MFNetBSD: if_aue.c (1.26), if_auereg.h (1.6), if_cue.c (1.10),
if_cuereg.h (1.5), if_kue.c (1.11), if_kuereg.h (1.5) date: 2000/03/02 12:37:51; author: augustss; Use ratecheck() to limit error messages on disconnect. Break out some common functionality.
This commit is contained in:
parent
862c145a2f
commit
87c2c53d47
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user