Skip to content

libata: Add support for SATA attachment to SAS adapters

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10libata: Setup nbytes in ata_sg_init_onedrivers/scsi/libata-core.c+1 -00 replies
2/10libata: Add host lock to struct ata_portdrivers/scsi/libata-core.c drivers/scsi/libata-scsi.c include/linux/libata.h+26 -250 replies
3/10libata: Conditionally set host->max_cmd_lendrivers/scsi/libata-core.c+7 -50 replies
4/10libata: Add support for SATA attachment to SAS adaptersdrivers/scsi/libata-core.c drivers/scsi/libata-scsi.c drivers/scsi/libata.h +1 more+175 -20 replies
5/10ipr: Disk remove path cleanupdrivers/scsi/ipr.c drivers/scsi/ipr.h+4 -32 replies
6/10ipr: Fixup device type checkdrivers/scsi/ipr.c drivers/scsi/ipr.h+18 -20 replies
7/10ipr: Simplify status area dumpingdrivers/scsi/ipr.c+4 -350 replies
8/10ipr: printk macro cleanup/removaldrivers/scsi/ipr.c drivers/scsi/ipr.h+14 -260 replies
9/10ipr: Reset device cleanupdrivers/scsi/ipr.c+41 -170 replies
10/10ipr: Support attaching SATA devicesdrivers/scsi/Kconfig drivers/scsi/Makefile drivers/scsi/ipr.c +1 more+636 -210 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/10] 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