Hi, This is a repeat of an old outstanding patch for the ftdi_sio driver in the 2.4 kernel, which I have rediffed against 2.4.30. The original patch (with M$ line folding problems) was posted by Nathan Croy, back in June 2004. I resent a version diffed against 2.4.28 back in November.
The bug being fixed is that the driver does not reassert RTS and DTR when coming out of B0 mode. Signed off by me in the inline attachment, which contains the patch and a description. Pete, please add this to your Marcelo queue. TIA. -- -=( Ian Abbott @ MEV Ltd. E-mail: <[EMAIL PROTECTED]> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
On Friday 25 June 2004 21:56, Croy, Nathan wrote: > SUMMARY > ======= > ftdi_sio never reasserts modem control lines once the baud has been > set to B0. > > DESCRIPTION > =========== > Setting the baud to B0 (hangup) drops DTR. When the baud is raised > again, DTR is not raised. This can cause a modem to ignore any > commands sent to it until the device is closed and reopened. This > renders minicom (and other software) useless, unless you instruct the > modem to ignore DTR. > > The following patch is intended to make ftdi_sio act like other > serial devices I have used (i.e. the standard serial ports > (/dev/ttyS*) and stallion ports (/dev/ttyE*)). Upon setting the baud > to something other than B0, it ensures the modem control lines are > set back to the way they were when the port was opened. > > Thanks to Ian Abbott for confirming my suspicions: > http://sourceforge.net/mailarchive/forum.php?thread_id=4984710&forum_id=12120 Nathan's email suffered from a line-folding bug (blame M$, probably!), so his patch came out corrupted. I reposted an uncorrupted version a few days later. It showed up in 2.6.9, but has yet to be applied to the 2.4 tree. I am resubmitting the patch against 2.4.30. Please apply to 2.4, thanks. Signed-off-by: Ian Abbott <[EMAIL PROTECTED]> diff -ur a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c --- a/drivers/usb/serial/ftdi_sio.c 2005-04-29 12:07:20.000000000 +0100 +++ b/drivers/usb/serial/ftdi_sio.c 2005-05-23 14:10:39.000000000 +0100 @@ -1913,6 +1913,13 @@ if (change_speed(port)) { err("%s urb failed to set baurdrate", __FUNCTION__); } + /* Ensure RTS and DTR are raised */ + else if (set_dtr(port, HIGH) < 0){ + err("%s Error from DTR HIGH urb", __FUNCTION__); + } + else if (set_rts(port, HIGH) < 0){ + err("%s Error from RTS HIGH urb", __FUNCTION__); + } } /* Set flow control */
