Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178076
b: refs/heads/master
c: c4bc7d7
h: refs/heads/master
v: v3
  • Loading branch information
Saeed Bishara authored and Jeff Garzik committed Dec 17, 2009
1 parent 3208a56 commit dc9ef7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6481f2b52cd5411ea6342b749daf0e4f3b390d7b
refs/heads/master: c4bc7d7310a40c8c0b917e88983dc4a8e6b59e38
19 changes: 10 additions & 9 deletions trunk/drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3910,14 +3910,6 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
void __iomem *port_mmio = mv_port_base(mmio, port);

mv_port_init(&ap->ioaddr, port_mmio);

#ifdef CONFIG_PCI
if (!IS_SOC(hpriv)) {
unsigned int offset = port_mmio - mmio;
ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio");
ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port");
}
#endif
}

for (hc = 0; hc < n_hc; hc++) {
Expand Down Expand Up @@ -4268,7 +4260,7 @@ static int mv_pci_init_one(struct pci_dev *pdev,
const struct ata_port_info *ppi[] = { &mv_port_info[board_idx], NULL };
struct ata_host *host;
struct mv_host_priv *hpriv;
int n_ports, rc;
int n_ports, port, rc;

if (!printed_version++)
dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n");
Expand Down Expand Up @@ -4304,6 +4296,15 @@ static int mv_pci_init_one(struct pci_dev *pdev,
if (rc)
return rc;

for (port = 0; port < host->n_ports; port++) {
struct ata_port *ap = host->ports[port];
void __iomem *port_mmio = mv_port_base(hpriv->base, port);
unsigned int offset = port_mmio - hpriv->base;

ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio");
ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port");
}

/* initialize adapter */
rc = mv_init_host(host, board_idx);
if (rc)
Expand Down

0 comments on commit dc9ef7b

Please sign in to comment.