mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
sr: Switch the sector size back to 2048 if sr_read_sector() changed it.
sr_read_sector() is hardly used since v2.3.16. Its only purpose is to check if it is a XA medium via sr_is_xa(). This check is only enabled if the module parameter `xa_test' is enabled. Change the sector size back to 2048 if it was changed. With this change, there is no lazy sector size changing left. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
b5f3255556
commit
8d2ac857a8
@@ -549,6 +549,8 @@ static int sr_read_sector(Scsi_CD *cd, int lba, int blksize, unsigned char *dest
|
||||
cgc.timeout = IOCTL_TIMEOUT;
|
||||
rc = sr_do_ioctl(cd, &cgc);
|
||||
|
||||
if (blksize != CD_FRAMESIZE)
|
||||
rc |= sr_set_blocklength(cd, CD_FRAMESIZE);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user