lkml.org 
[lkml]   [2011]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Question about error from xhci-hcd
On 12/28/2011 09:32 PM, Andiry Xu wrote:
>
> Thanks for your test. However, I did not find anything abnormal
> information in the dmesg, except for the dump, but it seems unrelated
> with "no room on ring" error.
>
> The patch is supposed to print the ep ring when it encounters a "no room
> on ring" error, but it's not triggered. I see you added some control
> transfer prints in the dmesg, but it seems quite normal: note the
> "Toggle cycle state for ring" info, it means the ring is looped
> normally, and driver does not report any no room on ring error. Can it
> be reproduced frequently or hard to trigger?
>
> The short transfer message is normal for control transfer too. Sarah has
> posted some patches to remove the corresponding printk and downgrade the
> debug warn level so people will not be scared.

The patch I added was as follows:

Index: compat-wireless-2011-10-28/drivers/usb/host/xhci-ring.c
===================================================================
--- compat-wireless-2011-10-28.orig/drivers/usb/host/xhci-ring.c
+++ compat-wireless-2011-10-28/drivers/usb/host/xhci-ring.c
@@ -2462,9 +2462,15 @@ static int prepare_ring(struct xhci_hcd
}
if (!room_on_ring(xhci, ep_ring, num_trbs)) {
/* FIXME allocate more room */
- xhci_err(xhci, "ERROR no room on ep ring\n");
+ if (count++ < 25) {
+ xhci_err(xhci, "ERROR no room on ep ring\n");
+ xhci_err(xhci, "Event ring:\n");
+ xhci_debug_ring(xhci, xhci->event_ring);
+ xhci_err(xhci, "Endpoint ring:\n");
+ xhci_debug_ring(xhci, ep_ring);
+ if (count < 2)
+ dump_stack();
+ }
return -ENOMEM;
}

Count is a static int to limit the amount of output to help prevent wrapping of
the dmesg buffer.

With the rtl8192cu driver, the "no room" message occurs repeatedly. A piece of
the unrestrained log is as follows:

[ 269.214841] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214847] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214853] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214859] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214865] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214916] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214926] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214936] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214945] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214954] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214964] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214973] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214981] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.214990] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.215000] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.215009] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.215018] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
[ 269.215027] xhci_hcd 0000:05:00.0: ERROR no room on ep ring
If the ring appears to be normal, any idea why the error is being triggered?

Whatever the cause, the device fails, but works fine on a USB 2.0 port. If you
have any other tests we could run, please let me know.

Larry


\
 
 \ /
  Last update: 2011-12-29 04:57    [from the cache]
©2003-2011 Jasper Spaans