On 03/21/11 20:54, Johan Hovold wrote:
This is simply an indication that read is still working as it is printed
in the read-urb completion handler. It seems your device is simply not
receiving any data, which could suggest that it is indeed DTR/RTS which is
causing trouble.
This evening I've found that adding two lines back into ftdi_set_termios
fixes the problem - see below. I don't understand why I've been unable
to achieve the same thing in userspace via the TIOCMBIS ioctl. Given
that it is the clear_mctrl call that seems to make the difference, I'm
trying to do the following after the initial call to tcsetattr.
int mask = 0;
ioctl(tty_fd, TIOCMBIS, &mask);
But I'm a novice when it comes to this stuff so maybe this is completely
wrong?
Cheers,
Steve
*** linux-2.6.38/drivers/usb/serial/ftdi_sio_orig.c 2011-03-21
21:34:47.000000000 +0800
--- linux-2.6.38/drivers/usb/serial/ftdi_sio.c 2011-03-21
21:37:10.000000000 +0800
***************
*** 2128,2133 ****
--- 2128,2135 ----
"urb failed to set to rts/cts flow control\n");
}
+ /* raise DTR/RTS */
+ set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
} else {
/*
* Xon/Xoff code
***************
*** 2175,2180 ****
--- 2177,2184 ----
}
}
+ /* lower DTR/RTS */
+ clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
}
}
--
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