diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-05-01 11:33:41 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-05-01 11:33:41 +0000 |
commit | 868d765569987bf1d96fe6287713c34d48399de1 (patch) | |
tree | 922bd9adb95e506a35f43860ec8c0c12ff91285c /sys/dev/pci | |
parent | 79b26fe32477c5b64df779580c85eef861f5dd31 (diff) |
do not write every byte of the firmware to the same address, increment
the register offset as well...
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_nx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_nx.c b/sys/dev/pci/if_nx.c index b9ec2d95f77..1968a8341f5 100644 --- a/sys/dev/pci/if_nx.c +++ b/sys/dev/pci/if_nx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nx.c,v 1.31 2007/05/01 02:20:13 reyk Exp $ */ +/* $OpenBSD: if_nx.c,v 1.32 2007/05/01 11:33:40 reyk Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -781,14 +781,14 @@ nxb_reset(struct nxb_softc *sc) data = (u_int32_t *)(fw + sizeof(fh)); for (i = 0; i < (bootsz / 4); i++) { nxb_write(sc, reg, *data); - addr += sizeof(u_int32_t); + reg += sizeof(u_int32_t); data++; } if (imagesz) { reg = NXFLASHMAP_FIRMWARE_0; for (i = 0; i < (imagesz / 4); i++) { nxb_write(sc, reg, *data); - addr += sizeof(u_int32_t); + reg += sizeof(u_int32_t); data++; } /* tell the bootloader to load the firmware image from RAM */ |