Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb Make flags/timeout types match what usbdi ...
details: https://anonhg.NetBSD.org/src-all/rev/5788fab8c213
branches: trunk
changeset: 375744:5788fab8c213
user: Martin Husemann <martin%NetBSD.org@localhost>
date: Wed Feb 09 11:57:26 2022 +0100
description:
Make flags/timeout types match what usbdi expects
diffstat:
sys/dev/usb/usbwifi.c | 17 ++++++++++++++---
sys/dev/usb/usbwifi.h | 13 ++++++-------
2 files changed, 20 insertions(+), 10 deletions(-)
diffs (57 lines):
diff -r a621e8ba044d -r 5788fab8c213 sys/dev/usb/usbwifi.c
--- a/sys/dev/usb/usbwifi.c Tue Feb 08 21:07:14 2022 +0100
+++ b/sys/dev/usb/usbwifi.c Wed Feb 09 11:57:26 2022 +0100
@@ -309,9 +309,12 @@ usbwifi_rxeof(struct usbd_xfer *xfer, vo
if (total_len > uw->uw_rx_bufsz) {
-KASSERT(xfer == c->uwc_xfer);
-panic("rxeof: too large transfer (%u > %u) on pipe %u, status %x\n",
- total_len, uw->uw_rx_bufsz, c->uwc_index, status);
+#if 1 /* XXX remove this block */
+ KASSERT(xfer == c->uwc_xfer);
+ panic("rxeof: too large transfer (%u > %u) on pipe %u,"
+ " status %x\n",
+ total_len, uw->uw_rx_bufsz, c->uwc_index, status);
+#endif
aprint_error_dev(uw->uw_dev,
"rxeof: too large transfer (%u > %u)\n",
@@ -1166,6 +1169,14 @@ usbwifi_attach(struct usbwifi *uw)
* Provide some default operations, may be overriden by the driver
*/
uw->uw_ic.ic_parent = usbwifi_parent;
+
+ /*
+ * Default settings used by many devices
+ */
+ uw->uw_rx_xfer_timeout = USBD_NO_TIMEOUT;
+ uw->uw_tx_xfer_timeout = USBD_NO_TIMEOUT;
+ uw->uw_rx_xfer_flags = USBD_SHORT_XFER_OK;
+ uw->uw_tx_xfer_flags = USBD_FORCE_SHORT_XFER;
}
void
diff -r a621e8ba044d -r 5788fab8c213 sys/dev/usb/usbwifi.h
--- a/sys/dev/usb/usbwifi.h Tue Feb 08 21:07:14 2022 +0100
+++ b/sys/dev/usb/usbwifi.h Wed Feb 09 11:57:26 2022 +0100
@@ -196,13 +196,12 @@ struct usbwifi {
unsigned uw_tx_bufsz;
unsigned uw_rx_list_cnt;
unsigned uw_tx_list_cnt;
- int uw_rx_xfer_flags;
- int uw_rx_xfer_timeout;
- int uw_tx_xfer_flags;
- int uw_tx_xfer_timeout;
-
- int uw_rxpipes;
- int uw_txpipes;
+ unsigned uw_rxpipes;
+ unsigned uw_txpipes;
+ uint16_t uw_rx_xfer_flags;
+ uint16_t uw_tx_xfer_flags;
+ uint32_t uw_rx_xfer_timeout;
+ uint32_t uw_tx_xfer_timeout;
/*
* This section should be filled in before calling
Home |
Main Index |
Thread Index |
Old Index