Re: ide-cd still borken for me in 2.5.45

From: Jens Axboe (axboe@suse.de)
Date: Sat Nov 02 2002 - 10:43:23 EST


On Sat, Nov 02 2002, Jens Axboe wrote:
> On Sat, Nov 02 2002, Thomas Molina wrote:
> > On Sat, 2 Nov 2002, Jens Axboe wrote:
> >
> > > > Well that was quick. 2.5.42 works correctly. The problems begin with
> > > > 2.5.43.
> > >
> > > Ok, so Linus broke it :-)
> > >
> > > Please boot with this patch, it looks like a command length screwup.
> >
> > Your patch produced:
> >
> > hdc: starting 5a, len = 24
>
> ok looks fine, now please try (on top of the other one):

There's at least one report of that patch fixing the issue. Thomas, I'd
like you to try it too.

Linus, we need something like this for now, your switch to
unconditionally output 16 bytes of cdb broke lots of drives... Please
apply.

===== drivers/ide/ide-cd.c 1.27 vs edited =====
--- 1.27/drivers/ide/ide-cd.c Fri Oct 18 20:02:55 2002
+++ edited/drivers/ide/ide-cd.c Sat Nov 2 16:40:33 2002
@@ -863,6 +863,12 @@
         }
 }
 
+/*
+ * fixme, this breaks for real 16-byte commands. however, lots of drives
+ * currently break if we just send 16-bytes for 10/12 byte commands
+ */
+#define MAX_CDB_BYTES 12
+
 /* Send a packet command to DRIVE described by CMD_BUF and CMD_LEN.
    The device registers must have already been prepared
    by cdrom_start_packet_command.
@@ -877,7 +883,6 @@
                                           ide_handler_t *handler)
 {
         unsigned char *cmd_buf = rq->cmd;
- int cmd_len = sizeof(rq->cmd);
         unsigned int timeout = rq->timeout;
         struct cdrom_info *info = drive->driver_data;
         ide_startstop_t startstop;
@@ -904,7 +909,7 @@
         ide_set_handler(drive, handler, timeout, cdrom_timer_expiry);
 
         /* Send the command to the device. */
- HWIF(drive)->atapi_output_bytes(drive, cmd_buf, cmd_len);
+ HWIF(drive)->atapi_output_bytes(drive, cmd_buf, MAX_CDB_BYTES);
 
         /* Start the DMA if need be */
         if (info->dma)

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:24 EST