small problem with serial driver in .28/.29

Pekka Pietik{inen (
Tue, 11 Mar 1997 01:30:01 +0200

After upgrading to .29, I noticed that my modem wasn't working,
every time I tried to access it I got a device is busy error.
(I have three serial ports, 1-3, the modem is on 3 with irq5).
Then I noticed the reason. In the new serial.c there's now code that
checks if the irq of the port is being used and if it is and
CONFIG_SERIAL_SHARE_IRQ is not defined, it returns EBUSY.
This might be a nice idea, but it also means that setserial
can't be used to move the port to another irq because the port is
busy because the kernel thinks it uses an irq that's already in use
by another port :)

I worked around this by moving setserial from the end of rc.local to
the start of my gpm start script.

The exact code that does this is:

if (state->irq && (!IRQ_ports[state->irq] ||
!IRQ_ports[state->irq]->next_port)) {
if (IRQ_ports[state->irq]) {
free_irq(state->irq, NULL);
if (rs_multiport[state->irq].port1)
handler = rs_interrupt_multi;
handler = rs_interrupt;
+ return -EBUSY;

Pekka Pietikäinen, Net People Ltd., Oulu, Finland