Rescan IDE interface when no IDE devices are present
My laptop has only one IDE interface (/dev/hdc), which means there are no valid IDE block devices which can be used for HDIO_SCAN_HWIF ioctl to scan for the insertion of my CD-ROM drive.
Are there alternate methods of invoking this ioctl, or for creating an open filehandle where it can be used?
Quoted 6 lines · Daniel De Graaf
My laptop has only one IDE interface (
/dev/hdc), which means there are no valid IDE block devices which can be used forHDIO_SCAN_HWIFioctl to scan for the insertion of my CD-ROM drive.Are there alternate methods of invoking this ioctl, or for creating an open filehandle where it can be used?
If you have ide1, you have both hdc and hdd (slave of hdc) unles sit's not really IDE ...
Ben.
Quoted 4 lines · Benjamin Herrenschmidt
If you have ide1, you have both hdc and hdd (slave of hdc) unles sit's not really IDE ...
Ben.
Yes, I have /dev/hdd, but no device is ever present there. I also have /dev/sda for the SATA hard disk, but do not think it is useful for HDIO_SCAN_HWIF or HWIO_UNREGISTER_HWIF ioctls.
- Daniel
I wonder if its like my laptop: hdc is hard disk, hda is cdrom, and in this case removable so it is necessary to scan for ide0 when inserting cdrom.
Quoted 9 lines · Daniel De Graaf
Quoted 4 lines · Benjamin Herrenschmidt
If you have ide1, you have both hdc and hdd (slave of hdc) unles sit's not really IDE ...
Ben.
Yes, I have
/dev/hdd, but no device is ever present there. I also have/dev/sdafor the SATA hard disk, but do not think it is useful forHDIO_SCAN_HWIForHWIO_UNREGISTER_HWIFioctls.
There isn't. Feel free to write a module to do it (see how the ioctl handles it and follow the same logic). Its at best a hack. libata is trying to add proper hotplug for ATA/SATA.
Alan
Quoted 11 lines · Alan Cox
Quoted 9 lines · Daniel De Graaf
Quoted 4 lines · Benjamin Herrenschmidt
If you have ide1, you have both hdc and hdd (slave of hdc) unles sit's not really IDE ...
Ben.
Yes, I have
/dev/hdd, but no device is ever present there. I also have/dev/sdafor the SATA hard disk, but do not think it is useful forHDIO_SCAN_HWIForHWIO_UNREGISTER_HWIFioctls.
Quoted 5 lines
There isn't. Feel free to write a module to do it (see how the ioctl handles it and follow the same logic). Its at best a hack. libata is trying to add proper hotplug for ATA/SATA.
Alan
I wrote a module to do the register/unregister through a /proc file. It currently only works on ide1; the constants in scan_hw and unreg_hw should be made to depend on the value written to the /proc if other interfaces are needed. Available at
http://danieldegraaf.afraid.org/linux/ide_proc_register.c
Daniel