summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2008-12-07 19:17:17 +0100
committerMatthieu Herrb <matthieu.herrb@laas.fr>2008-12-07 19:17:17 +0100
commit20ea239eb29ae11faf2503fb841d0e8a0bea8b75 (patch)
treee4f3e619b7d5f521a017292ab18330700f9cea8f /src
parente3538fe1287d45e5158a869d7716bdb259b94e00 (diff)
parent4ed838a238e4016b03e8a045b30d91cd974f836b (diff)
Merge branch 'obsd' into obsd-multihead-fixobsd-multihead-fix
Conflicts: src/openbsd_pci.c
Diffstat (limited to 'src')
-rw-r--r--src/openbsd_pci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c
index b859456..ce3411f 100644
--- a/src/openbsd_pci.c
+++ b/src/openbsd_pci.c
@@ -110,8 +110,7 @@ pci_device_openbsd_read_rom(struct pci_device *device, void *buffer)
pciaddr_t rom_base;
pciaddr_t rom_size;
u_int32_t csr, rom;
- int pci_rom;
- int bus, dev, func;
+ int pci_rom, bus, dev, func;
bus = device->bus;
dev = device->dev;
@@ -385,7 +384,8 @@ pci_device_openbsd_probe(struct pci_device *device)
}
}
}
- /* Expansion ROM if present */
+
+ /* Probe expansion ROM if present */
err = pci_read(bus, dev, func, PCI_ROM_REG, &reg);
if (err)
return err;
@@ -395,6 +395,7 @@ pci_device_openbsd_probe(struct pci_device *device)
return err;
pci_read(bus, dev, func, PCI_ROM_REG, &size);
pci_write(bus, dev, func, PCI_ROM_REG, reg);
+
if (PCI_ROM_ADDR(reg) != 0) {
priv->rom_base = PCI_ROM_ADDR(reg);
device->rom_size = PCI_ROM_SIZE(size);