mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
scsi: sd: Defer spinning up drive while SANITIZE is in progress
commit 505aa4b6a8 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a5f4276787
commit
b23b417427
@@ -2132,6 +2132,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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user