Re: re-scan ide devices

Egervary Gergely (mauzi@faber.poli.hu)
Tue, 6 Jul 1999 15:34:01 +0200 (CEST)


hello

the same problem, as with ioctl's :(

ide_register() returns -1 ...

'hope it will be fixed in 2.2.11

- mauzi

> with 2.0 and a the appropriate kernel settings, insertying following
> code as a module used to work to rescan the ide1 bus. I didn't try
> with 2.2 yet:
>
> #include <linux/config.h>
> #include <linux/module.h>
> #include <linux/hdreg.h>
> #include <linux/kernel.h>
> #include "linux/version.h"
>
>
> static int host;
>
> int init_module(void)
> {
> host = ide_register(0x170, 0x376, 15);
> if (host == -1)
> {
> printk(KERN_NOTICE "IDE-Register failed on host %d \n", host);
> return host;
> }
> printk(KERN_NOTICE "IDE-Register successfull on host %d \n", host);
> return 0;
> }
>
> void cleanup_module(void)
> {
> printk(KERN_NOTICE "Trying to ide_unregister host %d\n", host);
> ide_unregister(host);
> }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/