Re: ide.c question!

Egor Egorov (lkernel@fastware.kiev.ua)
Sun, 1 Jun 1997 11:38:00 +0300 (EET DST)


On Sun, 1 Jun 1997, Gadi Oxman wrote:

> 2. You can issue the HDIO_SCAN_HWIF ioctl to any IDE drive which
> is not on the interface which you wish to rescan. For example,
> to re-scan hda + hdb, we can run:
> ...
> int args[3] = {0x1f0, 0, 0};
> ...
> fd = open("/dev/hdc", O_RDONLY);
> ioctl(fd, HDIO_SCAN_HWIF, args);

Ok. I have no source for 2.1. kernels, so how does this ioctl handlings
reads in source? I did so:

switch (cmd) {
case HDIO_IDENT:
{

for (index = 0; index < MAX_HWIFS; ++index) {
printk("Probe1s\n");
probe_hwif (&ide_hwifs[index]);
printk("Probe1e\n");
}
for (index = 0; index < MAX_HWIFS; ++index) {
printk("Probe2s\n");
hwif_init (index);
printk("Probe2e\n");
}

But it does not work, and in second or two kernel dies.:-)

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

> > not under Linux: "No ??Q after issuing write". What can I do with it? :-)
> And the line just before the "no DRQ after issuing write", does it read
> "hdx: status timeout: status=0x58 { DriveReady SeekComplete DataRequest }"?

Yes!

Thank you for answer!

> Gadi