* [PATCH 01/21] patches: fix spatch for bluetooth
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 02/21] patches: deactivate tracing for ath6kl, cfg80211 and wil6210 only on kernel < 3.4 Hauke Mehrtens
` (21 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens, Luis R. Rodriguez
Commit 8e879bf1f in backports converted some bluetooth patches into an
spatch. There was a problem in this conversion, the second argument is
not struct socket, but struct sock. This causes some warnings in the
kernel build.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
.../collateral-evolutions/network/0054-struct-proto_ops-sig.cocci | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/patches/collateral-evolutions/network/0054-struct-proto_ops-sig.cocci b/patches/collateral-evolutions/network/0054-struct-proto_ops-sig.cocci
index 0c0845a..64df8ab 100644
--- a/patches/collateral-evolutions/network/0054-struct-proto_ops-sig.cocci
+++ b/patches/collateral-evolutions/network/0054-struct-proto_ops-sig.cocci
@@ -126,10 +126,10 @@ send_func(...)
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
-+static int backport_send(struct kiocb *iocb, struct socket *sock,
++static int backport_send(struct kiocb *iocb, struct sock *sk,
+ struct msghdr *msg, size_t len)
+{
-+ return send_func(sock, msg, len);
++ return send_func(sk, msg, len);
+}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
@@ -144,11 +144,11 @@ recv_func(...)
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
-+static int backport_recv(struct kiocb *iocb, struct socket *sock,
++static int backport_recv(struct kiocb *iocb, struct sock *sk,
+ struct msghdr *msg, size_t len,
+ int noblock, int flags, int *addr_len)
+{
-+ return recv_func(sock, msg, len, noblock, flags, addr_len);
++ return recv_func(sk, msg, len, noblock, flags, addr_len);
+}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 02/21] patches: deactivate tracing for ath6kl, cfg80211 and wil6210 only on kernel < 3.4
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 01/21] patches: fix spatch for bluetooth Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-15 7:02 ` Johannes Berg
2015-06-14 14:29 ` [PATCH 03/21] patches: include linux/sched.h header in drivers/nfc/mei_phy.c Hauke Mehrtens
` (20 subsequent siblings)
22 siblings, 1 reply; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
On kernel version >= 3.4 we can normally include tracing, only on such
old kernel we have to deactivate the tracing code.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../network/0022-define-tracing/ath6kl.patch | 4 +++-
.../network/0022-define-tracing/cfg80211.patch | 8 ++++++--
.../network/0022-define-tracing/wil6210.patch | 4 +++-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch b/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch
index 5910f54..b6e8c35 100644
--- a/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch
+++ b/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch
@@ -1,10 +1,12 @@
--- a/drivers/net/wireless/ath/ath6kl/trace.c
+++ b/drivers/net/wireless/ath/ath6kl/trace.c
-@@ -16,6 +16,7 @@
+@@ -16,6 +16,9 @@
#include <linux/module.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
+#include "trace.h"
++#endif
#define CREATE_TRACE_POINTS
#include "trace.h"
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch b/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch
index eeab23d..8b59837 100644
--- a/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch
+++ b/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch
@@ -1,8 +1,12 @@
--- a/net/wireless/trace.c
+++ b/net/wireless/trace.c
-@@ -1,4 +1,5 @@
+@@ -1,6 +1,9 @@
#include <linux/module.h>
-+#include "trace.h"
#ifndef __CHECKER__
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
++#include "trace.h"
++#endif
#define CREATE_TRACE_POINTS
+ #include "trace.h"
+
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch b/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch
index 1888cd7..ec9df86 100644
--- a/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch
+++ b/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch
@@ -1,9 +1,11 @@
--- a/drivers/net/wireless/ath/wil6210/trace.c
+++ b/drivers/net/wireless/ath/wil6210/trace.c
-@@ -16,5 +16,6 @@
+@@ -16,5 +16,8 @@
#include <linux/module.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
+#include "trace.h"
++#endif
#define CREATE_TRACE_POINTS
#include "trace.h"
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 02/21] patches: deactivate tracing for ath6kl, cfg80211 and wil6210 only on kernel < 3.4
2015-06-14 14:29 ` [PATCH 02/21] patches: deactivate tracing for ath6kl, cfg80211 and wil6210 only on kernel < 3.4 Hauke Mehrtens
@ 2015-06-15 7:02 ` Johannes Berg
2015-06-15 18:20 ` Hauke Mehrtens
0 siblings, 1 reply; 27+ messages in thread
From: Johannes Berg @ 2015-06-15 7:02 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: backports
On Sun, 2015-06-14 at 16:29 +0200, Hauke Mehrtens wrote:
> On kernel version >= 3.4 we can normally include tracing, only on such
> old kernel we have to deactivate the tracing code.
This is very annoying - why is this needed?
johannes
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 02/21] patches: deactivate tracing for ath6kl, cfg80211 and wil6210 only on kernel < 3.4
2015-06-15 7:02 ` Johannes Berg
@ 2015-06-15 18:20 ` Hauke Mehrtens
0 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-15 18:20 UTC (permalink / raw)
To: Johannes Berg; +Cc: backports
On 06/15/2015 09:02 AM, Johannes Berg wrote:
> On Sun, 2015-06-14 at 16:29 +0200, Hauke Mehrtens wrote:
>> On kernel version >= 3.4 we can normally include tracing, only on such
>> old kernel we have to deactivate the tracing code.
>
> This is very annoying - why is this needed?
>
> johannes
>
Thanks for asking, I looked into this again and there is only an include
of linux/interrupt.h missing for these drivers. mt7601u needs it for
kernel < 3.4 and the others for kernel < 3.1.
I will send a new patch.
Hauke
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 03/21] patches: include linux/sched.h header in drivers/nfc/mei_phy.c
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 01/21] patches: fix spatch for bluetooth Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 02/21] patches: deactivate tracing for ath6kl, cfg80211 and wil6210 only on kernel < 3.4 Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 04/21] header: fix rt6_nexthop() backport Hauke Mehrtens
` (19 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This additional include is needed to prevent this error with kernel 3.10:
In file included from /home/hauke/compat-wireless/tmp/backport-include/linux/wait.h:3:0,
from include/linux/mmzone.h:9,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/hauke/compat-wireless/tmp/backport-include/linux/module.h:3,
from /home/hauke/compat-wireless/tmp/drivers/nfc/mei_phy.c:21:
/home/hauke/compat-wireless/tmp/drivers/nfc/mei_phy.c: In function ‘mei_nfc_send’:
include/linux/wait.h:296:33: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
^
.....
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../network/0013-fix-makefile-includes/mei_phy.patch | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 patches/collateral-evolutions/network/0013-fix-makefile-includes/mei_phy.patch
diff --git a/patches/collateral-evolutions/network/0013-fix-makefile-includes/mei_phy.patch b/patches/collateral-evolutions/network/0013-fix-makefile-includes/mei_phy.patch
new file mode 100644
index 0000000..c05f6ea
--- /dev/null
+++ b/patches/collateral-evolutions/network/0013-fix-makefile-includes/mei_phy.patch
@@ -0,0 +1,10 @@
+--- a/drivers/nfc/mei_phy.c
++++ b/drivers/nfc/mei_phy.c
+@@ -19,6 +19,7 @@
+ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+ #include <linux/module.h>
++#include <linux/sched.h>
+ #include <linux/slab.h>
+ #include <linux/nfc.h>
+
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 04/21] header: fix rt6_nexthop() backport
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (2 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 03/21] patches: include linux/sched.h header in drivers/nfc/mei_phy.c Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 05/21] patches: remove additional member in struct mei_cl_device_id Hauke Mehrtens
` (18 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
rt6_nexthop() got an additional parameter in commit 2647a9b0. Instead
of only backporting it for kernel < 3.10 do it now for kernel version <
4.2.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/net/ip6_fib.h | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/backport/backport-include/net/ip6_fib.h b/backport/backport-include/net/ip6_fib.h
index 8c5d8ff..96b6759 100644
--- a/backport/backport-include/net/ip6_fib.h
+++ b/backport/backport-include/net/ip6_fib.h
@@ -4,12 +4,22 @@
#include <net/ip6_route.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+/*
+ * This function is avaliable with one argument since kernel 3.10, but the
+ * secound one was added in 4.2.
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
#define rt6_nexthop LINUX_BACKPORT(rt6_nexthop)
-static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt)
+static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt,
+ struct in6_addr *daddr)
{
- return &rt->rt6i_gateway;
+ if (rt->rt6i_flags & RTF_GATEWAY)
+ return &rt->rt6i_gateway;
+ else if (rt->rt6i_flags & RTF_CACHE)
+ return &rt->rt6i_dst.addr;
+ else
+ return daddr;
}
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) */
#endif /* __BACKPORT_NET_IP6_ROUTE_H */
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 05/21] patches: remove additional member in struct mei_cl_device_id
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (3 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 04/21] header: fix rt6_nexthop() backport Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 06/21] patches: rhashtable header patch not needed Hauke Mehrtens
` (17 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The uuid member was added to the struct mei_cl_device_id in this commit:
commit c93b76b34b4d8dbe8e3443eb27e49ac60034342b
Author: Tomas Winkler <tomas.winkler@intel.com>
Date: Thu May 7 15:54:02 2015 +0300
mei: bus: report also uuid in module alias
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../network/0059-uuid-in-mei/INFO | 7 ++++++
.../network/0059-uuid-in-mei/nfc.patch | 28 ++++++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 patches/collateral-evolutions/network/0059-uuid-in-mei/INFO
create mode 100644 patches/collateral-evolutions/network/0059-uuid-in-mei/nfc.patch
diff --git a/patches/collateral-evolutions/network/0059-uuid-in-mei/INFO b/patches/collateral-evolutions/network/0059-uuid-in-mei/INFO
new file mode 100644
index 0000000..4c96bf5
--- /dev/null
+++ b/patches/collateral-evolutions/network/0059-uuid-in-mei/INFO
@@ -0,0 +1,7 @@
+The uuid member was added to the struct mei_cl_device_id in this commit:
+commit c93b76b34b4d8dbe8e3443eb27e49ac60034342b
+Author: Tomas Winkler <tomas.winkler@intel.com>
+Date: Thu May 7 15:54:02 2015 +0300
+
+ mei: bus: report also uuid in module alias
+
diff --git a/patches/collateral-evolutions/network/0059-uuid-in-mei/nfc.patch b/patches/collateral-evolutions/network/0059-uuid-in-mei/nfc.patch
new file mode 100644
index 0000000..69e20e2
--- /dev/null
+++ b/patches/collateral-evolutions/network/0059-uuid-in-mei/nfc.patch
@@ -0,0 +1,28 @@
+--- a/drivers/nfc/microread/mei.c
++++ b/drivers/nfc/microread/mei.c
+@@ -67,7 +67,11 @@ static int microread_mei_remove(struct m
+ }
+
+ static struct mei_cl_device_id microread_mei_tbl[] = {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ { MICROREAD_DRIVER_NAME, MEI_NFC_UUID},
++#else
++ { MICROREAD_DRIVER_NAME},
++#endif
+
+ /* required last entry */
+ { }
+--- a/drivers/nfc/pn544/mei.c
++++ b/drivers/nfc/pn544/mei.c
+@@ -67,7 +67,11 @@ static int pn544_mei_remove(struct mei_c
+ }
+
+ static struct mei_cl_device_id pn544_mei_tbl[] = {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ { PN544_DRIVER_NAME, MEI_NFC_UUID},
++#else
++ { PN544_DRIVER_NAME},
++#endif
+
+ /* required last entry */
+ { }
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 06/21] patches: rhashtable header patch not needed
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (4 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 05/21] patches: remove additional member in struct mei_cl_device_id Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 07/21] backports: add backport for new AEAD crypto API Hauke Mehrtens
` (16 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This patch, adding a missing include to rhashtable.c, is not needed any
more, because it went into upstream in commit 6d7954130.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/backport-adjustments/rhashtable.patch | 10 ----------
1 file changed, 10 deletions(-)
delete mode 100644 patches/backport-adjustments/rhashtable.patch
diff --git a/patches/backport-adjustments/rhashtable.patch b/patches/backport-adjustments/rhashtable.patch
deleted file mode 100644
index 798d9cb..0000000
--- a/patches/backport-adjustments/rhashtable.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/compat/lib-rhashtable.c
-+++ b/compat/lib-rhashtable.c
-@@ -26,6 +26,7 @@
- #include <linux/random.h>
- #include <linux/rhashtable.h>
- #include <linux/err.h>
-+#include <linux/export.h>
-
- #define HASH_DEFAULT_SIZE 64UL
- #define HASH_MIN_SIZE 4U
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 07/21] backports: add backport for new AEAD crypto API
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (5 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 06/21] patches: rhashtable header patch not needed Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-16 8:56 ` Johannes Berg
2015-06-14 14:29 ` [PATCH 08/21] dependencies: add VIDEO_COBALT Hauke Mehrtens
` (15 subsequent siblings)
22 siblings, 1 reply; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens, Johannes Berg
mac80211 makes use of the new AEAD crypto api since commit 957e0fe629.
This patch provides a backport layer which converts the new API to the
old one used in older kernel versions. This backport is based on this
mainline commit: 996d98d85.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Johannes Berg <johannes.berg@intel.com>
---
backport/backport-include/crypto/aead.h | 33 ++++++++++++++++
backport/compat/Makefile | 1 +
backport/compat/backport-4.2.c | 67 +++++++++++++++++++++++++++++++++
3 files changed, 101 insertions(+)
create mode 100644 backport/backport-include/crypto/aead.h
create mode 100644 backport/compat/backport-4.2.c
diff --git a/backport/backport-include/crypto/aead.h b/backport/backport-include/crypto/aead.h
new file mode 100644
index 0000000..97d5ce6
--- /dev/null
+++ b/backport/backport-include/crypto/aead.h
@@ -0,0 +1,33 @@
+#ifndef __BACKPORT_CRYPTO_AEAD_H
+#define __BACKPORT_CRYPTO_AEAD_H
+#include_next <crypto/aead.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+#define aead_request_set_ad LINUX_BACKPORT(aead_request_set_ad)
+static inline void aead_request_set_ad(struct aead_request *req,
+ unsigned int assoclen)
+{
+ req->assoclen = assoclen;
+}
+
+#define crypto_aead_reqsize LINUX_BACKPORT(crypto_aead_reqsize)
+unsigned int crypto_aead_reqsize(struct crypto_aead *tfm);
+
+struct aead_request *crypto_backport_convert(struct aead_request *req);
+
+static inline int backport_crypto_aead_encrypt(struct aead_request *req)
+{
+ return crypto_aead_encrypt(crypto_backport_convert(req));
+}
+#define crypto_aead_encrypt LINUX_BACKPORT(crypto_aead_encrypt)
+
+static inline int backport_crypto_aead_decrypt(struct aead_request *req)
+{
+ return crypto_aead_decrypt(crypto_backport_convert(req));
+}
+#define crypto_aead_decrypt LINUX_BACKPORT(crypto_aead_decrypt)
+
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) */
+
+#endif /* __BACKPORT_CRYPTO_AEAD_H */
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index f60c32b..d0acf17 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -26,6 +26,7 @@ compat-$(CPTCFG_KERNEL_3_17) += backport-3.17.o
compat-$(CPTCFG_KERNEL_3_18) += backport-3.18.o
compat-$(CPTCFG_KERNEL_3_19) += backport-3.19.o
compat-$(CPTCFG_KERNEL_4_1) += backport-4.1.o
+compat-$(CPTCFG_KERNEL_4_2) += backport-4.2.o
compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o
compat-$(CPTCFG_BPAUTO_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o
diff --git a/backport/compat/backport-4.2.c b/backport/compat/backport-4.2.c
new file mode 100644
index 0000000..e00aa49
--- /dev/null
+++ b/backport/compat/backport-4.2.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2015 Hauke Mehrtens <hauke@hauke-m.de>
+ *
+ * Backport functionality introduced in Linux 4.2.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <crypto/scatterwalk.h>
+#include <crypto/aead.h>
+
+static struct scatterlist *scatterwalk_ffwd(struct scatterlist dst[2],
+ struct scatterlist *src,
+ unsigned int len)
+{
+ for (;;) {
+ if (!len)
+ return src;
+
+ if (src->length > len)
+ break;
+
+ len -= src->length;
+ src = sg_next(src);
+ }
+
+ sg_init_table(dst, 2);
+ sg_set_page(dst, sg_page(src), src->length - len, src->offset + len);
+ scatterwalk_crypto_chain(dst, sg_next(src), 0, 2);
+
+ return dst;
+}
+
+struct aead_old_request {
+ struct scatterlist srcbuf[2];
+ struct scatterlist dstbuf[2];
+ struct aead_request subreq;
+};
+
+unsigned int crypto_aead_reqsize(struct crypto_aead *tfm)
+{
+ return crypto_aead_crt(tfm)->reqsize + sizeof(struct aead_old_request);
+}
+EXPORT_SYMBOL_GPL(crypto_aead_reqsize);
+
+struct aead_request *crypto_backport_convert(struct aead_request *req)
+{
+ struct aead_old_request *nreq = aead_request_ctx(req);
+ struct crypto_aead *aead = crypto_aead_reqtfm(req);
+ struct scatterlist *src, *dst;
+
+ src = scatterwalk_ffwd(nreq->srcbuf, req->src, req->assoclen);
+ dst = req->src == req->dst ?
+ src : scatterwalk_ffwd(nreq->dstbuf, req->dst, req->assoclen);
+
+ aead_request_set_tfm(&nreq->subreq, aead);
+ aead_request_set_callback(&nreq->subreq, aead_request_flags(req),
+ req->base.complete, req->base.data);
+ aead_request_set_crypt(&nreq->subreq, src, dst, req->cryptlen,
+ req->iv);
+ aead_request_set_assoc(&nreq->subreq, req->src, req->assoclen);
+
+ return &nreq->subreq;
+}
+EXPORT_SYMBOL_GPL(crypto_backport_convert);
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 08/21] dependencies: add VIDEO_COBALT
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (6 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 07/21] backports: add backport for new AEAD crypto API Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 09/21] dependencies: make DVB_M88DS3103 and DVB_TS2020 depend on kernel > 3.8 Hauke Mehrtens
` (14 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
VIDEO_COBALT selects VIDEO_ADV7604, but VIDEO_ADV7604 should only be
build on kernel versions >= 3.13. On older kernel versions this causes
this warning which makes Kconfig ignore the dependency on kernel version
>= 3.13.
warning: (VIDEO_COBALT) selects VIDEO_ADV7604 which has unmet direct
dependencies (MEDIA_SUPPORT && !KERNEL_3_13 && m && <choice> &&
VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && GPIOLIB)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
dependencies | 1 +
1 file changed, 1 insertion(+)
diff --git a/dependencies b/dependencies
index 14c1462..c8f174a 100644
--- a/dependencies
+++ b/dependencies
@@ -46,6 +46,7 @@ DVB_RTL2832 3.8
# This does not seem like a good test desirable test case to
# start that work with.
VIDEO_ADV7604 3.13
+VIDEO_COBALT 3.13
# missing devm_gpiod_get_optional()
# this needs devm_gpiod_get_optional() with 3 arguments.
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 09/21] dependencies: make DVB_M88DS3103 and DVB_TS2020 depend on kernel > 3.8
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (7 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 08/21] dependencies: add VIDEO_COBALT Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 10/21] dependencies: make two media tuners depend on kernel >= 3.3 Hauke Mehrtens
` (13 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The drivers DVB_M88DS3103 and DVB_TS2020 are accessing some member in
struct regmap_config which is not available in kernel version < 3.8.
These drivers are getting selected by some other drivers, which are now
also depending on kernel >= 3.8, otherwise KConfig would ignore the
dependency on kernel >= 3.8
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
dependencies | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dependencies b/dependencies
index c8f174a..8692497 100644
--- a/dependencies
+++ b/dependencies
@@ -37,6 +37,16 @@ DVB_USB_RTL28XXU 3.4
DVB_USB_RTL28XXU 3.8
DVB_RTL2830 3.8
DVB_RTL2832 3.8
+DVB_M88DS3103 3.8
+DVB_TS2020 3.8
+DVB_USB_DW2102 3.8
+DVB_USB_LME2510 3.8
+DVB_USB_DVBSKY 3.8
+VIDEO_EM28XX_DVB 3.8
+VIDEO_CX23885 3.8
+VIDEO_CX88_DVB 3.8
+DVB_DM1105 3.8
+DVB_SMIPCIE 3.8
# missing linux/gpio/consumer.h
# consumer.h cannot be backported currently, as functions rely
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 10/21] dependencies: make two media tuners depend on kernel >= 3.3
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (8 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 09/21] dependencies: make DVB_M88DS3103 and DVB_TS2020 depend on kernel > 3.8 Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 11/21] dependencies: make VIDEO_ADV7604 depend on kernel >= 3.17 Hauke Mehrtens
` (12 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The drivers MEDIA_TUNER_FC2580 and MEDIA_TUNER_TUA9001 are using
devm_regmap_init_i2c() which is only believable on kernel >= 3.3, add a
dependency to the driver.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
dependencies | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dependencies b/dependencies
index 8692497..ab3fef0 100644
--- a/dependencies
+++ b/dependencies
@@ -94,6 +94,8 @@ VIDEO_S5C73M3 3.6
VIDEO_LM3646 3.3
VIDEO_LM3560 3.3
MEDIA_TUNER_M88RS6000T 3.3
+MEDIA_TUNER_FC2580 3.3
+MEDIA_TUNER_TUA9001 3.3
# missing regmap_bulk_write()
DVB_USB_AF9035 3.4
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 11/21] dependencies: make VIDEO_ADV7604 depend on kernel >= 3.17
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (9 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 10/21] dependencies: make two media tuners depend on kernel >= 3.3 Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 12/21] dependencies: make VIDEO_ADP1653 depend on kernel >= 3.13 Hauke Mehrtens
` (11 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The VIDEO_ADV7604 driver now makes use of
devm_gpiod_get_index_optional() which gets less parameters in older
kernel versions. This makes the driver depend on kernel >= 3.17. In
addition also the VIDEO_COBALT has to depend on this kernel version
because it selects VIDEO_ADV7604.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
dependencies | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dependencies b/dependencies
index ab3fef0..65ffa01 100644
--- a/dependencies
+++ b/dependencies
@@ -55,8 +55,6 @@ DVB_SMIPCIE 3.8
# integration only and figure out a way to easily split that.
# This does not seem like a good test desirable test case to
# start that work with.
-VIDEO_ADV7604 3.13
-VIDEO_COBALT 3.13
# missing devm_gpiod_get_optional()
# this needs devm_gpiod_get_optional() with 3 arguments.
@@ -64,6 +62,8 @@ I2C_SI4713 3.17
USB_SI4713 3.17
PLATFORM_SI4713 3.17
SOC_CAMERA_OV2640 3.17
+VIDEO_ADV7604 3.17
+VIDEO_COBALT 3.17
# missing function clk_prepare_enable(), clk_disable_unprepare() and devm_regulator_bulk_get()
VIDEO_MT9V032 3.3
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 12/21] dependencies: make VIDEO_ADP1653 depend on kernel >= 3.13
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (10 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 11/21] dependencies: make VIDEO_ADV7604 depend on kernel >= 3.17 Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 13/21] backports: add HDMI driver Hauke Mehrtens
` (10 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The driver VIDEO_ADP1653 now includes linux/gpio/consumer.h which is
not available in kernel versions < 3.13. This patch makes the driver
depend on kernel version >= 3.13.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
dependencies | 1 +
1 file changed, 1 insertion(+)
diff --git a/dependencies b/dependencies
index 65ffa01..e1bd663 100644
--- a/dependencies
+++ b/dependencies
@@ -55,6 +55,7 @@ DVB_SMIPCIE 3.8
# integration only and figure out a way to easily split that.
# This does not seem like a good test desirable test case to
# start that work with.
+VIDEO_ADP1653 3.13
# missing devm_gpiod_get_optional()
# this needs devm_gpiod_get_optional() with 3 arguments.
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 13/21] backports: add HDMI driver
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (11 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 12/21] dependencies: make VIDEO_ADP1653 depend on kernel >= 3.13 Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 14/21] patches: do not use vidioc_expbuf function pointer in v4l Hauke Mehrtens
` (9 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
Before we only copied the hdmi.h header file and not the driver. Now
some other drivers need the hdmi driver code, also copy it now too.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/compat/Kconfig | 16 ++++++++++++++++
copy-list | 2 --
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig
index 8fcdb8a..ca50190 100644
--- a/backport/compat/Kconfig
+++ b/backport/compat/Kconfig
@@ -144,3 +144,19 @@ config BPAUTO_RHASHTABLE
default y if MAC80211
#h-file linux/rhashtable.h
#c-file lib/rhashtable.c
+
+config BPAUTO_BUILD_HDMI
+ bool
+ # the hdmi driver got some new apis like hdmi_infoframe_unpack() in
+ # kernel 4.0 which are used by some drivers
+ depends on KERNEL_4_0
+ #h-file linux/hdmi.h
+ #c-file drivers/video/hdmi.c
+
+config BPAUTO_HDMI
+ bool
+ select BPAUTO_BUILD_HDMI if KERNEL_4_0
+ # these drivers are using the new features of the hdmi driver.
+ default y if VIDEO_ADV7511
+ default y if VIDEO_ADV7604
+ default y if VIDEO_ADV7842
diff --git a/copy-list b/copy-list
index 5cd6dbf..7cfeedf 100644
--- a/copy-list
+++ b/copy-list
@@ -165,8 +165,6 @@ drivers/staging/media/cxd2099/cxd2099.h
include/uapi/linux/ivtv.h
include/uapi/linux/meye.h
-include/linux/hdmi.h
-
drivers/media/
include/linux/platform_data/camera-rcar.h
include/linux/of_graph.h
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 14/21] patches: do not use vidioc_expbuf function pointer in v4l
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (12 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 13/21] backports: add HDMI driver Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 15/21] backports: add tty_set_termios() Hauke Mehrtens
` (8 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
More v4l drivers are now accessing the vidioc_expbuf function pointer
in struct v4l2_ioctl_ops which we can not backport to kernel < 3.5.
This adds some more checks around the places.
We should convert this to an spatch.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../media/0002-no_dmabuf/v4l2.patch | 58 ++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch b/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch
index 91c7cda..35950ec 100644
--- a/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch
+++ b/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch
@@ -508,6 +508,64 @@
.vidioc_s_std = vidioc_s_std,
.vidioc_g_std = vidioc_g_std,
+--- a/drivers/media/usb/stk1160/stk1160-v4l.c
++++ b/drivers/media/usb/stk1160/stk1160-v4l.c
+@@ -500,7 +500,9 @@ static const struct v4l2_ioctl_ops stk11
+ .vidioc_dqbuf = vb2_ioctl_dqbuf,
+ .vidioc_streamon = vb2_ioctl_streamon,
+ .vidioc_streamoff = vb2_ioctl_streamoff,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+ .vidioc_expbuf = vb2_ioctl_expbuf,
++#endif
+
+ .vidioc_log_status = v4l2_ctrl_log_status,
+ .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
+--- a/drivers/media/usb/uvc/uvc_queue.c
++++ b/drivers/media/usb/uvc/uvc_queue.c
+@@ -270,6 +270,7 @@ int uvc_queue_buffer(struct uvc_video_qu
+ return ret;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+ int uvc_export_buffer(struct uvc_video_queue *queue,
+ struct v4l2_exportbuffer *exp)
+ {
+@@ -281,6 +282,7 @@ int uvc_export_buffer(struct uvc_video_q
+
+ return ret;
+ }
++#endif
+
+ int uvc_dequeue_buffer(struct uvc_video_queue *queue, struct v4l2_buffer *buf,
+ int nonblocking)
+--- a/drivers/media/usb/uvc/uvc_v4l2.c
++++ b/drivers/media/usb/uvc/uvc_v4l2.c
+@@ -720,6 +720,7 @@ static int uvc_ioctl_qbuf(struct file *f
+ return uvc_queue_buffer(&stream->queue, buf);
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+ static int uvc_ioctl_expbuf(struct file *file, void *fh,
+ struct v4l2_exportbuffer *exp)
+ {
+@@ -731,6 +732,7 @@ static int uvc_ioctl_expbuf(struct file
+
+ return uvc_export_buffer(&stream->queue, exp);
+ }
++#endif
+
+ static int uvc_ioctl_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
+ {
+@@ -1487,7 +1489,9 @@ const struct v4l2_ioctl_ops uvc_ioctl_op
+ .vidioc_reqbufs = uvc_ioctl_reqbufs,
+ .vidioc_querybuf = uvc_ioctl_querybuf,
+ .vidioc_qbuf = uvc_ioctl_qbuf,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+ .vidioc_expbuf = uvc_ioctl_expbuf,
++#endif
+ .vidioc_dqbuf = uvc_ioctl_dqbuf,
+ .vidioc_create_bufs = uvc_ioctl_create_bufs,
+ .vidioc_streamon = uvc_ioctl_streamon,
--- a/drivers/media/v4l2-core/videobuf2-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-sg.c
@@ -379,9 +379,11 @@ static void *vb2_dma_sg_vaddr(void *buf_
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 15/21] backports: add tty_set_termios()
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (13 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 14/21] patches: do not use vidioc_expbuf function pointer in v4l Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 16/21] header: add dev_dbg_once() and others Hauke Mehrtens
` (7 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
tty_set_termios() was not exported any more in kernel 4.0-rc1 (commit
632f32e21) and exported again in kernel 4.1-rc2 (commit b00f5c2dc).
This patch adds the backport for kernel 4.0.X, we can not detect kernel
4.1-rc1, which would also need this fix, so bluetooth will have a
compile error on kernel 4.1-rc1, kernel 4.1-rc2 and more recent
versions will work.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/tty.h | 5 +++
backport/compat/backport-4.1.c | 65 +++++++++++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
diff --git a/backport/backport-include/linux/tty.h b/backport/backport-include/linux/tty.h
index 758c549..3b8a0a2 100644
--- a/backport/backport-include/linux/tty.h
+++ b/backport/backport-include/linux/tty.h
@@ -24,4 +24,9 @@ extern void tty_port_tty_wakeup(struct tty_port *port);
extern void tty_port_tty_hangup(struct tty_port *port, bool check_clocal);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) && \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
+extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) */
+
#endif /* __BACKPORT_LINUX_TTY_H */
diff --git a/backport/compat/backport-4.1.c b/backport/compat/backport-4.1.c
index d5027bd..f367e3b 100644
--- a/backport/compat/backport-4.1.c
+++ b/backport/compat/backport-4.1.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2015 Stefan Assmann <sassmann@kpanic.de>
+ * Copyright (c) 2015 Hauke Mehrtens <hauke@hauke-m.de>
*
* Backport functionality introduced in Linux 4.1.
*
@@ -9,6 +10,7 @@
*/
#include <linux/netdevice.h>
+#include <linux/tty.h>
netdev_features_t passthru_features_check(struct sk_buff *skb,
struct net_device *dev,
@@ -17,3 +19,66 @@ netdev_features_t passthru_features_check(struct sk_buff *skb,
return features;
}
EXPORT_SYMBOL_GPL(passthru_features_check);
+
+#ifdef CONFIG_TTY
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
+static void unset_locked_termios(struct ktermios *termios,
+ struct ktermios *old,
+ struct ktermios *locked)
+{
+ int i;
+
+#define NOSET_MASK(x, y, z) (x = ((x) & ~(z)) | ((y) & (z)))
+
+ if (!locked) {
+ printk(KERN_WARNING "Warning?!? termios_locked is NULL.\n");
+ return;
+ }
+
+ NOSET_MASK(termios->c_iflag, old->c_iflag, locked->c_iflag);
+ NOSET_MASK(termios->c_oflag, old->c_oflag, locked->c_oflag);
+ NOSET_MASK(termios->c_cflag, old->c_cflag, locked->c_cflag);
+ NOSET_MASK(termios->c_lflag, old->c_lflag, locked->c_lflag);
+ termios->c_line = locked->c_line ? old->c_line : termios->c_line;
+ for (i = 0; i < NCCS; i++)
+ termios->c_cc[i] = locked->c_cc[i] ?
+ old->c_cc[i] : termios->c_cc[i];
+ /* FIXME: What should we do for i/ospeed */
+}
+
+int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
+{
+ struct ktermios old_termios;
+ struct tty_ldisc *ld;
+
+ WARN_ON(tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+ tty->driver->subtype == PTY_TYPE_MASTER);
+ /*
+ * Perform the actual termios internal changes under lock.
+ */
+
+
+ /* FIXME: we need to decide on some locking/ordering semantics
+ for the set_termios notification eventually */
+ down_write(&tty->termios_rwsem);
+ old_termios = tty->termios;
+ tty->termios = *new_termios;
+ unset_locked_termios(&tty->termios, &old_termios, &tty->termios_locked);
+
+ if (tty->ops->set_termios)
+ tty->ops->set_termios(tty, &old_termios);
+ else
+ tty_termios_copy_hw(&tty->termios, &old_termios);
+
+ ld = tty_ldisc_ref(tty);
+ if (ld != NULL) {
+ if (ld->ops->set_termios)
+ ld->ops->set_termios(tty, &old_termios);
+ tty_ldisc_deref(ld);
+ }
+ up_write(&tty->termios_rwsem);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(tty_set_termios);
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) */
+#endif /* CONFIG_TTY */
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 16/21] header: add dev_dbg_once() and others
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (14 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 15/21] backports: add tty_set_termios() Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 17/21] header: add devm_kcalloc() Hauke Mehrtens
` (6 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The mt7601u driver makes use of some of these functions and they are
not available on kernel version < 3.19.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/device.h | 37 ++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index 03ca1f1..539fd50 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -199,5 +199,42 @@ static inline void *devm_kmemdup(struct device *dev, const void *src,
}
#endif
+#ifndef dev_level_once
+#ifdef CONFIG_PRINTK
+#define dev_level_once(dev_level, dev, fmt, ...) \
+do { \
+ static bool __print_once __read_mostly; \
+ \
+ if (!__print_once) { \
+ __print_once = true; \
+ dev_level(dev, fmt, ##__VA_ARGS__); \
+ } \
+} while (0)
+#else
+#define dev_level_once(dev_level, dev, fmt, ...) \
+do { \
+ if (0) \
+ dev_level(dev, fmt, ##__VA_ARGS__); \
+} while (0)
+#endif
+
+#define dev_emerg_once(dev, fmt, ...) \
+ dev_level_once(dev_emerg, dev, fmt, ##__VA_ARGS__)
+#define dev_alert_once(dev, fmt, ...) \
+ dev_level_once(dev_alert, dev, fmt, ##__VA_ARGS__)
+#define dev_crit_once(dev, fmt, ...) \
+ dev_level_once(dev_crit, dev, fmt, ##__VA_ARGS__)
+#define dev_err_once(dev, fmt, ...) \
+ dev_level_once(dev_err, dev, fmt, ##__VA_ARGS__)
+#define dev_warn_once(dev, fmt, ...) \
+ dev_level_once(dev_warn, dev, fmt, ##__VA_ARGS__)
+#define dev_notice_once(dev, fmt, ...) \
+ dev_level_once(dev_notice, dev, fmt, ##__VA_ARGS__)
+#define dev_info_once(dev, fmt, ...) \
+ dev_level_once(dev_info, dev, fmt, ##__VA_ARGS__)
+#define dev_dbg_once(dev, fmt, ...) \
+ dev_level_once(dev_dbg, dev, fmt, ##__VA_ARGS__)
+#endif /* dev_level_once */
+
#endif /* __BACKPORT_DEVICE_H */
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 17/21] header: add devm_kcalloc()
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (15 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 16/21] header: add dev_dbg_once() and others Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 18/21] backports: add mediatek mt7601u driver Hauke Mehrtens
` (5 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This is needed by the mt7601u driver.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/device.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index 539fd50..f03e7c1 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -182,6 +182,13 @@ static inline void *devm_kmalloc_array(struct device *dev,
return NULL;
return devm_kmalloc(dev, n * size, flags);
}
+
+#define devm_kcalloc LINUX_BACKPORT(devm_kcalloc)
+static inline void *devm_kcalloc(struct device *dev,
+ size_t n, size_t size, gfp_t flags)
+{
+ return devm_kmalloc_array(dev, n, size, flags);
+}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 18/21] backports: add mediatek mt7601u driver
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (16 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 17/21] header: add devm_kcalloc() Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 19/21] patches: deactivate struct tracing in mt7601u Hauke Mehrtens
` (4 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/defconfigs/wifi | 2 ++
copy-list | 1 +
2 files changed, 3 insertions(+)
diff --git a/backport/defconfigs/wifi b/backport/defconfigs/wifi
index 3d26444..933be4b 100644
--- a/backport/defconfigs/wifi
+++ b/backport/defconfigs/wifi
@@ -58,6 +58,7 @@ CPTCFG_MAC80211_HWSIM=m
CPTCFG_MAC80211_LEDS=y
CPTCFG_MAC80211=m
CPTCFG_MAC80211_MESH=y
+CPTCFG_MT7601U=m
CPTCFG_MWIFIEX=m
CPTCFG_MWIFIEX_PCIE=m
CPTCFG_MWIFIEX_SDIO=m
@@ -118,5 +119,6 @@ CPTCFG_WLAN=y
CPTCFG_WLCORE=m
CPTCFG_WLCORE_SDIO=m
CPTCFG_WLCORE_SPI=m
+CPTCFG_WL_MEDIATEK=y
CPTCFG_WL_TI=y
CPTCFG_ZD1211RW=m
diff --git a/copy-list b/copy-list
index 7cfeedf..a679c77 100644
--- a/copy-list
+++ b/copy-list
@@ -78,6 +78,7 @@ drivers/net/wireless/libertas_tf/
drivers/net/wireless/ipw2x00/
drivers/net/wireless/ti/
drivers/net/wireless/orinoco/
+drivers/net/wireless/mediatek/
drivers/net/wireless/mwifiex/
drivers/net/wireless/adm8211.c
drivers/net/wireless/adm8211.h
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 19/21] patches: deactivate struct tracing in mt7601u
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (17 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 18/21] backports: add mediatek mt7601u driver Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 20/21] patches: deactivate tracing on mt7601u for kernel < 3.4 Hauke Mehrtens
` (3 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
The mt7601u driver makes use of __field_struct which was added in Linux
commit 4d4c9cc83. It is hard to backport this feature, so just remove
the code using it on kernel version < 3.16.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../network/0060-trace_field_struct/INFO | 11 ++++++++
.../network/0060-trace_field_struct/mt7601u.patch | 33 ++++++++++++++++++++++
2 files changed, 44 insertions(+)
create mode 100644 patches/collateral-evolutions/network/0060-trace_field_struct/INFO
create mode 100644 patches/collateral-evolutions/network/0060-trace_field_struct/mt7601u.patch
diff --git a/patches/collateral-evolutions/network/0060-trace_field_struct/INFO b/patches/collateral-evolutions/network/0060-trace_field_struct/INFO
new file mode 100644
index 0000000..bb2d355
--- /dev/null
+++ b/patches/collateral-evolutions/network/0060-trace_field_struct/INFO
@@ -0,0 +1,11 @@
+deactivate struct tracing
+
+__field_struct was added in Linux commit 4d4c9cc83. It is hard to backport
+this feature, so just remove the code using it on kernel version < 3.16.
+
+commit 4d4c9cc839a308be3289a361ccba4447ee140552
+Author: Steven Rostedt <rostedt@goodmis.org>
+Date: Tue Jun 17 08:59:16 2014 -0400
+
+ tracing: Add __field_struct macro for TRACE_EVENT()
+
diff --git a/patches/collateral-evolutions/network/0060-trace_field_struct/mt7601u.patch b/patches/collateral-evolutions/network/0060-trace_field_struct/mt7601u.patch
new file mode 100644
index 0000000..4e29b2c
--- /dev/null
+++ b/patches/collateral-evolutions/network/0060-trace_field_struct/mt7601u.patch
@@ -0,0 +1,33 @@
+diff --git a/drivers/net/wireless/mediatek/mt7601u/trace.h b/drivers/net/wireless/mediatek/mt7601u/trace.h
+index 2898973..7fa1b96 100644
+--- a/drivers/net/wireless/mediatek/mt7601u/trace.h
++++ b/drivers/net/wireless/mediatek/mt7601u/trace.h
+@@ -252,6 +252,7 @@ TRACE_EVENT(freq_cal_offset,
+ DEV_PR_ARG, __entry->phy_mode, __entry->freq_off)
+ );
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
+ TRACE_EVENT(mt_rx,
+ TP_PROTO(struct mt7601u_dev *dev, struct mt7601u_rxwi *rxwi, u32 f),
+ TP_ARGS(dev, rxwi, f),
+@@ -306,6 +307,20 @@ TRACE_EVENT(mt_tx,
+ __entry->h.ack_ctl, __entry->h.wcid,
+ le16_to_cpu(__entry->h.len_ctl))
+ );
++#else
++#ifndef __BACKPORT_MT7601U_TRACE_H_EXTRA
++#define __BACKPORT_MT7601U_TRACE_H_EXTRA
++static inline void trace_mt_rx(struct mt7601u_dev *dev,
++ struct mt7601u_rxwi *rxwi,
++ u32 f)
++{
++}
++static inline void trace_mt_tx(struct mt7601u_dev *dev, struct sk_buff *skb,
++ struct mt76_sta *sta, struct mt76_txwi *h)
++{
++}
++#endif /* __BACKPORT_MT7601U_TRACE_H_EXTRA */
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */
+
+ TRACE_EVENT(mt_tx_dma_done,
+ TP_PROTO(struct mt7601u_dev *dev, struct sk_buff *skb),
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 20/21] patches: deactivate tracing on mt7601u for kernel < 3.4
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (18 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 19/21] patches: deactivate struct tracing in mt7601u Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-14 14:29 ` [PATCH 21/21] patches: refresh patches on next-20150612 Hauke Mehrtens
` (2 subsequent siblings)
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
Kernel version < 3.4 has problems with tracing, deactivate it in the
mt7601u driver for these kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../network/0022-define-tracing/mt7601u.patch | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 patches/collateral-evolutions/network/0022-define-tracing/mt7601u.patch
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/mt7601u.patch b/patches/collateral-evolutions/network/0022-define-tracing/mt7601u.patch
new file mode 100644
index 0000000..688f4c8
--- /dev/null
+++ b/patches/collateral-evolutions/network/0022-define-tracing/mt7601u.patch
@@ -0,0 +1,12 @@
+--- a/drivers/net/wireless/mediatek/mt7601u/trace.c
++++ b/drivers/net/wireless/mediatek/mt7601u/trace.c
+@@ -15,6 +15,9 @@
+ #include <linux/module.h>
+
+ #ifndef __CHECKER__
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
++#include "trace.h"
++#endif
+ #define CREATE_TRACE_POINTS
+ #include "trace.h"
+
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 21/21] patches: refresh patches on next-20150612
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (19 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 20/21] patches: deactivate tracing on mt7601u for kernel < 3.4 Hauke Mehrtens
@ 2015-06-14 14:29 ` Hauke Mehrtens
2015-06-15 21:13 ` [PATCH v2 02/22] patches: fix tracing on older kernels for cfg80211, ath6kl and wil6210 Hauke Mehrtens
2015-06-15 21:14 ` [PATCH v2 22/22] header: fix warning in lockdep_assert_held() Hauke Mehrtens
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-14 14:29 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
1 3.0.101 [ OK ]
2 3.1.10 [ OK ]
3 3.2.68 [ OK ]
4 3.3.8 [ OK ]
5 3.4.107 [ OK ]
6 3.5.7 [ OK ]
7 3.6.11 [ OK ]
8 3.7.10 [ OK ]
9 3.8.13 [ OK ]
10 3.9.11 [ OK ]
11 3.10.75 [ OK ]
12 3.11.10 [ OK ]
13 3.12.40 [ OK ]
14 3.13.11 [ OK ]
15 3.14.39 [ OK ]
16 3.15.10 [ OK ]
17 3.16.7 [ OK ]
18 3.17.8 [ OK ]
19 3.18.12 [ OK ]
20 3.19.5 [ OK ]
21 4.0.0 [ OK ]
22 4.1-rc1 [ FAIL ]
Only kernel 4.1-rc1 will fail, because tty_set_termios() is not exported, 4.1-rc4 works.
manual changes done to:
drivers/media/platform/vim2m.c
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../media/0002-no_dmabuf/v4l2.patch | 74 +++++++++++-----------
.../media/0005-dma-no-sync/v4l2.patch | 8 +--
.../network/0024-led-blink-api/mac80211.patch | 2 +-
.../network/0028-select_queue/mac80211.patch | 4 +-
.../network/0028-select_queue/mwifiex.patch | 2 +-
.../network/0046-mmc_rescan_entered/mwifiex.patch | 2 +-
.../network/0050-iov_iter/bluetooth.patch | 8 +--
.../0053-remove_wait_on_bit_timeout/btusb.patch | 12 ++--
8 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch b/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch
index 35950ec..e571111 100644
--- a/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch
+++ b/patches/collateral-evolutions/media/0002-no_dmabuf/v4l2.patch
@@ -27,7 +27,7 @@
tristate
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
-@@ -440,6 +440,7 @@ int v4l2_m2m_create_bufs(struct file *fi
+@@ -459,6 +459,7 @@ int v4l2_m2m_create_bufs(struct file *fi
}
EXPORT_SYMBOL_GPL(v4l2_m2m_create_bufs);
@@ -35,7 +35,7 @@
/**
* v4l2_m2m_expbuf() - export a source or destination buffer, depending on
* the type
-@@ -453,6 +454,7 @@ int v4l2_m2m_expbuf(struct file *file, s
+@@ -472,6 +473,7 @@ int v4l2_m2m_expbuf(struct file *file, s
return vb2_expbuf(vq, eb);
}
EXPORT_SYMBOL_GPL(v4l2_m2m_expbuf);
@@ -43,15 +43,15 @@
/**
* v4l2_m2m_streamon() - turn on streaming for a video queue
*/
-@@ -803,6 +805,7 @@ int v4l2_m2m_ioctl_dqbuf(struct file *fi
+@@ -839,6 +841,7 @@ int v4l2_m2m_ioctl_prepare_buf(struct fi
}
- EXPORT_SYMBOL_GPL(v4l2_m2m_ioctl_dqbuf);
+ EXPORT_SYMBOL_GPL(v4l2_m2m_ioctl_prepare_buf);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
int v4l2_m2m_ioctl_expbuf(struct file *file, void *priv,
struct v4l2_exportbuffer *eb)
{
-@@ -811,6 +814,7 @@ int v4l2_m2m_ioctl_expbuf(struct file *f
+@@ -847,6 +850,7 @@ int v4l2_m2m_ioctl_expbuf(struct file *f
return v4l2_m2m_expbuf(file, fh->m2m_ctx, eb);
}
EXPORT_SYMBOL_GPL(v4l2_m2m_ioctl_expbuf);
@@ -61,7 +61,7 @@
enum v4l2_buf_type type)
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
-@@ -252,6 +252,7 @@ static void __vb2_buf_userptr_put(struct
+@@ -253,6 +253,7 @@ static void __vb2_buf_userptr_put(struct
}
}
@@ -69,7 +69,7 @@
/**
* __vb2_plane_dmabuf_put() - release memory associated with
* a DMABUF shared plane
-@@ -280,6 +281,7 @@ static void __vb2_buf_dmabuf_put(struct
+@@ -281,6 +282,7 @@ static void __vb2_buf_dmabuf_put(struct
for (plane = 0; plane < vb->num_planes; ++plane)
__vb2_plane_dmabuf_put(vb, &vb->planes[plane]);
}
@@ -77,7 +77,7 @@
/**
* __setup_lengths() - setup initial lengths for every plane in
-@@ -423,8 +425,10 @@ static void __vb2_free_mem(struct vb2_qu
+@@ -424,8 +426,10 @@ static void __vb2_free_mem(struct vb2_qu
/* Free MMAP buffers or release USERPTR buffers */
if (q->memory == V4L2_MEMORY_MMAP)
__vb2_buf_mem_free(vb);
@@ -88,7 +88,7 @@
else
__vb2_buf_userptr_put(vb);
}
-@@ -783,6 +787,7 @@ static int __verify_mmap_ops(struct vb2_
+@@ -784,6 +788,7 @@ static int __verify_mmap_ops(struct vb2_
return 0;
}
@@ -96,7 +96,7 @@
/**
* __verify_dmabuf_ops() - verify that all memory operations required for
* DMABUF queue type have been provided
-@@ -796,6 +801,7 @@ static int __verify_dmabuf_ops(struct vb
+@@ -797,6 +802,7 @@ static int __verify_dmabuf_ops(struct vb
return 0;
}
@@ -104,7 +104,7 @@
/**
* __verify_memory_type() - Check whether the memory type and buffer type
-@@ -829,10 +835,12 @@ static int __verify_memory_type(struct v
+@@ -830,10 +836,12 @@ static int __verify_memory_type(struct v
return -EINVAL;
}
@@ -117,7 +117,7 @@
/*
* Place the busy tests at the end: -EBUSY can be ignored when
-@@ -1481,6 +1489,7 @@ err:
+@@ -1486,6 +1494,7 @@ err:
return ret;
}
@@ -125,7 +125,7 @@
/**
* __qbuf_dmabuf() - handle qbuf of a DMABUF buffer
*/
-@@ -1599,6 +1608,7 @@ err:
+@@ -1604,6 +1613,7 @@ err:
return ret;
}
@@ -133,7 +133,7 @@
/**
* __enqueue_in_driver() - enqueue a vb2_buffer in driver for processing
-@@ -1659,9 +1669,11 @@ static int __buf_prepare(struct vb2_buff
+@@ -1664,9 +1674,11 @@ static int __buf_prepare(struct vb2_buff
case V4L2_MEMORY_USERPTR:
ret = __qbuf_userptr(vb, b);
break;
@@ -145,7 +145,7 @@
default:
WARN(1, "Invalid queue type\n");
ret = -EINVAL;
-@@ -2047,8 +2059,10 @@ EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffe
+@@ -2057,8 +2069,10 @@ EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffe
*/
static void __vb2_dqbuf(struct vb2_buffer *vb)
{
@@ -156,7 +156,7 @@
/* nothing to do if the buffer is already dequeued */
if (vb->state == VB2_BUF_STATE_DEQUEUED)
-@@ -2056,6 +2070,7 @@ static void __vb2_dqbuf(struct vb2_buffe
+@@ -2066,6 +2080,7 @@ static void __vb2_dqbuf(struct vb2_buffe
vb->state = VB2_BUF_STATE_DEQUEUED;
@@ -164,7 +164,7 @@
/* unmap DMABUF buffer */
if (q->memory == V4L2_MEMORY_DMABUF)
for (i = 0; i < vb->num_planes; ++i) {
-@@ -2064,6 +2079,7 @@ static void __vb2_dqbuf(struct vb2_buffe
+@@ -2074,6 +2089,7 @@ static void __vb2_dqbuf(struct vb2_buffe
call_void_memop(vb, unmap_dmabuf, vb->planes[i].mem_priv);
vb->planes[i].dbuf_mapped = 0;
}
@@ -172,7 +172,7 @@
}
static int vb2_internal_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b, bool nonblocking)
-@@ -2370,6 +2386,7 @@ static int __find_plane_by_offset(struct
+@@ -2384,6 +2400,7 @@ static int __find_plane_by_offset(struct
return -EINVAL;
}
@@ -180,7 +180,7 @@
/**
* vb2_expbuf() - Export a buffer as a file descriptor
* @q: videobuf2 queue
-@@ -2447,6 +2464,7 @@ int vb2_expbuf(struct vb2_queue *q, stru
+@@ -2461,6 +2478,7 @@ int vb2_expbuf(struct vb2_queue *q, stru
return 0;
}
EXPORT_SYMBOL_GPL(vb2_expbuf);
@@ -188,7 +188,7 @@
/**
* vb2_mmap() - map video buffers into application address space
-@@ -3384,6 +3402,7 @@ int vb2_ioctl_streamoff(struct file *fil
+@@ -3406,6 +3424,7 @@ int vb2_ioctl_streamoff(struct file *fil
}
EXPORT_SYMBOL_GPL(vb2_ioctl_streamoff);
@@ -196,7 +196,7 @@
int vb2_ioctl_expbuf(struct file *file, void *priv, struct v4l2_exportbuffer *p)
{
struct video_device *vdev = video_devdata(file);
-@@ -3393,6 +3412,7 @@ int vb2_ioctl_expbuf(struct file *file,
+@@ -3415,6 +3434,7 @@ int vb2_ioctl_expbuf(struct file *file,
return vb2_expbuf(vdev->queue, p);
}
EXPORT_SYMBOL_GPL(vb2_ioctl_expbuf);
@@ -318,7 +318,7 @@
.num_users = vb2_vmalloc_num_users,
--- a/include/media/v4l2-mem2mem.h
+++ b/include/media/v4l2-mem2mem.h
-@@ -119,8 +119,10 @@ int v4l2_m2m_dqbuf(struct file *file, st
+@@ -121,8 +121,10 @@ int v4l2_m2m_prepare_buf(struct file *fi
int v4l2_m2m_create_bufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
struct v4l2_create_buffers *create);
@@ -329,7 +329,7 @@
int v4l2_m2m_streamon(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
enum v4l2_buf_type type);
-@@ -242,8 +244,10 @@ int v4l2_m2m_ioctl_create_bufs(struct fi
+@@ -244,8 +246,10 @@ int v4l2_m2m_ioctl_create_bufs(struct fi
struct v4l2_create_buffers *create);
int v4l2_m2m_ioctl_querybuf(struct file *file, void *fh,
struct v4l2_buffer *buf);
@@ -367,7 +367,7 @@
void *(*vaddr)(void *buf_priv);
void *(*cookie)(void *buf_priv);
-@@ -459,7 +463,9 @@ void vb2_queue_release(struct vb2_queue
+@@ -463,7 +467,9 @@ void vb2_queue_release(struct vb2_queue
void vb2_queue_error(struct vb2_queue *q);
int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b);
@@ -377,7 +377,7 @@
int vb2_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b, bool nonblocking);
int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type);
-@@ -624,8 +630,10 @@ int vb2_ioctl_qbuf(struct file *file, vo
+@@ -637,8 +643,10 @@ int vb2_ioctl_qbuf(struct file *file, vo
int vb2_ioctl_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p);
int vb2_ioctl_streamon(struct file *file, void *priv, enum v4l2_buf_type i);
int vb2_ioctl_streamoff(struct file *file, void *priv, enum v4l2_buf_type i);
@@ -390,7 +390,7 @@
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
-@@ -2256,7 +2256,9 @@ static const struct v4l2_ioctl_ops vpfe_
+@@ -2257,7 +2257,9 @@ static const struct v4l2_ioctl_ops vpfe_
.vidioc_querybuf = vb2_ioctl_querybuf,
.vidioc_qbuf = vb2_ioctl_qbuf,
.vidioc_dqbuf = vb2_ioctl_dqbuf,
@@ -402,19 +402,19 @@
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
-@@ -864,7 +864,9 @@ static const struct v4l2_ioctl_ops coda_
+@@ -859,7 +859,9 @@ static const struct v4l2_ioctl_ops coda_
.vidioc_querybuf = v4l2_m2m_ioctl_querybuf,
.vidioc_qbuf = coda_qbuf,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
.vidioc_expbuf = v4l2_m2m_ioctl_expbuf,
+#endif
- .vidioc_dqbuf = coda_dqbuf,
+ .vidioc_dqbuf = v4l2_m2m_ioctl_dqbuf,
.vidioc_create_bufs = v4l2_m2m_ioctl_create_bufs,
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
-@@ -1249,7 +1249,9 @@ static const struct v4l2_ioctl_ops vpbe_
+@@ -1244,7 +1244,9 @@ static const struct v4l2_ioctl_ops vpbe_
.vidioc_dqbuf = vb2_ioctl_dqbuf,
.vidioc_streamon = vb2_ioctl_streamon,
.vidioc_streamoff = vb2_ioctl_streamoff,
@@ -486,10 +486,10 @@
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
-@@ -693,7 +693,9 @@ static const struct v4l2_ioctl_ops vim2m
- .vidioc_querybuf = v4l2_m2m_ioctl_querybuf,
- .vidioc_qbuf = v4l2_m2m_ioctl_qbuf,
+@@ -695,7 +695,9 @@ static const struct v4l2_ioctl_ops vim2m
.vidioc_dqbuf = v4l2_m2m_ioctl_dqbuf,
+ .vidioc_prepare_buf = v4l2_m2m_ioctl_prepare_buf,
+ .vidioc_create_bufs = v4l2_m2m_ioctl_create_bufs,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
.vidioc_expbuf = v4l2_m2m_ioctl_expbuf,
+#endif
@@ -568,7 +568,7 @@
.vidioc_streamon = uvc_ioctl_streamon,
--- a/drivers/media/v4l2-core/videobuf2-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-sg.c
-@@ -379,9 +379,11 @@ static void *vb2_dma_sg_vaddr(void *buf_
+@@ -383,9 +383,11 @@ static void *vb2_dma_sg_vaddr(void *buf_
BUG_ON(!buf);
if (!buf->vaddr) {
@@ -580,7 +580,7 @@
buf->vaddr = vm_map_ram(buf->pages,
buf->num_pages, -1, PAGE_KERNEL);
}
-@@ -434,6 +436,7 @@ static int vb2_dma_sg_mmap(void *buf_pri
+@@ -438,6 +440,7 @@ static int vb2_dma_sg_mmap(void *buf_pri
return 0;
}
@@ -588,7 +588,7 @@
/*********************************************/
/* DMABUF ops for exporters */
/*********************************************/
-@@ -707,6 +710,7 @@ static void *vb2_dma_sg_attach_dmabuf(vo
+@@ -711,6 +714,7 @@ static void *vb2_dma_sg_attach_dmabuf(vo
return buf;
}
@@ -596,7 +596,7 @@
static void *vb2_dma_sg_cookie(void *buf_priv)
{
-@@ -725,11 +729,13 @@ const struct vb2_mem_ops vb2_dma_sg_memo
+@@ -729,11 +733,13 @@ const struct vb2_mem_ops vb2_dma_sg_memo
.vaddr = vb2_dma_sg_vaddr,
.mmap = vb2_dma_sg_mmap,
.num_users = vb2_dma_sg_num_users,
@@ -624,7 +624,7 @@
};
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
-@@ -1586,7 +1586,9 @@ static const struct v4l2_ioctl_ops mcam_
+@@ -1585,7 +1585,9 @@ static const struct v4l2_ioctl_ops mcam_
.vidioc_querybuf = vb2_ioctl_querybuf,
.vidioc_qbuf = vb2_ioctl_qbuf,
.vidioc_dqbuf = vb2_ioctl_dqbuf,
diff --git a/patches/collateral-evolutions/media/0005-dma-no-sync/v4l2.patch b/patches/collateral-evolutions/media/0005-dma-no-sync/v4l2.patch
index ccb165b..deeddd9 100644
--- a/patches/collateral-evolutions/media/0005-dma-no-sync/v4l2.patch
+++ b/patches/collateral-evolutions/media/0005-dma-no-sync/v4l2.patch
@@ -32,7 +32,7 @@
if (WARN_ON(alloc_ctx == NULL))
return NULL;
-@@ -184,7 +186,9 @@ static void vb2_dma_sg_put(void *buf_pri
+@@ -185,7 +187,9 @@ static void vb2_dma_sg_put(void *buf_pri
if (atomic_dec_and_test(&buf->refcount)) {
DEFINE_DMA_ATTRS(attrs);
@@ -41,8 +41,8 @@
+#endif
dprintk(1, "%s: Freeing buffer of %d pages\n", __func__,
buf->num_pages);
- dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->nents,
-@@ -241,7 +245,9 @@ static void *vb2_dma_sg_get_userptr(void
+ dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
+@@ -242,7 +246,9 @@ static void *vb2_dma_sg_get_userptr(void
struct sg_table *sgt;
DEFINE_DMA_ATTRS(attrs);
@@ -52,7 +52,7 @@
buf = kzalloc(sizeof *buf, GFP_KERNEL);
if (!buf)
-@@ -351,7 +357,9 @@ static void vb2_dma_sg_put_userptr(void
+@@ -354,7 +360,9 @@ static void vb2_dma_sg_put_userptr(void
int i = buf->num_pages;
DEFINE_DMA_ATTRS(attrs);
diff --git a/patches/collateral-evolutions/network/0024-led-blink-api/mac80211.patch b/patches/collateral-evolutions/network/0024-led-blink-api/mac80211.patch
index e7cbd5f..ea1c1f7 100644
--- a/patches/collateral-evolutions/network/0024-led-blink-api/mac80211.patch
+++ b/patches/collateral-evolutions/network/0024-led-blink-api/mac80211.patch
@@ -1,6 +1,6 @@
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1259,6 +1259,7 @@ struct ieee80211_local {
+@@ -1256,6 +1256,7 @@ struct ieee80211_local {
struct mutex chanctx_mtx;
#ifdef CONFIG_MAC80211_LEDS
diff --git a/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch b/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
index 7b4aa48..d0f4f69 100644
--- a/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
+++ b/patches/collateral-evolutions/network/0028-select_queue/mac80211.patch
@@ -1,6 +1,6 @@
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
-@@ -1088,10 +1088,20 @@ static void ieee80211_uninit(struct net_
+@@ -1094,10 +1094,20 @@ static void ieee80211_uninit(struct net_
ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
}
@@ -21,7 +21,7 @@
{
return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
}
-@@ -1137,10 +1147,20 @@ static const struct net_device_ops ieee8
+@@ -1143,10 +1153,20 @@ static const struct net_device_ops ieee8
.ndo_get_stats64 = ieee80211_get_stats64,
};
diff --git a/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch b/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch
index aade0bb..93bec6c 100644
--- a/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch
+++ b/patches/collateral-evolutions/network/0028-select_queue/mwifiex.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
-@@ -972,9 +972,19 @@ static struct net_device_stats *mwifiex_
+@@ -1082,9 +1082,19 @@ static struct net_device_stats *mwifiex_
return &priv->stats;
}
diff --git a/patches/collateral-evolutions/network/0046-mmc_rescan_entered/mwifiex.patch b/patches/collateral-evolutions/network/0046-mmc_rescan_entered/mwifiex.patch
index 462c10f..9dfd418 100644
--- a/patches/collateral-evolutions/network/0046-mmc_rescan_entered/mwifiex.patch
+++ b/patches/collateral-evolutions/network/0046-mmc_rescan_entered/mwifiex.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
-@@ -2063,7 +2063,9 @@ static void mwifiex_sdio_card_reset_work
+@@ -2125,7 +2125,9 @@ static void mwifiex_sdio_card_reset_work
mmc_remove_host(target);
/* 200ms delay is based on experiment with sdhci controller */
mdelay(200);
diff --git a/patches/collateral-evolutions/network/0050-iov_iter/bluetooth.patch b/patches/collateral-evolutions/network/0050-iov_iter/bluetooth.patch
index 724d02e..39bf077 100644
--- a/patches/collateral-evolutions/network/0050-iov_iter/bluetooth.patch
+++ b/patches/collateral-evolutions/network/0050-iov_iter/bluetooth.patch
@@ -105,7 +105,7 @@
static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn, bool locked)
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
-@@ -2120,7 +2120,12 @@ static inline int l2cap_skbuff_fromiovec
+@@ -2116,7 +2116,12 @@ static inline int l2cap_skbuff_fromiovec
struct sk_buff **frag;
int sent = 0;
@@ -118,7 +118,7 @@
return -EFAULT;
sent += count;
-@@ -2140,8 +2145,13 @@ static inline int l2cap_skbuff_fromiovec
+@@ -2136,8 +2141,13 @@ static inline int l2cap_skbuff_fromiovec
*frag = tmp;
@@ -175,7 +175,7 @@
l2cap_chan_send(chan, &msg, 1 + len);
-@@ -3049,6 +3054,9 @@ static const struct l2cap_ops smp_chan_o
+@@ -3047,6 +3052,9 @@ static const struct l2cap_ops smp_chan_o
.suspend = l2cap_chan_no_suspend,
.set_shutdown = l2cap_chan_no_set_shutdown,
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
@@ -185,7 +185,7 @@
};
static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan)
-@@ -3097,6 +3105,9 @@ static const struct l2cap_ops smp_root_c
+@@ -3095,6 +3103,9 @@ static const struct l2cap_ops smp_root_c
.resume = l2cap_chan_no_resume,
.set_shutdown = l2cap_chan_no_set_shutdown,
.get_sndtimeo = l2cap_chan_no_get_sndtimeo,
diff --git a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch
index 16e7669..e89725b 100644
--- a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch
+++ b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch
@@ -1,6 +1,6 @@
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
-@@ -1768,8 +1768,12 @@ static void btusb_intel_bootup(struct bt
+@@ -1755,8 +1755,12 @@ static void btusb_intel_bootup(struct bt
return;
if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) {
@@ -13,7 +13,7 @@
}
}
-@@ -1786,8 +1790,12 @@ static void btusb_intel_secure_send_resu
+@@ -1773,8 +1777,12 @@ static void btusb_intel_secure_send_resu
if (test_and_clear_bit(BTUSB_DOWNLOADING, &data->flags) &&
test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) {
@@ -26,7 +26,7 @@
}
}
-@@ -2172,6 +2180,7 @@ static int btusb_setup_intel_new(struct
+@@ -2169,6 +2177,7 @@ static int btusb_setup_intel_new(struct
* and thus just timeout if that happens and fail the setup
* of this device.
*/
@@ -34,7 +34,7 @@
err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
-@@ -2186,6 +2195,31 @@ static int btusb_setup_intel_new(struct
+@@ -2183,6 +2192,31 @@ static int btusb_setup_intel_new(struct
err = -ETIMEDOUT;
goto done;
}
@@ -66,7 +66,7 @@
if (test_bit(BTUSB_FIRMWARE_FAILED, &data->flags)) {
BT_ERR("%s: Firmware loading failed", hdev->name);
-@@ -2225,6 +2259,7 @@ done:
+@@ -2222,6 +2256,7 @@ done:
*/
BT_INFO("%s: Waiting for device to boot", hdev->name);
@@ -74,7 +74,7 @@
err = wait_on_bit_timeout(&data->flags, BTUSB_BOOTING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
-@@ -2238,6 +2273,33 @@ done:
+@@ -2235,6 +2270,33 @@ done:
BT_ERR("%s: Device boot timeout", hdev->name);
return -ETIMEDOUT;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 02/22] patches: fix tracing on older kernels for cfg80211, ath6kl and wil6210
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (20 preceding siblings ...)
2015-06-14 14:29 ` [PATCH 21/21] patches: refresh patches on next-20150612 Hauke Mehrtens
@ 2015-06-15 21:13 ` Hauke Mehrtens
2015-06-15 21:14 ` [PATCH v2 22/22] header: fix warning in lockdep_assert_held() Hauke Mehrtens
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-15 21:13 UTC (permalink / raw)
To: backports; +Cc: johannes, Hauke Mehrtens
On kernel 3.0 we have to include linux/interrupt.h, because it
otherwise results in a long compile errors about missing HI_SOFTIRQ for
example. It looks like it was not possible to activate tracing without
this patch on these drivers at all.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.../network/0022-define-tracing/ath6kl.patch | 8 +++++---
.../network/0022-define-tracing/cfg80211.patch | 6 ++++--
.../network/0022-define-tracing/wil6210.patch | 7 +++++--
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch b/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch
index 5910f54..bdf455a 100644
--- a/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch
+++ b/patches/collateral-evolutions/network/0022-define-tracing/ath6kl.patch
@@ -1,10 +1,12 @@
--- a/drivers/net/wireless/ath/ath6kl/trace.c
+++ b/drivers/net/wireless/ath/ath6kl/trace.c
-@@ -16,6 +16,7 @@
+@@ -15,6 +15,9 @@
+ */
#include <linux/module.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
++#include <linux/interrupt.h>
++#endif
-+#include "trace.h"
#define CREATE_TRACE_POINTS
#include "trace.h"
-
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch b/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch
index eeab23d..95a0d6a 100644
--- a/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch
+++ b/patches/collateral-evolutions/network/0022-define-tracing/cfg80211.patch
@@ -1,8 +1,10 @@
--- a/net/wireless/trace.c
+++ b/net/wireless/trace.c
-@@ -1,4 +1,5 @@
+@@ -1,4 +1,7 @@
#include <linux/module.h>
-+#include "trace.h"
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
++#include <linux/interrupt.h>
++#endif
#ifndef __CHECKER__
#define CREATE_TRACE_POINTS
diff --git a/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch b/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch
index 1888cd7..5f4b43b 100644
--- a/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch
+++ b/patches/collateral-evolutions/network/0022-define-tracing/wil6210.patch
@@ -1,9 +1,12 @@
--- a/drivers/net/wireless/ath/wil6210/trace.c
+++ b/drivers/net/wireless/ath/wil6210/trace.c
-@@ -16,5 +16,6 @@
+@@ -15,6 +15,9 @@
+ */
#include <linux/module.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)
++#include <linux/interrupt.h>
++#endif
-+#include "trace.h"
#define CREATE_TRACE_POINTS
#include "trace.h"
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 22/22] header: fix warning in lockdep_assert_held()
2015-06-14 14:29 [PATCH 00/21] backports: bring it to next-20150612 and add mt7601u Hauke Mehrtens
` (21 preceding siblings ...)
2015-06-15 21:13 ` [PATCH v2 02/22] patches: fix tracing on older kernels for cfg80211, ath6kl and wil6210 Hauke Mehrtens
@ 2015-06-15 21:14 ` Hauke Mehrtens
22 siblings, 0 replies; 27+ messages in thread
From: Hauke Mehrtens @ 2015-06-15 21:14 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
When building the kernel there are lots of warnings like this:
drivers/net/wireless/ath/ath10k/ce.c:404:21: warning: unused variable ‘ar_pci’ [-Wunused-variable]
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
They are caused by an empty lockdep_assert_held() which does nothing
with this variable in kernel version < 3.9. This patch replaces this
macro with the version from a recent kernel and silence this warning.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/lockdep.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 backport/backport-include/linux/lockdep.h
diff --git a/backport/backport-include/linux/lockdep.h b/backport/backport-include/linux/lockdep.h
new file mode 100644
index 0000000..3974b8d
--- /dev/null
+++ b/backport/backport-include/linux/lockdep.h
@@ -0,0 +1,17 @@
+#ifndef __BACKPORT_LINUX_LOCKDEP_H
+#define __BACKPORT_LINUX_LOCKDEP_H
+#include_next <linux/lockdep.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
+#undef lockdep_assert_held
+#ifdef CONFIG_LOCKDEP
+#define lockdep_assert_held(l) do { \
+ WARN_ON(debug_locks && !lockdep_is_held(l)); \
+ } while (0)
+#else
+#define lockdep_assert_held(l) do { (void)(l); } while (0)
+#endif /* CONFIG_LOCKDEP */
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */
+
+#endif /* __BACKPORT_LINUX_LOCKDEP_H */
--
2.1.4
^ permalink raw reply related [flat|nested] 27+ messages in thread