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>
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;