[SeaBIOS] [PATCH 3/4] ahci: fix off-by-one in port count

Gerd Hoffmann kraxel at redhat.com
Wed Dec 8 11:24:13 CET 2010


Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 src/ahci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ahci.c b/src/ahci.c
index b906cc5..17bd522 100644
--- a/src/ahci.c
+++ b/src/ahci.c
@@ -414,7 +414,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);
-- 
1.7.1




More information about the SeaBIOS mailing list