summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/controller/xhci.c13
-rw-r--r--sys/dev/usb/controller/xhci.h1
-rw-r--r--sys/dev/usb/usb_hid.c3
-rw-r--r--sys/dev/usb/usbdevs1
-rw-r--r--sys/dev/usb/wlan/if_urtwn.c1
5 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index 1c1d2b0ee3d7..0739e2865e39 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -2358,6 +2358,8 @@ xhci_configure_endpoint(struct usb_device *udev,
/* store endpoint mode */
pepext->trb_ep_mode = ep_mode;
+ /* store bMaxPacketSize for control endpoints */
+ pepext->trb_ep_maxp = edesc->wMaxPacketSize[0];
usb_pc_cpu_flush(pepext->page_cache);
if (ep_mode == USB_EP_MODE_STREAMS) {
@@ -2904,6 +2906,17 @@ xhci_transfer_insert(struct usb_xfer *xfer)
return (USB_ERR_NOMEM);
}
+ /* check if bMaxPacketSize changed */
+ if (xfer->flags_int.control_xfr != 0 &&
+ pepext->trb_ep_maxp != xfer->endpoint->edesc->wMaxPacketSize[0]) {
+
+ DPRINTFN(8, "Reconfigure control endpoint\n");
+
+ /* force driver to reconfigure endpoint */
+ pepext->trb_halted = 1;
+ pepext->trb_running = 0;
+ }
+
/* check for stopped condition, after putting transfer on interrupt queue */
if (pepext->trb_running == 0) {
struct xhci_softc *sc = XHCI_BUS2SC(xfer->xroot->bus);
diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h
index 48574506548e..306400a52fda 100644
--- a/sys/dev/usb/controller/xhci.h
+++ b/sys/dev/usb/controller/xhci.h
@@ -383,6 +383,7 @@ struct xhci_endpoint_ext {
uint8_t trb_halted;
uint8_t trb_running;
uint8_t trb_ep_mode;
+ uint8_t trb_ep_maxp;
};
enum {
diff --git a/sys/dev/usb/usb_hid.c b/sys/dev/usb/usb_hid.c
index e6361a6f1195..dc0ce99facc4 100644
--- a/sys/dev/usb/usb_hid.c
+++ b/sys/dev/usb/usb_hid.c
@@ -354,7 +354,8 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
/* range check usage count */
if (c->loc.count > 255) {
DPRINTFN(0, "Number of "
- "items truncated to 255\n");
+ "items(%u) truncated to 255\n",
+ (unsigned)(c->loc.count));
s->ncount = 255;
} else
s->ncount = c->loc.count;
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 2a55e7cba4e8..07b3f73c94dc 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -835,6 +835,7 @@ product ABOCOM RT2573_4 0xb21e RT2573
product ABOCOM RTL8188CU_1 0x8188 RTL8188CU
product ABOCOM RTL8188CU_2 0x8189 RTL8188CU
product ABOCOM RTL8192CU 0x8178 RTL8192CU
+product ABOCOM RTL8188EU 0x8179 RTL8188EU
product ABOCOM WUG2700 0xb21f WUG2700
/* Acton Research Corp. */
diff --git a/sys/dev/usb/wlan/if_urtwn.c b/sys/dev/usb/wlan/if_urtwn.c
index a793ba93c2d3..d95be56b23f2 100644
--- a/sys/dev/usb/wlan/if_urtwn.c
+++ b/sys/dev/usb/wlan/if_urtwn.c
@@ -176,6 +176,7 @@ static const STRUCT_USB_HOST_ID urtwn_devs[] = {
URTWN_DEV(TRENDNET, RTL8192CU),
URTWN_DEV(ZYXEL, RTL8192CU),
/* URTWN_RTL8188E */
+ URTWN_RTL8188E_DEV(ABOCOM, RTL8188EU),
URTWN_RTL8188E_DEV(DLINK, DWA123D1),
URTWN_RTL8188E_DEV(DLINK, DWA125D1),
URTWN_RTL8188E_DEV(ELECOM, WDC150SU2M),