CD-ROM fix for 2.3.16

Jens Axboe (axboe@image.dk)
Wed, 1 Sep 1999 11:42:34 +0200


--JwB53PgKC5A7+0Ej
Content-Type: text/plain; charset=us-ascii

Hi all,

Two quick fixes for SCSI and ATAPI CD-ROM's in 2.3.16.
These weren't actually meant to go in yet, but I had
left them enabled by mistake.

-- 
*  Jens Axboe <axboe@image.dk>
*  Linux CD-ROM Maintainer
*  http://www.kernel.dk

--JwB53PgKC5A7+0Ej Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cd.diff"

--- /tmp/linux-2.3.16/drivers/scsi/sr.c Wed Sep 1 11:29:55 1999 +++ drivers/scsi/sr.c Wed Sep 1 11:39:34 1999 @@ -928,13 +928,14 @@ scsi_CDs[i].sector_size = 2048; /* A guess, just in case */ scsi_CDs[i].needs_sector_size = 1; } else { +#if 0 if (cdrom_get_last_written(MKDEV(MAJOR_NR, i), - (long*)&scsi_CDs[i].capacity)) { + (long*)&scsi_CDs[i].capacity)) +#endif scsi_CDs[i].capacity = 1 + ((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]); - } scsi_CDs[i].sector_size = (buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | buffer[7]; switch (scsi_CDs[i].sector_size) { --- /tmp/linux-2.3.16/drivers/block/ide-cd.c Wed Sep 1 11:29:53 1999 +++ drivers/block/ide-cd.c Wed Sep 1 11:30:56 1999 @@ -1794,10 +1794,13 @@ toc->xa_flag = (ms_tmp.hdr.first_track != ms_tmp.hdr.last_track); /* Now try to get the total cdrom capacity. */ +#if 0 stat = cdrom_get_last_written(MKDEV(HWIF(drive)->major, drive->select.b.unit << PARTN_BITS), (long *)&toc->capacity); - if (stat) stat = cdrom_read_capacity (drive, &toc->capacity, reqbuf); + if (stat) +#endif + stat = cdrom_read_capacity (drive, &toc->capacity, reqbuf); if (stat) toc->capacity = 0x1fffff; HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] @@ -2048,7 +2051,6 @@ return cgc->stat; } - static int ide_cdrom_dev_ioctl (struct cdrom_device_info *cdi, unsigned int cmd, unsigned long arg) @@ -2977,11 +2979,3 @@ MOD_DEC_USE_COUNT; return 0; } - - -/*==========================================================================*/ -/* - * Local variables: - * c-basic-offset: 8 - * End: - */

--JwB53PgKC5A7+0Ej--

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