From: Jeff Garzik <jeff@garzik.org>
To: Elias Oltmanns <eo@nebensachen.de>
Cc: Tejun Heo <tj@kernel.org>, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2 v3] Introduce ata_id_has_unload()
Date: Mon, 29 Sep 2008 00:34:04 -0400 [thread overview]
Message-ID: <48E05ABC.4020802@garzik.org> (raw)
In-Reply-To: <20080919214359.7183.81870.stgit@denkblock.local>
Elias Oltmanns wrote:
> Add a function to check an ATA device's id for head unload support as
> specified in ATA-7.
>
> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
> ---
>
> include/linux/ata.h | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ata.h b/include/linux/ata.h
> index cea079c..c66a7d6 100644
> --- a/include/linux/ata.h
> +++ b/include/linux/ata.h
> @@ -707,6 +707,15 @@ static inline int ata_id_has_dword_io(const u16 *id)
> return 0;
> }
>
> +static inline int ata_id_has_unload(const u16 *id)
> +{
> + if (ata_id_major_version(id) >= 7 &&
> + (id[ATA_ID_CFSSE] & 0xC000) == 0x4000 &&
> + id[ATA_ID_CFSSE] & (1 << 13))
> + return 1;
> + return 0;
> +}
> +
> static inline int ata_id_current_chs_valid(const u16 *id)
> {
> /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
applied 1-2
next prev parent reply other threads:[~2008-09-29 4:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 21:41 Disk shock protection in libata Elias Oltmanns
2008-09-19 21:46 ` [PATCH 1/2 v3] Introduce ata_id_has_unload() Elias Oltmanns
2008-09-29 4:34 ` Jeff Garzik [this message]
2008-09-19 21:48 ` [PATCH 2/2 v3] libata: Implement disk shock protection support Elias Oltmanns
2008-09-20 4:47 ` Tejun Heo
2008-09-20 5:54 ` Elias Oltmanns
2008-09-20 11:12 ` Elias Oltmanns
2008-09-20 21:44 ` [PATCH 2/2 v4] " Elias Oltmanns
2008-09-20 23:55 ` Tejun Heo
2008-09-21 9:54 ` [PATCH 2/2 v5] " Elias Oltmanns
2008-09-21 9:58 ` Tejun Heo
2008-09-21 9:51 ` [PATCH 2/2 v3] " Elias Oltmanns
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=48E05ABC.4020802@garzik.org \
--to=jeff@garzik.org \
--cc=eo@nebensachen.de \
--cc=linux-ide@vger.kernel.org \
--cc=tj@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).