Bug#534927: fglrx-source: fglrx kernel driver cannot be loaded on linux-2.6.30

2009-06-28 Thread Hendrik Sattler
Package: fglrx-source
Version: 1:9-6-1
Severity: important

Hi,

The closed-source part calls a function called pci_enable_msi(). However, on 
linux-2.6.30, this is only a define. Thus while loading the module, the symbol 
cannot be found.

Either this should be forwarded upstream or a small wrapper could look like:
#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,30)
#undef pci_enable_msi
int pci_enable_msi (struct pci_dev *dev) {
return pci_enable_msi_block(dev, 1);
}
#endif

Have fun

HS

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fglrx-source depends on:
ii  bzip2 1.0.5-2high-quality block-sorting file co
ii  debhelper 7.2.14 helper programs for debian/rules
ii  make  3.81-5 The GNU version of the make util

Versions of packages fglrx-source recommends:
ii  kernel-package12.014 A utility for building Linux kerne
ii  module-assistant  0.11.1 tool to make module package creati

Versions of packages fglrx-source suggests:
pn  fglrx-driver  none (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#534927: [Pkg-fglrx-devel] Bug#534927: fglrx-source: fglrx kernel driver cannot be loaded on linux-2.6.30

2009-06-28 Thread Patrick Matthäi

Hendrik Sattler schrieb:

Package: fglrx-source
Version: 1:9-6-1
Severity: important

Hi,

The closed-source part calls a function called pci_enable_msi(). However, on 
linux-2.6.30, this is only a define. Thus while loading the module, the symbol 
cannot be found.


Thanks, I will fix it these days.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#534927: [Pkg-fglrx-devel] Bug#534927: fglrx-source: fglrx kernel driver cannot be loaded on linux-2.6.30

2009-06-28 Thread Hendrik Sattler
Am Sonntag 28 Juni 2009 19:56:42 schrieb Patrick Matthäi:
 Hendrik Sattler schrieb:
  Package: fglrx-source
  Version: 1:9-6-1
  Severity: important
 
  The closed-source part calls a function called pci_enable_msi(). However,
  on linux-2.6.30, this is only a define. Thus while loading the module,
  the symbol cannot be found.

 Thanks, I will fix it these days.

I attach the patch for the modules/fglrx dir that makes it compile (without 
compiler warnings and works on my self-compiled 2.6.30).

Have fun

HS

BTW: the make.sh script and Makefile is broken as you do not ship the 2.6.x  
directory.

Index: fglrx/firegl_public.c
===
--- fglrx.orig/firegl_public.c	2009-06-28 12:47:32.421193869 +0200
+++ fglrx/firegl_public.c	2009-06-28 12:55:08.429443844 +0200
@@ -175,6 +175,13 @@
 
 // 
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,30)
+#undef pci_enable_msi
+int pci_enable_msi(struct pci_dev *dev) {
+  return pci_enable_msi_block(dev, 1);
+}
+#endif
+
 // VM_SHM is deleted in 2.6.18 or higher kernels.
 #ifndef VM_SHM
 #define VM_SHM 0
@@ -1228,8 +1235,6 @@
  */
 int ATI_API_CALL KCL_SetPageCache_Array(unsigned long *pt, int pages, int enable)
 {
-unsigned int i;
-int ret = 0;
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,28)
 if (enable)
 {
@@ -1240,6 +1245,8 @@
 return set_memory_array_uc(pt, pages);
 }  
 #else   
+unsigned int i;
+int ret = 0;
 for( i = 0; i  pages; i++ )
 {
 ret = KCL_SetPageCache((void *)pt[i], 1, enable);
Index: fglrx/drm_proc.h
===
--- fglrx.orig/drm_proc.h	2009-06-28 12:57:52.893189018 +0200
+++ fglrx/drm_proc.h	2009-06-28 12:58:22.604195690 +0200
@@ -496,7 +496,7 @@
 
 	DRM_PROC_PRINT(vma use count: %d, high_memory = %p, 0x%08lx\n,
 		   atomic_read(dev-vma_count),
-		   high_memory, virt_to_phys(high_memory));
+		   high_memory, (unsigned long)virt_to_phys(high_memory));
 	for (pt = dev-vmalist; pt; pt = pt-next) {
 		if (!(vma = pt-vma)) continue;
 		DRM_PROC_PRINT(\n%5d 0x%08lx-0x%08lx %c%c%c%c%c%c 0x%08lx,
Index: fglrx/firegl_public.h
===
--- fglrx.orig/firegl_public.h	2009-06-28 12:53:41.029442531 +0200
+++ fglrx/firegl_public.h	2009-06-28 13:00:21.494199179 +0200
@@ -601,10 +601,12 @@
 #endif
 
 /* #ifndef pgprot_writecombine */
+#undef pgprot_writecombine
 #define pgprot_writecombine(prot) __pgprot((pgprot_val(prot)  ~(_PAGE_PCD)) | _PAGE_PWT)
 /* #endif */
 
 /* #ifndef pgprot_noncached */
+#undef pgprot_noncached
 #define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT)
 /* #endif */