X Strike Force XFree86 SVN commit: r1510 - in trunk/debian: . patches
Author: branden
Date: 2004-06-03 22:17:34 -0500 (Thu, 03 Jun 2004)
New Revision: 1510
Added:
trunk/debian/patches/049_Xserver_recognize_Linux_2.6_proc_bus_pci.diff
Modified:
trunk/debian/CHANGESETS
trunk/debian/TODO
trunk/debian/changelog
Log:
Fix XFree86 X server's PCI bus support code to be able to cope with both
Linux 2.4 and Linux 2.6 styles of organization for /proc/bus/pci, checking
for the 2.6 style first (thanks, Daniel Seyffer and Ciaran McCreesh).
(Closes: #225526)
Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS 2004-06-04 03:13:55 UTC (rev 1509)
+++ trunk/debian/CHANGESETS 2004-06-04 03:17:34 UTC (rev 1510)
@@ -79,4 +79,10 @@
accordingly. (Thanks to Andrew Suffield for pointing out this problem.)
1509
+Fix XFree86 X server's PCI bus support code to be able to cope with both
+Linux 2.4 and Linux 2.6 styles of organization for /proc/bus/pci, checking
+for the 2.6 style first (thanks, Daniel Seyffer and Ciaran McCreesh).
+(Closes: #225526)
+ 1510
+
vim:set ai et sts=4 sw=4 tw=80:
Modified: trunk/debian/TODO
===================================================================
--- trunk/debian/TODO 2004-06-04 03:13:55 UTC (rev 1509)
+++ trunk/debian/TODO 2004-06-04 03:17:34 UTC (rev 1510)
@@ -17,8 +17,6 @@
4.3.0.dfsg.1-5
--------------
-* #225526: Fix PCI domains / Mach64 cards on SPARCs running Linux 2.6. Apply
- patch by Daniel Seyffer and Ciaran McCreesh of the Gentoo SPARC team.
* Apply "other half" of SPARC 64-bit avoidance patch to Mesa; see #241331.
* #245246: Apply hot pokers to Ben Collins until we extract a working patch for
XAA and Render support for the sunffb driver. Mmmm, burning manflesh...
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-06-04 03:13:55 UTC (rev 1509)
+++ trunk/debian/changelog 2004-06-04 03:17:34 UTC (rev 1510)
@@ -84,6 +84,11 @@
and increase versioned dependency of xserver-xfree86 on xserver-common
accordingly. (Thanks to Andrew Suffield for pointing out this problem.)
+ * Fix XFree86 X server's PCI bus support code to be able to cope with both
+ Linux 2.4 and Linux 2.6 styles of organization for /proc/bus/pci, checking
+ for the 2.6 style first (thanks, Daniel Seyffer and Ciaran McCreesh).
+ (Closes: #225526)
+
-- Branden Robinson <branden@debian.org> Thu, 3 Jun 2004 14:14:49 -0500
xfree86 (4.3.0.dfsg.1-4) unstable; urgency=medium
Added: trunk/debian/patches/049_Xserver_recognize_Linux_2.6_proc_bus_pci.diff
===================================================================
--- trunk/debian/patches/049_Xserver_recognize_Linux_2.6_proc_bus_pci.diff 2004-06-04 03:13:55 UTC (rev 1509)
+++ trunk/debian/patches/049_Xserver_recognize_Linux_2.6_proc_bus_pci.diff 2004-06-04 03:17:34 UTC (rev 1510)
@@ -0,0 +1,48 @@
+$Id$
+
+Fix XFree86 X server's PCI bus support code to be able to cope with both
+Linux 2.4 and Linux 2.6 styles of organization for /proc/bus/pci,
+checking for the 2.6 style first.
+
+This patch by Daniel Seyffer and Ciaran McCreesh.
+
+Not submitted to XFree86.
+
+--- xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c~ 2004-06-03 09:52:19.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c 2004-06-03 09:54:49.000000000 -0500
+@@ -104,6 +104,7 @@
+ static int lbus,ldev,lfunc,fd = -1;
+ int bus, dev, func;
+ char file[32];
++ struct stat ignored;
+
+ bus = PCI_BUS_FROM_TAG(tag);
+ dev = PCI_DEV_FROM_TAG(tag);
+@@ -111,12 +112,21 @@
+ if (fd == -1 || bus != lbus || dev != ldev || func != lfunc) {
+ if (fd != -1)
+ close(fd);
+- if (bus < 256)
+- sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
+- bus, dev, func);
+- else
+- sprintf(file, "/proc/bus/pci/%04x/%02x.%1x",
+- bus, dev, func);
++ if (bus < 256) {
++ if (stat("/proc/bus/pci/00", &ignored) < 0)
++ sprintf(file, "/proc/bus/pci/0000:%02x/%02x.%1x",
++ bus, dev, func);
++ else
++ sprintf(file, "/proc/bus/pci/%02x/%02x.%1x",
++ bus, dev, func);
++ } else {
++ if (stat("/proc/bus/pci/00", &ignored) < 0)
++ sprintf(file, "/proc/bus/pci/0000:%04x/%02x.%1x",
++ bus, dev, func);
++ else
++ sprintf(file, "/proc/bus/pci/%04x/%02x.%1x",
++ bus, dev, func);
++ }
+ fd = open(file,O_RDWR);
+ lbus = bus;
+ ldev = dev;
Property changes on: trunk/debian/patches/049_Xserver_recognize_Linux_2.6_proc_bus_pci.diff
___________________________________________________________________
Name: svn:keywords
+ Id
Reply to: