Module Name: xsrc
Committed By: mrg
Date: Mon Jun 3 19:08:56 UTC 2013
Modified Files:
xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c
Log Message:
support map/unmap_legacy() calls. copies the openbsd-style.
this fixes xf86-video-vesa, which was using this call and getting
zero back from the default callback.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.10 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.11
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.10 Sat Jun 1 09:03:25 2013
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Mon Jun 3 19:08:56 2013
@@ -285,6 +285,35 @@ pci_device_netbsd_boot_vga(struct pci_de
return 1;
}
+static int
+pci_device_netbsd_map_legacy(struct pci_device *dev, pciaddr_t base,
+ pciaddr_t size, unsigned map_flags, void **addr)
+{
+ struct pci_device_mapping map;
+ int err;
+
+ map.base = base;
+ map.size = size;
+ map.flags = map_flags;
+ map.memory = NULL;
+ err = pci_device_netbsd_map_range(dev, &map);
+ *addr = map.memory;
+
+ return err;
+}
+
+static int
+pci_device_netbsd_unmap_legacy(struct pci_device *dev, void *addr, pciaddr_t size)
+{
+ struct pci_device_mapping map;
+
+ map.memory = addr;
+ map.size = size;
+ map.flags = 0;
+ return pci_device_netbsd_unmap_range(dev, &map);
+}
+
+
static void
pci_system_netbsd_destroy(void)
{
@@ -519,6 +548,8 @@ static const struct pci_system_methods n
.write = pci_device_netbsd_write,
.fill_capabilities = pci_fill_capabilities_generic,
.boot_vga = pci_device_netbsd_boot_vga,
+ .map_legacy = pci_device_netbsd_map_legacy,
+ .unmap_legacy = pci_device_netbsd_unmap_legacy,
};
int