From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Luis Henriques <luis.henriques@canonical.com>
Subject: [ 07/26] xhci: Dont warn on empty ring for suspended devices.
Date: Thu, 9 May 2013 15:34:21 -0700 [thread overview]
Message-ID: <20130509223423.209896644@linuxfoundation.org> (raw)
In-Reply-To: <20130509223422.368544659@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
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>
---
drivers/usb/host/xhci-ring.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2459,14 +2459,21 @@ static int handle_tx_event(struct xhci_h
* TD list.
*/
if (list_empty(&ep_ring->td_list)) {
- xhci_warn(xhci, "WARN Event TRB for slot %d ep %d "
- "with no TDs queued?\n",
- TRB_TO_SLOT_ID(le32_to_cpu(event->flags)),
- ep_index);
- xhci_dbg(xhci, "Event TRB with TRB type ID %u\n",
- (le32_to_cpu(event->flags) &
- TRB_TYPE_BITMASK)>>10);
- xhci_print_trb_offsets(xhci, (union xhci_trb *) event);
+ /*
+ * A stopped endpoint may generate an extra completion
+ * event if the device was suspended. Don't print
+ * warnings.
+ */
+ if (!(trb_comp_code == COMP_STOP ||
+ trb_comp_code == COMP_STOP_INVAL)) {
+ xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n",
+ TRB_TO_SLOT_ID(le32_to_cpu(event->flags)),
+ ep_index);
+ xhci_dbg(xhci, "Event TRB with TRB type ID %u\n",
+ (le32_to_cpu(event->flags) &
+ TRB_TYPE_BITMASK)>>10);
+ xhci_print_trb_offsets(xhci, (union xhci_trb *) event);
+ }
if (ep->skip) {
ep->skip = false;
xhci_dbg(xhci, "td_list is empty while skip "
next prev parent reply other threads:[~2013-05-09 22:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 22:34 [ 00/26] 3.4.45-stable review Greg Kroah-Hartman
2013-05-09 22:34 ` [ 01/26] powerpc: Emulate non privileged DSCR read and write Greg Kroah-Hartman
2013-05-09 22:34 ` [ 02/26] powerpc: fix numa distance for form0 device tree Greg Kroah-Hartman
2013-05-09 22:34 ` [ 03/26] autofs - remove autofs dentry mount check Greg Kroah-Hartman
2013-05-09 22:34 ` [ 04/26] net/eth/ibmveth: Fixup retrieval of MAC address Greg Kroah-Hartman
2013-05-09 22:34 ` [ 05/26] perf/x86/intel/lbr: Fix LBR filter Greg Kroah-Hartman
2013-05-09 22:34 ` [ 06/26] perf/x86/intel/lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL Greg Kroah-Hartman
2013-05-09 22:34 ` Greg Kroah-Hartman [this message]
2013-05-09 22:34 ` [ 08/26] ipvs: ip_vs_sip_fill_param() BUG: bad check of return value Greg Kroah-Hartman
2013-05-09 22:34 ` [ 09/26] ext4: add check for inodes_count overflow in new resize ioctl Greg Kroah-Hartman
2013-05-09 22:34 ` [ 10/26] r8169: fix 8168evl frame padding Greg Kroah-Hartman
2013-05-09 22:34 ` [ 11/26] cpufreq / Longhaul: Disable driver by default Greg Kroah-Hartman
2013-05-09 22:34 ` [ 12/26] drm/i915: Add no-lvds quirk for Fujitsu Esprimo Q900 Greg Kroah-Hartman
2013-05-09 22:34 ` [ 13/26] drm/i915: Fall back to bit banging mode for DVO transmitter detection Greg Kroah-Hartman
2013-05-09 22:34 ` [ 14/26] drm/radeon: dont use get_engine_clock() on APUs Greg Kroah-Hartman
2013-05-09 22:34 ` [ 15/26] drm/radeon/dce6: add missing display reg for tiling setup Greg Kroah-Hartman
2013-05-09 22:34 ` [ 16/26] drm/radeon: properly lock disp in mc_stop/resume for evergreen+ Greg Kroah-Hartman
2013-05-09 22:34 ` [ 17/26] drm/radeon: disable the crtcs in mc_stop (evergreen+) (v2) Greg Kroah-Hartman
2013-05-09 22:34 ` [ 18/26] drm/radeon: add some new SI PCI ids Greg Kroah-Hartman
2013-05-09 22:34 ` [ 19/26] drm/radeon/evergreen+: dont enable HPD interrupts on eDP/LVDS Greg Kroah-Hartman
2013-05-09 22:34 ` [ 20/26] drm/radeon: fix endian bugs in atom_allocate_fb_scratch() Greg Kroah-Hartman
2013-05-09 22:34 ` [ 21/26] drm/radeon: fix possible segfault when parsing pm tables Greg Kroah-Hartman
2013-05-09 22:34 ` [ 22/26] drm/radeon: add new richland pci ids Greg Kroah-Hartman
2013-05-09 22:34 ` [ 23/26] drm/radeon: fix handling of v6 power tables Greg Kroah-Hartman
2013-05-09 22:34 ` [ 24/26] tracing: Fix ftrace_dump() Greg Kroah-Hartman
2013-05-09 22:34 ` [ 25/26] kernel/audit_tree.c: tree will leak memory when failure occurs in audit_trim_trees() Greg Kroah-Hartman
2013-05-09 22:34 ` [ 26/26] x86/mm: account for PGDIR_SIZE alignment Greg Kroah-Hartman
2013-05-10 15:25 ` [ 00/26] 3.4.45-stable review Shuah Khan
2013-05-11 5:20 ` Satoru Takeuchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130509223423.209896644@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luis.henriques@canonical.com \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox