diff options
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 80b2e93c2936..cc46652e4658 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -384,10 +384,21 @@ static inline unsigned int sdev_id(struct scsi_device *sdev) | |||
384 | #define scmd_id(scmd) sdev_id((scmd)->device) | 384 | #define scmd_id(scmd) sdev_id((scmd)->device) |
385 | #define scmd_channel(scmd) sdev_channel((scmd)->device) | 385 | #define scmd_channel(scmd) sdev_channel((scmd)->device) |
386 | 386 | ||
387 | /* | ||
388 | * checks for positions of the SCSI state machine | ||
389 | */ | ||
387 | static inline int scsi_device_online(struct scsi_device *sdev) | 390 | static inline int scsi_device_online(struct scsi_device *sdev) |
388 | { | 391 | { |
389 | return sdev->sdev_state != SDEV_OFFLINE; | 392 | return sdev->sdev_state != SDEV_OFFLINE; |
390 | } | 393 | } |
394 | static inline int scsi_device_blocked(struct scsi_device *sdev) | ||
395 | { | ||
396 | return sdev->sdev_state == SDEV_BLOCK; | ||
397 | } | ||
398 | static inline int scsi_device_created(struct scsi_device *sdev) | ||
399 | { | ||
400 | return sdev->sdev_state == SDEV_CREATED; | ||
401 | } | ||
391 | 402 | ||
392 | /* accessor functions for the SCSI parameters */ | 403 | /* accessor functions for the SCSI parameters */ |
393 | static inline int scsi_device_sync(struct scsi_device *sdev) | 404 | static inline int scsi_device_sync(struct scsi_device *sdev) |