aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 1389c64e0027..ad5b6f384ba1 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -243,9 +243,9 @@ static int ahci_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
243static int ahci_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); 243static int ahci_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
244static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 244static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
245static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); 245static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
246static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
246static int ahci_port_start(struct ata_port *ap); 247static int ahci_port_start(struct ata_port *ap);
247static void ahci_port_stop(struct ata_port *ap); 248static void ahci_port_stop(struct ata_port *ap);
248static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
249static void ahci_qc_prep(struct ata_queued_cmd *qc); 249static void ahci_qc_prep(struct ata_queued_cmd *qc);
250static u8 ahci_check_status(struct ata_port *ap); 250static u8 ahci_check_status(struct ata_port *ap);
251static void ahci_freeze(struct ata_port *ap); 251static void ahci_freeze(struct ata_port *ap);
@@ -295,10 +295,10 @@ static struct ata_port_operations ahci_ops = {
295 .sff_check_status = ahci_check_status, 295 .sff_check_status = ahci_check_status,
296 .sff_check_altstatus = ahci_check_status, 296 .sff_check_altstatus = ahci_check_status,
297 297
298 .sff_tf_read = ahci_tf_read,
299 .qc_defer = sata_pmp_qc_defer_cmd_switch, 298 .qc_defer = sata_pmp_qc_defer_cmd_switch,
300 .qc_prep = ahci_qc_prep, 299 .qc_prep = ahci_qc_prep,
301 .qc_issue = ahci_qc_issue, 300 .qc_issue = ahci_qc_issue,
301 .qc_fill_rtf = ahci_qc_fill_rtf,
302 302
303 .freeze = ahci_freeze, 303 .freeze = ahci_freeze,
304 .thaw = ahci_thaw, 304 .thaw = ahci_thaw,
@@ -1473,14 +1473,6 @@ static u8 ahci_check_status(struct ata_port *ap)
1473 return readl(mmio + PORT_TFDATA) & 0xFF; 1473 return readl(mmio + PORT_TFDATA) & 0xFF;
1474} 1474}
1475 1475
1476static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
1477{
1478 struct ahci_port_priv *pp = ap->private_data;
1479 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
1480
1481 ata_tf_from_fis(d2h_fis, tf);
1482}
1483
1484static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl) 1476static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl)
1485{ 1477{
1486 struct scatterlist *sg; 1478 struct scatterlist *sg;
@@ -1779,6 +1771,15 @@ static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
1779 return 0; 1771 return 0;
1780} 1772}
1781 1773
1774static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
1775{
1776 struct ahci_port_priv *pp = qc->ap->private_data;
1777 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
1778
1779 ata_tf_from_fis(d2h_fis, &qc->result_tf);
1780 return true;
1781}
1782
1782static void ahci_freeze(struct ata_port *ap) 1783static void ahci_freeze(struct ata_port *ap)
1783{ 1784{
1784 void __iomem *port_mmio = ahci_port_base(ap); 1785 void __iomem *port_mmio = ahci_port_base(ap);