aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/sas_ata.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-11-17 20:59:48 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 14:39:36 -0500
commit756f173fb5fa90ec15222e80fb579288be7794fd (patch)
tree83633164ff4b8fb20c2fb383429905e25ceed1fc /include/scsi/sas_ata.h
parent735f7d2fedf57380214221be7bed7f62d729e262 (diff)
[SCSI] libsas: fix leak of dev->sata_dev.identify_[packet_]device
These are never freed in the nominal path. A domain_device has a different lifetime than a sas_rphy we need a dev->rphy independent way of identifying sata devices. Reviewed-by: Jack Wang <jack_wang@usish.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi/sas_ata.h')
-rw-r--r--include/scsi/sas_ata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 9c159f74c6d..7d5013f8653 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -32,7 +32,8 @@
32 32
33static inline int dev_is_sata(struct domain_device *dev) 33static inline int dev_is_sata(struct domain_device *dev)
34{ 34{
35 return (dev->rphy->identify.target_port_protocols & SAS_PROTOCOL_SATA); 35 return dev->dev_type == SATA_DEV || dev->dev_type == SATA_PM ||
36 dev->dev_type == SATA_PM_PORT;
36} 37}
37 38
38int sas_ata_init_host_and_port(struct domain_device *found_dev, 39int sas_ata_init_host_and_port(struct domain_device *found_dev,