Commit a33e5bfb authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

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: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 86117d7f
...@@ -2764,6 +2764,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) ...@@ -2764,6 +2764,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
switch (oldstate) { switch (oldstate) {
case SDEV_RUNNING: case SDEV_RUNNING:
case SDEV_CREATED_BLOCK: case SDEV_CREATED_BLOCK:
case SDEV_OFFLINE:
break; break;
default: default:
goto illegal; goto illegal;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment