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]
Message-ID: <m1hbssex24.fsf@fess.ebiederm.org>
Date:	Tue, 17 Nov 2009 12:05:55 -0800
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Oliver Neukum <oliver@...kum.org>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Johan Hovold <jhovold@...il.com>,
	"Greg Kroah-Hartman" <gregkh@...e.de>,
	Michael Trimarchi <trimarchi@...dalf.sssup.it>,
	linux-usb@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [PATCH] USB: ftdi_sio: Remove tty->low_latency.

Oliver Neukum <oliver@...kum.org> writes:

> Am Dienstag, 17. November 2009 19:35:07 schrieb Eric W. Biederman:
>> Boiled down.  ftdi_chars_in_buffer is essentially
>>  priv->tx_outstanding_bytes. tx_outstanding_bytes is incremented when an
>>  urb request is sent and tx_outstanding_bytes is decremented when an urb
>>  request completes.
>> 
>> It turns out I have a moderately noisy usb line, and so I occasionally
>> get messages like:
>> 
>> ehci_hcd 0000:00:0a.1: detected XactErr len 0/7 retry 31
>> 
>> Which as best as I can tell result in the urb getting abandoned and
>> neither completed nor canceled (because we have hit the maximum
>> retry count and they still don't succeed).
>
> The URB should be finished with an error code in urb->status.
> ftdi_write_bulk_callback() does decrement the counter even in
> the error case.
>
>> Which appears to result in tx_outstanding_bytes getting stuck at
>> some positive number.
>
> Do you see this message
>
>  	if (status) {
> 		dbg("nonzero write bulk status received: %d", status);
> 		return;
> 	}
>
> if you enable debugging output?
>
> 	Regards
> 		Oliver

I think I have enabled debug output but I don't see anything extra
coming out.  Below is the patch I am running against 2.6.32-rc5.  The
full dmesg is attached.

The highlights seem to be:

ehci_hcd 0000:00:0a.1: 9.2 detected XactErr len 0/7 retry 1
ehci_hcd 0000:00:0a.1: devpath 9.2 ep4out 3strikes

The fact that "stty -F /dev/ttyUSB15 9600" hangs forever in
tty_wait_until sent.

Eric


diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 00ad9ce..0766f1b 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -389,9 +389,10 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
 						++qh->xacterrs < QH_XACTERR_MAX &&
 						!urb->unlinked) {
 					ehci_dbg(ehci,
-	"detected XactErr len %zu/%zu retry %d\n",
+	"%s detected XactErr len %zu/%zu retry %d\n",
+	qtd->urb->dev->devpath,
 	qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
-
+#if 0
 					/* reset the token in the qtd and the
 					 * qh overlay (which still contains
 					 * the qtd) so that we pick up from
@@ -406,6 +407,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
 					hw->hw_token = cpu_to_hc32(ehci,
 							token);
 					goto retry_xacterr;
+#endif
 				}
 				stopped = 1;
 
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 9c60d6d..1e1933e 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -29,6 +29,7 @@
 /* Thanx to gkh and the rest of the usb dev group for all code I have
    assimilated :-) */
 
+#define DEBUG 1
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>



View attachment "dmesg-hang1.txt" of type "text/plain" (108280 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ