Re: [PATCH] 2.6 ide-cd DMA ripping

From: Jens Axboe
Date: Wed Mar 03 2004 - 06:46:40 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/