lkml.org 
[lkml]   [2004]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.6 ide-cd DMA ripping
On Wed, Mar 03 2004, Jens Axboe wrote:
> +static int cdrom_read_cdda(struct cdrom_device_info *cdi, __u8 __user *ubuf,
> + int lba, int nframes)
> +{
> + int ret;
> +
> + if (cdi->cdda_method == CDDA_OLD)
> + return cdrom_read_cdda_old(cdi, ubuf, lba, nframes);
> +
> + do {
> + ret = cdrom_read_cdda_bpc(cdi, ubuf, lba, nframes);
> +
> + if (!ret)
> + break;
> +
> + /*
> + * I've seen drives get sense 4/8/3 udma crc errors, so
> + * drop to single frame dma if we need to
> + */
> + if (cdi->cdda_method == CDDA_BPC_FULL && nframes > 1) {
> + printk("cdrom: dropping to single frame dma\n");
> + cdi->cdda_method = CDDA_BPC_SINGLE;
> + continue;
> + }
> +
> + printk("cdrom: dropping to old style cdda\n");
> + cdi->cdda_method = CDDA_OLD;
> + ret = cdrom_read_cdda_old(cdi, ubuf, lba, nframes);
> + } while (0);

Irk, that should have been a while (1) of course, and a break after the
last cdrom_read_cdda_old();

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.071 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site