Subject: Re: Handling BREAK on serail console in com dirver?
To: None <firstname.lastname@example.org>
From: Valeriy E. Ushakov <email@example.com>
Date: 10/09/2001 01:19:01
On Sun, Oct 07, 2001 at 05:57:00 -0700, Bill Studenmund wrote:
> > In com_enable_debugport and com_shutdown we set Interrupt Enable
> > Register to IER_ERXRDY with a comment that for serial console we want
> > an interrupt on BREAK. However my reading of the ns16550 docs is that
> > to get an interrupt on BREAK we need to set it to IER_ERLS.
> First off, have you tried it with the current code? IF it works, don't
> change it. :-)
Well, I was not going to change it. It's just IER_ERXRDY and
/* interrupt on break */ on one line has striken me as, well,
> To test, run w/ a serial console but with no getty running on it (so the
> port won't be open). Then try sending a break. You should get into ddb.
It does break into ddb (I made sure I don't have anything holding onto
console), but it gets the interrupt for "wrong" reason :). With
current code we've got interrupt for IIR_RXTOUT. With IER_ERLS
enabled instead we've got IIR_RLS.
On the minus side, in fifo mode the BREAK is associated with
particular character in the fifo and so if one pastes something into
serial console (e.g. speed mismatch garbage), one will need several
breaks to get to ddb.
> What exactly does ERXRDY do?
Enables IIR_RXRDY and in fifo mode IIR_RXTOUT (which makes me wonder
what happens with fifo disabled or fifo-less chips, but I'm too lazy
to check the former and doesn't have the latter).
Well, I was just curious...
firstname.lastname@example.org | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen