Commit d9f5b4d5 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] fix cdrom cdda rip single frame dma fall back

There's a stupid error in the fall back logic, it fails to increment the
user pointer so the wave file is corrupt. We should also clear
last_sense just to be sure.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8b0cf2f6
......@@ -1921,6 +1921,8 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf,
struct packet_command cgc;
int nr, ret;
cdi->last_sense = 0;
memset(&cgc, 0, sizeof(cgc));
/*
......@@ -1972,6 +1974,8 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
if (!q)
return -ENXIO;
cdi->last_sense = 0;
while (nframes) {
nr = nframes;
if (cdi->cdda_method == CDDA_BPC_SINGLE)
......@@ -2019,6 +2023,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
nframes -= nr;
lba += nr;
ubuf += len;
}
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment