diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2009-05-25 03:49:43 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2009-05-25 03:49:43 +0000 |
| commit | 7a76e8a4899fcdbe6345b67fd472600970e8e799 (patch) | |
| tree | 04a9cf32b7f986cbd1d1eff13adc8aa924105fbb /sys/dev/msk | |
| parent | ab7df1e420251dd0f5b4f04f8e4eee0a37fd56c9 (diff) | |
Notes
Diffstat (limited to 'sys/dev/msk')
| -rw-r--r-- | sys/dev/msk/if_msk.c | 8 | ||||
| -rw-r--r-- | sys/dev/msk/if_mskreg.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index 942a7514f8b9..30cd67c4c60f 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -923,7 +923,7 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) & (IFF_PROMISC | IFF_ALLMULTI)) != 0) msk_rxfilter(sc_if); } else { - if (sc_if->msk_detach == 0) + if ((sc_if->msk_flags & MSK_FLAG_DETACH) == 0) msk_init_locked(sc_if); } } else { @@ -1645,7 +1645,7 @@ mskc_attach(device_t dev) if (sc->msk_num_port == 1 && pci_alloc_msi(dev, &msir) == 0) { if (msic == msir) { - sc->msk_msi = 1; + sc->msk_pflags |= MSK_FLAG_MSI; sc->msk_irq_spec = msic == 2 ? msk_irq_spec_msi2 : msk_irq_spec_msi; @@ -1771,7 +1771,7 @@ msk_detach(device_t dev) ifp = sc_if->msk_ifp; if (device_is_attached(dev)) { /* XXX */ - sc_if->msk_detach = 1; + sc_if->msk_flags |= MSK_FLAG_DETACH; msk_stop(sc_if); /* Can't hold locks while calling detach. */ MSK_IF_UNLOCK(sc_if); @@ -1855,7 +1855,7 @@ mskc_detach(device_t dev) sc->msk_intrhand[1] = NULL; } bus_release_resources(dev, sc->msk_irq_spec, sc->msk_irq); - if (sc->msk_msi) + if ((sc->msk_pflags & MSK_FLAG_MSI) != 0) pci_release_msi(dev); bus_release_resources(dev, sc->msk_res_spec, sc->msk_res); mtx_destroy(&sc->msk_mtx); diff --git a/sys/dev/msk/if_mskreg.h b/sys/dev/msk/if_mskreg.h index f3c75887a0b4..0416e0d3d8db 100644 --- a/sys/dev/msk/if_mskreg.h +++ b/sys/dev/msk/if_mskreg.h @@ -2343,7 +2343,6 @@ struct msk_softc { uint32_t msk_intrhwemask; uint32_t msk_pflags; int msk_clock; - int msk_msi; struct msk_if_softc *msk_if[2]; device_t msk_devs[2]; int msk_txqsize; @@ -2382,9 +2381,11 @@ struct msk_if_softc { int msk_phytype; int msk_phyaddr; uint32_t msk_flags; +#define MSK_FLAG_MSI 0x0001 #define MSK_FLAG_RAMBUF 0x0010 #define MSK_FLAG_NOJUMBO 0x0020 #define MSK_FLAG_SUSPEND 0x2000 +#define MSK_FLAG_DETACH 0x4000 #define MSK_FLAG_LINK 0x8000 struct callout msk_tick_ch; int msk_watchdog_timer; @@ -2397,7 +2398,6 @@ struct msk_if_softc { struct msk_hw_stats msk_stats; struct task msk_tx_task; int msk_if_flags; - int msk_detach; uint16_t msk_vtag; /* VLAN tag id. */ }; |
