reserve= not working, drivers fail to do check_region

Kohtala Marko (Marko.Kohtala@ntc.nokia.com)
Fri, 10 Jan 1997 00:36:06 +0200


Lots of drivers seem to forget to do check_region when probing for
devices.

Therefore I am asking device driver maintainers to add the apropriate
check_region calls to their drivers.

This lists some candidate drivers (searched from 2.1.20):

$ find -type f -name '*.c' ! -exec grep -q check_region {} \; -exec grep -q request_region {} \; -print
./drivers/net/eexpress.c
./drivers/net/dgrs.c
./drivers/net/3c59x.c
./drivers/net/sdla.c
./drivers/net/3c523.c
./drivers/net/smc-mca.c
./drivers/block/hd.c
./drivers/block/floppy.c
./drivers/char/keyboard.c
./drivers/char/istallion.c
./drivers/char/stallion.c
./drivers/char/wdt.c
./drivers/char/vga.c
./drivers/char/pcxx.c
./drivers/char/ftape/fdc-io.c
./drivers/char/rtc.c
./drivers/scsi/in2000.c
./drivers/sound/gus_wave.c

Also, there are some that do check_region sometimes, but not before
I/O during the probe at boot time.

./drivers/char/serial.c
./drivers/net/3c509.c
./drivers/net/depca.c
./drivers/net/de600.c
./drivers/net/de620.c
./drivers/net/de4x5.c
./drivers/scsi/fdomain.c
./drivers/cdrom/cdu31a.c

Many drivers do I/O without check_region if user gives the address or
the card is in PCI devices. I do not think they should, since they'll
fail at request_region. Most net drivers based on the skeleton are
like this.

I am fairly certain I could do the fixes myself, but I can not
possibly test them.

Would be great to have the fix in 2.0.x, so that I could use stock
Linux on a problematic machine. I ran into problems trying to run
Linux on a machine with a built in watchdog which can not be disabled
(and is not supported by Linux). It seems a probe activates the
watchdog and the machine resets shortly after. reserve= does not help.

Btw, drivers/scsi/53c7,8xx.c seems to have unused NCR53c7xx_detect
function (not to mention inconvenient file name as etags breaks
because of it).

-- 
---
Marko Kohtala - Marko.Kohtala@ntc.nokia.com, Marko.Kohtala@hut.fi