]> xenbits.xensource.com Git - seabios.git/commitdiff
ahci: Ignore max_ports.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 18 May 2015 13:00:31 +0000 (15:00 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 12 Jun 2015 06:51:07 +0000 (08:51 +0200)
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 <phcoder@gmail.com>
(cherry picked from commit 40dfc0ee947c35f31e935ec290622e7780bb52b8)

src/hw/ahci.c

index ff5d5f9ee625ced45184f52af408eb12e667cb4c..3193d81a6610634d850511140a724b6c2e9a372c 100644 (file)
@@ -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;