lkml.org 
[lkml]   [2005]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 03 Oct 2005 11:53:26 -0400
FromJeff Garzik <>
SubjectRe: [PATCH 2/3] Add disk hotswap support to libata RESEND #5
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


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

\
 
 \ /
  Last update: 2005-10-03 17:56    [from the cache]
©2003-2010