Re: [RFC][PATCH 4/4] ahci: support hot plug when port/controlleris runtime suspended
From: Matthew Garrett
Date: Mon Jan 02 2012 - 10:57:31 EST
On Thu, Dec 15, 2011 at 11:21:31AM -0800, Tejun Heo wrote:
> SATA link detection requires hot wire and keeping wire hot takes
> power. I think it's fair tradeoff to not support hotplug while
> powersaving is on. We have warm plug mechanism (the SCSI rescan
> trigger via sysfs) after all. It would be nice if things like that is
> somehow exported to userland in easy way tho (cc'ing Kay), but I
> frankly don't have much idea where that would fit.
We expose the ahci_port_cmd field in sysfs, which lets us know whether a
port is flagged as hotpluggable or external. Userspace could use that to
identify whether a given port can be safely powered off or not. It's not
guaranteed - desktop boards with esata ports will typically not have
this information available (because the esata port could be plugged into
any on-board port), so I think leaving it up to userspace to set the
policy makes sense.
--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/