public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: select(2), usbserial, tty's and disconnect
@ 2005-03-09 10:10 Joerg Pommnitz
  0 siblings, 0 replies; 5+ messages in thread
From: Joerg Pommnitz @ 2005-03-09 10:10 UTC (permalink / raw)
  To: linux-kernel

Robert Hancock wrote:
> I thought this (hangup on remove [jpo]) had been merged, but I could be
> wrong.

I just checked bitkeeper. The patch went in some time ago:

4 months eolson 1.126 usb-serial: add tty_hangup on disconnect

Regards
  Joerg


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: select(2), usbserial, tty's and disconnect
@ 2005-03-09  9:53 Joerg Pommnitz
  0 siblings, 0 replies; 5+ messages in thread
From: Joerg Pommnitz @ 2005-03-09  9:53 UTC (permalink / raw)
  To: linux-kernel

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.

Regards
  Joerg


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

^ permalink raw reply	[flat|nested] 5+ messages in thread
* select(2), usbserial, tty's and disconnect
@ 2005-03-08 16:19 Joerg Pommnitz
  2005-03-08 16:25 ` linux-os
  0 siblings, 1 reply; 5+ messages in thread
From: Joerg Pommnitz @ 2005-03-08 16:19 UTC (permalink / raw)
  To: linux-kernel

Hello all,
currently it seems that select keeps blocking when the USB device behind
ttyUSBx gets unplugged. My understanding is, that select should return
when the next call to one of the operations (read/write) will not block.
This is certainly true for failing with ENODEV. So, is this an issue
that will be fixed or should I poll (not the syscall) the device? Or is 
there another way to monitor for a vanishing tty (it should not be USB 
specific).

Thanks in advance
  Joerg


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-09 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3FPL5-7pH-29@gated-at.bofh.it>
2005-03-09  1:54 ` select(2), usbserial, tty's and disconnect Robert Hancock
2005-03-09 10:10 Joerg Pommnitz
  -- strict thread matches above, loose matches on Subject: below --
2005-03-09  9:53 Joerg Pommnitz
2005-03-08 16:19 Joerg Pommnitz
2005-03-08 16:25 ` linux-os

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox