aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 42e72a2c1f98..cbcd3f681b62 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1095,7 +1095,8 @@ EXPORT_SYMBOL(__starget_for_each_device);
1095 * Description: Looks up the scsi_device with the specified @lun for a given 1095 * Description: Looks up the scsi_device with the specified @lun for a given
1096 * @starget. The returned scsi_device does not have an additional 1096 * @starget. The returned scsi_device does not have an additional
1097 * reference. You must hold the host's host_lock over this call and 1097 * reference. You must hold the host's host_lock over this call and
1098 * any access to the returned scsi_device. 1098 * any access to the returned scsi_device. A scsi_device in state
1099 * SDEV_DEL is skipped.
1099 * 1100 *
1100 * Note: The only reason why drivers should use this is because 1101 * Note: The only reason why drivers should use this is because
1101 * they need to access the device list in irq context. Otherwise you 1102 * they need to access the device list in irq context. Otherwise you
@@ -1107,6 +1108,8 @@ struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *starget,
1107 struct scsi_device *sdev; 1108 struct scsi_device *sdev;
1108 1109
1109 list_for_each_entry(sdev, &starget->devices, same_target_siblings) { 1110 list_for_each_entry(sdev, &starget->devices, same_target_siblings) {
1111 if (sdev->sdev_state == SDEV_DEL)
1112 continue;
1110 if (sdev->lun ==lun) 1113 if (sdev->lun ==lun)
1111 return sdev; 1114 return sdev;
1112 } 1115 }