]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
cdrom: respect device capabilities during opening action
authorDiego Elio Pettenò <flameeyes@flameeyes.com>
Tue, 19 Nov 2019 21:37:08 +0000 (21:37 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 16:10:13 +0000 (10:10 -0600)
commit742735a952029b664dd3ea78d009b400d56df6ef
treee98a1dd7037163507d4c334e2935ebccc9b39707
parent5b1f8aac2b08cbd86d9f62d53359e176549213ac
cdrom: respect device capabilities during opening action

BugLink: https://bugs.launchpad.net/bugs/1858429
[ Upstream commit 366ba7c71ef77c08d06b18ad61b26e2df7352338 ]

Reading the TOC only works if the device can play audio, otherwise
these commands fail (and possibly bring the device to an unhealthy
state.)

Similarly, cdrom_mmc3_profile() should only be called if the device
supports generic packet commands.

To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/cdrom/cdrom.c