summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCody P Schafer2017-03-30 15:50:25 -0400
committerCody P Schafer2017-03-30 15:50:25 -0400
commit942d09de73f552e53cc1031243c9b9f006082a09 (patch)
tree22b89fe085378dcc7cfbea9da742fa481fcffac8
parentb020311fe8557d16ac3de1a78ec0cac298174da1 (diff)
downloadaur-942d09de73f552e53cc1031243c9b9f006082a09.tar.gz
add linux 4.10 build fix, enable some debug output
-rw-r--r--0001-fix-4.10.y.patch26
-rw-r--r--0001-fix-for-4.9.y.patch136
-rw-r--r--PKGBUILD7
3 files changed, 150 insertions, 19 deletions
diff --git a/0001-fix-4.10.y.patch b/0001-fix-4.10.y.patch
new file mode 100644
index 000000000000..bf3cbd43c9e2
--- /dev/null
+++ b/0001-fix-4.10.y.patch
@@ -0,0 +1,26 @@
+From 516856f60f8a47173aa71e067c37f8622245c80e Mon Sep 17 00:00:00 2001
+From: Cody P Schafer <dev@codyps.com>
+Date: Thu, 30 Mar 2017 15:44:05 -0400
+Subject: [PATCH] fix 4.10.y
+
+---
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
+index ccee80c..7cb3f3e 100644
+--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
++++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
+@@ -763,7 +763,9 @@ struct inode_operations prlfs_symlink_iops = {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+ .readlink = prlfs_readlink,
+ #else
++# if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .readlink = generic_readlink,
++# endif
+ .getattr = prlfs_getattr,
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)
+--
+2.12.1
+
diff --git a/0001-fix-for-4.9.y.patch b/0001-fix-for-4.9.y.patch
index 58df4eeacc33..799ca7533fdd 100644
--- a/0001-fix-for-4.9.y.patch
+++ b/0001-fix-for-4.9.y.patch
@@ -1,42 +1,48 @@
-From 8695b6d330e237f5e21bef576d0ba3e49832b6fe Mon Sep 17 00:00:00 2001
+From 7d99b6d8e78946e06f066c25145fe7cf93b7d5b4 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 30 Jan 2017 12:22:26 -0500
Subject: [PATCH] fix for 4.9.y
---
- prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c | 12 ++++++++++++
- prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c | 2 +-
- prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h | 10 ++++++++--
- 3 files changed, 21 insertions(+), 3 deletions(-)
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/Makefile | 2 +-
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c | 15 ++++++++++++++-
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/interface.c | 6 ++++++
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h | 3 ++-
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c | 8 ++++++--
+ prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile | 2 +-
+ prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c | 5 +++--
+ prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h | 10 ++++++++--
+ 8 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
-index 5502d70..e8d0043 100644
+index 5502d70..ccee80c 100644
--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
+++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
-@@ -382,11 +382,22 @@ static int prlfs_rmdir(struct inode *dir, struct dentry *dentry)
- return ret;
+@@ -383,10 +383,22 @@ static int prlfs_rmdir(struct inode *dir, struct dentry *dentry)
}
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
- struct inode *new_dir, struct dentry *new_de)
-+#else
-+static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
-+ struct inode *new_dir, struct dentry *new_de, unsigned int flags)
+- struct inode *new_dir, struct dentry *new_de)
++ struct inode *new_dir, struct dentry *new_de
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
++ , unsigned int flags
+#endif
++ )
{
void *np, *nbuf;
int nbuflen;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
-+ if (flags)
++ if (flags) {
++ pr_info_ratelimited("rename got invalid flags: 0x%x\n", flags);
+ return -EINVAL;
++ }
+#endif
+
+ {
PRLFS_STD_INODE_HEAD(old_de)
nbuflen = PATH_MAX;
nbuf = kmalloc(nbuflen, GFP_KERNEL);
-@@ -406,6 +417,7 @@ static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
+@@ -406,6 +418,7 @@ static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
out_free1:
kfree(nbuf);
PRLFS_STD_INODE_TAIL
@@ -44,11 +50,107 @@ index 5502d70..e8d0043 100644
}
/*
+diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/interface.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/interface.c
+index 1665ed3..89b809f 100644
+--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/interface.c
++++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/interface.c
+@@ -114,6 +114,9 @@ int host_request_get_sf_list(struct pci_dev *pdev, void *data, int size)
+ ret = call_tg_sync(pdev, &sdesc);
+ if ((ret == 0) && (Req.Req.Status != TG_STATUS_SUCCESS))
+ ret = -TG_ERR(Req.Req.Status);
++ if (ret < 0) {
++ pr_warn("failed to get sf list: %d\n", ret);
++ }
+ return ret;
+ }
+
+@@ -136,6 +139,9 @@ int host_request_sf_param(struct pci_dev *pdev, void *data, int size,
+ ret = call_tg_sync(pdev, &sdesc);
+ if ((ret == 0) && (Req.Req.Status != TG_STATUS_SUCCESS))
+ ret = -TG_ERR(Req.Req.Status);
++ if (ret < 0) {
++ pr_warn("sf_param failed: %d %d\n", ret, Req.Req.Status);
++ }
+ return ret;
+ }
+
+diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h b/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h
+index 77660e0..c6d342a 100644
+--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h
++++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h
+@@ -149,13 +149,14 @@ int host_request_symlink(struct super_block *sb, const void *src_path, int src_l
+
+ /* define to 1 to enable copious debugging info */
+ #undef DRV_DEBUG
++#define DRV_DEBUG 1
+
+ /* define to 1 to disable lightweight runtime debugging checks */
+ #undef DRV_NDEBUG
+
+ #ifdef DRV_DEBUG
+ /* note: prints function name for you */
+-# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
++# define DPRINTK(fmt, args...) pr_debug("%s: " fmt, __FUNCTION__ , ## args)
+ #else
+ # define DPRINTK(fmt, args...)
+ #endif
+diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
+index 5b7e5e8..2aae4ce 100644
+--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
++++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
+@@ -441,12 +441,16 @@ static int seq_sf_show(struct seq_file *s, void *v)
+ psp.id = GET_SF_INFO;
+ strncpy((char *)&psp.locale, "utf-8", LOCALE_NAME_LEN - 1);
+ ret = host_request_sf_param(tg_dev, p, PAGE_SIZE, &psp);
+- if (ret < 0)
++ if (ret < 0) {
++ pr_warn("could not get info for %u: %d\n", psp.index, ret);
+ goto free;
++ }
+
+ prsp = p;
+- if (prsp->ret == 0)
++ if (prsp->ret == 0) {
++ pr_warn("empty info for %u\n", psp.index);
+ goto free;
++ }
+
+ *((char *)prsp + PAGE_SIZE - 1) = 0;
+ seq_printf(s, "%x: %s ", psp.index, prsp->buf);
+diff --git a/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile b/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile
+index 014ae08..9af5c16 100644
+--- a/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile
++++ b/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile
+@@ -21,7 +21,7 @@ DRIVER_DIR ?= $(PWD)
+
+ export DRIVER_DIR
+
+-EXTRA_CFLAGS += -I$(DRIVER_DIR)
++EXTRA_CFLAGS += -I$(DRIVER_DIR) -DDEBUG=1
+ EXTRA_CFLAGS += -I$(DRIVER_DIR)/../../../../
+
+ # Get version from version.h in kernel source directory
diff --git a/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c b/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
-index a03e742..9f54ec1 100644
+index a03e742..a48862d 100644
--- a/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
+++ b/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
-@@ -480,7 +480,7 @@ static TG_PAGED_BUFFER *map_user_request(TG_PAGED_BUFFER *buf, TG_BUFFER *sbuf,
+@@ -42,13 +42,14 @@ static char version[] = KERN_INFO DRIVER_LOAD_MSG "\n";
+
+ /* define to 1 to enable copious debugging info */
+ #undef DRV_DEBUG
++#define DRV_DEBUG 1
+
+ /* define to 1 to disable lightweight runtime debugging checks */
+ #undef DRV_NDEBUG
+
+ #ifdef DRV_DEBUG
+ /* note: prints function name for you */
+-# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
++# define DPRINTK(fmt, args...) pr_debug("%s: " fmt, __FUNCTION__ , ## args)
+ #else
+ # define DPRINTK(fmt, args...)
+ #endif
+@@ -480,7 +481,7 @@ static TG_PAGED_BUFFER *map_user_request(TG_PAGED_BUFFER *buf, TG_BUFFER *sbuf,
/* lock userspace pages */
got = get_user_pages(
sbuf->u.Va, npages,
diff --git a/PKGBUILD b/PKGBUILD
index 96963bc5d2d6..22793ebafccf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgbase=parallels-tools
pkgname=(parallels-tools parallels-tools-dkms)
pkgver=11.2.2.32651
-pkgrel=3
+pkgrel=4
pkgdesc="Parallels virtualization integration services & drivers"
arch=('x86_64')
url="https://parallels.com"
@@ -33,6 +33,7 @@ source=(
dir://parallels-tools/installer/prl-x11.service
dir://parallels-tools/installer/prlfsmountd.sh
'0001-fix-for-4.9.y.patch'
+ '0001-fix-4.10.y.patch'
)
sha1sums=('af32269e60b11704be9fca73ea9586da01b37ae2'
@@ -47,10 +48,12 @@ sha1sums=('af32269e60b11704be9fca73ea9586da01b37ae2'
'82ab36a2876a1d30fad92ebf06d87b0d8d7210a8'
'bd681d740b4a1a68adfd4f94afec5934c2ea69ac'
'56d3fc7c9abb7c63b9c6356422261f0a87cf3b22'
- 'dca57db6826f044d23fc26c0df3736a5dfb9ae6d')
+ 'e955e6d9215a0d104a0482b69bb7d7399f8c9f36'
+ '078ecd2bb95b05006e94007dc8428d9c8fcc519e')
prepare() {
patch -p1 -i ../0001-fix-for-4.9.y.patch
+ patch -p1 -i ../0001-fix-4.10.y.patch
}
package_parallels-tools() {