diff options
-rw-r--r-- | sys/dev/usb/if_aue.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/if_auereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_cuereg.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/if_kue.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_kuereg.h | 1 |
6 files changed, 16 insertions, 7 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 1b72df5..1608aea 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -653,6 +653,9 @@ USB_ATTACH(aue) struct aue_type *t; bzero(sc, sizeof(struct aue_softc)); + + usbd_devinfo(uaa->device, 0, devinfo); + sc->aue_iface = uaa->iface; sc->aue_udev = uaa->device; sc->aue_unit = device_get_unit(self); @@ -673,7 +676,7 @@ USB_ATTACH(aue) t++; } - id = usbd_get_interface_descriptor(uaa->iface); + id = usbd_get_interface_descriptor(sc->aue_iface); usbd_devinfo(uaa->device, 0, devinfo); device_set_desc_copy(self, devinfo); @@ -980,8 +983,9 @@ aue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) AUE_UNLOCK(sc); return; } - printf("aue%d: usb error on rx: %s\n", sc->aue_unit, - usbd_errstr(status)); + if (usbd_ratecheck(&sc->aue_rx_notice)) + printf("aue%d: usb error on rx: %s\n", sc->aue_unit, + usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->aue_ep[AUE_ENDPT_RX]); goto done; diff --git a/sys/dev/usb/if_auereg.h b/sys/dev/usb/if_auereg.h index 77bed8e..59914ec 100644 --- a/sys/dev/usb/if_auereg.h +++ b/sys/dev/usb/if_auereg.h @@ -251,6 +251,7 @@ struct aue_softc { struct callout_handle aue_stat_ch; struct mtx aue_mtx; char aue_dying; + struct timeval aue_rx_notice; }; #if 0 diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index bda1af4..cacf21e 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -708,8 +708,9 @@ cue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) CUE_UNLOCK(sc); return; } - printf("cue%d: usb error on rx: %s\n", sc->cue_unit, - usbd_errstr(status)); + if (usbd_ratecheck(&sc->cue_rx_notice)) + printf("cue%d: usb error on rx: %s\n", sc->cue_unit, + usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->cue_ep[CUE_ENDPT_RX]); goto done; diff --git a/sys/dev/usb/if_cuereg.h b/sys/dev/usb/if_cuereg.h index b74ca04..b875983 100644 --- a/sys/dev/usb/if_cuereg.h +++ b/sys/dev/usb/if_cuereg.h @@ -180,6 +180,7 @@ struct cue_softc { struct callout_handle cue_stat_ch; struct mtx cue_mtx; char cue_dying; + struct timeval cue_rx_notice; }; #if 0 diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index d061e04..4764fe6 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -671,8 +671,9 @@ Static void kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, KUE_UNLOCK(sc); return; } - printf("kue%d: usb error on rx: %s\n", sc->kue_unit, - usbd_errstr(status)); + if (usbd_ratecheck(&sc->kue_rx_notice)) + printf("kue%d: usb error on rx: %s\n", sc->kue_unit, + usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->kue_ep[KUE_ENDPT_RX]); goto done; diff --git a/sys/dev/usb/if_kuereg.h b/sys/dev/usb/if_kuereg.h index 07cdfce..0654ab6 100644 --- a/sys/dev/usb/if_kuereg.h +++ b/sys/dev/usb/if_kuereg.h @@ -171,6 +171,7 @@ struct kue_softc { struct kue_cdata kue_cdata; struct mtx kue_mtx; char kue_dying; + struct timeval kue_rx_notice; }; #if 0 |