[PATCH pciaccess] Fix long standing MTRR bug.

Thomas Hellstrom thellstrom at vmware.com
Tue Jul 20 13:14:22 PDT 2010


Add an include that makes the file common_vgaarb.c see the same
struct pci_system as the file linux_sysfs.c.

Without this fix, on a MTRR system, the vgaarb_fd member
would overwrite the mtrr_fd member and cause the MTRR_IOC_ADD_ENTRY call
to be issued to the incorrect device causing the infamous
"Inappropriate ioctl for device (25)" error.

This error would cause MTRR setup to fail on all systems relying on it
and is severe enough to warrant a new release.

Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
---
 src/common_vgaarb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index c94b362..86eceb5 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <limits.h>
 
+#include "config.h"
 #include "pciaccess.h"
 #include "pciaccess_private.h"
 
-- 
1.6.2.5



More information about the xorg-devel mailing list