diff options
author | Jens Axboe <axboe@suse.de> | 2004-08-01 20:16:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-01 20:16:52 -0700 |
commit | d9f5b4d57c3c01ff590cb76cc02b36003652c014 (patch) | |
tree | f6a8658439079be459c4f3a64884cf6b73d4e894 /drivers | |
parent | 8b0cf2f6c2b306f5bef55315fe5818ad4796bad0 (diff) | |
download | history-d9f5b4d57c3c01ff590cb76cc02b36003652c014.tar.gz |
[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: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cdrom/cdrom.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 5a08b536444c7d..4c271524ea6480 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -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; |