summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-10-19 20:01:17 +0200
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-29 02:06:45 +0200
commitac01bbbd3b7ebfca64357aed12cf476b16abe3ce (patch)
treee0ab34ebdabb88f31a0b06321df5c7ff7122455a /drivers/scsi
parent[SCSI] sr: remove dead code (diff)
downloadlinux-ac01bbbd3b7ebfca64357aed12cf476b16abe3ce.tar.xz
linux-ac01bbbd3b7ebfca64357aed12cf476b16abe3ce.zip
[SCSI] sas: add flag for locally attached PHYs
Add a flag to mark a PHY as attached to the HBA as opposed to beeing on an expander. This is needed because various features are only supported on those. This is a crude hack, the proper fix would be to use different classes for host-attached vs expander phys. I'm looking into that. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_transport_sas.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 63445f90097e..f5618c1116f4 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -266,6 +266,9 @@ show_sas_phy_##field(struct class_device *cdev, char *buf) \
struct sas_internal *i = to_sas_internal(shost->transportt); \
int error; \
\
+ if (!phy->local_attached) \
+ return -EINVAL; \
+ \
error = i->f->get_linkerrors(phy); \
if (error) \
return error; \