Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144558732
D26915.1775461876.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
784 B
Referenced Files
None
Subscribers
None
D26915.1775461876.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D26915: virtio_pci: Allow memory space for configuration
Attached
Detach File
Event Timeline
Log In to Comment