Re: [PATCH v2 1/2] libata: Add support for SEND/RECEIVE FPDMA QUEUED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/08/2013 11:16 AM, Marc C wrote:

From: Marc Carino <marc.ceeeee@xxxxxxxxx>

Add support for the following ATA opcodes, which are present
in SATA 3.1 and T13 ATA ACS-3:

         SEND FPDMA QUEUED
         RECEIVE FPDMA QUEUED

Signed-off-by: Marc Carino <marc.ceeeee@xxxxxxxxx>
[...]

diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 1145637..f9e4fd8 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -388,4 +388,12 @@ static inline int ahci_nr_ports(u32 cap)
  	return (cap & 0x1f) + 1;
  }

+static inline void ahci_h2dfis_set_auxiliary(u8 *fis, u32 aux)
+{
+	fis[16] = aux & 0xff;
+	fis[17] = (aux >> 8) & 0xff;
+	fis[18] = (aux >> 16) & 0xff;
+	fis[19] = (aux >> 24) & 0xff;
+}
+
  #endif /* _AHCI_H */
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index acfd0f7..52668f4 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1499,6 +1499,7 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
  	cmd_tbl = pp->cmd_tbl + qc->tag * AHCI_CMD_TBL_SZ;

  	ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, cmd_tbl);
+	ahci_h2dfis_set_auxiliary(cmd_tbl, qc->auxiliary);
  	if (is_atapi) {
  		memset(cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32);
  		memcpy(cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, qc->dev->cdb_len);

   How about non-AHCI FIS-based controllers?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux