]> Git Repo - linux.git/commitdiff
Merge 4.5-rc4 into usb-next
authorGreg Kroah-Hartman <[email protected]>
Sun, 14 Feb 2016 22:38:30 +0000 (14:38 -0800)
committerGreg Kroah-Hartman <[email protected]>
Sun, 14 Feb 2016 22:38:30 +0000 (14:38 -0800)
We want the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <[email protected]>
1  2 
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h

index cd336226ad478af8a3a2578f914e3065e687aea7,3915657e6078b66211fd699eab9bf227752f1ffc..6773e508d9bb67619a5c576ee6a9794a8b702dd7
@@@ -2193,10 -2193,6 +2193,6 @@@ static int process_bulk_intr_td(struct 
                }
        /* Fast path - was this the last TRB in the TD for this URB? */
        } else if (event_trb == td->last_trb) {
-               if (td->urb_length_set && trb_comp_code == COMP_SHORT_TX)
-                       return finish_td(xhci, td, event_trb, event, ep,
-                                        status, false);
                if (EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)) != 0) {
                        td->urb->actual_length =
                                td->urb->transfer_buffer_length -
                        td->urb->actual_length +=
                                TRB_LEN(le32_to_cpu(cur_trb->generic.field[2])) -
                                EVENT_TRB_LEN(le32_to_cpu(event->transfer_len));
-               if (trb_comp_code == COMP_SHORT_TX) {
-                       xhci_dbg(xhci, "mid bulk/intr SP, wait for last TRB event\n");
-                       td->urb_length_set = true;
-                       return 0;
-               }
        }
  
        return finish_td(xhci, td, event_trb, event, ep, status, false);
@@@ -3573,7 -3563,7 +3563,7 @@@ static unsigned int xhci_get_burst_coun
  {
        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;
@@@ -3599,7 -3589,6 +3589,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;
diff --combined drivers/usb/host/xhci.c
index 503d82fb0dd582b799ae8ca76e846517ee3bae81,0c8087d3c3138f72e6eeaedc928c09453ab32285..d51ee0c3cf9f009d3f9098bfa77434a6ed4695b6
@@@ -1554,7 -1554,9 +1554,9 @@@ int xhci_urb_dequeue(struct usb_hcd *hc
                xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
                                "HW died, freeing TD.");
                urb_priv = urb->hcpriv;
-               for (i = urb_priv->td_cnt; i < urb_priv->length; i++) {
+               for (i = urb_priv->td_cnt;
+                    i < urb_priv->length && xhci->devs[urb->dev->slot_id];
+                    i++) {
                        td = urb_priv->td[i];
                        if (!list_empty(&td->td_list))
                                list_del_init(&td->td_list);
@@@ -2084,7 -2086,6 +2086,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:
@@@ -2210,7 -2211,7 +2212,7 @@@ static int xhci_check_bw_table(struct x
        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) {
@@@ -2411,7 -2412,7 +2413,7 @@@ void xhci_drop_ep_from_interval_table(s
        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);
                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
@@@ -2509,7 -2509,6 +2511,7 @@@ static void xhci_add_ep_to_interval_tab
                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
@@@ -4898,7 -4897,6 +4900,7 @@@ int xhci_gen_setup(struct usb_hcd *hcd
                if (xhci->sbrn == 0x31) {
                        xhci_info(xhci, "Host supports USB 3.1 Enhanced SuperSpeed\n");
                        hcd->speed = HCD_USB31;
 +                      hcd->self.root_hub->speed = USB_SPEED_SUPER_PLUS;
                }
                /* xHCI private pointer was set in xhci_pci_probe for the second
                 * registered roothub.
diff --combined drivers/usb/host/xhci.h
index 9f28bea65fedc1d2c8aba3a78b252470e7224934,cc651383ce5a85d713c66b032a0aa30bd4331dc8..e1bee3fe1a394ae7d39edd919aca493da91cb86b
@@@ -343,7 -343,6 +343,7 @@@ struct xhci_op_regs 
  #define       SLOT_SPEED_LS           (XDEV_LS << 10)
  #define       SLOT_SPEED_HS           (XDEV_HS << 10)
  #define       SLOT_SPEED_SS           (XDEV_SS << 10)
 +#define       SLOT_SPEED_SSP          (XDEV_SSP << 10)
  /* Port Indicator Control */
  #define PORT_LED_OFF  (0 << 14)
  #define PORT_LED_AMBER        (1 << 14)
@@@ -1632,6 -1631,7 +1632,7 @@@ struct xhci_hcd 
  #define XHCI_BROKEN_STREAMS   (1 << 19)
  #define XHCI_PME_STUCK_QUIRK  (1 << 20)
  #define XHCI_MTK_HOST         (1 << 21)
+ #define XHCI_SSIC_PORT_UNUSED (1 << 22)
        unsigned int            num_active_eps;
        unsigned int            limit_active_eps;
        /* There are two roothubs to keep track of bus suspend info for */
This page took 0.11981 seconds and 4 git commands to generate.