diff options
-rw-r--r-- | drivers/scsi/scsi_lib.c | 3 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 68e0d7dbe6ce..bf5191f6aaa1 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -2037,6 +2037,9 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) | |||
2037 | 2037 | ||
2038 | case SDEV_DEL: | 2038 | case SDEV_DEL: |
2039 | switch (oldstate) { | 2039 | switch (oldstate) { |
2040 | case SDEV_CREATED: | ||
2041 | case SDEV_RUNNING: | ||
2042 | case SDEV_OFFLINE: | ||
2040 | case SDEV_CANCEL: | 2043 | case SDEV_CANCEL: |
2041 | break; | 2044 | break; |
2042 | default: | 2045 | default: |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 0f7e6f94d66b..4c31799e2711 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -810,6 +810,7 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) | |||
810 | 810 | ||
811 | static inline void scsi_destroy_sdev(struct scsi_device *sdev) | 811 | static inline void scsi_destroy_sdev(struct scsi_device *sdev) |
812 | { | 812 | { |
813 | scsi_device_set_state(sdev, SDEV_DEL); | ||
813 | if (sdev->host->hostt->slave_destroy) | 814 | if (sdev->host->hostt->slave_destroy) |
814 | sdev->host->hostt->slave_destroy(sdev); | 815 | sdev->host->hostt->slave_destroy(sdev); |
815 | transport_destroy_device(&sdev->sdev_gendev); | 816 | transport_destroy_device(&sdev->sdev_gendev); |