From: Elias Oltmanns <eo@nebensachen.de>
To: Tejun Heo <tj@kernel.org>, Jeff Garzik <jeff@garzik.org>
Cc: linux-ide@vger.kernel.org
Subject: [PATCH 1/2 v3] Introduce ata_id_has_unload()
Date: Fri, 19 Sep 2008 23:46:01 +0200 [thread overview]
Message-ID: <20080919214359.7183.81870.stgit@denkblock.local> (raw)
In-Reply-To: <87tzcb7r0r.fsf@denkblock.local>
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
next prev parent reply other threads:[~2008-09-19 21:47 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 ` Elias Oltmanns [this message]
2008-09-29 4:34 ` [PATCH 1/2 v3] Introduce ata_id_has_unload() Jeff Garzik
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=20080919214359.7183.81870.stgit@denkblock.local \
--to=eo@nebensachen.de \
--cc=jeff@garzik.org \
--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 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.