Messages in this thread |  | | | Subject | Patch for drivers/block/floppy.c | | From | Claus-Justus Heine <> | | Date | 02 Apr 1997 11:13:35 +0200 |
| |
Hi!
Below I've included a small patch to the floppy driver that makes it check for IO regions before doing any hardware probing. There could be conflicts between the floppy driver and the ftape driver when accidentally trying to access a floppy disk while the ftape driver was using the tape drive (or vice versa). My latest development version of the ftape driver also uses the check_region() calls before accessing hardware registers s.t. those conflicts should be solved.
What I've done: call check_region() before actually accessing the hardware. If the region is unused, call request_region() to signal other drivers (i.e. ftape) that the io region is currently in use.
The current version of the floppy driver does part of its hardware probing before checking if other drivers (i.e. ftape) make currently use of it.
The patched floppy driver also releases the regions after releasing the irq and dma channel. The current implementation doesn't do this but leave the io region `allocated' until it is unloaded (i.e. never when compiled into the kernel). This behavior make the proper use of check/request/release_region() impossible with the floppy driver.
Hopefully the patch doesn't hose up the floppy driver. It works for me, though. That patch is against 2.1.30. It should also apply to 2.0.29, but I only tested it with 2.1.30.
Cheers
Claus
[unhandled content-type:application/octet-stream] Claus-Justus Heine claus@momo.math.rwth-aachen.de http://samuel.math.rwth-aachen.de/~LBFM/claus
PGP Public Key: http://samuel.math.rwth-aachen.de/~LBFM/claus/claus-public-key.asc
Ftape - the Linux Floppy Tape Project WWW : http://samuel.math.rwth-aachen.de/~LBFM/claus/ftape Mailing-list: linux-tape@vger.rutgers.edu Newsgroup : linux.dev.tape
[unhandled content-type:application/pgp-signature] |  |