diff options
author | Hannes Reinecke <hare@suse.de> | 2014-11-06 14:31:56 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-10 11:30:55 +0100 |
commit | 8936dbb2cd5403c9a8279c849f7f4b0ccc0796ac (patch) | |
tree | 6e31ac3ea25f294345cd325e32ffa792d8a02c1f | |
parent | bc8a06350c3e061bb831182e90b49e031d40bd4f (diff) | |
download | seabios-8936dbb2cd5403c9a8279c849f7f4b0ccc0796ac.zip seabios-8936dbb2cd5403c9a8279c849f7f4b0ccc0796ac.tar.gz seabios-8936dbb2cd5403c9a8279c849f7f4b0ccc0796ac.tar.bz2 |
megasas: read addional PCI I/O barrel-1.7.5.1
Some newer cards have the I/O bar at BAR 0, so we need to check
that, too, if we cannot get an address for BAR 2.
Without this patch the new 'megasas-gen2' emulation in qemu
is not detected.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 09f876f11743c1143c73a52eb889ae9231f7a5b3)
-rw-r--r-- | src/hw/megasas.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hw/megasas.c b/src/hw/megasas.c index a5dc14f..b2a65e4 100644 --- a/src/hw/megasas.c +++ b/src/hw/megasas.c @@ -357,6 +357,10 @@ init_megasas(struct pci_device *pci) u32 iobase = pci_config_readl(pci->bdf, PCI_BASE_ADDRESS_2) & PCI_BASE_ADDRESS_IO_MASK; + if (!iobase) + iobase = pci_config_readl(pci->bdf, PCI_BASE_ADDRESS_0) + & PCI_BASE_ADDRESS_IO_MASK; + dprintf(1, "found MegaRAID SAS at %02x:%02x.%x, io @ %x\n", pci_bdf_to_bus(bdf), pci_bdf_to_dev(bdf), pci_bdf_to_fn(bdf), iobase); |