]> git.baikalelectronics.ru Git - kernel.git/commit
ahci: fix PORTS_IMPL override
authorTejun Heo <htejun@gmail.com>
Tue, 19 Jun 2007 09:52:56 +0000 (18:52 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 20 Jun 2007 23:56:21 +0000 (19:56 -0400)
commit61e6189e2b792e31e5999a16f8eec776c18bdd62
tree96dd7ab5c98198e634b9323dc4d903c9bf8548eb
parent2c45d480da230c7245445ae2236c755e3dae0c8a
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>
drivers/ata/ahci.c