1. 03 May, 2012 2 commits
    • Hans de Goede's avatar
      usb-xhci: Handle COMP_TX_ERR for isoc tds · 9c745995
      Hans de Goede authored
      While testing unplugging an UVC HD webcam with usb-redirection (so through
      usbdevfs), my userspace usb-redir code was getting a value of -1 in
      iso_frame_desc[n].status, which according to Documentation/usb/error-codes.txt
      is not a valid value.
      
      The source of this -1 is the default case in xhci-ring.c:process_isoc_td()
      adding a kprintf there showed the value of trb_comp_code to be COMP_TX_ERR
      in this case, so this patch adds handling for that completion code to
      process_isoc_td().
      
      This was observed and tested with the following xhci controller:
      1033:0194 NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
      
      Note: I also wonder if setting frame->status to -1 (-EPERM) is the best we can
      do, but since I cannot come up with anything better I've left that as is.
      
      This patch should be backported to kernels as old as 2.6.36, which contain the
      commit 04e51901 "USB: xHCI: Isochronous
      transfer implementation".
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      9c745995
    • Andiry Xu's avatar
      xHCI: keep track of ports being resumed and indicate in hub_status_data · f370b996
      Andiry Xu authored
      This commit adds a bit-array to xhci bus_state for keeping track of
      which ports are undergoing a resume transition. If any of the bits
      are set when xhci_hub_status_data() is called, the routine will return
      a non-zero value even if no ports have any status changes pending.
      This will allow usbcore to handle races between root-hub suspend and
      port wakeup.
      
      This patch should be backported to kernels as old as 3.4, that contain
      the commit 879d38e6 "USB: fix race
      between root-hub suspend and remote wakeup".
      Signed-off-by: default avatarAndiry Xu <andiry.xu@amd.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: stable@vger.kernel.org
      f370b996
  2. 02 May, 2012 38 commits