aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian King <brking@us.ibm.com>2006-08-07 15:27:31 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-09 00:08:39 -0400
commit80289167fd3ebaeb7b2641e69cbec44b61165fe7 (patch)
treecb979ef0563377b9c901359dbcb1f117ff7d48d5 /include
parentf6d950e2a5209bd7e3fb1a238f43f24f3697f5b0 (diff)
[PATCH] libata: Add support for SATA attachment to SAS adapters
The following patch 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 Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index be15ef5d8d85..cf5eb1da3e32 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -691,6 +691,15 @@ extern int ata_scsi_detect(struct scsi_host_template *sht);
691extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 691extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
692extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 692extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
693extern int ata_scsi_release(struct Scsi_Host *host); 693extern int ata_scsi_release(struct Scsi_Host *host);
694extern void ata_sas_port_destroy(struct ata_port *);
695extern struct ata_port *ata_sas_port_alloc(struct ata_host_set *,
696 struct ata_port_info *, struct Scsi_Host *);
697extern int ata_sas_port_init(struct ata_port *);
698extern int ata_sas_port_start(struct ata_port *ap);
699extern void ata_sas_port_stop(struct ata_port *ap);
700extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *);
701extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *),
702 struct ata_port *ap);
694extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); 703extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
695extern int sata_scr_valid(struct ata_port *ap); 704extern int sata_scr_valid(struct ata_port *ap);
696extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); 705extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val);