patch-2.4.23 linux-2.4.23/drivers/ide/ide-cd.c

Next file: linux-2.4.23/drivers/ide/ide-default.c
Previous file: linux-2.4.23/drivers/ide/Makefile
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/ide/ide-cd.c linux-2.4.23/drivers/ide/ide-cd.c
@@ -2231,7 +2231,7 @@
 	minor = (drive->select.b.unit) << PARTN_BITS;
 	dev = MKDEV(HWIF(drive)->major, minor);
 	stat = cdrom_get_last_written(dev, &toc->capacity);
-	if (stat)
+	if (stat || !toc->capacity)
 		stat = cdrom_read_capacity(drive, &toc->capacity, sense);
 	if (stat)
 		toc->capacity = 0x1fffff;
@@ -3262,7 +3262,7 @@
 		}
 		if (ide_register_subdriver(drive, 
 				&ide_cdrom_driver, IDE_SUBDRIVER_VERSION)) {
-			printk("%s: Failed to register the driver with "
+			printk("ide-cd: %s: Failed to register the driver with "
 				"ide.c\n", drive->name);
 			kfree(info);
 			continue;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)