Deleted Added
full compact
if_ural.c (201028) if_ural.c (206358)
1/* $FreeBSD: head/sys/dev/usb/wlan/if_ural.c 201028 2009-12-26 19:03:28Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/wlan/if_ural.c 206358 2010-04-07 15:29:13Z rpaulo $ */
2
3/*-
4 * Copyright (c) 2005, 2006
5 * Damien Bergamini <damien.bergamini@free.fr>
6 *
7 * Copyright (c) 2006, 2008
8 * Hans Petter Selasky <hselasky@FreeBSD.org>
9 *

--- 6 unchanged lines hidden (view full) ---

16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 */
22
23#include <sys/cdefs.h>
2
3/*-
4 * Copyright (c) 2005, 2006
5 * Damien Bergamini <damien.bergamini@free.fr>
6 *
7 * Copyright (c) 2006, 2008
8 * Hans Petter Selasky <hselasky@FreeBSD.org>
9 *

--- 6 unchanged lines hidden (view full) ---

16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 */
22
23#include <sys/cdefs.h>
24__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_ural.c 201028 2009-12-26 19:03:28Z thompsa $");
24__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_ural.c 206358 2010-04-07 15:29:13Z rpaulo $");
25
26/*-
27 * Ralink Technology RT2500USB chipset driver
28 * http://www.ralinktech.com/
29 */
30
31#include <sys/param.h>
32#include <sys/sockio.h>

--- 28 unchanged lines hidden (view full) ---

61#include <netinet/in_var.h>
62#include <netinet/if_ether.h>
63#include <netinet/ip.h>
64#endif
65
66#include <net80211/ieee80211_var.h>
67#include <net80211/ieee80211_regdomain.h>
68#include <net80211/ieee80211_radiotap.h>
25
26/*-
27 * Ralink Technology RT2500USB chipset driver
28 * http://www.ralinktech.com/
29 */
30
31#include <sys/param.h>
32#include <sys/sockio.h>

--- 28 unchanged lines hidden (view full) ---

61#include <netinet/in_var.h>
62#include <netinet/if_ether.h>
63#include <netinet/ip.h>
64#endif
65
66#include <net80211/ieee80211_var.h>
67#include <net80211/ieee80211_regdomain.h>
68#include <net80211/ieee80211_radiotap.h>
69#include <net80211/ieee80211_amrr.h>
69#include <net80211/ieee80211_ratectl.h>
70
71#include <dev/usb/usb.h>
72#include <dev/usb/usbdi.h>
73#include "usbdevs.h"
74
75#define USB_DEBUG_VAR ural_debug
76#include <dev/usb/usb_debug.h>
77

--- 79 unchanged lines hidden (view full) ---

157static void ural_read_multi(struct ural_softc *, uint16_t, void *,
158 int);
159static void ural_write(struct ural_softc *, uint16_t, uint16_t);
160static void ural_write_multi(struct ural_softc *, uint16_t, void *,
161 int) __unused;
162static void ural_bbp_write(struct ural_softc *, uint8_t, uint8_t);
163static uint8_t ural_bbp_read(struct ural_softc *, uint8_t);
164static void ural_rf_write(struct ural_softc *, uint8_t, uint32_t);
70
71#include <dev/usb/usb.h>
72#include <dev/usb/usbdi.h>
73#include "usbdevs.h"
74
75#define USB_DEBUG_VAR ural_debug
76#include <dev/usb/usb_debug.h>
77

--- 79 unchanged lines hidden (view full) ---

157static void ural_read_multi(struct ural_softc *, uint16_t, void *,
158 int);
159static void ural_write(struct ural_softc *, uint16_t, uint16_t);
160static void ural_write_multi(struct ural_softc *, uint16_t, void *,
161 int) __unused;
162static void ural_bbp_write(struct ural_softc *, uint8_t, uint8_t);
163static uint8_t ural_bbp_read(struct ural_softc *, uint8_t);
164static void ural_rf_write(struct ural_softc *, uint8_t, uint32_t);
165static struct ieee80211_node *ural_node_alloc(struct ieee80211vap *,
166 const uint8_t mac[IEEE80211_ADDR_LEN]);
167static void ural_newassoc(struct ieee80211_node *, int);
168static void ural_scan_start(struct ieee80211com *);
169static void ural_scan_end(struct ieee80211com *);
170static void ural_set_channel(struct ieee80211com *);
171static void ural_set_chan(struct ural_softc *,
172 struct ieee80211_channel *);
173static void ural_disable_rf_tune(struct ural_softc *);
174static void ural_enable_tsf_sync(struct ural_softc *);
175static void ural_enable_tsf(struct ural_softc *);

--- 10 unchanged lines hidden (view full) ---

186static int ural_bbp_init(struct ural_softc *);
187static void ural_set_txantenna(struct ural_softc *, int);
188static void ural_set_rxantenna(struct ural_softc *, int);
189static void ural_init_locked(struct ural_softc *);
190static void ural_init(void *);
191static void ural_stop(struct ural_softc *);
192static int ural_raw_xmit(struct ieee80211_node *, struct mbuf *,
193 const struct ieee80211_bpf_params *);
165static void ural_scan_start(struct ieee80211com *);
166static void ural_scan_end(struct ieee80211com *);
167static void ural_set_channel(struct ieee80211com *);
168static void ural_set_chan(struct ural_softc *,
169 struct ieee80211_channel *);
170static void ural_disable_rf_tune(struct ural_softc *);
171static void ural_enable_tsf_sync(struct ural_softc *);
172static void ural_enable_tsf(struct ural_softc *);

--- 10 unchanged lines hidden (view full) ---

183static int ural_bbp_init(struct ural_softc *);
184static void ural_set_txantenna(struct ural_softc *, int);
185static void ural_set_rxantenna(struct ural_softc *, int);
186static void ural_init_locked(struct ural_softc *);
187static void ural_init(void *);
188static void ural_stop(struct ural_softc *);
189static int ural_raw_xmit(struct ieee80211_node *, struct mbuf *,
190 const struct ieee80211_bpf_params *);
194static void ural_amrr_start(struct ural_softc *,
191static void ural_ratectl_start(struct ural_softc *,
195 struct ieee80211_node *);
192 struct ieee80211_node *);
196static void ural_amrr_timeout(void *);
197static void ural_amrr_task(void *, int);
193static void ural_ratectl_timeout(void *);
194static void ural_ratectl_task(void *, int);
198static int ural_pause(struct ural_softc *sc, int timeout);
199
200/*
201 * Default values for MAC registers; values taken from the reference driver.
202 */
203static const struct {
204 uint16_t reg;
205 uint16_t val;

--- 192 unchanged lines hidden (view full) ---

398 .size = sizeof(struct ural_softc),
399};
400
401static devclass_t ural_devclass;
402
403DRIVER_MODULE(ural, uhub, ural_driver, ural_devclass, NULL, 0);
404MODULE_DEPEND(ural, usb, 1, 1, 1);
405MODULE_DEPEND(ural, wlan, 1, 1, 1);
195static int ural_pause(struct ural_softc *sc, int timeout);
196
197/*
198 * Default values for MAC registers; values taken from the reference driver.
199 */
200static const struct {
201 uint16_t reg;
202 uint16_t val;

--- 192 unchanged lines hidden (view full) ---

395 .size = sizeof(struct ural_softc),
396};
397
398static devclass_t ural_devclass;
399
400DRIVER_MODULE(ural, uhub, ural_driver, ural_devclass, NULL, 0);
401MODULE_DEPEND(ural, usb, 1, 1, 1);
402MODULE_DEPEND(ural, wlan, 1, 1, 1);
406MODULE_DEPEND(ural, wlan_amrr, 1, 1, 1);
407
408static int
409ural_match(device_t self)
410{
411 struct usb_attach_arg *uaa = device_get_ivars(self);
412
413 if (uaa->usb_mode != USB_MODE_HOST)
414 return (ENXIO);

--- 80 unchanged lines hidden (view full) ---

495 setbit(&bands, IEEE80211_MODE_11B);
496 setbit(&bands, IEEE80211_MODE_11G);
497 if (sc->rf_rev == RAL_RF_5222)
498 setbit(&bands, IEEE80211_MODE_11A);
499 ieee80211_init_channels(ic, NULL, &bands);
500
501 ieee80211_ifattach(ic, sc->sc_bssid);
502 ic->ic_update_promisc = ural_update_promisc;
403
404static int
405ural_match(device_t self)
406{
407 struct usb_attach_arg *uaa = device_get_ivars(self);
408
409 if (uaa->usb_mode != USB_MODE_HOST)
410 return (ENXIO);

--- 80 unchanged lines hidden (view full) ---

491 setbit(&bands, IEEE80211_MODE_11B);
492 setbit(&bands, IEEE80211_MODE_11G);
493 if (sc->rf_rev == RAL_RF_5222)
494 setbit(&bands, IEEE80211_MODE_11A);
495 ieee80211_init_channels(ic, NULL, &bands);
496
497 ieee80211_ifattach(ic, sc->sc_bssid);
498 ic->ic_update_promisc = ural_update_promisc;
503 ic->ic_newassoc = ural_newassoc;
504 ic->ic_raw_xmit = ural_raw_xmit;
499 ic->ic_raw_xmit = ural_raw_xmit;
505 ic->ic_node_alloc = ural_node_alloc;
506 ic->ic_scan_start = ural_scan_start;
507 ic->ic_scan_end = ural_scan_end;
508 ic->ic_set_channel = ural_set_channel;
509
510 ic->ic_vap_create = ural_vap_create;
511 ic->ic_vap_delete = ural_vap_delete;
512
513 ieee80211_radiotap_attach(ic,

--- 78 unchanged lines hidden (view full) ---

592 /* enable s/w bmiss handling for sta mode */
593 ieee80211_vap_setup(ic, vap, name, unit, opmode,
594 flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
595
596 /* override state transition machine */
597 uvp->newstate = vap->iv_newstate;
598 vap->iv_newstate = ural_newstate;
599
500 ic->ic_scan_start = ural_scan_start;
501 ic->ic_scan_end = ural_scan_end;
502 ic->ic_set_channel = ural_set_channel;
503
504 ic->ic_vap_create = ural_vap_create;
505 ic->ic_vap_delete = ural_vap_delete;
506
507 ieee80211_radiotap_attach(ic,

--- 78 unchanged lines hidden (view full) ---

586 /* enable s/w bmiss handling for sta mode */
587 ieee80211_vap_setup(ic, vap, name, unit, opmode,
588 flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
589
590 /* override state transition machine */
591 uvp->newstate = vap->iv_newstate;
592 vap->iv_newstate = ural_newstate;
593
600 usb_callout_init_mtx(&uvp->amrr_ch, &sc->sc_mtx, 0);
601 TASK_INIT(&uvp->amrr_task, 0, ural_amrr_task, uvp);
602 ieee80211_amrr_init(&uvp->amrr, vap,
603 IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD,
604 IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD,
605 1000 /* 1 sec */);
594 usb_callout_init_mtx(&uvp->ratectl_ch, &sc->sc_mtx, 0);
595 TASK_INIT(&uvp->ratectl_task, 0, ural_ratectl_task, uvp);
596 ieee80211_ratectl_init(vap);
597 ieee80211_ratectl_setinterval(vap, 1000 /* 1 sec */);
606
607 /* complete setup */
608 ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status);
609 ic->ic_opmode = opmode;
610 return vap;
611}
612
613static void
614ural_vap_delete(struct ieee80211vap *vap)
615{
616 struct ural_vap *uvp = URAL_VAP(vap);
617 struct ieee80211com *ic = vap->iv_ic;
618
598
599 /* complete setup */
600 ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status);
601 ic->ic_opmode = opmode;
602 return vap;
603}
604
605static void
606ural_vap_delete(struct ieee80211vap *vap)
607{
608 struct ural_vap *uvp = URAL_VAP(vap);
609 struct ieee80211com *ic = vap->iv_ic;
610
619 usb_callout_drain(&uvp->amrr_ch);
620 ieee80211_draintask(ic, &uvp->amrr_task);
621 ieee80211_amrr_cleanup(&uvp->amrr);
611 usb_callout_drain(&uvp->ratectl_ch);
612 ieee80211_draintask(ic, &uvp->ratectl_task);
613 ieee80211_ratectl_deinit(vap);
622 ieee80211_vap_detach(vap);
623 free(uvp, M_80211_VAP);
624}
625
626static void
627ural_tx_free(struct ural_tx_data *data, int txerr)
628{
629 struct ural_softc *sc = data->sc;

--- 68 unchanged lines hidden (view full) ---

698 struct mbuf *m;
699
700 DPRINTF("%s -> %s\n",
701 ieee80211_state_name[vap->iv_state],
702 ieee80211_state_name[nstate]);
703
704 IEEE80211_UNLOCK(ic);
705 RAL_LOCK(sc);
614 ieee80211_vap_detach(vap);
615 free(uvp, M_80211_VAP);
616}
617
618static void
619ural_tx_free(struct ural_tx_data *data, int txerr)
620{
621 struct ural_softc *sc = data->sc;

--- 68 unchanged lines hidden (view full) ---

690 struct mbuf *m;
691
692 DPRINTF("%s -> %s\n",
693 ieee80211_state_name[vap->iv_state],
694 ieee80211_state_name[nstate]);
695
696 IEEE80211_UNLOCK(ic);
697 RAL_LOCK(sc);
706 usb_callout_stop(&uvp->amrr_ch);
698 usb_callout_stop(&uvp->ratectl_ch);
707
708 switch (nstate) {
709 case IEEE80211_S_INIT:
710 if (vap->iv_state == IEEE80211_S_RUN) {
711 /* abort TSF synchronization */
712 ural_write(sc, RAL_TXRX_CSR19, 0);
713
714 /* force tx led to stop blinking */

--- 39 unchanged lines hidden (view full) ---

754 ural_enable_tsf_sync(sc);
755 else
756 ural_enable_tsf(sc);
757
758 /* enable automatic rate adaptation */
759 /* XXX should use ic_bsschan but not valid until after newstate call below */
760 tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
761 if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
699
700 switch (nstate) {
701 case IEEE80211_S_INIT:
702 if (vap->iv_state == IEEE80211_S_RUN) {
703 /* abort TSF synchronization */
704 ural_write(sc, RAL_TXRX_CSR19, 0);
705
706 /* force tx led to stop blinking */

--- 39 unchanged lines hidden (view full) ---

746 ural_enable_tsf_sync(sc);
747 else
748 ural_enable_tsf(sc);
749
750 /* enable automatic rate adaptation */
751 /* XXX should use ic_bsschan but not valid until after newstate call below */
752 tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
753 if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE)
762 ural_amrr_start(sc, ni);
754 ural_ratectl_start(sc, ni);
763
764 break;
765
766 default:
767 break;
768 }
769 RAL_UNLOCK(sc);
770 IEEE80211_LOCK(ic);

--- 808 unchanged lines hidden (view full) ---

1579 ural_write(sc, RAL_PHY_CSR10, tmp >> 16);
1580
1581 /* remember last written value in sc */
1582 sc->rf_regs[reg] = val;
1583
1584 DPRINTFN(15, "RF R[%u] <- 0x%05x\n", reg & 0x3, val & 0xfffff);
1585}
1586
755
756 break;
757
758 default:
759 break;
760 }
761 RAL_UNLOCK(sc);
762 IEEE80211_LOCK(ic);

--- 808 unchanged lines hidden (view full) ---

1571 ural_write(sc, RAL_PHY_CSR10, tmp >> 16);
1572
1573 /* remember last written value in sc */
1574 sc->rf_regs[reg] = val;
1575
1576 DPRINTFN(15, "RF R[%u] <- 0x%05x\n", reg & 0x3, val & 0xfffff);
1577}
1578
1587/* ARGUSED */
1588static struct ieee80211_node *
1589ural_node_alloc(struct ieee80211vap *vap __unused,
1590 const uint8_t mac[IEEE80211_ADDR_LEN] __unused)
1591{
1592 struct ural_node *un;
1593
1594 un = malloc(sizeof(struct ural_node), M_80211_NODE, M_NOWAIT | M_ZERO);
1595 return un != NULL ? &un->ni : NULL;
1596}
1597
1598static void
1579static void
1599ural_newassoc(struct ieee80211_node *ni, int isnew)
1600{
1601 struct ieee80211vap *vap = ni->ni_vap;
1602
1603 ieee80211_amrr_node_init(&URAL_VAP(vap)->amrr, &URAL_NODE(ni)->amn, ni);
1604}
1605
1606static void
1607ural_scan_start(struct ieee80211com *ic)
1608{
1609 struct ifnet *ifp = ic->ic_ifp;
1610 struct ural_softc *sc = ifp->if_softc;
1611
1612 RAL_LOCK(sc);
1613 ural_write(sc, RAL_TXRX_CSR19, 0);
1614 ural_set_bssid(sc, ifp->if_broadcastaddr);

--- 611 unchanged lines hidden (view full) ---

2226bad:
2227 ifp->if_oerrors++;
2228 RAL_UNLOCK(sc);
2229 ieee80211_free_node(ni);
2230 return EIO; /* XXX */
2231}
2232
2233static void
1580ural_scan_start(struct ieee80211com *ic)
1581{
1582 struct ifnet *ifp = ic->ic_ifp;
1583 struct ural_softc *sc = ifp->if_softc;
1584
1585 RAL_LOCK(sc);
1586 ural_write(sc, RAL_TXRX_CSR19, 0);
1587 ural_set_bssid(sc, ifp->if_broadcastaddr);

--- 611 unchanged lines hidden (view full) ---

2199bad:
2200 ifp->if_oerrors++;
2201 RAL_UNLOCK(sc);
2202 ieee80211_free_node(ni);
2203 return EIO; /* XXX */
2204}
2205
2206static void
2234ural_amrr_start(struct ural_softc *sc, struct ieee80211_node *ni)
2207ural_ratectl_start(struct ural_softc *sc, struct ieee80211_node *ni)
2235{
2236 struct ieee80211vap *vap = ni->ni_vap;
2237 struct ural_vap *uvp = URAL_VAP(vap);
2238
2239 /* clear statistic registers (STA_CSR0 to STA_CSR10) */
2240 ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof sc->sta);
2241
2208{
2209 struct ieee80211vap *vap = ni->ni_vap;
2210 struct ural_vap *uvp = URAL_VAP(vap);
2211
2212 /* clear statistic registers (STA_CSR0 to STA_CSR10) */
2213 ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof sc->sta);
2214
2242 ieee80211_amrr_node_init(&uvp->amrr, &URAL_NODE(ni)->amn, ni);
2215 ieee80211_ratectl_node_init(ni);
2243
2216
2244 usb_callout_reset(&uvp->amrr_ch, hz, ural_amrr_timeout, uvp);
2217 usb_callout_reset(&uvp->ratectl_ch, hz, ural_ratectl_timeout, uvp);
2245}
2246
2247static void
2218}
2219
2220static void
2248ural_amrr_timeout(void *arg)
2221ural_ratectl_timeout(void *arg)
2249{
2250 struct ural_vap *uvp = arg;
2251 struct ieee80211vap *vap = &uvp->vap;
2252 struct ieee80211com *ic = vap->iv_ic;
2253
2222{
2223 struct ural_vap *uvp = arg;
2224 struct ieee80211vap *vap = &uvp->vap;
2225 struct ieee80211com *ic = vap->iv_ic;
2226
2254 ieee80211_runtask(ic, &uvp->amrr_task);
2227 ieee80211_runtask(ic, &uvp->ratectl_task);
2255}
2256
2257static void
2228}
2229
2230static void
2258ural_amrr_task(void *arg, int pending)
2231ural_ratectl_task(void *arg, int pending)
2259{
2260 struct ural_vap *uvp = arg;
2261 struct ieee80211vap *vap = &uvp->vap;
2262 struct ieee80211com *ic = vap->iv_ic;
2263 struct ifnet *ifp = ic->ic_ifp;
2264 struct ural_softc *sc = ifp->if_softc;
2265 struct ieee80211_node *ni = vap->iv_bss;
2266 int ok, fail;
2232{
2233 struct ural_vap *uvp = arg;
2234 struct ieee80211vap *vap = &uvp->vap;
2235 struct ieee80211com *ic = vap->iv_ic;
2236 struct ifnet *ifp = ic->ic_ifp;
2237 struct ural_softc *sc = ifp->if_softc;
2238 struct ieee80211_node *ni = vap->iv_bss;
2239 int ok, fail;
2240 int sum, retrycnt;
2267
2268 RAL_LOCK(sc);
2269 /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */
2270 ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof(sc->sta));
2271
2272 ok = sc->sta[7] + /* TX ok w/o retry */
2273 sc->sta[8]; /* TX ok w/ retry */
2274 fail = sc->sta[9]; /* TX retry-fail count */
2241
2242 RAL_LOCK(sc);
2243 /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */
2244 ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof(sc->sta));
2245
2246 ok = sc->sta[7] + /* TX ok w/o retry */
2247 sc->sta[8]; /* TX ok w/ retry */
2248 fail = sc->sta[9]; /* TX retry-fail count */
2249 sum = ok+fail;
2250 retrycnt = sc->sta[8] + fail;
2275
2251
2276 ieee80211_amrr_tx_update(&URAL_NODE(ni)->amn,
2277 ok+fail, ok, sc->sta[8] + fail);
2278 (void) ieee80211_amrr_choose(ni, &URAL_NODE(ni)->amn);
2252 ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt);
2253 (void) ieee80211_ratectl_rate(ni, NULL, 0);
2279
2280 ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */
2281
2254
2255 ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */
2256
2282 usb_callout_reset(&uvp->amrr_ch, hz, ural_amrr_timeout, uvp);
2257 usb_callout_reset(&uvp->ratectl_ch, hz, ural_ratectl_timeout, uvp);
2283 RAL_UNLOCK(sc);
2284}
2285
2286static int
2287ural_pause(struct ural_softc *sc, int timeout)
2288{
2289
2290 usb_pause_mtx(&sc->sc_mtx, timeout);
2291 return (0);
2292}
2258 RAL_UNLOCK(sc);
2259}
2260
2261static int
2262ural_pause(struct ural_softc *sc, int timeout)
2263{
2264
2265 usb_pause_mtx(&sc->sc_mtx, timeout);
2266 return (0);
2267}