lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Dec 2011 21:55:30 -0600
From:	Larry Finger <Larry.Finger@...inger.net>
To:	Andiry Xu <andiry.xu@....com>
CC:	Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
	USB list <linux-usb@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, v4mp <gaigo88@...mail.it>
Subject: Re: 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ