From: Marc C <marc.ceeeee@gmail.com>
To: tj@kernel.org, linux-ide@vger.kernel.org
Cc: Marc Carino <marc.ceeeee@gmail.com>
Subject: [PATCH v5 1/4] libata: Populate host-to-device FIS "auxiliary" field
Date: Sat, 24 Aug 2013 23:22:48 -0700 [thread overview]
Message-ID: <1377411771-3733-2-git-send-email-marc.ceeeee@gmail.com> (raw)
In-Reply-To: <1377411771-3733-1-git-send-email-marc.ceeeee@gmail.com>
From: Marc Carino <marc.ceeeee@gmail.com>
SATA 3.1 added an "auxiliary" field to the host-to-device FIS.
Populate the host-to-device FIS with the new field via the
taskfile struct.
Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
---
drivers/ata/libata-core.c | 10 ++++++----
include/linux/libata.h | 4 ++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c24354d..9062aa0 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -546,6 +546,8 @@ int atapi_cmd_type(u8 opcode)
*/
void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis)
{
+ const __le32 aux = cpu_to_le32(tf->auxiliary);
+
fis[0] = 0x27; /* Register - Host to Device FIS */
fis[1] = pmp & 0xf; /* Port multiplier number*/
if (is_cmd)
@@ -569,10 +571,10 @@ void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis)
fis[14] = 0;
fis[15] = tf->ctl;
- fis[16] = 0;
- fis[17] = 0;
- fis[18] = 0;
- fis[19] = 0;
+ fis[16] = aux & 0xff;
+ fis[17] = (aux >> 8) & 0xff;
+ fis[18] = (aux >> 16) & 0xff;
+ fis[19] = (aux >> 24) & 0xff;
}
/**
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 283d66b..47122f4 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -555,6 +555,10 @@ struct ata_taskfile {
u8 device;
u8 command; /* IO operation */
+
+ u32 auxiliary; /* auxiliary field */
+ /* from SATA 3.1 and */
+ /* ATA-8 ACS-3 */
};
#ifdef CONFIG_ATA_SFF
--
1.8.1.2
next prev parent reply other threads:[~2013-08-25 6:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-25 6:22 [PATCH v5 0/4] Introduce new SATA queued commands Marc C
2013-08-25 6:22 ` Marc C [this message]
2013-08-25 6:22 ` [PATCH v5 2/4] libata: Add H2D FIS "auxiliary" port flag Marc C
2013-08-25 6:22 ` [PATCH v5 3/4] libata: Add support for SEND/RECEIVE FPDMA QUEUED Marc C
2013-08-25 6:22 ` [PATCH v5 4/4] libata: Add support for queued DSM TRIM Marc C
2013-08-25 13:40 ` [PATCH v5 0/4] Introduce new SATA queued commands Tejun Heo
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=1377411771-3733-2-git-send-email-marc.ceeeee@gmail.com \
--to=marc.ceeeee@gmail.com \
--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).