From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH 1/3] ata: add ata_id_pio_need_iordy() helper
Date: Sun, 14 Jun 2009 00:49:26 +0400 [thread overview]
Message-ID: <4A3410D6.9060400@ru.mvista.com> (raw)
In-Reply-To: <200906131821.07018.bzolnier@gmail.com>
Hello.
Bartlomiej Zolnierkiewicz wrote:
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> against Linus' tree
>
> include/linux/ata.h | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> Index: b/include/linux/ata.h
> ===================================================================
> --- a/include/linux/ata.h
> +++ b/include/linux/ata.h
> @@ -800,6 +800,17 @@ static inline int ata_id_is_ssd(const u1
> return id[ATA_ID_ROT_SPEED] == 0x01;
> }
>
> +static inline int ata_id_pio_need_iordy(const u16 *id, const u8 pio)
> +{
> + /* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6. */
> + if (ata_id_is_cfa(id) && pio > 4)
>
It actually makes sense to put the cheap 'pio' check first. We
shouldn't call ata_id_is_cfa() for all modes.
> + return 0;
> + /* PIO3 and higher it is mandatory. */
> + if (pio > 2 || ata_id_has_iordy(id))
> + return 1;
> + return 0;
> +}
> +
MBR, Sergei
next prev parent reply other threads:[~2009-06-13 20:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 16:21 [PATCH 1/3] ata: add ata_id_pio_need_iordy() helper Bartlomiej Zolnierkiewicz
2009-06-13 20:19 ` Sergei Shtylyov
2009-06-13 20:49 ` Sergei Shtylyov [this message]
2009-06-15 16:32 ` Bartlomiej Zolnierkiewicz
2009-06-15 17:21 ` Jeff Garzik
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=4A3410D6.9060400@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=jgarzik@pobox.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 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.