aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Sharp2013-03-18 12:19:51 -0500
committerGreg Kroah-Hartman2013-05-11 15:53:53 -0500
commitcfc8f2cebe1dfda582e128c63d8cd6a1cebfe751 (patch)
tree425e1486a8cff1bde1edf223386982be409e0a89 /drivers
parentb241f9dc4c1f736711d8ea471de604a97807454f (diff)
downloadkernel-omap-cfc8f2cebe1dfda582e128c63d8cd6a1cebfe751.tar.gz
kernel-omap-cfc8f2cebe1dfda582e128c63d8cd6a1cebfe751.tar.xz
kernel-omap-cfc8f2cebe1dfda582e128c63d8cd6a1cebfe751.zip
xhci: Don't warn on empty ring for suspended devices.
commit a83d6755814e4614ba77e15d82796af0f695c6b8 upstream. When a device attached to the roothub is suspended, the endpoint rings are stopped. The host may generate a completion event with the completion code set to 'Stopped' or 'Stopped Invalid' when the ring is halted. The current xHCI code prints a warning in that case, which can be really annoying if the USB device is coming into and out of suspend. Remove the unnecessary warning. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Stephen Hemminger <stephen@networkplumber.org> Cc: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci-ring.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index f2845f1da5ba..2573cf4de9ea 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2461,14 +2461,21 @@ static int handle_tx_event(struct xhci_hcd *xhci,
2461 * TD list. 2461 * TD list.
2462 */ 2462 */
2463 if (list_empty(&ep_ring->td_list)) { 2463 if (list_empty(&ep_ring->td_list)) {
2464 xhci_warn(xhci, "WARN Event TRB for slot %d ep %d " 2464 /*
2465 "with no TDs queued?\n", 2465 * A stopped endpoint may generate an extra completion
2466 TRB_TO_SLOT_ID(le32_to_cpu(event->flags)), 2466 * event if the device was suspended. Don't print
2467 ep_index); 2467 * warnings.
2468 xhci_dbg(xhci, "Event TRB with TRB type ID %u\n", 2468 */
2469 (le32_to_cpu(event->flags) & 2469 if (!(trb_comp_code == COMP_STOP ||
2470 TRB_TYPE_BITMASK)>>10); 2470 trb_comp_code == COMP_STOP_INVAL)) {
2471 xhci_print_trb_offsets(xhci, (union xhci_trb *) event); 2471 xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n",
2472 TRB_TO_SLOT_ID(le32_to_cpu(event->flags)),
2473 ep_index);
2474 xhci_dbg(xhci, "Event TRB with TRB type ID %u\n",
2475 (le32_to_cpu(event->flags) &
2476 TRB_TYPE_BITMASK)>>10);
2477 xhci_print_trb_offsets(xhci, (union xhci_trb *) event);
2478 }
2472 if (ep->skip) { 2479 if (ep->skip) {
2473 ep->skip = false; 2480 ep->skip = false;
2474 xhci_dbg(xhci, "td_list is empty while skip " 2481 xhci_dbg(xhci, "td_list is empty while skip "