]> git.baikalelectronics.ru Git - kernel.git/commit
cdrom: Check SCSI passthrough support before reading audio
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 31 May 2017 21:43:49 +0000 (14:43 -0700)
committerJens Axboe <axboe@fb.com>
Thu, 1 Jun 2017 19:10:44 +0000 (13:10 -0600)
commit6fde5a4a61b551570e6a7062a7d8794a25bfbdb3
tree0387060b46a8f75a3701f8006588cb1295e0bff6
parent8b2ecd9c0123be061293a5edead7c0a2eed3fc5d
cdrom: Check SCSI passthrough support before reading audio

The CDROMREADAUDIO ioctl uses SCSI passthrough when the .disk
pointer has been set in struct cdrom_device_info. Hence check
whether SCSI passthrough is supported before submitting a SCSI
command. Note: both the ide-cd and sr drivers set the disk
pointer in struct cdrom_device_info but neither the pcd nor
the gdrom driver sets that pointer.

References: commit e5e0f7fb06a0 ("block: split scsi_request out of struct request")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Omar Sandoval <osandov@fb.com>
Cc: linux-block@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/cdrom/cdrom.c