scsi: sr: Return appropriate error code when disk is ejected
authorManYi Li <limanyi@uniontech.com>
Fri, 11 Jun 2021 09:44:02 +0000 (17:44 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 19 Jun 2021 02:15:47 +0000 (22:15 -0400)
commit7dd753ca59d6c8cc09aa1ed24f7657524803c7f3
treedf1acc9e9ad96d9974627fb0744604456c66d6bd
parent1e0d4e6225996f05271de1ebcb1a7c9381af0b27
scsi: sr: Return appropriate error code when disk is ejected

Handle a reported media event code of 3. This indicates that the media has
been removed from the drive and user intervention is required to proceed.
Return DISK_EVENT_EJECT_REQUEST in that case.

Link: https://lore.kernel.org/r/20210611094402.23884-1-limanyi@uniontech.com
Signed-off-by: ManYi Li <limanyi@uniontech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sr.c