diff options
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index cc46652e4658..b49e725be039 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -42,9 +42,11 @@ enum scsi_device_state { | |||
42 | * originate in the mid-layer) */ | 42 | * originate in the mid-layer) */ |
43 | SDEV_OFFLINE, /* Device offlined (by error handling or | 43 | SDEV_OFFLINE, /* Device offlined (by error handling or |
44 | * user request */ | 44 | * user request */ |
45 | SDEV_BLOCK, /* Device blocked by scsi lld. No scsi | 45 | SDEV_BLOCK, /* Device blocked by scsi lld. No |
46 | * commands from user or midlayer should be issued | 46 | * scsi commands from user or midlayer |
47 | * to the scsi lld. */ | 47 | * should be issued to the scsi |
48 | * lld. */ | ||
49 | SDEV_CREATED_BLOCK, /* same as above but for created devices */ | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | enum scsi_device_event { | 52 | enum scsi_device_event { |
@@ -393,11 +395,13 @@ static inline int scsi_device_online(struct scsi_device *sdev) | |||
393 | } | 395 | } |
394 | static inline int scsi_device_blocked(struct scsi_device *sdev) | 396 | static inline int scsi_device_blocked(struct scsi_device *sdev) |
395 | { | 397 | { |
396 | return sdev->sdev_state == SDEV_BLOCK; | 398 | return sdev->sdev_state == SDEV_BLOCK || |
399 | sdev->sdev_state == SDEV_CREATED_BLOCK; | ||
397 | } | 400 | } |
398 | static inline int scsi_device_created(struct scsi_device *sdev) | 401 | static inline int scsi_device_created(struct scsi_device *sdev) |
399 | { | 402 | { |
400 | return sdev->sdev_state == SDEV_CREATED; | 403 | return sdev->sdev_state == SDEV_CREATED || |
404 | sdev->sdev_state == SDEV_CREATED_BLOCK; | ||
401 | } | 405 | } |
402 | 406 | ||
403 | /* accessor functions for the SCSI parameters */ | 407 | /* accessor functions for the SCSI parameters */ |