Skip to contentSkip to conversation

libata: Add support for SATA attachment to SAS adapters

PATCH In review Brian King 1 participant 1 message Mar 29, 2006

Subsystems (2)
lore
Share & tools
lore

Brian King

author
#0 lore raw

cover libata: Add support for SATA attachment to SAS adapters

Jeff,

Here is a refresh of my patchset to add support to libata to allow for SAS HBAs to use libata to attach SATA devices. The patchset is against your #upstream branch. Once again, no real feature changes here, just a refresh (some of the patches no longer would apply). Additionally, I have removed the CDB length checking code that was discussed yesterday on the list. I've been running with these patches for a while now without problems.

Please apply.

Thanks,

Brian

The following patchset enhances libata to allow SAS device drivers to utilize libata to talk to SATA devices. It introduces some new APIs which allow libata to be used without allocating a virtual scsi host.

New APIs:

ata_sas_port_alloc - Allocate an ata_port
ata_sas_port_init - Initialize an ata_port (probe device, etc) ata_sas_port_destroy - Free an ata_port allocated by ata_sas_port_alloc ata_sas_slave_configure - configure scsi device ata_sas_queuecmd - queue a scsi command, similar to ata_scsi_queuecomand

These new APIs can be used either directly by a SAS LLDD or could be used by the SAS transport class.

Possible usage for a SAS LLDD would be:

scsi_scan_host
target_alloc
ata_sas_port_alloc
slave_alloc
ata_sas_port_init
slave_configure
ata_sas_slave_configure

Commands received by the LLDD for SATA devices would call ata_sas_queuecmd.

Device teardown would occur with:

slave_destroy
port_disable
target_destroy
ata_sas_port_destroy

Signature · 3 lines
Brian King
eServer Storage I/O
IBM Linux Technology Center