Messages in this thread | | | Date | Sun, 1 Jun 1997 09:57:55 -0500 | From | Jeff Epler <> | Subject | Probing IDE interfaces after boot (was Re: ide.c question!) |
| |
On Sun, Jun 01, 1997 at 11:38:00AM +0300, Egor Egorov wrote: > > 3. If you have a single IDE interface, you can compile ide-probe.c > > both as a module and into the kernel by: > > copying ide-probe.c to ide-probe-m.c > > adding M_OBJS += ide-probe-m.o after L_OBJS += ide-probe.o > > in linux/drivers/block/Makefile > > and just "insmod ide-probe-m" whenever you wish to re-scan > > the idle IDE devices. > > Will this module work with 2.0 kernels?
In 2.0 kernels, one can probe ide interfaces after boot by loading a bogus module. This also requires that CONFIG_BLK_DEV_IDE_PCMCIA is set.
Enclosed is a module which, when loaded, will ask ide.c to recognize my newly configured sb16 pnp ide interface.
Jeff -- \/ jepler@inetnebr.com http://www.crack.com/ (0|1(01*0)*1)+ Don't tell any big lies today. Small ones can be just as effective. #define MODULE
#include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h>
int port=0x1e8; int port1=0x3ee; int irq=11; int index=1; int do_register=1; int res;
init_module() { if (do_register) { printk("ide_register(%x, %x, %d)->%d\n", port, port1, irq, res=ide_register(port, port1, irq)); } else { printk("ide_unregister(%d)->%d\n", res=index, ide_unregister(index)); } return res; }
cleanup_module() { }
| |