Skip to content

Commit 7676f83

Browse files
James BottomleyJames Bottomley
authored andcommitted
[SCSI] scsi_transport_sas: don't scan a non-existent end device
Any end device that can't support any of the scanning protocols shouldn't be scanned, so set its id to -1 to prevent scsi_scan_target() being called for it. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent 3c0c25b commit 7676f83

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/scsi/scsi_transport_sas.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,8 @@ int sas_rphy_add(struct sas_rphy *rphy)
845845
(identify->target_port_protocols &
846846
(SAS_PROTOCOL_SSP|SAS_PROTOCOL_STP|SAS_PROTOCOL_SATA)))
847847
rphy->scsi_target_id = sas_host->next_target_id++;
848+
else if (identify->device_type == SAS_END_DEVICE)
849+
rphy->scsi_target_id = -1;
848850
mutex_unlock(&sas_host->lock);
849851

850852
if (identify->device_type == SAS_END_DEVICE &&

0 commit comments

Comments
 (0)