Intermittent ftdi_sio issues that lead to usb subsystem hang?

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

 



Hi,

I'm starting a new thread with this since my previous one had some
unnecessary information/complexity. I'm having issues using an FT232RL
device through the ftdi_sio 1.6 driver. After using a particular app
to access the device, I have problems communicating with it. I've
tried to narrow down the steps that lead to failure. The issue is
intermittent -- the problem occurs most of the time, but not always.
The problem doesn't occur on another device using a Prolific chipset.

I'm using an external application which does a bunch of stuff to try
and autodetect the device type. At a glance, I think it tries to
change baud rates, data bits/stop bits and flow control. After its
done, the application is told to relinquish the device (close it).
Here is the relevant output of an strace on the application:
http://pastie.org/pastes/3077794/text

After the application is closed (process is killed, nothing is
accessing the device as verified with lsof), the issue starts... I
open the port (ie /dev/ttyUSBx) in any other application and it seems
like I can talk TO the device, but not receive anything from it. The
device in question will flash LEDs in a particular sequence when a
specific command is given, and if I send that command, the LEDs flash
as expected. The device should also be giving back some data, but I
don't ever see it. At this point, if I disconnect the device, the
system will recognize the disconnection (I'll see the message in
dmesg) but I won't be able to unload ftdi_sio with modprobe -r, as the
system complains it in use. If I try to force it, the command will
hang.

Eventually (with no further action), I'll get "[  720.526646] INFO:
task khubd:123 blocked for more than 120 seconds" and a call trace
from dmesg. After this point I guess whatever major module handles usb
(usbcore?) hangs. If I disconnect my mouse for instance, reconnecting
it isn't detected and the mouse is no longer accessible until a
reboot.

The relevant parts of these events in kernel.log with debugging
enabled on the module is shown here:
http://pastie.org/pastes/3077786/text

Here's the output of ftdi_sio loaded with debug arguments for when the
issue occurs. I've separated the point in time after using the
application whose strace I linked to earlier and removed
'ftdi_process_packet' messages. Regardless of whether the problem
happens or not, ftdi_sio's debug output consistently shows that
certain ioctl args are not supported... they are:

0x5401   TCGETS
0x5402   TCSETS
0x540b   TCFLSH

I don't really know what implies. I'm pretty lost with how to try
fixing this issue, and would great appreciate any advice.


Regards,

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