Skip to content

Commit a33e5bf

Browse files
Hannes Reineckemartinkpetersen
authored andcommitted
scsi: core: Allow state transitions from OFFLINE to BLOCKED
When an RSCN gets delayed (or not being sent at all), the transport class will detect an error, EH kicks in, and eventually will be setting the device to offline. If we receive an RSCN after that, the device will stay in 'offline'. This patch allows for an 'offline' to 'blocked' transition, thereby allowing the device to become active again. Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 86117d7 commit a33e5bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,6 +2764,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
27642764
switch (oldstate) {
27652765
case SDEV_RUNNING:
27662766
case SDEV_CREATED_BLOCK:
2767+
case SDEV_OFFLINE:
27672768
break;
27682769
default:
27692770
goto illegal;

0 commit comments

Comments
 (0)