aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2007-07-16 14:41:04 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-18 12:16:14 -0400
commit0f05df8b3b41bc258bdf520b72e8cf7c524048b7 (patch)
treee6fd95f097da4785a1e0fb195044a745de8e89aa /include/scsi
parent3a2755af37b317d47fdc3dd15178adaf5d47263e (diff)
[SCSI] libsas, aic94xx: fix dma mapping cockups with ATA
This one was noticed by Gilbert Wu of Adaptec: The libata core actually does the DMA mapping for you, so there has to be an exception in the device drivers that *don't* do dma mapping for ATA commands. However, since we've already done this, libsas must now dma map any ATA commands that it wishes to issue ... and yes, this is a horrible mess. Additionally, the test in aic94xx for ATA protocols isn't quite right. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_transport_sas.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 9aedc19820b0..97eeb5b59ea5 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -23,6 +23,12 @@ enum sas_protocol {
23 SAS_PROTOCOL_SSP = 0x08, 23 SAS_PROTOCOL_SSP = 0x08,
24}; 24};
25 25
26static inline int sas_protocol_ata(enum sas_protocol proto)
27{
28 return ((proto & SAS_PROTOCOL_SATA) ||
29 (proto & SAS_PROTOCOL_STP))? 1 : 0;
30}
31
26enum sas_linkrate { 32enum sas_linkrate {
27 /* These Values are defined in the SAS standard */ 33 /* These Values are defined in the SAS standard */
28 SAS_LINK_RATE_UNKNOWN = 0, 34 SAS_LINK_RATE_UNKNOWN = 0,