diff options
| author | Antoine Tenart <antoine.tenart@free-electrons.com> | 2014-11-03 03:56:11 -0500 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2014-11-04 12:56:25 -0500 |
| commit | 9a23c1d6f0f5dbac4c9b73fa6cea7c9ee3d29074 (patch) | |
| tree | 10f539b563ed9d560ffbc5c9e9e590edb41e9173 /drivers | |
| parent | e35b98849f2530bb77f8fe649b3eaa1489ff9d33 (diff) | |
ahci: fix AHCI parameters not taken into account
Changes into the AHCI subsystem have introduced a bug by not taking into
account the force_port_map and mask_port_map parameters when using the
ahci_pci_save_initial_config function. This commit fixes it by setting
the internal parameters of the ahci_port_priv structure.
Fixes: 725c7b570fda
Reported-and-tested-by: Zlatko Calusic <zcalusic@bitsync.net>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/ahci.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 89c081134112..e45f83789809 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -527,12 +527,9 @@ MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)"); | |||
| 527 | static void ahci_pci_save_initial_config(struct pci_dev *pdev, | 527 | static void ahci_pci_save_initial_config(struct pci_dev *pdev, |
| 528 | struct ahci_host_priv *hpriv) | 528 | struct ahci_host_priv *hpriv) |
| 529 | { | 529 | { |
| 530 | unsigned int force_port_map = 0; | ||
| 531 | unsigned int mask_port_map = 0; | ||
| 532 | |||
| 533 | if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) { | 530 | if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) { |
| 534 | dev_info(&pdev->dev, "JMB361 has only one port\n"); | 531 | dev_info(&pdev->dev, "JMB361 has only one port\n"); |
| 535 | force_port_map = 1; | 532 | hpriv->force_port_map = 1; |
| 536 | } | 533 | } |
| 537 | 534 | ||
| 538 | /* | 535 | /* |
| @@ -542,9 +539,9 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev, | |||
| 542 | */ | 539 | */ |
| 543 | if (hpriv->flags & AHCI_HFLAG_MV_PATA) { | 540 | if (hpriv->flags & AHCI_HFLAG_MV_PATA) { |
| 544 | if (pdev->device == 0x6121) | 541 | if (pdev->device == 0x6121) |
| 545 | mask_port_map = 0x3; | 542 | hpriv->mask_port_map = 0x3; |
| 546 | else | 543 | else |
| 547 | mask_port_map = 0xf; | 544 | hpriv->mask_port_map = 0xf; |
| 548 | dev_info(&pdev->dev, | 545 | dev_info(&pdev->dev, |
| 549 | "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n"); | 546 | "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n"); |
| 550 | } | 547 | } |
