aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_device.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2009-01-12 03:28:55 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 13:57:56 -0400
commit0762a4824d6c6f8eb5d2646dfda95581d99afaa5 (patch)
treedcf60e311f6ead5f706fa8956c5c7cfcee12c93f /include/scsi/scsi_device.h
parent71fa7421822a251fc3e9ffb54653395b6b964309 (diff)
[SCSI] Check for deleted device in scsi_device_online()
scsi_device_online() is not just a negation of SDEV_OFFLINE, also devices in state SDEV_DEL are actually offline. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r--include/scsi/scsi_device.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9576690901dd..15b09266b7ff 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -401,7 +401,8 @@ static inline unsigned int sdev_id(struct scsi_device *sdev)
401 */ 401 */
402static inline int scsi_device_online(struct scsi_device *sdev) 402static inline int scsi_device_online(struct scsi_device *sdev)
403{ 403{
404 return sdev->sdev_state != SDEV_OFFLINE; 404 return (sdev->sdev_state != SDEV_OFFLINE &&
405 sdev->sdev_state != SDEV_DEL);
405} 406}
406static inline int scsi_device_blocked(struct scsi_device *sdev) 407static inline int scsi_device_blocked(struct scsi_device *sdev)
407{ 408{