summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_rl.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2007-07-24 01:24:03 +0000
committeryongari <yongari@FreeBSD.org>2007-07-24 01:24:03 +0000
commitf01a448638ad65647e242aa1a41bc7de44034338 (patch)
treefa0f80907c2a5c90d3367bd3387f64e2ac154b4d /sys/pci/if_rl.c
parent1ad992a983743615205a66251a98a9f2d7b25ac3 (diff)
downloadFreeBSD-src-f01a448638ad65647e242aa1a41bc7de44034338.zip
FreeBSD-src-f01a448638ad65647e242aa1a41bc7de44034338.tar.gz
Add MSI support.
Ever since switching to adaptive polling re(4) occasionally spews watchdog timeouts on systems with MSI capability. This change is minimal one for supporting MSI and re(4) also needs MSIX support for RTL8111C in future. Because softc structure of re(4) is shared with rl(4), rl(4) was touched to use the modified softc. Reported by: cnst Tested by: cnst Approved by: re (kensmith)
Diffstat (limited to 'sys/pci/if_rl.c')
-rw-r--r--sys/pci/if_rl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index ce2f1bb..303adb3 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -828,10 +828,10 @@ rl_attach(device_t dev)
/* Allocate interrupt */
rid = 0;
- sc->rl_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+ sc->rl_irq[0] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
RF_SHAREABLE | RF_ACTIVE);
- if (sc->rl_irq == NULL) {
+ if (sc->rl_irq[0] == NULL) {
device_printf(dev, "couldn't map interrupt\n");
error = ENXIO;
goto fail;
@@ -971,8 +971,8 @@ rl_attach(device_t dev)
ether_ifattach(ifp, eaddr);
/* Hook interrupt last to avoid having to lock softc */
- error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET | INTR_MPSAFE,
- NULL, rl_intr, sc, &sc->rl_intrhand);
+ error = bus_setup_intr(dev, sc->rl_irq[0], INTR_TYPE_NET | INTR_MPSAFE,
+ NULL, rl_intr, sc, &sc->rl_intrhand[0]);
if (error) {
device_printf(sc->rl_dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
@@ -1022,10 +1022,10 @@ rl_detach(device_t dev)
device_delete_child(dev, sc->rl_miibus);
bus_generic_detach(dev);
- if (sc->rl_intrhand)
- bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand);
- if (sc->rl_irq)
- bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq);
+ if (sc->rl_intrhand[0])
+ bus_teardown_intr(dev, sc->rl_irq[0], sc->rl_intrhand[0]);
+ if (sc->rl_irq[0])
+ bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq[0]);
if (sc->rl_res)
bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);
OpenPOWER on IntegriCloud