]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2016 11:27:53 +0000 (13:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2016 11:27:53 +0000 (13:27 +0200)
added patches:
xhci-make-sure-xhci-handles-usb_speed_super_plus-devices.patch

queue-3.14/series
queue-3.14/xhci-make-sure-xhci-handles-usb_speed_super_plus-devices.patch [new file with mode: 0644]

index bef8328e84d6d64cf631c7c35efbcf96f93780d6..01a6098b7ef0857d54cc9b3ee30dead1e641e996 100644 (file)
@@ -15,3 +15,4 @@ usb-serial-option-add-d-link-dwm-156-a3.patch
 usb-serial-option-add-support-for-telit-le920a4.patch
 usb-serial-ftdi_sio-add-device-id-for-wiced-usb-uart-dev-board.patch
 usb-serial-ftdi_sio-add-pids-for-ivium-technologies-devices.patch
+xhci-make-sure-xhci-handles-usb_speed_super_plus-devices.patch
diff --git a/queue-3.14/xhci-make-sure-xhci-handles-usb_speed_super_plus-devices.patch b/queue-3.14/xhci-make-sure-xhci-handles-usb_speed_super_plus-devices.patch
new file mode 100644 (file)
index 0000000..1cd789c
--- /dev/null
@@ -0,0 +1,137 @@
+From 0caf6b33452112e5a1186c8c964e90310e49e6bd Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Mon, 25 Jan 2016 15:30:44 +0200
+Subject: xhci: Make sure xhci handles USB_SPEED_SUPER_PLUS devices.
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit 0caf6b33452112e5a1186c8c964e90310e49e6bd upstream.
+
+In most cases the devices with the speed set to USB_SPEED_SUPER_PLUS
+are handled like regular SuperSpeed devices.
+
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-mem.c  |    9 ++++++---
+ drivers/usb/host/xhci-ring.c |    3 ++-
+ drivers/usb/host/xhci.c      |    7 +++++--
+ 3 files changed, 13 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -974,7 +974,7 @@ static u32 xhci_find_real_port_number(st
+       struct usb_device *top_dev;
+       struct usb_hcd *hcd;
+-      if (udev->speed == USB_SPEED_SUPER)
++      if (udev->speed >= USB_SPEED_SUPER)
+               hcd = xhci->shared_hcd;
+       else
+               hcd = xhci->main_hcd;
+@@ -1009,6 +1009,7 @@ int xhci_setup_addressable_virt_dev(stru
+       /* 3) Only the control endpoint is valid - one endpoint context */
+       slot_ctx->dev_info |= cpu_to_le32(LAST_CTX(1) | udev->route);
+       switch (udev->speed) {
++      case USB_SPEED_SUPER_PLUS:
+       case USB_SPEED_SUPER:
+               slot_ctx->dev_info |= cpu_to_le32(SLOT_SPEED_SS);
+               max_packets = MAX_PACKET(512);
+@@ -1196,6 +1197,7 @@ static unsigned int xhci_get_endpoint_in
+               }
+               /* Fall through - SS and HS isoc/int have same decoding */
++      case USB_SPEED_SUPER_PLUS:
+       case USB_SPEED_SUPER:
+               if (usb_endpoint_xfer_int(&ep->desc) ||
+                   usb_endpoint_xfer_isoc(&ep->desc)) {
+@@ -1236,7 +1238,7 @@ static unsigned int xhci_get_endpoint_in
+ static u32 xhci_get_endpoint_mult(struct usb_device *udev,
+               struct usb_host_endpoint *ep)
+ {
+-      if (udev->speed != USB_SPEED_SUPER ||
++      if (udev->speed < USB_SPEED_SUPER ||
+                       !usb_endpoint_xfer_isoc(&ep->desc))
+               return 0;
+       return ep->ss_ep_comp.bmAttributes;
+@@ -1288,7 +1290,7 @@ static u32 xhci_get_max_esit_payload(str
+                       usb_endpoint_xfer_bulk(&ep->desc))
+               return 0;
+-      if (udev->speed == USB_SPEED_SUPER)
++      if (udev->speed >= USB_SPEED_SUPER)
+               return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval);
+       max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc));
+@@ -1359,6 +1361,7 @@ int xhci_endpoint_init(struct xhci_hcd *
+       max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc));
+       max_burst = 0;
+       switch (udev->speed) {
++      case USB_SPEED_SUPER_PLUS:
+       case USB_SPEED_SUPER:
+               /* dig out max burst from ep companion desc */
+               max_burst = ep->ss_ep_comp.bMaxBurst;
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -3705,7 +3705,7 @@ static unsigned int xhci_get_burst_count
+ {
+       unsigned int max_burst;
+-      if (xhci->hci_version < 0x100 || udev->speed != USB_SPEED_SUPER)
++      if (xhci->hci_version < 0x100 || udev->speed < USB_SPEED_SUPER)
+               return 0;
+       max_burst = urb->ep->ss_ep_comp.bMaxBurst;
+@@ -3731,6 +3731,7 @@ static unsigned int xhci_get_last_burst_
+               return 0;
+       switch (udev->speed) {
++      case USB_SPEED_SUPER_PLUS:
+       case USB_SPEED_SUPER:
+               /* bMaxBurst is zero based: 0 means 1 packet per burst */
+               max_burst = urb->ep->ss_ep_comp.bMaxBurst;
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -2054,6 +2054,7 @@ static unsigned int xhci_get_block_size(
+       case USB_SPEED_HIGH:
+               return HS_BLOCK;
+       case USB_SPEED_SUPER:
++      case USB_SPEED_SUPER_PLUS:
+               return SS_BLOCK;
+       case USB_SPEED_UNKNOWN:
+       case USB_SPEED_WIRELESS:
+@@ -2179,7 +2180,7 @@ static int xhci_check_bw_table(struct xh
+       unsigned int packets_remaining = 0;
+       unsigned int i;
+-      if (virt_dev->udev->speed == USB_SPEED_SUPER)
++      if (virt_dev->udev->speed >= USB_SPEED_SUPER)
+               return xhci_check_ss_bw(xhci, virt_dev);
+       if (virt_dev->udev->speed == USB_SPEED_HIGH) {
+@@ -2380,7 +2381,7 @@ void xhci_drop_ep_from_interval_table(st
+       if (xhci_is_async_ep(ep_bw->type))
+               return;
+-      if (udev->speed == USB_SPEED_SUPER) {
++      if (udev->speed >= USB_SPEED_SUPER) {
+               if (xhci_is_sync_in_ep(ep_bw->type))
+                       xhci->devs[udev->slot_id]->bw_table->ss_bw_in -=
+                               xhci_get_ss_bw_consumed(ep_bw);
+@@ -2418,6 +2419,7 @@ void xhci_drop_ep_from_interval_table(st
+               interval_bw->overhead[HS_OVERHEAD_TYPE] -= 1;
+               break;
+       case USB_SPEED_SUPER:
++      case USB_SPEED_SUPER_PLUS:
+       case USB_SPEED_UNKNOWN:
+       case USB_SPEED_WIRELESS:
+               /* Should never happen because only LS/FS/HS endpoints will get
+@@ -2477,6 +2479,7 @@ static void xhci_add_ep_to_interval_tabl
+               interval_bw->overhead[HS_OVERHEAD_TYPE] += 1;
+               break;
+       case USB_SPEED_SUPER:
++      case USB_SPEED_SUPER_PLUS:
+       case USB_SPEED_UNKNOWN:
+       case USB_SPEED_WIRELESS:
+               /* Should never happen because only LS/FS/HS endpoints will get