Re: ISP1761 / FTDI SIO USB serial problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 07, 2011 at 01:08:47PM +0100, Johan Hovold wrote:
> On Fri, Jan 07, 2011 at 11:27:18AM +0000, Russell King - ARM Linux wrote:
> > Is this actually an error?  Surely for serial devices, this is normal
> > behaviour.
> > 
> > At the moment, it makes the console on the machine unusable all the time
> > that the USB device is in use.  Obviously, a serial device won't may not
> > have data available for long periods of time to satisfy a pending read.
> > Note that the console is serial, so printk() will have a higher latency
> > than printk() to VGA.
> 
> I'd suggest disabling the KERN_NOTICE message in question first. If that
> alone does not help, try enabling debugging in both usb-serial and ftdi_sio.

Done.

Enabling debugging in ftdi_sio isn't going to be useful.  With it
enabled, I get a kernel message log very quickly full of:

drivers/usb/serial/ftdi_sio.c: ftdi_process_packet - port 2

and anything else is just going to be swamped out of existence.

With this on, I'm unable to reproduce the problem - I've pasted
"setenv bootargs 'root=/dev/mmcblk0p2 rw mem=512M vmalloc=1G console=ttyO2,115200n8 rootdelay=2'"
about 30 times into minicom and it continues working.

If I disable ftdi_sio debugging, after five pastes of that, it all comes
to a halt again, with wchan as before.  If at that point I unplug the USB
cable, I get this:

hub 1-1:1.0: hub_port_status failed (err = -110)
hub 1-1:1.0: hub_port_status failed (err = -110)
hub 1-1:1.0: hub_port_status failed (err = -110)

repeating every six seconds.

diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index bdba8c5..00fd7ba 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -1049,17 +1049,6 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
 		if (!nakcount && (dw3 & DW3_QTD_ACTIVE)) {
 			u32 buffstatus;
 
-			/*
-			 * NAKs are handled in HW by the chip. Usually if the
-			 * device is not able to send data fast enough.
-			 * This happens mostly on slower hardware.
-			 */
-			printk(KERN_NOTICE "Reloading ptd %p/%p... qh %p read: "
-					"%d of %zu done: %08x cur: %08x\n", qtd,
-					urb, qh, PTD_XFERRED_LENGTH(dw3),
-					qtd->length, done_map,
-					(1 << queue_entry));
-
 			/* RL counter = ERR counter */
 			dw3 &= ~(0xf << 19);
 			dw3 |= rl << 19;
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 2dec500..96e359c 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -30,7 +30,7 @@
 /*   to talk to the device */
 /* Thanx to gkh and the rest of the usb dev group for all code I have
    assimilated :-) */
-
+#define DEBUG
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 6954de5..2aca55c 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -16,7 +16,7 @@
  * driver
  *
  */
-
+#define DEBUG
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux