diff options
author | Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com> | 2018-04-17 13:33:12 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-19 05:37:40 +0200 |
commit | 505aa4b6a8834a2300971c5220c380c3271ebde3 (patch) | |
tree | e6ea517ca16fa8fe10869bfb6e7333b7b03408dc /drivers/scsi | |
parent | scsi: megaraid_sas: Do not log an error if FW successfully initializes. (diff) | |
download | linux-505aa4b6a8834a2300971c5220c380c3271ebde3.tar.xz linux-505aa4b6a8834a2300971c5220c380c3271ebde3.zip |
scsi: sd: Defer spinning up drive while SANITIZE is in progress
A drive being sanitized will return NOT READY / ASC 0x4 / ASCQ
0x1b ("LOGICAL UNIT NOT READY. SANITIZE IN PROGRESS").
Prevent spinning up the drive until this condition clears.
[mkp: tweaked commit message]
Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a6201e696ab9..9421d9877730 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2121,6 +2121,8 @@ sd_spinup_disk(struct scsi_disk *sdkp) break; /* standby */ if (sshdr.asc == 4 && sshdr.ascq == 0xc) break; /* unavailable */ + if (sshdr.asc == 4 && sshdr.ascq == 0x1b) + break; /* sanitize in progress */ /* * Issue command to spin up drive when not ready */ |