[Top] [All Lists]

Patch to get IDE CDROM working on MIPS

Subject: Patch to get IDE CDROM working on MIPS
From: Hartvig Ekner <>
Date: Thu, 16 Aug 2001 09:40:14 +0200 (MET DST)
I have gotten IDE CDROM support to work under MIPS now (tested on Malta
both LE and BE with 2.4.3 kernel). It was broken due to a stack
overwrite in the generic cdrom.c which for obscure reasons didn't kill an
x86 kernel, but does kill a MIPS kernel, see the patch below.

The patch has been accepted by the CDROM maintainer, but in case somebody
wants to experiment with IDE CDROM now, have fun!


/home/hartvige/tmp/linux-2.4.3/drivers/cdrom> diff -u cdrom.c.ORG cdrom.c
--- cdrom.c.ORG Tue Aug 14 10:35:04 2001
+++ cdrom.c     Tue Aug 14 14:44:14 2001
@@ -2244,8 +2244,13 @@
        if ((ret = cdo->generic_packet(cdi, &cgc)))
                return ret;
-       cgc.cmd[8] = cgc.buflen = be16_to_cpu(ti->track_information_length) +
+       cgc.buflen = be16_to_cpu(ti->track_information_length) +
+       if (cgc.buflen > sizeof(track_information))
+               cgc.buflen = sizeof(track_information);
+       cgc.cmd[8] = cgc.buflen;
        return cdo->generic_packet(cdi, &cgc);

<Prev in Thread] Current Thread [Next in Thread>
  • Patch to get IDE CDROM working on MIPS, Hartvig Ekner <=