Page MenuHomeFreeBSD

D26915.id78628.diff
No OneTemporary

D26915.id78628.diff

Index: sys/dev/virtio/pci/virtio_pci.c
===================================================================
--- sys/dev/virtio/pci/virtio_pci.c
+++ sys/dev/virtio/pci/virtio_pci.c
@@ -288,8 +288,17 @@
sc->vtpci_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
RF_ACTIVE);
if (sc->vtpci_res == NULL) {
- device_printf(dev, "cannot map I/O space\n");
- return (ENXIO);
+ /*
+ * We should try harder as the common configuration structure is
+ * possible to be in memory space.
+ */
+ rid = PCIR_BAR(0);
+ sc->vtpci_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+ RF_ACTIVE);
+ if (sc->vtpci_res == NULL) {
+ device_printf(dev, "cannot map I/O nor memory space\n");
+ return (ENXIO);
+ }
}
if (pci_find_cap(dev, PCIY_MSI, NULL) != 0)

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 23, 8:44 PM (15 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34258716
Default Alt Text
D26915.id78628.diff (784 B)

Event Timeline