Re: hdparm and removable IDE?

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Mar 28 2003 - 11:55:34 EST


On Fri, 2003-03-28 at 14:04, Jeremy Jackson wrote:
> It might be better to say not supported fully, or support not complete.
> Most chipsets and their linux drivers have the ability to tristate-off
> the IDE bus, making it work safely on the electrical level. Switching
> off the power to the drive has to be provided by the swap bay in
> question. I can get that for $17 CDN. But...

Hardly "most", I think its two

> This is another piece of the puzzle. The kernel buffer-cache can be
> flushed by a simple sync command. I've only seen the IDE write cache

And on umount by 2.5, or always on 2.4 as well if the device is marked
removable

> What can be done at boot... correct. However, the BIOS does part of the
> BOOT init, the linux kerenel IDE driver does some more. So changing the
> drive without rebooting through BIOS can be a problem. The PIO modes
> are the issue here. Perhaps a script can do hdparm -X somehow, but
> nobody is certain if it will be reliable, because who knows what the
> bios does. With LinuxBIOS there is hope though.

Not really the PIO modes. In fact the PIO modes are generally just fine.
The problems are mostly at the DMA and UDMA end of things where there
is complex setup or interactions involved.

> IMHO the ide driver is a real mess. statically allocated structures,

You bet.

> because the kernel command line parameters have to be read early because
> they're so wierd, no wonder the hdparm -U / -R stuff is busted. It
> should take the PCI ID of the interface, not the io ports. Fixing this
> is on my hit list, in about a month.

2.7 at the earliest, and only if there is a general buy in about such a
change to the init handling. Similarly the big issues with hdparm -U and
-R are the same as with hotplug races, and will take a lot more than
quick hacks to fix.

Alan

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



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:32 EST