Mailing List Archive

cdrom updates
--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii
Hi,
I missed some of the negative length settings, mainly
the DVD stuff. Here's an incremental patch, against
2.3.16 + the previous I sent.
--
* Jens Axboe <axboe@image.dk>
* Linux CD-ROM Maintainer
* http://www.kernel.dk
--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="sep2_2.diff"
diff -ur --exclude-from /home/axboe/cdrom/exclude-from /tmp/linux-2.3.16/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c
--- /tmp/linux-2.3.16/drivers/block/ide-cd.c Thu Sep 2 21:58:55 1999
+++ linux/drivers/block/ide-cd.c Thu Sep 2 22:00:41 1999
@@ -1315,11 +1315,8 @@
struct cdrom_info *info = drive->driver_data;

info->dma = 0;
-
- len = pc->buflen;
- if (len < 0) len = -len;
-
pc->stat = 0;
+ len = pc->buflen;

/* Start sending the command to the drive. */
cdrom_start_packet_command (drive, len, cdrom_do_pc_continuation);
@@ -1848,7 +1845,7 @@
pc.sense_data = reqbuf;

pc.buffer = buf;
- pc.buflen = - buflen;
+ pc.buflen = buflen;
pc.c[0] = GPCMD_MODE_SELECT_10;
pc.c[1] = 0x10;
pc.c[2] = pageno;
diff -ur --exclude-from /home/axboe/cdrom/exclude-from /tmp/linux-2.3.16/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- /tmp/linux-2.3.16/drivers/cdrom/cdrom.c Thu Sep 2 21:58:55 1999
+++ linux/drivers/cdrom/cdrom.c Thu Sep 2 21:50:08 1999
@@ -836,7 +836,7 @@
case DVD_HOST_SEND_CHALLENGE:
cdinfo(CD_DO_IOCTL, "entering DVD_HOST_SEND_CHALLENGE\n");
setup_send_key (&cgc, ai->hsc.agid, 1);
- cgc.buflen = -(cgc.cmd[9] = 16);
+ cgc.buflen = cgc.cmd[9] = 16;
buf[1] = 14;
copy_chal (&buf[4], ai->hsc.chal);

@@ -849,7 +849,7 @@
case DVD_HOST_SEND_KEY2:
cdinfo(CD_DO_IOCTL, "entering DVD_HOST_SEND_KEY2\n");
setup_send_key (&cgc, ai->hsk.agid, 3);
- cgc.buflen = -(cgc.cmd[9] = 12);
+ cgc.buflen = cgc.cmd[9] = 12;
buf[1] = 10;
copy_key (&buf[4], ai->hsk.key);

--bg08WKrSYDhXBjb5--
-
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/