Page MenuHomeFreeBSD

D26915.1775461876.diff
No OneTemporary

Size
784 B
Referenced Files
None
Subscribers
None

D26915.1775461876.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
Mon, Apr 6, 7:51 AM (5 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28272075
Default Alt Text
D26915.1775461876.diff (784 B)

Event Timeline