]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jul 2021 10:49:30 +0000 (12:49 +0200)
commitb52a404434a93d83b243187c6cf135dd6ba529c8
tree6f1f54ba2f873ba8251e7386cff0180b44f80cb2
parent2445837e9cd084ba849a7c1c70086a6cdc608f48
scsi: sr: Return appropriate error code when disk is ejected

[ Upstream commit 7dd753ca59d6c8cc09aa1ed24f7657524803c7f3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/sr.c