Re: [2.5.45] CDRW not working

Kronos (kronos@kronoz.cjb.net)
Sun, 3 Nov 2002 16:39:35 +0100


Il Sun, Nov 03, 2002 at 04:01:50PM +0100, Jens Axboe ha scritto:
> > > Does 2.5.42 work or not?
> >
> > If I don't use hdparm 2.5.42 works. On 2.5.45 it's random.
>
> 2.5.45 with attached patch, how does that compare?

The first patch doesn't apply to 2.5.45. cmd_len was removed in 2.5.45.
This one should be ok, right?

--- ide-cd.c.orig Sun Nov 3 16:34:38 2002
+++ ide-cd.c Sun Nov 3 16:36:52 2002
@@ -884,6 +884,7 @@
{
struct cdrom_info *info = drive->driver_data;
ide_startstop_t startstop;
+ unsigned int cmd_len;

if (CDROM_CONFIG_FLAGS(drive)->drq_interrupt) {
/* Here we should have been called after receiving an interrupt
@@ -905,8 +906,12 @@
/* Arm the interrupt handler. */
ide_set_handler(drive, handler, rq->timeout, cdrom_timer_expiry);

+ cmd_len = COMMAND_SIZE(rq->cmd[0]);
+ if (cmd_len < ATAPI_MIN_CDB_BYTES)
+ cmd_len = ATAPI_MIN_CDB_BYTES;
+
/* Send the command to the device. */
- HWIF(drive)->atapi_output_bytes(drive, rq->cmd, sizeof(rq->cmd));
+ HWIF(drive)->atapi_output_bytes(drive, rq->cmd, cmd_len);

/* Start the DMA if need be */
if (info->dma)

Luca

-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Carpe diem, quam minimum credula postero. (Q. Horatius Flaccus)
-
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/