diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2006-05-19 11:49:37 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-05-20 10:01:21 -0400 |
commit | 6d99a3f372181160a56d7b1ee3259dbe03663f0d (patch) | |
tree | 97b4c8487de9b92fe5eb05e6f57a22c783c0594e /drivers | |
parent | 78a904b65420e02bf964af6a83c1fd7a85e0b59d (diff) |
[SCSI] scsi_transport_sas; fix user_scan
the user_scan() callback currently has the potential to identify the
wrong device in the presence of expanders. This is because it finds
the first device with a matching target_id, which might be an
expander. Fix this by making it look specifically for end devices.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 8b6d65e21bae..8126c395de16 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) && |