diff options
author | Tejun Heo <htejun@gmail.com> | 2008-02-06 09:13:51 +0300 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-06 14:59:27 +0300 |
commit | 837f5f8fb98d4357d49e9631c9ee2815f3c328ca (patch) | |
tree | 25c24b611fd66b0599d8145716513339d42a7bb3 /drivers/ata/sata_fsl.c | |
parent | f351b2d638c3cb0b95adde3549b7bfaf3f991dfa (diff) | |
download | linux-837f5f8fb98d4357d49e9631c9ee2815f3c328ca.tar.xz |
ahci: fix CAP.NP and PI handling
AHCI uses CAP.NP to indicate the number of ports and PI to tell which
ports are enabled. The only requirement is that the number of ports
indicated by CAP.NP should equal or be higher than the number of
enabled ports in PI.
CAP.NP and PI carry duplicate information and there have been some
interesting cases. Some early AHCI controllers didn't set PI at all
and just implement from port 0 to CAP.NP. An ICH8 board which wired
four out of six available ports had 3 (4 ports) for CAP.NP and 0x33
for PI. While ESB2 has less bits set in PI than the value in CAP.NP.
Till now, ahci driver assumed that PI is invalid if it doesn't match
CAP.NP exactly. This violates AHCI standard and the driver ends up
accessing unmimplemented ports on ESB2.
This patch updates CAP.NP and PI handling such that PI can have less
number of bits set than indicated in CAP.NP and the highest port is
determined as the maximum port of what CAP.NP and PI indicate.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_fsl.c')
0 files changed, 0 insertions, 0 deletions