public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Samuel Rydh <samuel@ibrium.se>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <axboe@suse.de>
Subject: Re: ide-cd bug (MODE_SENSE/CDROM_SEND_PACKET)
Date: Tue, 23 Mar 2004 12:46:44 +0100	[thread overview]
Message-ID: <20040323114644.GA954@ibrium.se> (raw)
In-Reply-To: <20040323104846.GZ1481@suse.de>

On Tue, Mar 23, 2004 at 11:48:47AM +0100, Jens Axboe wrote:
> Could you check if this works for you?
> 
> ===== drivers/block/elevator.c 1.53 vs edited =====
> --- 1.53/drivers/block/elevator.c	Mon Jan 19 07:38:36 2004
> +++ edited/drivers/block/elevator.c	Tue Mar 23 11:47:53 2004
> @@ -210,10 +210,14 @@
>  			rq = NULL;
>  			break;
>  		} else if (ret == BLKPREP_KILL) {
> +			int nr_bytes = rq->hard_nr_sectors << 9;
> +
> +			if (!nr_bytes)
> +				nr_bytes = rq->data_len;
> +
>  			blkdev_dequeue_request(rq);
>  			rq->flags |= REQ_QUIET;
> -			while (end_that_request_first(rq, 0, rq->nr_sectors))
> -				;
> +			end_that_request_chunk(rq, 0, nr_bytes);
>  			end_that_request_last(rq);
>  		} else {
>  			printk("%s: bad return=%d\n", __FUNCTION__, ret);
> 

Yes, this fixes the problem.

/Samuel

      reply	other threads:[~2004-03-23 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23  0:40 ide-cd bug (MODE_SENSE/CDROM_SEND_PACKET) Samuel Rydh
2004-03-23 10:48 ` Jens Axboe
2004-03-23 11:46   ` Samuel Rydh [this message]

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=20040323114644.GA954@ibrium.se \
    --to=samuel@ibrium.se \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox