diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-19 11:52:56 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-21 01:56:21 +0200 |
commit | a3d2cc5e742f82a87fdf9e2b730f41ff381c0a73 (patch) | |
tree | 96dd7ab5c98198e634b9323dc4d903c9bf8548eb /drivers/ata/ahci.c | |
parent | kerneldoc fix in libata (diff) | |
download | linux-a3d2cc5e742f82a87fdf9e2b730f41ff381c0a73.tar.xz linux-a3d2cc5e742f82a87fdf9e2b730f41ff381c0a73.zip |
ahci: fix PORTS_IMPL override
If PORTS_IMPL register is zero, ahci initialize it to full mask
corresponding to nr_ports in the CAP register. hpriv->cap, which is
initialized at the end of the function, is incorrectly used as value
of CAP causing ahci to always override PORTS_IMPL to 0x1 if it's zero.
Fix it.
This fixes a bug where early ich6 ahci can only access the first port.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/ata/ahci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 545f330e59a5..ca5229d24d8e 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -527,7 +527,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev, /* fixup zero port_map */ if (!port_map) { - port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1; + port_map = (1 << ahci_nr_ports(cap)) - 1; dev_printk(KERN_WARNING, &pdev->dev, "PORTS_IMPL is zero, forcing 0x%x\n", port_map); |