diff options
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 9642a7103cb6..6281f7f9eae6 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1179,7 +1179,7 @@ static void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, | |||
1179 | 1179 | ||
1180 | static int ahci_kick_engine(struct ata_port *ap, int force_restart) | 1180 | static int ahci_kick_engine(struct ata_port *ap, int force_restart) |
1181 | { | 1181 | { |
1182 | void __iomem *port_mmio = ap->ioaddr.cmd_addr; | 1182 | void __iomem *port_mmio = ahci_port_base(ap); |
1183 | struct ahci_host_priv *hpriv = ap->host->private_data; | 1183 | struct ahci_host_priv *hpriv = ap->host->private_data; |
1184 | u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; | 1184 | u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; |
1185 | u32 tmp; | 1185 | u32 tmp; |
@@ -1255,8 +1255,8 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, | |||
1255 | 1255 | ||
1256 | static int ahci_check_ready(struct ata_link *link) | 1256 | static int ahci_check_ready(struct ata_link *link) |
1257 | { | 1257 | { |
1258 | void __iomem *mmio = link->ap->ioaddr.cmd_addr; | 1258 | void __iomem *port_mmio = ahci_port_base(link->ap); |
1259 | u8 status = readl(mmio + PORT_TFDATA) & 0xFF; | 1259 | u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; |
1260 | 1260 | ||
1261 | if (!(status & ATA_BUSY)) | 1261 | if (!(status & ATA_BUSY)) |
1262 | return 1; | 1262 | return 1; |
@@ -1616,7 +1616,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat) | |||
1616 | 1616 | ||
1617 | static void ahci_port_intr(struct ata_port *ap) | 1617 | static void ahci_port_intr(struct ata_port *ap) |
1618 | { | 1618 | { |
1619 | void __iomem *port_mmio = ap->ioaddr.cmd_addr; | 1619 | void __iomem *port_mmio = ahci_port_base(ap); |
1620 | struct ata_eh_info *ehi = &ap->link.eh_info; | 1620 | struct ata_eh_info *ehi = &ap->link.eh_info; |
1621 | struct ahci_port_priv *pp = ap->private_data; | 1621 | struct ahci_port_priv *pp = ap->private_data; |
1622 | struct ahci_host_priv *hpriv = ap->host->private_data; | 1622 | struct ahci_host_priv *hpriv = ap->host->private_data; |
@@ -2210,7 +2210,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2210 | 2210 | ||
2211 | for (i = 0; i < host->n_ports; i++) { | 2211 | for (i = 0; i < host->n_ports; i++) { |
2212 | struct ata_port *ap = host->ports[i]; | 2212 | struct ata_port *ap = host->ports[i]; |
2213 | void __iomem *port_mmio = ahci_port_base(ap); | ||
2214 | 2213 | ||
2215 | ata_port_pbar_desc(ap, AHCI_PCI_BAR, -1, "abar"); | 2214 | ata_port_pbar_desc(ap, AHCI_PCI_BAR, -1, "abar"); |
2216 | ata_port_pbar_desc(ap, AHCI_PCI_BAR, | 2215 | ata_port_pbar_desc(ap, AHCI_PCI_BAR, |
@@ -2219,12 +2218,8 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2219 | /* set initial link pm policy */ | 2218 | /* set initial link pm policy */ |
2220 | ap->pm_policy = NOT_AVAILABLE; | 2219 | ap->pm_policy = NOT_AVAILABLE; |
2221 | 2220 | ||
2222 | /* standard SATA port setup */ | ||
2223 | if (hpriv->port_map & (1 << i)) | ||
2224 | ap->ioaddr.cmd_addr = port_mmio; | ||
2225 | |||
2226 | /* disabled/not-implemented port */ | 2221 | /* disabled/not-implemented port */ |
2227 | else | 2222 | if (!(hpriv->port_map & (1 << i))) |
2228 | ap->ops = &ata_dummy_port_ops; | 2223 | ap->ops = &ata_dummy_port_ops; |
2229 | } | 2224 | } |
2230 | 2225 | ||