Messages in this thread | | | Date | Thu, 30 Oct 2008 17:22:51 +0000 | From | Alan Cox <> | Subject | Re: Linux 2.6.28-rc2 i/o error on /dev/ttyUSB0 |
| |
> It looks partially fixed. > No more I/O errors, and the gps unit works fine. > > But look at the attached dmesg file - there are WARNINGs still.
Thats an unrelated and long long standing bug - the USB serial close paths are all racy versus the received URB handlers. The only reason you now will occasionally get a warning message is that we bother to actually trap the case rather than praying silently it doesn't blow up.
What actually occurs is that you enter usb-serial:usb_serial_close which then drops port->port.count and calls type->close. Somewhere in there new data arrives and the ldisc path gets to run. The n_tty path tries to echo back bytes to the (closed) port and the WARN triggers.
Changing the order to clear the port->tty first requires auditing each and every USB serial driver close method so isn't planned for this release - but its not caused major disasters in the past few years the race has been there.
I can push patches this release for it if Linus particularly wants however.
Alan
| |