diff options
author | imp <imp@FreeBSD.org> | 2009-04-18 03:10:28 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-04-18 03:10:28 +0000 |
commit | fa43940cbb76d0a72cbba1fd434ed749293b9b0a (patch) | |
tree | 3072d3eb02a44a13a41b884b04a608d1fdf0104f /sys/dev/ed/if_ed_pci.c | |
parent | f2f5ef69b6e29713bde02e719cb499342097d9c2 (diff) | |
download | FreeBSD-src-fa43940cbb76d0a72cbba1fd434ed749293b9b0a.zip FreeBSD-src-fa43940cbb76d0a72cbba1fd434ed749293b9b0a.tar.gz |
Establish the interrupt handler AFTER we successfully attach. We need
to do this in case we have a shared interrupt that fires during the
attach process....
Diffstat (limited to 'sys/dev/ed/if_ed_pci.c')
-rw-r--r-- | sys/dev/ed/if_ed_pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c index 1b2e17d..21ddb74 100644 --- a/sys/dev/ed/if_ed_pci.c +++ b/sys/dev/ed/if_ed_pci.c @@ -110,15 +110,15 @@ ed_pci_attach(device_t dev) ed_release_resources(dev); return (error); } - error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, - NULL, edintr, sc, &sc->irq_handle); + if (sc->sc_media_ioctl == NULL) + ed_gen_ifmedia_init(sc); + error = ed_attach(dev); if (error) { ed_release_resources(dev); return (error); } - if (sc->sc_media_ioctl == NULL) - ed_gen_ifmedia_init(sc); - error = ed_attach(dev); + error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, + NULL, edintr, sc, &sc->irq_handle); if (error) ed_release_resources(dev); return (error); |