Re: Cosmetics - improper registration of resources (floppy.c, serial.c)

Jon Tombs (jon@gte.esi.us.es)
Fri, 14 Jun 1996 17:30:08 +0200 (MET DST)


Harald Anlauf said:
>
> Hi,
>
> this is only a minor cosmetic issue, but drivers/block/floppy.c and
> drivers/char/serial.c do not properly register the used resources (IRQ's).
> The serial driver only registers irq 4 (com1) but not irq 3 (com2);
> the floppy driver should register irq 6. Maybe this can be fixed in 2.0.x.
>
> Example:
>
> /proc/interrupts:
> 0: 478505 timer
> 1: 4669 keyboard
> 2: 0 cascade
> 4: 30015 + serial
> 11: 11096 aha1740
> 13: 0 math error
> 15: 0 + ide1

This is correct, you are using your mouse on IRQ4, but your modem is idle.
The floppy and serial ports correctly only register the interrupts when they
use them, this isn't a bug. On many systems irq 6 might be floppy or ftape
(they share the irq). The serial ports can work without irqs so it would be
possible to run com2 with polling and reuse IRQ 3 for something else.

> /proc/ioports is o.k., everything is properly registered:

You can't share ioports, and the devices are phyically using them always so
yes they are registered without regard to whether the device is in use or not.

Jon