Re: select(2), usbserial, tty's and disconnect

From: Joerg Pommnitz
Date: Wed Mar 09 2005 - 04:56:40 EST

Robert Hancock wrote:
> There was discussion at one point about doing a tty_hangup() when the >
USB device was disconnected (this causes the read() to return with 0 > >
bytes and future open attempts to fail), and a patch was put out to do >
this. I thought this had been merged, but I could be wrong.

Well, I observed the hanging select with SuSE kernel 2.6.8-24.11, so it is
fairly current. I'm seeing this problem with an Option Wireless UMTS data
card. This card is interesting. It is a CardBus card that presents a USB
OHCI hub to the system. Internally it claims to plug in a USB serial
connector. If you issue a RESET AT command, the kernel tells me that the
USB device virtually plugged into the hub got disconnected. A few seconds
later the gets plugged in again. At this point I would have to reopen the
tty. Unfortunately the disconnect event does not propagate to the
application. I could poke the tty to see whether it is still really there,
but this seems quite hackish.


Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at