From: Jens Axboe <axboe@suse.de>
To: Thomas Molina <tmolina@cox.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ide-cd still borken for me in 2.5.45
Date: Sat, 2 Nov 2002 16:43:23 +0100 [thread overview]
Message-ID: <20021102154323.GB2177@suse.de> (raw)
In-Reply-To: <20021102145451.GA1820@suse.de>
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
next prev parent reply other threads:[~2002-11-02 15:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-01 11:55 ide-cd still borken for me in 2.5.45 Thomas Molina
2002-11-01 12:06 ` Jens Axboe
2002-11-01 13:09 ` Thomas Molina
2002-11-02 1:49 ` Thomas Molina
2002-11-02 2:24 ` Thomas Molina
2002-11-02 9:18 ` Jens Axboe
2002-11-02 14:48 ` Thomas Molina
2002-11-02 14:54 ` Jens Axboe
2002-11-02 15:43 ` Jens Axboe [this message]
2002-11-02 18:39 ` Thomas Molina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021102154323.GB2177@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tmolina@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox