summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorDenis Orlov <denorl2009@gmail.com>2022-05-05 17:44:40 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2022-05-11 08:46:07 +0200
commit1092de3cb69a7f5f835a023e411db6cc73bef111 (patch)
tree832ca06fd3d15d496f54ba5c5bc86170c5b35f02 /drivers/ata
parentbe24ea9fcc88d15a85c3b7aed0e6abdcaf107207 (diff)
downloadbarebox-1092de3cb69a7f5f835a023e411db6cc73bef111.tar.gz
barebox-1092de3cb69a7f5f835a023e411db6cc73bef111.tar.xz
ata: ahci: use correct macro when calculating offsets in dma memory
The macro that indicates the size of a single element in the command list was incorrectly used instead of the macro that stands for the size of the whole list. Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20220505144440.29188-1-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index f707efb50f..eb9e1bd133 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -310,15 +310,15 @@ static int ahci_init_port(struct ahci_port *ahci_port)
/*
* Second item: Received-FIS area
*/
- ahci_port->rx_fis = mem + AHCI_CMD_SLOT_SZ;
- ahci_port->rx_fis_dma = mem_dma + AHCI_CMD_SLOT_SZ;
+ ahci_port->rx_fis = mem + AHCI_CMD_LIST_SZ;
+ ahci_port->rx_fis_dma = mem_dma + AHCI_CMD_LIST_SZ;
/*
* Third item: data area for storing a single command
* and its scatter-gather table
*/
- ahci_port->cmd_tbl = mem + AHCI_CMD_SLOT_SZ + AHCI_RX_FIS_SZ;
- ahci_port->cmd_tbl_dma = mem_dma + AHCI_CMD_SLOT_SZ + AHCI_RX_FIS_SZ;
+ ahci_port->cmd_tbl = mem + AHCI_CMD_LIST_SZ + AHCI_RX_FIS_SZ;
+ ahci_port->cmd_tbl_dma = mem_dma + AHCI_CMD_LIST_SZ + AHCI_RX_FIS_SZ;
ahci_port_debug(ahci_port, "cmd_tbl = 0x%p (0x%pa)\n",
ahci_port->cmd_tbl, ahci_port->cmd_tbl_dma);