aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-12-09 08:39:47 +0100
committerKevin O'Connor <kevin@koconnor.net>2010-12-12 14:02:23 -0500
commit1e924bb7ec2fbf3f81d86fb5478ba4002a1ef0c6 (patch)
tree2aeabbe26555817e34f9a83c41f287eab6b7f9e2
parent7eb0222835c2bc01e1927db5ae344a64f5fd7fba (diff)
downloadseabios-1e924bb7ec2fbf3f81d86fb5478ba4002a1ef0c6.tar.gz
ahci: fix off-by-one in port count
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--src/ahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ahci.c b/src/ahci.c
index a03d8be4..4ccee86b 100644
--- a/src/ahci.c
+++ b/src/ahci.c
@@ -417,7 +417,7 @@ ahci_detect(void *data)
int rc;
max = ctrl->caps & 0x1f;
- for (pnr = 0; pnr < max; pnr++) {
+ for (pnr = 0; pnr <= max; pnr++) {
if (!(ctrl->ports & (1 << pnr)))
continue;
dprintf(2, "AHCI/%d: probing\n", pnr);