提交 505aa4b6 编写于 作者: M Mahesh Rajashekhara 提交者: Martin K. Petersen

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: NMahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 fb1633d5
...@@ -2121,6 +2121,8 @@ sd_spinup_disk(struct scsi_disk *sdkp) ...@@ -2121,6 +2121,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
break; /* standby */ break; /* standby */
if (sshdr.asc == 4 && sshdr.ascq == 0xc) if (sshdr.asc == 4 && sshdr.ascq == 0xc)
break; /* unavailable */ break; /* unavailable */
if (sshdr.asc == 4 && sshdr.ascq == 0x1b)
break; /* sanitize in progress */
/* /*
* Issue command to spin up drive when not ready * Issue command to spin up drive when not ready
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册