Re: IDE-Bus rescan, like bootup...

Andrzej Krzysztofowicz (ankry@pg.gda.pl)
Wed, 2 Jun 1999 11:13:53 +0038 (MET DST)


> int main()
> {
> int x[]={0x170,0x376,15};
> int fd=open("/dev/hdc", O_RDONLY);
> int i = ioctl(fd,HDIO_SCAN_HWIF, &x);
> close(fd);
> }
>
> But anytime I run this ioctl it's return with input/output error, while
> /dev/hdc is _NOT_ in use by any case (not mounted, not accessed, etc.)...
>
> Anyone knows what the problem is?

I think, you should use it on a device, which really exist in the system
at the moment. If yoy have /dev/hda - use it.
I use a simillar program:

main() {
int par[3] = {0x170, 0x376, 15};
int fd = open("/dev/hda",0);
ioctl(fd, HDIO_SCAN_HWIF, (long)par);
}
It works, however, after use it system sometimes became unstable ...

Andrzej

--
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

- 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/