Re: tty TTY_HUPPED anomaly

From: Mark Hounschell
Date: Wed Jan 04 2012 - 10:59:44 EST


On 12/23/2011 03:40 PM, Alan Cox wrote:

I turned the TTY_DEBUG_HANGUP and added some additional printks. You see
below the first port works just fine but the second fails because
something is calling the tty_hangup function around 70usecs after I open
the device???
What and Why???

The driver will be - and because the carrier dropped and the HUPCL flag
is set on the port.


Thanks Alan,

But what has carrier dropping got to do with an TIOCSETD ioctl. For that matter, any operation other than an actual read or write to the port? This seems wrong. You've obviously looked at my code being executed. What can be done to prevent tty_hangup from being called after opening the port? And if this is really supposed to happen, why does it not always happen?

Even if the first thing I do after opening the port is to clear HUPCL and set CLOCAL, this still randomly happens the first time I open the port after booting.

Thanks again for your help
Mark



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