From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 6/15] ide: ide_find_best_pio_mode() fixes
Date: Mon, 02 Jul 2007 19:20:50 +0400 [thread overview]
Message-ID: <468917D2.6010907@ru.mvista.com> (raw)
In-Reply-To: <200706302104.42299.bzolnier@gmail.com>
Hello.
Bartlomiej Zolnierkiewicz wrote:
> * Check IORDY bit for PIO modes > 2.
> * Some devices claim maximum PIO mode > 2 in id->tPIO, they were punished too
> severly for this by being limited to PIO_SLOW. Limit them to PIO2 instead.
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
NAK. :-)
> Index: b/drivers/ide/ide-timing.h
> ===================================================================
> --- a/drivers/ide/ide-timing.h
> +++ b/drivers/ide/ide-timing.h
> @@ -111,16 +111,14 @@ static short ide_find_best_pio_mode(ide_
> struct hd_driveid *id = drive->id;
> short best = 0;
>
> - if (id->field_valid & 2) { /* EIDE PIO modes */
> -
> + /* EIDE PIO modes */
> + if ((id->field_valid & 2) && (id->capability & 8)) {
> if ((best = (drive->id->eide_pio_modes & 4) ? XFER_PIO_5 :
> (drive->id->eide_pio_modes & 2) ? XFER_PIO_4 :
> (drive->id->eide_pio_modes & 1) ? XFER_PIO_3 : 0)) return best;
> }
> -
> - return (drive->id->tPIO == 2) ? XFER_PIO_2 :
> - (drive->id->tPIO == 1) ? XFER_PIO_1 :
> - (drive->id->tPIO == 0) ? XFER_PIO_0 : XFER_PIO_SLOW;
> +
> + return min_t(u8, id->tPIO, 2);
XFER_PIO_[012] != [012], and otherwise you're returning XFER_PIO_* constants.
MBR, Sergei
next prev parent reply other threads:[~2007-07-02 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 19:04 [PATCH 6/15] ide: ide_find_best_pio_mode() fixes Bartlomiej Zolnierkiewicz
2007-07-02 15:20 ` Sergei Shtylyov [this message]
2007-07-02 18:05 ` Bartlomiej Zolnierkiewicz
2007-07-04 16:19 ` Sergei Shtylyov
2007-07-04 19:00 ` 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=468917D2.6010907@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).