From dbd4a8791915f6cadb67d37d97e2768a21d8846e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko 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 (cherry picked from commit 40dfc0ee947c35f31e935ec290622e7780bb52b8) --- 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.39.5