How to do hangup?

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Sun Feb 27 2000 - 11:48:39 EST


Hello,

I'm mailing you, as the author of the tty code under Linux, with
a question about how to do hangup correctly. I'm writing an USB modem
driver. The USB hardware emulates a PC serial port and a modem connected
to it.

Now, what I'd like to know is what to do exacly on a DCD signal drop to
correctly signal the application the line was disconnected (eg. when
running pppd and the modem looses carrier.)

I'm doing it now via tty_hangup(). What's odd is that most other serial
drivers have their own BH which they schedule to run tty_hangup(). This
seems nonsensical to me, because tty_hangup() schedules a task queue,
which in turn runs tty_do_hangup(). Why the BH? Relict historical code?

Also, what's tty_vhangup() for? It does the same as tty_hangup().

Now the real problem - in minicom when the DCD signal drops, the CLOCAL
flag isn't set and thus my code calls tty_hangup() and kills any further
communication with modem. Not minicom, though. What exact conditions
have to be met to call tty_hangup()? For normal serial lines this
doesn't happen with minicom ...

Anyone on the list, help?

-- 
Vojtech Pavlik
SuSE Labs

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:17 EST