All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: "Stuart_Hayes@dell.com" <Stuart_Hayes@dell.com>
Cc: stuarthayes@austin.rr.com, axboe@suse.de, linux-ide@vger.kernel.org
Subject: Re: ide-cd question
Date: Fri, 18 Mar 2005 17:42:59 +0100	[thread overview]
Message-ID: <58cb370e05031808424e549b9a@mail.gmail.com> (raw)
In-Reply-To: <7A8F92187EF7A249BF847F1BF4903C04010EEA2A@ausx2kmpc103.aus.amer.dell.com>

On Thu, 17 Mar 2005 10:17:58 -0600, Stuart_Hayes@dell.com
<Stuart_Hayes@dell.com> wrote:
> Jens Axboe wrote:
> > On Fri, Mar 04 2005, Stuart_Hayes@Dell.com wrote:
> >>
> >>>
> >>> There's still a problem here, you are not initializing nsectors for
> >>> non-pc requests. And your comments wrap :)
> >>>
> >>>         int nsectors = rq->hard_nr_sectors;
> >>>
> >>>         if (blk_pc_request(rq))
> >>>                 nsectors = (rq->data_len + 511) >> 9;         if
> >>>                 (!nsectors) nsectors = 1;
> >>>
> >>>         ...
> >>>
> >>> Can you resend with that fixed up and with a Signed-off-by header?
> >>
> >> Here it is.  Thanks for all the help.  I'm attaching as a file, too,
> >> just in case it gets garbled again.
> >> Stuart
> >>
> >>
> >> Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
> >>
> >> --- linux-2.6.11/drivers/ide/ide-io.c.orig   2005-03-04
> >> 16:11:14.000000000 -0500 +++
> >> linux-2.6.11/drivers/ide/ide-io.c    2005-03-04 16:19:19.000000000
> >>              -0500 @@ -516,7 +516,19 @@ static ide_startstop_t
> >> ide_atapi_error(i hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
> >>
> >>      if (rq->errors >= ERROR_MAX) {
> >> -            drive->driver->end_request(drive, 0, 0);
> >> +            /*
> >> +             * make sure request is fully ended--otherwise the
> >> +             * command will be retried without rq->errors getting
> >> +             * reset to zero, which could cause us to get stuck
> >> +             * in a loop with infinite retries without any more +
> * reset
> >> attempts +            */
> >> +            int nsectors = rq->hard_nr_sectors;
> >> +            if (blk_pc_request(rq))
> >> +                    nsectors = (rq->data_len + 511) >> 9;
> >> +            if (!nsectors)
> >> +                    nsectors = 1;

ide_end_request() handles this case differently
and this code path is used not only by ide-cd.

You've changed the current behavior here.
The question is - what are the consequences of that?

> >> +            drive->driver->end_request(drive, 0, nsectors);
> >>      } else {
> >>              if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
> >>                      ++rq->errors;
> >
> > Looks good, Bart care to pick this up?

This is not so obvious for me...

> > Signed-off-by: Jens Axboe <axboe@suse.de>
> 
> Bart--
> 
> Is there a chance you might pick this up, or is there a problem with it?
> 
> Thanks
> Stuart
>

  reply	other threads:[~2005-03-18 16:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 16:17 ide-cd question Stuart_Hayes
2005-03-18 16:42 ` Bartlomiej Zolnierkiewicz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-03-24 23:01 Stuart_Hayes
2005-03-04 22:37 Stuart_Hayes
2005-03-08 14:14 ` Jens Axboe
2005-03-03 17:34 Stuart_Hayes
2005-03-04  7:47 ` Jens Axboe
2005-03-03 14:27 Stuart Hayes
2005-03-03 16:15 ` Jens Axboe
2005-02-12 17:26 Stuart Hayes
     [not found] <7A8F92187EF7A249BF847F1BF4903C04010EE8A6@ausx2kmpc103.aus.amer.dell.com>
2005-02-12 17:21 ` Stuart Hayes
2005-02-10 21:46 Stuart_Hayes
2005-02-10 21:41 Stuart_Hayes
2005-02-07 17:22 Stuart_Hayes
2005-02-04 16:21 Stuart_Hayes
2005-02-03 20:34 Stuart_Hayes
2005-02-03 21:03 ` Bartlomiej Zolnierkiewicz

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=58cb370e05031808424e549b9a@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=Stuart_Hayes@dell.com \
    --cc=axboe@suse.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=stuarthayes@austin.rr.com \
    /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.