mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
scsi: sr: cdrom: Move cdrom_read_cdda_bpc() into the sr driver
cdrom_read_cdda_bpc() relies on sending SCSI command to the low level driver using a REQ_OP_SCSI_IN request. This isn't generic block layer functionality, so move the actual low-level code into the sr driver and call it through a new read_cdda_bpc method in the cdrom_device_ops structure. With this the CDROM code does not have to pull in scsi_normalize_sense() and depend on CONFIG_SCSI_COMMON. Link: https://lore.kernel.org/r/20210730072752.GB23847%40lst.de Tested-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
08dc2f9b53
commit
ba51bdafaa
@@ -86,11 +86,13 @@ struct cdrom_device_ops {
|
||||
/* play stuff */
|
||||
int (*audio_ioctl) (struct cdrom_device_info *,unsigned int, void *);
|
||||
|
||||
/* driver specifications */
|
||||
const int capability; /* capability flags */
|
||||
/* handle uniform packets for scsi type devices (scsi,atapi) */
|
||||
int (*generic_packet) (struct cdrom_device_info *,
|
||||
struct packet_command *);
|
||||
int (*read_cdda_bpc)(struct cdrom_device_info *cdi, void __user *ubuf,
|
||||
u32 lba, u32 nframes, u8 *last_sense);
|
||||
/* driver specifications */
|
||||
const int capability; /* capability flags */
|
||||
};
|
||||
|
||||
int cdrom_multisession(struct cdrom_device_info *cdi,
|
||||
|
||||
Reference in New Issue
Block a user