[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#645811: inux-image-3.0.0-2-686-pae: lirc_serial spuriously claims assigned port and irq to be in use



On Tue, 2011-11-15 at 21:16 +0100, Torsten Crass wrote:
> Hi,
> 
> ok, 'twas my fault -- loading lirc_serial with share_irq=1 did the 
> trick. Hence I ask you to close this bug report.

No, this is not your fault.  PC serial ports generally can't (and don't)
share IRQs and it should not be necessary to use this parameter.

You originally wrote:
> althoug I disabled serial port /dev/ttyS1 via setserial, lirc_serial
> claims the specified IO port (0x02f8) and IRQ (3) to be in use. However, 
> "cat /proc/ioports" and "cat /proc/interrupts" tell otherwise.
[...]
>    3:          0          0          0          0   IO-APIC-edge
>    4:          1          1          0          2   IO-APIC-edge

Although these lines seem to there is no interrupt handler for these
IRQs, the very fact that an IRQ is listed in /proc/interrupts means
there is one.  It's just that in this case the name is blank - and that
points to the bug.

I think what you did was something like that:

# modprobe lirc_serial
FATAL: Error inserting lirc_serial ...: Device or resource busy
# modprobe lirc_serial io=0x2f8 irq=3
FATAL: Error inserting lirc_serial ...: Device or resource busy
# dmesg | less
...
# setserial /dev/ttyS1 uart none
# modprobe lirc_serial io=0x2f8 irq=3
FATAL: Error inserting lirc_serial ...: Device or resource busy

On each failure the module:
1. Allocated the IRQ, which succeeded because the serial driver does not
allocate it until the serial device is in use.
2. Attempted to allocate the I/O region, which failed because the
regular serial driver had allocated it.
3. Exited - without releasing the IRQ.

So when you got the configuration right the driver still failed, because
the IRQ was already allocated.

If you get the configuration right first time the driver will work:

# setserial /dev/ttyS1 uart none
# modprobe lirc_serial io=0x2f8 irq=3

I reproduced the failure (and success) in a VM and I have a series of
fixes for the module which I'll apply shortly.

Ben.

-- 
Ben Hutchings
The world is coming to an end.	Please log off.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: