Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178079
b: refs/heads/master
c: 1bfeff0
h: refs/heads/master
i:
  178077: 88d0879
  178075: 3208a56
  178071: e61c525
  178063: c7b79b9
  178047: cffdf18
v: v3
  • Loading branch information
Saeed Bishara authored and Jeff Garzik committed Dec 17, 2009
1 parent 43c151c commit 587488e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 4716eaf20f37d10fd01b0fcacb3e41c1abd362c3
refs/heads/master: 1bfeff03f8a52eb896e5aad33d52e2451437bb0b
14 changes: 8 additions & 6 deletions trunk/drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ struct mv_port_signal {

struct mv_host_priv {
u32 hp_flags;
unsigned int board_idx;
u32 main_irq_mask;
struct mv_port_signal signal[8];
const struct mv_hw_ops *ops;
Expand Down Expand Up @@ -3859,21 +3860,20 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
/**
* mv_init_host - Perform some early initialization of the host.
* @host: ATA host to initialize
* @board_idx: controller index
*
* If possible, do an early global reset of the host. Then do
* our port init and clear/unmask all/relevant host interrupts.
*
* LOCKING:
* Inherited from caller.
*/
static int mv_init_host(struct ata_host *host, unsigned int board_idx)
static int mv_init_host(struct ata_host *host)
{
int rc = 0, n_hc, port, hc;
struct mv_host_priv *hpriv = host->private_data;
void __iomem *mmio = hpriv->base;

rc = mv_chip_id(host, board_idx);
rc = mv_chip_id(host, hpriv->board_idx);
if (rc)
goto done;

Expand Down Expand Up @@ -4032,6 +4032,7 @@ static int mv_platform_probe(struct platform_device *pdev)
return -ENOMEM;
host->private_data = hpriv;
hpriv->n_ports = n_ports;
hpriv->board_idx = chip_soc;

host->iomap = NULL;
hpriv->base = devm_ioremap(&pdev->dev, res->start,
Expand All @@ -4057,7 +4058,7 @@ static int mv_platform_probe(struct platform_device *pdev)
goto err;

/* initialize adapter */
rc = mv_init_host(host, chip_soc);
rc = mv_init_host(host);
if (rc)
goto err;

Expand Down Expand Up @@ -4130,7 +4131,7 @@ static int mv_platform_resume(struct platform_device *pdev)
mv_conf_mbus_windows(hpriv, mv_platform_data->dram);

/* initialize adapter */
ret = mv_init_host(host, chip_soc);
ret = mv_init_host(host);
if (ret) {
printk(KERN_ERR DRV_NAME ": Error during HW init\n");
return ret;
Expand Down Expand Up @@ -4274,6 +4275,7 @@ static int mv_pci_init_one(struct pci_dev *pdev,
return -ENOMEM;
host->private_data = hpriv;
hpriv->n_ports = n_ports;
hpriv->board_idx = board_idx;

/* acquire resources */
rc = pcim_enable_device(pdev);
Expand Down Expand Up @@ -4306,7 +4308,7 @@ static int mv_pci_init_one(struct pci_dev *pdev,
}

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

Expand Down

0 comments on commit 587488e

Please sign in to comment.