Skip to contentSkip to conversation

Lite-On cdwriter detected as 12x instead of 40x

DISCUSSION Jurriaan 2 participants 2 messages Sep 7, 2002

lore
Share & tools
lore

Jurriaan

author
#0 lore raw

I have a LITE-ON LTR-40125W cdwriter, which can write at 40x. The kernel sees it as 12x. This happens in 2.4.19ac4 up to 2.4.20pre4ac2, I didn't test later kernels due to the instable IDE situation. It has the latest firmware (WS05) - I'm not sure if bothering the manufacturer about this is worth it.

If I don't pass the drive on to ide-scsi, and patch drivers/ide/ide-cd.c with this small patch,

+ /* brain-dead LiteOn model reports itself as 12x */
+ if ((cap != NULL) && (strcmp (drive->id->model, "LITE-ON LTR-40125W") == 0))
+ cap->maxspeed = htons(40 * 176);

all is well, and the kernel reports 40x.

But I can't find out where to put this for the ide-scsi part. All the probing routines in drivers/scsi/ide-cd.c seem to access some sort of atapi-buffer that already exists. I can tweak it to display 40x in the bootup-messages by changing the idescsi_transform_pc? functions in drivers/scsi/ide-cd.c:

+ if (strcmp (drive->id->model, "LITE-ON LTR-40125W") == 0)
+ {
+ int n = scsi_buf[3] + 4;

+                   	        scsi_buf[n+8] = scsi_buf[n+14] = (u8) ((40 * 176) >> 8);
+                   	        scsi_buf[n+9] = scsi_buf[n+15] = (u8) ((40 * 176) & 0xff);

+ printk("ide-scsi.c: LITE-ON tweak activated\n");
+ }

but that doesn't fool cdrdao nor cdrecord - they still think the drive is 12x.

Can anyone help me by pointing out where I should tweak the kernel to get correct results when using ide-scsi with my drive?

Thanks,
Jurriaan

Signature · 2 lines
Remember, Unix on some machines is nUxi.
GNU/Linux 2.4.19-ac4 SMP/ReiserFS 2x1402 bogomips load av: 0.39 0.28 0.11
#1 lore raw

First, does it make it go any faster by changing the caps value? If so how are you detecting such performance changes?

Given the value discovered is what is reported.
You may need to issue a mode/capablities page change. You need to as Jens Axboe about this, he is more updated than me.

Quoted 29 lines · Jurriaan

I have a LITE-ON LTR-40125W cdwriter, which can write at 40x. The kernel sees it as 12x. This happens in 2.4.19ac4 up to 2.4.20pre4ac2, I didn't test later kernels due to the instable IDE situation. It has the latest firmware (WS05) - I'm not sure if bothering the manufacturer about this is worth it.

If I don't pass the drive on to ide-scsi, and patch drivers/ide/ide-cd.c with this small patch,

(quoted diff) +3 -0
+	/* brain-dead LiteOn model reports itself as 12x */
+	if ((cap != NULL) && (strcmp (drive->id->model, "LITE-ON LTR-40125W") == 0))
+	  cap->maxspeed = htons(40 * 176);

all is well, and the kernel reports 40x.

But I can't find out where to put this for the ide-scsi part. All the probing routines in drivers/scsi/ide-cd.c seem to access some sort of atapi-buffer that already exists. I can tweak it to display 40x in the bootup-messages by changing the idescsi_transform_pc? functions in drivers/scsi/ide-cd.c:

(quoted diff) +7 -0
+	                if (strcmp (drive->id->model, "LITE-ON LTR-40125W") == 0)
+			{
+				int n = scsi_buf[3] + 4;
+                   	        scsi_buf[n+8] = scsi_buf[n+14] = (u8) ((40 * 176) >> 8);
+                   	        scsi_buf[n+9] = scsi_buf[n+15] = (u8) ((40 * 176) & 0xff);
+				printk("ide-scsi.c: LITE-ON tweak activated\n");
+			}
Quoted 17 lines

but that doesn't fool cdrdao nor cdrecord - they still think the drive is 12x.

Can anyone help me by pointing out where I should tweak the kernel to get correct results when using ide-scsi with my drive?

Thanks,
Jurriaan

Signature · 7 lines
Remember, Unix on some machines is nUxi.
GNU/Linux 2.4.19-ac4 SMP/ReiserFS 2x1402 bogomips load av: 0.39 0.28 0.11
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Andre Hedrick
LAD Storage Consulting Group