aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_sas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_transport_sas.c')
-rw-r--r--drivers/scsi/scsi_transport_sas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 8b6d65e21bae..f3b16066387c 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -955,7 +955,8 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel,
955 list_for_each_entry(rphy, &sas_host->rphy_list, list) { 955 list_for_each_entry(rphy, &sas_host->rphy_list, list) {
956 struct sas_phy *parent = dev_to_phy(rphy->dev.parent); 956 struct sas_phy *parent = dev_to_phy(rphy->dev.parent);
957 957
958 if (rphy->scsi_target_id == -1) 958 if (rphy->identify.device_type != SAS_END_DEVICE ||
959 rphy->scsi_target_id == -1)
959 continue; 960 continue;
960 961
961 if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && 962 if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) &&
@@ -977,7 +978,6 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel,
977#define SETUP_TEMPLATE(attrb, field, perm, test) \ 978#define SETUP_TEMPLATE(attrb, field, perm, test) \
978 i->private_##attrb[count] = class_device_attr_##field; \ 979 i->private_##attrb[count] = class_device_attr_##field; \
979 i->private_##attrb[count].attr.mode = perm; \ 980 i->private_##attrb[count].attr.mode = perm; \
980 i->private_##attrb[count].store = NULL; \
981 i->attrb[count] = &i->private_##attrb[count]; \ 981 i->attrb[count] = &i->private_##attrb[count]; \
982 if (test) \ 982 if (test) \
983 count++ 983 count++