diff options
-rw-r--r-- | sys/dev/usb/if_aue.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_auereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_axe.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_axereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_cuereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_kue.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_kuereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_rue.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_ruereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/if_udavreg.h | 1 |
12 files changed, 24 insertions, 32 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 96d3a836d8c9..15acc14b4c5c 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -175,8 +175,6 @@ Static const struct aue_type aue_devs[] = { }; #define aue_lookup(v, p) ((const struct aue_type *)usb_lookup(aue_devs, v, p)) -Static struct usb_qdat aue_qdat; - Static int aue_match(device_ptr_t); Static int aue_attach(device_ptr_t); Static int aue_detach(device_ptr_t); @@ -769,8 +767,8 @@ USB_ATTACH(aue) USB_ATTACH_ERROR_RETURN; } - aue_qdat.ifp = ifp; - aue_qdat.if_rxstart = aue_rxstart; + sc->aue_qdat.ifp = ifp; + sc->aue_qdat.if_rxstart = aue_rxstart; /* * Call MI attach routine. @@ -1036,7 +1034,7 @@ aue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) total_len -= (4 + ETHER_CRC_LEN); ifp->if_ipackets++; - m->m_pkthdr.rcvif = (struct ifnet *)&aue_qdat; + m->m_pkthdr.rcvif = (struct ifnet *)&sc->aue_qdat; m->m_pkthdr.len = m->m_len = total_len; /* Put the packet on the special USB input queue. */ diff --git a/sys/dev/usb/if_auereg.h b/sys/dev/usb/if_auereg.h index c297f2bcf68f..478ceced0c22 100644 --- a/sys/dev/usb/if_auereg.h +++ b/sys/dev/usb/if_auereg.h @@ -248,6 +248,7 @@ struct aue_softc { u_int16_t aue_flags; char aue_dying; struct timeval aue_rx_notice; + struct usb_qdat aue_qdat; }; #if 0 diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index c5dd47b972d2..d80cb6aa4613 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -113,8 +113,6 @@ Static struct axe_type axe_devs[] = { { 0, 0 } }; -Static struct usb_qdat axe_qdat; - Static int axe_match(device_ptr_t); Static int axe_attach(device_ptr_t); Static int axe_detach(device_ptr_t); @@ -508,8 +506,8 @@ USB_ATTACH(axe) ifp->if_baudrate = 10000000; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; - axe_qdat.ifp = ifp; - axe_qdat.if_rxstart = axe_rxstart; + sc->axe_qdat.ifp = ifp; + sc->axe_qdat.if_rxstart = axe_rxstart; if (mii_phy_probe(self, &sc->axe_miibus, axe_ifmedia_upd, axe_ifmedia_sts)) { @@ -711,7 +709,7 @@ axe_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) } ifp->if_ipackets++; - m->m_pkthdr.rcvif = (struct ifnet *)&axe_qdat; + m->m_pkthdr.rcvif = (struct ifnet *)&sc->axe_qdat; m->m_pkthdr.len = m->m_len = total_len; /* Put the packet on the special USB input queue. */ diff --git a/sys/dev/usb/if_axereg.h b/sys/dev/usb/if_axereg.h index c880785e1ccf..a9938f4a229c 100644 --- a/sys/dev/usb/if_axereg.h +++ b/sys/dev/usb/if_axereg.h @@ -168,6 +168,7 @@ struct axe_softc { unsigned char axe_ipgs[3]; unsigned char axe_phyaddrs[2]; struct timeval axe_rx_notice; + struct usb_qdat axe_qdat; }; #if 0 diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 4ffccea0fa72..86bef5dc11ad 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -91,8 +91,6 @@ Static struct cue_type cue_devs[] = { { 0, 0 } }; -Static struct usb_qdat cue_qdat; - Static int cue_match(device_ptr_t); Static int cue_attach(device_ptr_t); Static int cue_detach(device_ptr_t); @@ -525,8 +523,8 @@ USB_ATTACH(cue) ifp->if_baudrate = 10000000; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; - cue_qdat.ifp = ifp; - cue_qdat.if_rxstart = cue_rxstart; + sc->cue_qdat.ifp = ifp; + sc->cue_qdat.if_rxstart = cue_rxstart; /* * Call MI attach routine. @@ -741,7 +739,7 @@ cue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) ifp->if_ipackets++; m_adj(m, sizeof(u_int16_t)); - m->m_pkthdr.rcvif = (struct ifnet *)&cue_qdat; + m->m_pkthdr.rcvif = (struct ifnet *)&sc->cue_qdat; m->m_pkthdr.len = m->m_len = total_len; /* Put the packet on the special USB input queue. */ diff --git a/sys/dev/usb/if_cuereg.h b/sys/dev/usb/if_cuereg.h index 4182aee9b38c..beaf1d5a39d1 100644 --- a/sys/dev/usb/if_cuereg.h +++ b/sys/dev/usb/if_cuereg.h @@ -182,6 +182,7 @@ struct cue_softc { #endif char cue_dying; struct timeval cue_rx_notice; + struct usb_qdat cue_qdat; }; #if 0 diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 7050ae831ad8..cf864c30d272 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -125,8 +125,6 @@ Static struct kue_type kue_devs[] = { { 0, 0 } }; -Static struct usb_qdat kue_qdat; - Static int kue_match(device_ptr_t); Static int kue_attach(device_ptr_t); Static int kue_detach(device_ptr_t); @@ -491,8 +489,8 @@ USB_ATTACH(kue) ifp->if_baudrate = 10000000; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; - kue_qdat.ifp = ifp; - kue_qdat.if_rxstart = kue_rxstart; + sc->kue_qdat.ifp = ifp; + sc->kue_qdat.if_rxstart = kue_rxstart; /* * Call MI attach routine. @@ -712,7 +710,7 @@ Static void kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, } ifp->if_ipackets++; - m->m_pkthdr.rcvif = (struct ifnet *)&kue_qdat; + m->m_pkthdr.rcvif = (struct ifnet *)&sc->kue_qdat; m->m_pkthdr.len = m->m_len = total_len; /* Put the packet on the special USB input queue. */ diff --git a/sys/dev/usb/if_kuereg.h b/sys/dev/usb/if_kuereg.h index 24a990c83590..4fa829516fb9 100644 --- a/sys/dev/usb/if_kuereg.h +++ b/sys/dev/usb/if_kuereg.h @@ -174,6 +174,7 @@ struct kue_softc { #endif char kue_dying; struct timeval kue_rx_notice; + struct usb_qdat kue_qdat; }; #if 0 diff --git a/sys/dev/usb/if_rue.c b/sys/dev/usb/if_rue.c index ab05653ea661..775dab7be218 100644 --- a/sys/dev/usb/if_rue.c +++ b/sys/dev/usb/if_rue.c @@ -127,8 +127,6 @@ Static struct rue_type rue_devs[] = { { 0, 0 } }; -Static struct usb_qdat rue_qdat; - Static int rue_match(device_ptr_t); Static int rue_attach(device_ptr_t); Static int rue_detach(device_ptr_t); @@ -704,8 +702,8 @@ USB_ATTACH(rue) goto error1; } - rue_qdat.ifp = ifp; - rue_qdat.if_rxstart = rue_rxstart; + sc->rue_qdat.ifp = ifp; + sc->rue_qdat.if_rxstart = rue_rxstart; /* Call MI attach routine */ #if __FreeBSD_version >= 500000 @@ -975,7 +973,7 @@ rue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) total_len -= ETHER_CRC_LEN; ifp->if_ipackets++; - m->m_pkthdr.rcvif = (struct ifnet *)&rue_qdat; + m->m_pkthdr.rcvif = (struct ifnet *)&sc->rue_qdat; m->m_pkthdr.len = m->m_len = total_len; /* Put the packet on the special USB input queue. */ diff --git a/sys/dev/usb/if_ruereg.h b/sys/dev/usb/if_ruereg.h index a12154fcfcff..f3818283ac0c 100644 --- a/sys/dev/usb/if_ruereg.h +++ b/sys/dev/usb/if_ruereg.h @@ -228,6 +228,7 @@ struct rue_softc { #endif char rue_dying; struct timeval rue_rx_notice; + struct usb_qdat rue_qdat; }; #if defined(__FreeBSD__) diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 51aa1fc647f0..cf8f4753989f 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -151,10 +151,6 @@ USB_DECLARE_DRIVER(udav); #endif #if defined(__FreeBSD__) -Static struct usb_qdat udav_qdat; -#endif - -#if defined(__FreeBSD__) Static int udav_match(device_ptr_t); Static int udav_attach(device_ptr_t); Static int udav_detach(device_ptr_t); @@ -452,8 +448,8 @@ USB_ATTACH(udav) USB_ATTACH_ERROR_RETURN; } - udav_qdat.ifp = ifp; - udav_qdat.if_rxstart = udav_rxstart; + sc->sc_qdat.ifp = ifp; + sc->sc_qdat.if_rxstart = udav_rxstart; /* * Call MI attach routine. @@ -1487,7 +1483,7 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #if defined(__NetBSD__) m->m_pkthdr.rcvif = ifp; #elif defined(__FreeBSD__) - m->m_pkthdr.rcvif = (struct ifnet *)&udav_qdat; + m->m_pkthdr.rcvif = (struct ifnet *)&sc->sc_qdat; #endif #if defined(__NetBSD__) diff --git a/sys/dev/usb/if_udavreg.h b/sys/dev/usb/if_udavreg.h index 4499b3ee4153..7680422a65e3 100644 --- a/sys/dev/usb/if_udavreg.h +++ b/sys/dev/usb/if_udavreg.h @@ -210,6 +210,7 @@ struct udav_softc { #if defined(__FreeBSD__) device_t sc_miibus ; struct mtx sc_mtx ; + struct usb_qdat sc_qdat; #elif defined(__NetBSD__) struct ethercom sc_ec; /* ethernet common */ struct mii_data sc_mii; |