At least AHCI on Intel on some machines claim to support only 6 ports
while in fact higher port numbers are present and work.
This is needed to access CD-ROM on PackardBell MS2290.
Both GRUB and Linux have a similar workaround.

Signed-off-by: Vladimir Serbinenko <[email protected]>
---
 src/hw/ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index ff5d5f9..3193d81 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -601,7 +601,7 @@ ahci_controller_setup(struct pci_device *pci)
     dprintf(2, "AHCI: cap 0x%x, ports_impl 0x%x\n",
             ctrl->caps, ctrl->ports);

-    max = ctrl->caps & 0x1f;
+    max = 0x1f;
     for (pnr = 0; pnr <= max; pnr++) {
         if (!(ctrl->ports & (1 << pnr)))
             continue;
-- 
2.1.4

From b8bb5973b2aa54763b56535998034b39a43157a7 Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <[email protected]>
Date: Mon, 18 May 2015 15:00:31 +0200
Subject: [PATCH] ahci: Ignore max_ports.

At least AHCI on Intel on some machines claim to support only 6 ports
while in fact higher port numbers are present and work.
This is needed to access CD-ROM on PackardBell MS2290.
Both GRUB and Linux have a similar workaround.

Signed-off-by: Vladimir Serbinenko <[email protected]>
---
 src/hw/ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index ff5d5f9..3193d81 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -601,7 +601,7 @@ ahci_controller_setup(struct pci_device *pci)
     dprintf(2, "AHCI: cap 0x%x, ports_impl 0x%x\n",
             ctrl->caps, ctrl->ports);
 
-    max = ctrl->caps & 0x1f;
+    max = 0x1f;
     for (pnr = 0; pnr <= max; pnr++) {
         if (!(ctrl->ports & (1 << pnr)))
             continue;
-- 
2.1.4

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
SeaBIOS mailing list
[email protected]
http://www.seabios.org/mailman/listinfo/seabios

Reply via email to