tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bug in sys/dev/drm/drm_drv.c:drm_lastclose()



Hi,
in sys/dev/drm/drm_drv.c:drm_lastclose(), line 412 on netbsd-5,
we have:
                        bus_space_unmap(dev->pci_map_data[i].maptype,
                                        dev->pci_map_data[i].bsh,
                                        dev->pci_map_data[i].size);

This can't be right, dev->pci_map_data[i].maptype should be
dev->pa.pa_memt, isn't it (see attached patch) ?
If not, what should dev->pci_map_data[i].maptype be remplaced with ?


-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: drm_drv.c
===================================================================
RCS file: /cvsroot/src/sys/dev/drm/drm_drv.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 drm_drv.c
--- drm_drv.c   3 Jul 2008 17:36:44 -0000       1.19
+++ drm_drv.c   16 Jan 2009 15:20:06 -0000
@@ -409,7 +409,7 @@ static int drm_lastclose(drm_device_t *d
 
        for(i = 0; i<DRM_MAX_PCI_RESOURCE; i++) {
                if (dev->pci_map_data[i].mapped > 1) {
-                       bus_space_unmap(dev->pci_map_data[i].maptype,
+                       bus_space_unmap(dev->pa.pa_memt,
                                        dev->pci_map_data[i].bsh,
                                        dev->pci_map_data[i].size);
                        dev->pci_map_data[i].mapped = 0;


Home | Main Index | Thread Index | Old Index