All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leopold Gouverneur <lgouv@pi.be>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Cdrom broken in bk current?
Date: Tue, 5 Nov 2002 00:38:31 +0100	[thread overview]
Message-ID: <20021104233831.GA510@gouv> (raw)
In-Reply-To: <20021103094306.GK3612@suse.de>

On Sun, Nov 03, 2002 at 10:43:06AM +0100, Jens Axboe wrote:
> On Sun, Nov 03 2002, Leopold Gouverneur wrote:
> > I see the following during booting:
> > ...
> > end_request: I/O error, dev hdc, sector 0
> > hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
> > Uniform CD-ROM driver Revision: 3.12
> > end_request: I/O error, dev hdc, sector 0
> > end_request: I/O error, dev hdd, sector 0
> > end_request: I/O error, dev hdd, sector 0
> > hdd: ATAPI 16X CD-ROM drive, 256kB Cache, DMA
> > ...
> > 
> > If I mount /dev/hd[cd], the system freezes completly.
> > 
> > This was not present in 2.5.42 IRC
> > ny help?
> 
> Try with this patch.
> 
> -- 
> Jens Axboe
> 

> ===== 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	Sun Nov  3 10:33:17 2002
> @@ -310,6 +310,7 @@
>  #include <linux/completion.h>
>  
>  #include <scsi/scsi.h>	/* For SCSI -> ATAPI command conversion */
> +#include "../scsi/scsi.h"
>  
>  #include <asm/irq.h>
>  #include <asm/io.h>
> @@ -877,10 +878,10 @@
>  					  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;
> +	unsigned int cmd_len;
>  
>  	if (CDROM_CONFIG_FLAGS(drive)->drq_interrupt) {
>  		/* Here we should have been called after receiving an interrupt
> @@ -902,6 +903,11 @@
>  
>  	/* Arm the interrupt handler. */
>  	ide_set_handler(drive, handler, timeout, cdrom_timer_expiry);
> +
> +	/* cdb length, pad upto the 12th byte if necessary */
> +	cmd_len = COMMAND_SIZE(rq->cmd[0]);
> +	if (cmd_len < 12)
> +		cmd_len = 12;
>  
>  	/* Send the command to the device. */
>  	HWIF(drive)->atapi_output_bytes(drive, cmd_buf, cmd_len);

I tried your patch without success. The problem is still there in 2.5.46


  reply	other threads:[~2002-11-05  0:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03  8:05 Cdrom broken in bk current? Leopold Gouverneur
2002-11-03  9:43 ` Jens Axboe
2002-11-04 23:38   ` Leopold Gouverneur [this message]
2002-11-05  7:04     ` Jens Axboe
     [not found]       ` <20021105161720.GA4968@gouv>
     [not found]         ` <20021105174540.GA3515@suse.de>
2002-11-09 15:21           ` Kernel Bug at drivers/ide/ide-cd.c: 860! Leopold Gouverneur

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=20021104233831.GA510@gouv \
    --to=lgouv@pi.be \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.