diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-11-01 23:56:46 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-11-01 23:56:46 +0000 |
commit | d454f22bf366c405d02a6025b65daf8e87e68107 (patch) | |
tree | 22f3f029c263935aee75d45b31b23c3b428a8e3c /sys/pci | |
parent | cf4f3816fdb38049598c53e62b6c94b42629f2b7 (diff) | |
download | FreeBSD-src-d454f22bf366c405d02a6025b65daf8e87e68107.zip FreeBSD-src-d454f22bf366c405d02a6025b65daf8e87e68107.tar.gz |
Fix 8-bit EEPROM breakage: compare against 0x8129, not 8129.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_rl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index d1448be..2657ddf 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -881,7 +881,7 @@ static int rl_attach(dev) rl_intr, sc, &sc->rl_intrhand); if (error) { - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq); bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); printf("rl%d: couldn't set up irq\n", unit); goto fail; @@ -896,7 +896,7 @@ static int rl_attach(dev) rl_reset(sc); sc->rl_eecmd_read = RL_EECMD_READ_6BIT; rl_read_eeprom(sc, (caddr_t)&rl_did, 0, 1, 0); - if (rl_did != 8129) + if (rl_did != 0x8129) sc->rl_eecmd_read = RL_EECMD_READ_8BIT; /* @@ -927,7 +927,7 @@ static int rl_attach(dev) else { printf("rl%d: unknown device ID: %x\n", unit, rl_did); bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq); bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); error = ENXIO; goto fail; @@ -939,7 +939,7 @@ static int rl_attach(dev) if (sc->rl_cdata.rl_rx_buf == NULL) { printf("rl%d: no memory for list buffers!\n", unit); bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq); bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); error = ENXIO; goto fail; @@ -954,7 +954,7 @@ static int rl_attach(dev) rl_ifmedia_upd, rl_ifmedia_sts)) { printf("rl%d: MII without any phy!\n", sc->rl_unit); bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq); bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); free(sc->rl_cdata.rl_rx_buf, M_DEVBUF); error = ENXIO; @@ -1005,7 +1005,7 @@ static int rl_detach(dev) device_delete_child(dev, sc->rl_miibus); bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq); bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); contigfree(sc->rl_cdata.rl_rx_buf, RL_RXBUFLEN + 32, M_DEVBUF); |