here are some patches for correct multisession detection
for toshiba and plextor compatible scsi cdroms.
Cheers, Heiko
--- drivers/scsi/sr.c.or Mon Jun 10 11:08:26 1996
+++ drivers/scsi/sr.c Sat Jul 27 17:57:07 1996
@@ -485,12 +485,12 @@
printk(KERN_WARNING"sr_photocd: ioctl error (TOSHIBA #1): 0x%x\n",rc);
break; /* if the first ioctl fails, we don't call the second one */
}
- is_xa = (rec[0] == 0x20);
min = (unsigned long) rec[1]/16*10 + (unsigned long) rec[1]%16;
sec = (unsigned long) rec[2]/16*10 + (unsigned long) rec[2]%16;
frame = (unsigned long) rec[3]/16*10 + (unsigned long) rec[3]%16;
sector = min*CD_SECS*CD_FRAMES + sec*CD_FRAMES + frame;
+ is_xa = (rec[0] == 0x20) || sector;
if (sector) {
sector -= CD_BLOCK_OFFSET;
#ifdef DEBUG
@@ -566,11 +573,11 @@
break;
}
sector = rec[11] + (rec[10] << 8) + (rec[9] << 16) + (rec[8] << 24);
+ if (rec[6] <= 1) {
+ sector = 0; /* ignore sector offsets from first track */
+ }
is_xa = !!sector;
#ifdef DEBUG
if (sector)