Skip to contentSkip to conversation

libata and hotplug status

DISCUSSION Jim Ramsay 2 participants 2 messages Jun 28, 2005 – Jul 2, 2005 libata

lore
Share & tools
lore

Jim Ramsay

author
#0 lore raw

I read at http://linux.yyz.us/sata/software-status.html that "libata does not support hotplug... yet", implying that it eventually would.

I am very interested in the current state and progress of SATA hotplug support for libata-based drivers (specifically the 'sata_promise' driver for the Promise TX4 card). Has there been any preliminary work or discussion on this feature?

How would it best be implemented? How much of a pain would it be to do? Are there any half-baked patches out there I can take a peek at or help with? Who can I prod to bump this up on the priority list for libata? What should I prod with?

Signature · 2 lines
Jim Ramsay
"Me fail English?  That's unpossible!"
#1 lore raw
Quoted 8 lines · Jim Ramsay

I read at http://linux.yyz.us/sata/software-status.html that "libata does not support hotplug... yet", implying that it eventually would.

I am very interested in the current state and progress of SATA hotplug support for libata-based drivers (specifically the 'sata_promise' driver for the Promise TX4 card). Has there been any preliminary work or discussion on this feature?

Quoted 5 lines

How would it best be implemented? How much of a pain would it be to do? Are there any half-baked patches out there I can take a peek at or help with? Who can I prod to bump this up on the priority list for libata? What should I prod with?

Hi, Jim.
Hi, Jeff.

First of all, AFAIK, there's no previous work in implementing SATA
hotplug. I used to be pretty interested in implementing hot-plug for libata. The problems are...

* libata runs under SCSI emulation, yet it tries to remain separate
from SCSI midlayer as much as possible (maybe for possible departure from SCSI emulation someday). So, the probing procedure is done inside libata layer when attaching a HBA and later SCSI discover commands are just simulated making using SCSI midlayer's hot-plug support a little bit difficult.

* SCSI midlayer's hotplug support is pretty brittle. The device state
model/host state model are broken in several aspects. (eg. multiple entities may attempt to change a device's state but there's no synchronization. You can mess it up pretty easily.) Also, there's no generic hot-plug helpers in the SCSI midlayer which each specific drivers can use with ease.

Well, I tried to fix SCSI midlayer and implement new device state
model but my patches haven't made it into SCSI devel tree (haven't given up yet ;-), and I'm not really sure how Jeff thinks about changing SATA probing such that it's more integrated with/tied to SCSI midlayer. Maybe it's possible to implement hot plugging w/o strictly following SCSI midlayer's probing model but, IMHO, it's gonna be messy.

Jeff, what do you think about this?

Signature · 1 line
tejun