mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
f1bc1e4c44
commit
8be5ad9acb
2 changed files with 10 additions and 4 deletions
|
@ -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)
|
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[0] = 0x27; /* Register - Host to Device FIS */
|
||||||
fis[1] = pmp & 0xf; /* Port multiplier number*/
|
fis[1] = pmp & 0xf; /* Port multiplier number*/
|
||||||
if (is_cmd)
|
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[14] = 0;
|
||||||
fis[15] = tf->ctl;
|
fis[15] = tf->ctl;
|
||||||
|
|
||||||
fis[16] = 0;
|
fis[16] = aux & 0xff;
|
||||||
fis[17] = 0;
|
fis[17] = (aux >> 8) & 0xff;
|
||||||
fis[18] = 0;
|
fis[18] = (aux >> 16) & 0xff;
|
||||||
fis[19] = 0;
|
fis[19] = (aux >> 24) & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -555,6 +555,10 @@ struct ata_taskfile {
|
||||||
u8 device;
|
u8 device;
|
||||||
|
|
||||||
u8 command; /* IO operation */
|
u8 command; /* IO operation */
|
||||||
|
|
||||||
|
u32 auxiliary; /* auxiliary field */
|
||||||
|
/* from SATA 3.1 and */
|
||||||
|
/* ATA-8 ACS-3 */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ATA_SFF
|
#ifdef CONFIG_ATA_SFF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue