aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorMarc Carino <marc.ceeeee@gmail.com>2013-08-25 02:22:48 -0400
committerTejun Heo <tj@kernel.org>2013-08-25 09:39:11 -0400
commit8be5ad9acb7c11b9d717bcdbe3d6de0dab081a39 (patch)
tree528bb497df99021c96fef990ccd4b3ae1b248e28 /drivers/ata/libata-core.c
parentf1bc1e4c44b1b78fe34431936c60759b5aad5e3f (diff)
libata: Populate host-to-device FIS "auxiliary" field
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> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 39e78e4524a3..2b4e92568850 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -546,6 +546,8 @@ int atapi_cmd_type(u8 opcode)
546 */ 546 */
547void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis) 547void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis)
548{ 548{
549 const __le32 aux = cpu_to_le32(tf->auxiliary);
550
549 fis[0] = 0x27; /* Register - Host to Device FIS */ 551 fis[0] = 0x27; /* Register - Host to Device FIS */
550 fis[1] = pmp & 0xf; /* Port multiplier number*/ 552 fis[1] = pmp & 0xf; /* Port multiplier number*/
551 if (is_cmd) 553 if (is_cmd)
@@ -569,10 +571,10 @@ void ata_tf_to_fis(const struct ata_taskfile *tf, u8 pmp, int is_cmd, u8 *fis)
569 fis[14] = 0; 571 fis[14] = 0;
570 fis[15] = tf->ctl; 572 fis[15] = tf->ctl;
571 573
572 fis[16] = 0; 574 fis[16] = aux & 0xff;
573 fis[17] = 0; 575 fis[17] = (aux >> 8) & 0xff;
574 fis[18] = 0; 576 fis[18] = (aux >> 16) & 0xff;
575 fis[19] = 0; 577 fis[19] = (aux >> 24) & 0xff;
576} 578}
577 579
578/** 580/**