[arch-commits] Commit in ndiswrapper-arch/trunk (PKGBUILD kernel-5.6.patch)

Christian Hesse eworm at archlinux.org
Fri Apr 3 20:15:11 UTC 2020


    Date: Friday, April 3, 2020 @ 20:15:11
  Author: eworm
Revision: 611209

upgpkg: ndiswrapper-arch 1.62-43

fix for linux 5.6

Added:
  ndiswrapper-arch/trunk/kernel-5.6.patch
Modified:
  ndiswrapper-arch/trunk/PKGBUILD

------------------+
 PKGBUILD         |    8 +++-
 kernel-5.6.patch |   85 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-03 20:14:07 UTC (rev 611208)
+++ PKGBUILD	2020-04-03 20:15:11 UTC (rev 611209)
@@ -3,7 +3,7 @@
 
 pkgname=ndiswrapper-arch
 pkgver=1.62
-pkgrel=42
+pkgrel=43
 pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors, kernel module for Arch kernel"
 arch=('x86_64')
 url="https://sourceforge.net/projects/ndiswrapper/"
@@ -12,11 +12,12 @@
 provides=('NDISWRAPPER-MODULE')
 replaces=('ndiswrapper-module')
 source=("https://sourceforge.net/projects/ndiswrapper/files/stable/ndiswrapper-$pkgver.tar.gz"
-        'kernel-5.3.patch' 'kernel-5.4.patch' 'kernel-5.5.patch')
+        'kernel-5.3.patch' 'kernel-5.4.patch' 'kernel-5.5.patch' 'kernel-5.6.patch')
 sha512sums=('a6e111bc699572642e44d6d31cc2f06374648a01b8dd7dd4e74d6ad5e187e39f99faee38f792c83a94d4618ae4d8866914fb3f60b1d80e838a753285ea7cf783'
             'c404f35280534b172235c5c578657d7a30ac2253c7c2abedd65a183d09390e95e7c3030cb409accb4d198ff0411482f8029f8664418c99d5672f92e9c733801d'
             '36450042db79ed4545030276bff9db1bc9895259f38c1c0bf4dc238ad76ec61c2e08d437997dafd327f2a8fd1694d61e418941555e92144e3ec86c8066561429'
-            'ed543cbfb236de0a20e1f164c22c83cd19aec416b5f50a58cee731857231c667d166c36814047174bddda36261af71e92ecdb2944e5b818a603085af279fbd89')
+            'ed543cbfb236de0a20e1f164c22c83cd19aec416b5f50a58cee731857231c667d166c36814047174bddda36261af71e92ecdb2944e5b818a603085af279fbd89'
+            'f37efd16a32c4a36607d43ccda0979a914521157e2095db4c331315638f24d440d8628ea7e98c96f92155e1df133478f0ce9eb76152e963eca4a3fecafbca155')
 
 prepare() {
   cd ndiswrapper-$pkgver
@@ -23,6 +24,7 @@
   patch --no-backup-if-mismatch -p2 -i "$srcdir"/kernel-5.3.patch
   patch --no-backup-if-mismatch -p1 -i "$srcdir"/kernel-5.4.patch
   patch --no-backup-if-mismatch -p1 -i "$srcdir"/kernel-5.5.patch
+  patch --no-backup-if-mismatch -p1 -i "$srcdir"/kernel-5.6.patch
 }
 
 build() {

Added: kernel-5.6.patch
===================================================================
--- kernel-5.6.patch	                        (rev 0)
+++ kernel-5.6.patch	2020-04-03 20:15:11 UTC (rev 611209)
@@ -0,0 +1,85 @@
+diff --git a/driver/ntoskernel.c b/driver/ntoskernel.c
+index fccb28e..cd87740 100644
+--- a/driver/ntoskernel.c
++++ b/driver/ntoskernel.c
+@@ -1763,9 +1763,9 @@ wstdcall void __iomem *WIN_FUNC(MmMapIoSpace,3)
+ 	void __iomem *virt;
+ 	ENTER1("cache type: %d", cache);
+ 	if (cache == MmCached)
+-		virt = ioremap(phys_addr, size);
++		virt = ioremap_cache(phys_addr, size);
+ 	else
+-		virt = ioremap_nocache(phys_addr, size);
++		virt = ioremap(phys_addr, size);
+ 	TRACE1("%llx, %zu, %p", phys_addr, size, virt);
+ 	return virt;
+ }
+diff --git a/driver/proc.c b/driver/proc.c
+index 8a8cf2b..2622228 100644
+--- a/driver/proc.c
++++ b/driver/proc.c
+@@ -70,7 +70,11 @@ static inline void *PDE_DATA(const struct inode *inode)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ static inline struct proc_dir_entry *proc_create_data(const char *name,
+ 	umode_t mode, struct proc_dir_entry *parent,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++	struct proc_ops *fops, void *data)
++#else
+ 	struct file_operations *fops, void *data)
++#endif
+ {
+ 	struct proc_dir_entry *de;
+ 
+@@ -86,7 +90,11 @@ static inline struct proc_dir_entry *proc_create_data(const char *name,
+ 
+ static int do_proc_make_entry(const char *name, umode_t mode,
+ 			      struct proc_dir_entry *parent,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++			      struct proc_ops *fops, kuid_t uid,
++#else
+ 			      struct file_operations *fops, kuid_t uid,
++#endif
+ 			      kgid_t gid, struct ndis_device *wnd)
+ {
+ 	struct proc_dir_entry *de;
+@@ -100,6 +108,32 @@ static int do_proc_make_entry(const char *name, umode_t mode,
+ 	return 0;
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++#define PROC_DECLARE_RO(name) \
++	static int proc_##name##_open(struct inode *inode, struct file *file) \
++	{ \
++		return single_open(file, proc_##name##_read, PDE_DATA(inode)); \
++	} \
++	static struct proc_ops name##_fops = { \
++		.proc_open = proc_##name##_open, \
++		.proc_read = seq_read, \
++		.proc_lseek = seq_lseek, \
++		.proc_release = single_release, \
++	};
++
++#define PROC_DECLARE_RW(name) \
++	static int proc_##name##_open(struct inode *inode, struct file *file) \
++	{ \
++		return single_open(file, proc_##name##_read, PDE_DATA(inode)); \
++	} \
++	static struct proc_ops name##_fops = { \
++		.proc_open = proc_##name##_open, \
++		.proc_read = seq_read, \
++		.proc_lseek = seq_lseek, \
++		.proc_release = single_release, \
++		.proc_write = proc_##name##_write, \
++	};
++#else
+ #define PROC_DECLARE_RO(name) \
+ 	static int proc_##name##_open(struct inode *inode, struct file *file) \
+ 	{ \
+@@ -126,6 +160,7 @@ static int do_proc_make_entry(const char *name, umode_t mode,
+ 		.release = single_release, \
+ 		.write = proc_##name##_write, \
+ 	};
++#endif
+ 
+ #define proc_make_entry_ro(name, parent, wnd) \
+ 	do_proc_make_entry(#name, S_IFREG | S_IRUSR | S_IRGRP, parent, \



More information about the arch-commits mailing list