From: Hannes Reinecke Date: Mon, 12 Jan 2009 08:28:55 +0000 (+0100) Subject: [SCSI] Check for deleted device in scsi_device_online() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0762a4824d6c6f8eb5d2646dfda95581d99afaa5;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: James Bottomley --- 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) */ static inline int scsi_device_online(struct scsi_device *sdev) { - return sdev->sdev_state != SDEV_OFFLINE; + return (sdev->sdev_state != SDEV_OFFLINE && + sdev->sdev_state != SDEV_DEL); } static inline int scsi_device_blocked(struct scsi_device *sdev) {