Re: [PATCH 2/3] Add disk hotswap support to libata RESEND #5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lukasz Kosewski wrote:
How about this; I want this SATA hotswapping stuff to be tested, so
I'll commit my patches for 'SATA only' for the time being.  I'll stare
at them for a while and then see what kind of PATA-specific if
statements and hooks are necessary in the code?

Ideally we should just create hooks for any SATA-specific behavior, and ensure that nothing SATA-specific is written into any of the core paths.

One of the SATA controllers, Intel ICH5 & ICH6, does not have a hotplug interrupt, but yet supports "coldplug":

	* user indicates to kernel, to disable the SATA port
	* kernel says "OK, it's disabled"
	* user disconnects hard drive
and
	* SATA port is disabled
	* user connects hard drive
	* user indicates to kernel, to enable SATA port
	* kernel says "OK, I've turned it on" and probes it

This is a real-world, high-volume SATA case, yet it functionally behaves like PATA.

So that causes us to consider various entry points:

* {something}, be it a hot-unplug interrupt or user write(2) to sysfs, tells us a device is gone * {something}, be it a hot-plug interrupt or user write(2) to sysfs, tells us a new device appeared

So for either SATA or PATA, it should look similar in the core: we just need a "kick", a function call that triggers one of these two actions. The handling of those actions [your code] should hopefully be pretty generic. ;-)

Thanks for working on this!

	Jeff


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux