Commit a33e5bfb29721015349a3864c91abe11f6195d5c

Authored by Hannes Reinecke
Committed by Martin K. Petersen
1 parent 86117d7f95

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/scsi/scsi_lib.c
... ... @@ -2764,6 +2764,7 @@
2764 2764 switch (oldstate) {
2765 2765 case SDEV_RUNNING:
2766 2766 case SDEV_CREATED_BLOCK:
  2767 + case SDEV_OFFLINE:
2767 2768 break;
2768 2769 default:
2769 2770 goto illegal;