aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_sil24.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_sil24.c')
-rw-r--r--drivers/ata/sata_sil24.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index e0cd31aa8002..3dcb223117be 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -1119,12 +1119,15 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1119 host->iomap = iomap; 1119 host->iomap = iomap;
1120 1120
1121 for (i = 0; i < host->n_ports; i++) { 1121 for (i = 0; i < host->n_ports; i++) {
1122 void __iomem *port = iomap[SIL24_PORT_BAR] + i * PORT_REGS_SIZE; 1122 struct ata_port *ap = host->ports[i];
1123 size_t offset = ap->port_no * PORT_REGS_SIZE;
1124 void __iomem *port = iomap[SIL24_PORT_BAR] + offset;
1123 1125
1124 host->ports[i]->ioaddr.cmd_addr = port; 1126 host->ports[i]->ioaddr.cmd_addr = port;
1125 host->ports[i]->ioaddr.scr_addr = port + PORT_SCONTROL; 1127 host->ports[i]->ioaddr.scr_addr = port + PORT_SCONTROL;
1126 1128
1127 ata_std_ports(&host->ports[i]->ioaddr); 1129 ata_port_pbar_desc(ap, SIL24_HOST_BAR, -1, "host");
1130 ata_port_pbar_desc(ap, SIL24_PORT_BAR, offset, "port");
1128 } 1131 }
1129 1132
1130 /* configure and activate the device */ 1133 /* configure and activate the device */