Skip to content

RFC libata: support SATA devices on SAS HBAs

Brian King linux-ide linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libata: configurable host_set lockdrivers/scsi/libata-core.c include/linux/libata.h+28 -210 replies
1/2libata: Remove dependence on host_set->dev for SASdrivers/scsi/libata-core.c include/linux/libata.h+8 -614 replies
2/2libata: support SATA devices on SAS HBAsdrivers/scsi/libata-core.c drivers/scsi/libata-scsi.c drivers/scsi/libata.h +1 more+222 -380 replies
2/2libata: Add support for SATA attachment to SAS adaptersdrivers/scsi/libata-core.c drivers/scsi/libata-scsi.c drivers/scsi/libata.h +1 more+199 -381 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/2] libata: support SATA devices on SAS HBAs

The following patches enhance 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. This is just a snapshot of what I've come up with at this point and I figured I would post it to see if I was heading in a reasonable direction or not, so don't expect the code below to do anything useful at this point as it is untested.

New APIs:

ata_sas_port_alloc - Allocate an ata_port
ata_sas_port_init - Initialize an ata_port (probe bus, 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
slave_alloc
ata_sas_port_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
ata_sas_port_destroy

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