Re: FTD driverI issue?

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

 



On Mon, Dec 12, 2016 at 06:47:55PM +0100, Sylvain Le Gourriérec wrote:
> Hello,
> 
> I don't manage to run more than one FTDI Usb Serial Adapter on a Beagle
> Bone Black. Since there is only one Usb Host port on the BBB, I tried with
> several hub (powered or not) or cape.
> 
> Each time that more than one adapter is plugged, these errors appear
> (kernel 4.4 or kernel 4.9):
> 
> [ 1544.135039] ftdi_sio ttyUSB0: ftdi_set_termios FAILED to set
> databits/stopbits/parity
> [ 1545.143074] ftdi_sio ttyUSB0: ftdi_set_termios urb failed to set baudrate
> [ 1550.151247] ftdi_sio ttyUSB0: urb failed to clear flow control
> 
> 
> Does the issue come from the FTDI driver?

No, but the error messages are printed by that driver. For some reason
these control transfers are now failing.

> I own 4 Beagle Bone Black: the problem exists on all of them.

Odd. I also have a BBB here and I have no problems connecting two FTDI
devices through a hub.

Are you using a mainline 4.9 kernel?

What kind of FTDI device are you using, and can you provide the output
of lsusb -v for them?

Could you also try running with the below diagnostics patch applied?

Thanks,
Johan


>From b5cff496d8a900af50039e3fc43c6e2ae4d2750c Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@xxxxxxxxxx>
Date: Mon, 12 Dec 2016 19:02:20 +0100
Subject: [PATCH] USB: serial: ftdi_sio: add set_termios instrumentation

---
 drivers/usb/serial/ftdi_sio.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index bf750e98d204..c3b4ea92a6a7 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -2190,6 +2190,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
 	unsigned int iflag = termios->c_iflag;
 	unsigned char vstop;
 	unsigned char vstart;
+	int ret;
 
 	/* Force baud rate if this device requires it, unless it is set to
 	   B0. */
@@ -2284,13 +2285,14 @@ static void ftdi_set_termios(struct tty_struct *tty,
 	   - but is or'ed with this value  */
 	priv->last_set_data_urb_value = urb_value;
 
-	if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+	ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 			    FTDI_SIO_SET_DATA_REQUEST,
 			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
 			    urb_value , priv->interface,
-			    NULL, 0, WDR_SHORT_TIMEOUT) < 0) {
-		dev_err(ddev, "%s FAILED to set databits/stopbits/parity\n",
-			__func__);
+			    NULL, 0, WDR_SHORT_TIMEOUT);
+	if (ret < 0) {
+		dev_err(ddev, "%s FAILED to set databits/stopbits/parity: %d\n",
+			__func__, ret);
 	}
 
 	/* Now do the baudrate */
-- 
2.7.3

--
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