diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6dfb9785d345..340c569d4535 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1173,6 +1173,7 @@ int scsi_prep_state_check(struct scsi_device *sdev, struct request *req) | |||
1173 | if (unlikely(sdev->sdev_state != SDEV_RUNNING)) { | 1173 | if (unlikely(sdev->sdev_state != SDEV_RUNNING)) { |
1174 | switch (sdev->sdev_state) { | 1174 | switch (sdev->sdev_state) { |
1175 | case SDEV_OFFLINE: | 1175 | case SDEV_OFFLINE: |
1176 | case SDEV_TRANSPORT_OFFLINE: | ||
1176 | /* | 1177 | /* |
1177 | * If the device is offline we refuse to process any | 1178 | * If the device is offline we refuse to process any |
1178 | * commands. The device must be brought online | 1179 | * commands. The device must be brought online |
@@ -2081,6 +2082,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
2081 | switch (oldstate) { | 2082 | switch (oldstate) { |
2082 | case SDEV_CREATED: | 2083 | case SDEV_CREATED: |
2083 | case SDEV_OFFLINE: | 2084 | case SDEV_OFFLINE: |
2085 | case SDEV_TRANSPORT_OFFLINE: | ||
2084 | case SDEV_QUIESCE: | 2086 | case SDEV_QUIESCE: |
2085 | case SDEV_BLOCK: | 2087 | case SDEV_BLOCK: |
2086 | break; | 2088 | break; |
@@ -2093,6 +2095,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
2093 | switch (oldstate) { | 2095 | switch (oldstate) { |
2094 | case SDEV_RUNNING: | 2096 | case SDEV_RUNNING: |
2095 | case SDEV_OFFLINE: | 2097 | case SDEV_OFFLINE: |
2098 | case SDEV_TRANSPORT_OFFLINE: | ||
2096 | break; | 2099 | break; |
2097 | default: | 2100 | default: |
2098 | goto illegal; | 2101 | goto illegal; |
@@ -2100,6 +2103,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
2100 | break; | 2103 | break; |
2101 | 2104 | ||
2102 | case SDEV_OFFLINE: | 2105 | case SDEV_OFFLINE: |
2106 | case SDEV_TRANSPORT_OFFLINE: | ||
2103 | switch (oldstate) { | 2107 | switch (oldstate) { |
2104 | case SDEV_CREATED: | 2108 | case SDEV_CREATED: |
2105 | case SDEV_RUNNING: | 2109 | case SDEV_RUNNING: |
@@ -2136,6 +2140,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
2136 | case SDEV_RUNNING: | 2140 | case SDEV_RUNNING: |
2137 | case SDEV_QUIESCE: | 2141 | case SDEV_QUIESCE: |
2138 | case SDEV_OFFLINE: | 2142 | case SDEV_OFFLINE: |
2143 | case SDEV_TRANSPORT_OFFLINE: | ||
2139 | case SDEV_BLOCK: | 2144 | case SDEV_BLOCK: |
2140 | break; | 2145 | break; |
2141 | default: | 2146 | default: |
@@ -2148,6 +2153,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
2148 | case SDEV_CREATED: | 2153 | case SDEV_CREATED: |
2149 | case SDEV_RUNNING: | 2154 | case SDEV_RUNNING: |
2150 | case SDEV_OFFLINE: | 2155 | case SDEV_OFFLINE: |
2156 | case SDEV_TRANSPORT_OFFLINE: | ||
2151 | case SDEV_CANCEL: | 2157 | case SDEV_CANCEL: |
2152 | break; | 2158 | break; |
2153 | default: | 2159 | default: |