Skip to content

Commit

Permalink
ahci: fix AHCI parameters not taken into account
Browse files Browse the repository at this point in the history
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: 725c7b5

Reported-and-tested-by: Zlatko Calusic <zcalusic@bitsync.net>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
  • Loading branch information
Antoine Tenart authored and Tejun Heo committed Nov 4, 2014
1 parent e35b988 commit 9a23c1d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,9 @@ MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)");
static void ahci_pci_save_initial_config(struct pci_dev *pdev,
struct ahci_host_priv *hpriv)
{
unsigned int force_port_map = 0;
unsigned int mask_port_map = 0;

if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {
dev_info(&pdev->dev, "JMB361 has only one port\n");
force_port_map = 1;
hpriv->force_port_map = 1;
}

/*
Expand All @@ -542,9 +539,9 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
*/
if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
if (pdev->device == 0x6121)
mask_port_map = 0x3;
hpriv->mask_port_map = 0x3;
else
mask_port_map = 0xf;
hpriv->mask_port_map = 0xf;
dev_info(&pdev->dev,
"Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n");
}
Expand Down

0 comments on commit 9a23c1d

Please sign in to comment.