Skip to contentSkip to conversation

backporst: take us to next-20130627

PATCH In review Luis R. Rodriguez 3 participants 16 messages Jul 19, 2013 – Jul 23, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover backporst: take us to next-20130627

From: "Luis R. Rodriguez" <[email protected]>

This takes us to next-20130627, the patches have been ammended where required with feedback and justification to merge. We'll deal with the required DMI reverts once advice comes through on how to deal with that.

Johannes Berg (1):
backport: backport sprintf-style workqueue naming

Luis R. Rodriguez (9):
backports: backport drvdata = NULL core driver fixes
backports: fix patches required for next-20130627
backports: refresh patches for next-20130627
backports: simplify swiotlb_nr_tbl() backport
backports: copy the max77693-private.h header file
backports: revert DMI_EXACT_MATCH() for older kernels
backports: add clock enable/disable on soc_camera_power_[on|off]()
backports: enable REGULATOR_MAX77693 on >= 3.6
backports: lib/kconfig.py - fix src line regexp

 backport/backport-include/linux/device.h           |   19 ++++++
 backport/backport-include/linux/mod_devicetable.h  |    4 ++
 backport/backport-include/linux/swiotlb.h          |   17 +++++
 backport/backport-include/linux/workqueue.h        |   50 ++++++++++++--
 .../backport-include/uapi/linux/v4l2-mediabus.h    |    8 ++-
 backport/compat/compat-3.3.c                       |   69 ++++++++++++++++++++
 backport/compat/compat-3.4.c                       |   31 +++++++--
 copy-list                                          |    2 +
 dependencies                                       |    1 +
 lib/kconfig.py                                     |    2 +-
 patches/collateral-evolutions/drm/03-swiotlb/INFO  |    5 --
 .../drivers_gpu_drm_nouveau_nouveau_bo.patch       |   31 ---------
 .../drivers_gpu_drm_radeon_radeon_ttm.patch        |   47 -------------
 .../drivers_gpu_drm_i915_i915_gem.patch            |    2 +-
 .../14-shrinkers-api/drivers_gpu_drm_i915.patch    |   12 ++--
 .../network/0001-netdev_ops/ipw2200.patch          |    4 +-
 .../network/0005-netlink-portid/nl80211.patch      |   60 ++++++++---------
 .../0006-disable-dump-adjust-on-old-kernels.patch  |    8 +--
 .../network/05-usb/ath9k_htc.patch                 |    2 +-
 .../include_net_cfg80211.patch                     |    2 +-
 .../drivers_net_wireless_iwlwifi_pcie_trans.patch  |    2 +-
 .../drivers_net_wireless_ti_wlcore_main.patch      |    6 +-
 .../drivers_net_wireless_ath_ath9k_pci.patch       |    4 +-
 .../drivers_net_wireless_ti_wlcore_main.patch      |    4 +-
 .../include_net_mac80211.patch                     |    2 +-
 ..._wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.patch |    8 +--
 .../30-bridge-port/net_wireless_nl80211.patch      |    2 +-
 .../42-netlink_seq/net_wireless_nl80211.patch      |    2 +-
 .../network/46-use_other_workqueue/INFO            |    4 --
 .../net_bluetooth_hci_core.patch                   |   27 --------
 .../drivers_net_wireless_mwifiex_init.patch        |    2 +-
 .../drivers_bluetooth_ath3k.patch                  |    2 +-
 .../drivers_bluetooth_btusb.patch                  |    2 +-
 .../drivers_net_wireless_ath_ath9k_hif_usb.patch   |    2 +-
 .../drivers_net_wireless_rt2x00_rt73usb.patch      |    2 +-
 .../69-wowlan-no-socket/net_wireless_nl80211.patch |    2 +-
 .../drivers_net_wireless_ti_wlcore_main.patch      |    6 +-
 37 files changed, 256 insertions(+), 199 deletions(-)
 create mode 100644 backport/backport-include/linux/swiotlb.h
 delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb/INFO
 delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.patch
 delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.patch
 delete mode 100644 patches/collateral-evolutions/network/46-use_other_workqueue/INFO
 delete mode 100644 patches/collateral-evolutions/network/46-use_other_workqueue/net_bluetooth_hci_core.patch
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/10 backports: backport drvdata = NULL core driver fixes

From: "Luis R. Rodriguez" <[email protected]>

The Linux kernel had tons of code which at times cleared the drvdata upon probe failure or release. There are however a bunch of drivers that didn't clear this.

Commit 0998d063 implmented clearing this upon device_release_driver() and dealt with probe failure on driver_probe_device(). After this the kernel was cleaned up separately with *tons* of patches to remove all these driver specific settings given that the clearing is now done internally by the device core.

Instead of ifdef'ing code back in for older code where it was properly in place backport this by piggy backing the new required code upon the calls used in place. There is a small race here upon device_release_driver() but we can live with that theoretical race.

Due to the way we hack this backport we can't use a separate namespace as we have with other symbols.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains \
	0998d0631001288a5974afc0b2a5f568bcdecb4d

v3.6-rc1~99^2~14^2~17

I count 65 patches implemented after this:

mcgrof@frijol ~/linux-stable (git::master)$ git format-patch \
	--grep="device-core: Ensure drvdata = NULL when no driver is bound" \
	 -o null-drv-fix v3.6-rc1~99^2~14^2~17..

TL;DR

Alan Stern argued that perhaps applying this to backports wasn't a good idea given that evidence shows that the original patch actually exposed tons of bugs in driver code where they were doing the wrong thing. While this may be true if the original patch was a bad idea it should be reverted, and if a bug is found upstream, then by all means finding it through backports will only accelerate the pace at which we fix these exposed bugs. That is, if a bug is found due to this on backports then a respective fix for it should go upstream, not to backports. This is the benefit of providing backports releases: keep your users engaged on upstream fixes.

Furthermore I am in hopes that perhaps we can SmPL'ify the bugs instead and in the future perhaps require SmPL to proove that the what the original patch was doing won't affect the inverse of what the patch was trying to do -- that is drivers doing the wrong thing.

commit 0998d0631001288a5974afc0b2a5f568bcdecb4d

Author: Hans de Goede <[email protected]>
Date:   Wed May 23 00:09:34 2012 +0200

device-core: Ensure drvdata = NULL when no driver is bound

1) drvdata is for a driver to store a pointer to driver specific data
2) If no driver is bound, there is no driver specific data associated with the device
3) Thus logically drvdata should be NULL if no driver is bound.

But many drivers don't clear drvdata on device_release, or set drvdata early on in probe and leave it set on probe error. Both of which results in a dangling pointer in drvdata.

This patch enforce for drvdata to be NULL after device_release or on probe failure.

Tested with ckmake against next-20130618:

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.79              [  OK  ]
18  3.1.10              [  OK  ]
19  3.10-rc1            [  OK  ]
20  3.2.45              [  OK  ]
21  3.3.8               [  OK  ]
22  3.4.46              [  OK  ]
23  3.5.7               [  OK  ]
24  3.6.11              [  OK  ]
25  3.7.10              [  OK  ]
26  3.8.13              [  OK  ]
27  3.9.3               [  OK  ]
real    32m2.332s
user    860m23.688s
sys     121m20.840s
---
 backport/backport-include/linux/device.h |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
backport/backport-include/linux/device.h +19 -0
index c2f80e2..ba55d0e 100644
@@ -176,4 +176,23 @@ extern int dev_set_name(struct device *dev, const char *name, ...)
 			__attribute__((format(printf, 2, 3)));
 #endif
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0)
+#define driver_probe_device(__drv, __dev)		\
+({							\
+ 	int ret;					\
+ 	ret = (driver_probe_device)(__drv, __dev);	\
+ 	if (ret)					\
+		dev_set_drvdata(__dev, NULL);		\
+ 	return ret;					\
+})
+
+#define device_release_driver(__dev)			\
+({							\
+ 	(device_release_driver)(__dev);			\
+ 	device_lock(__dev);				\
+ 	dev_set_drvdata(__dev, NULL);			\
+ 	device_unlock(__dev);				\
+})
+#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
+
 #endif /* __BACKPORT_DEVICE_H */
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 2/10 backport: backport sprintf-style workqueue naming

In reply to Luis R. Rodriguez

From: Johannes Berg <[email protected]>

Since kernel version 3.3, workqueue names could be sprintf'ed instead of just pointing to a name. This wasn't used a lot so never needed to be backported, but now it's used everywhere. Backport this API.

[mcgrof: add WQ_HIGHPRI and WQ_MEM_RECLAIM defines]
---
 backport/backport-include/linux/workqueue.h |   50 ++++++++++++++++---
 backport/compat/compat-3.3.c                |   69 +++++++++++++++++++++++++++
 2 files changed, 112 insertions(+), 7 deletions(-)
backport/backport-include/linux/workqueue.h +43 -7
index 9958715..1e9ca71 100644
@@ -14,16 +14,52 @@ bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork,
 #define create_freezable_workqueue create_freezeable_workqueue
 #endif
 
-#ifndef alloc_ordered_workqueue
-#define alloc_ordered_workqueue(name, flags) create_singlethread_workqueue(name)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)
+#define WQ_HIGHPRI 0
+#define WQ_MEM_RECLAIM 0
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
-#define alloc_workqueue(name, flags, max_active) __create_workqueue(name, flags, max_active)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+#define WQ_UNBOUND	0
 #endif
-
-#ifndef alloc_workqueue
-#define alloc_workqueue(name, flags, max_active) __create_workqueue(name, flags, max_active, 0)
+#define __WQ_ORDERED	0
+/*
+ * commit b196be89cdc14a88cc637cdad845a75c5886c82d
+ * Author: Tejun Heo <[email protected]>
+ * Date:   Tue Jan 10 15:11:35 2012 -0800
+ *
+ *     workqueue: make alloc_workqueue() take printf fmt and args for name
+ */
+struct workqueue_struct *
+backport_alloc_workqueue(const char *fmt, unsigned int flags,
+			 int max_active, struct lock_class_key *key,
+			 const char *lock_name, ...);
+#undef alloc_workqueue
+#ifdef CONFIG_LOCKDEP
+#define alloc_workqueue(fmt, flags, max_active, args...)		\
+({									\
+	static struct lock_class_key __key;				\
+	const char *__lock_name;					\
+									\
+	if (__builtin_constant_p(fmt))					\
+		__lock_name = (fmt);					\
+	else								\
+		__lock_name = #fmt;					\
+									\
+	backport_alloc_workqueue((fmt), (flags), (max_active),		\
+				 &__key, __lock_name, ##args);		\
+})
+#else
+#define alloc_workqueue(fmt, flags, max_active, args...)		\
+	backport_alloc_workqueue((fmt), (flags), (max_active),		\
+				 NULL, NULL, ##args)
+#endif
+#undef alloc_ordered_workqueue
+#define alloc_ordered_workqueue(fmt, flags, args...) \
+	alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args)
+#define destroy_workqueue backport_destroy_workqueue
+void backport_destroy_workqueue(struct workqueue_struct *wq);
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
backport/compat/compat-3.3.c +69 -0

78 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH v2 02/10] backport: backport sprintf-style workqueue naming

Quoted 9 lines · Luis R. Rodriguez

From: Johannes Berg <[email protected]>

Since kernel version 3.3, workqueue names could be sprintf'ed instead of just pointing to a name. This wasn't used a lot so never needed to be backported, but now it's used everywhere. Backport this API.

[mcgrof: add WQ_HIGHPRI and WQ_MEM_RECLAIM defines]

Were they needed somehow? Thye shouldn't have been, since users of this don't usually use the flags directly?

If they _are_ needed, then we probably need to do something different? My patch only backported "regular" and "ordered" workqueue, not the other flags, and I suspect the other flags can't actually be backported.

backport/backport-include/linux/workqueue.h bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, · line 20

Quoted 4 lines
backport/backport-include/linux/workqueue.h +3 -0
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)
+#define WQ_HIGHPRI 0
+#define WQ_MEM_RECLAIM 0
 #endif

Ah, here. I think that would cause problems?

backport/compat/compat-3.3.c out: · line 177

Quoted 2 lines
backport/compat/compat-3.3.c +2 -0
+static DEFINE_SPINLOCK(wq_name_lock);
+static struct list_head wq_name_list;

FWIW, my patch was [RFC] for a reason, I hadn't tested it... Now that I did, I can tell you that this must be

static LIST_HEAD(wq_name_list);

to get the list properly initialised.

johannes

#4 lore raw

Re: [PATCH v2 02/10] backport: backport sprintf-style workqueue naming

Quoted 8 lines · Johannes Berg
Quoted 7 lines · Luis R. Rodriguez

From: Johannes Berg <[email protected]>

Since kernel version 3.3, workqueue names could be sprintf'ed instead of just pointing to a name. This wasn't used a lot so never needed to be backported, but now it's used everywhere. Backport this API.

Quoted 5 lines
Quoted 2 lines
[mcgrof: add WQ_HIGHPRI and WQ_MEM_RECLAIM defines]

Were they needed somehow? Thye shouldn't have been, since users of this don't usually use the flags directly?

There's not used but at compile time the flags arguments were kept, we can surely nuke them if we #ifdef a call for older kernels.

Quoted 3 lines

If they _are_ needed, then we probably need to do something different? My patch only backported "regular" and "ordered" workqueue, not the other flags, and I suspect the other flags can't actually be backported.

Indeed they can't, we just ignore them for older kernels, in fact perhaps just using create_singlethread_workqueue(name) would suffice for older kernels.

Quoted 6 lines

backport/backport-include/linux/workqueue.h bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, · line 20

Quoted 4 lines
backport/backport-include/linux/workqueue.h +3 -0
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)
+#define WQ_HIGHPRI 0
+#define WQ_MEM_RECLAIM 0
 #endif

Ah, here. I think that would cause problems?

Not necessarily -- these are simply not usable / backportable on older kernels. In part of my synch up of patches (see d7608058) I nuked patches/collateral-evolutions/network/46-use_other_workqueue/ which used to backport alloc_workqueue() with create_singlethread_workqueue() given older kernels do not support WQ_HIGHPRI and WQ_MEM_RECLAIM. In your port you make use of __create_workqueue_key() but that's available in older kernels as well, its just the flags are kept in code, but they are not used per se.

Quoted 9 lines

backport/compat/compat-3.3.c out: · line 177

Quoted 2 lines
backport/compat/compat-3.3.c +2 -0
+static DEFINE_SPINLOCK(wq_name_lock);
+static struct list_head wq_name_list;

FWIW, my patch was [RFC] for a reason, I hadn't tested it... Now that I did, I can tell you that this must be

static LIST_HEAD(wq_name_list);

to get the list properly initialised.

I'll add that. Sorry for jumping the gun here.

Luis

#5 lore raw

PATCH v2 3/10 backports: fix patches required for next-20130627

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

---
 .../network/0005-netlink-portid/nl80211.patch      |   60 ++++++++++----------
 .../network/46-use_other_workqueue/INFO            |    4 --
 .../net_bluetooth_hci_core.patch                   |   27 ---------
 .../drivers_net_wireless_ti_wlcore_main.patch      |    6 +-
 4 files changed, 33 insertions(+), 64 deletions(-)
 delete mode 100644 patches/collateral-evolutions/network/46-use_other_workqueue/INFO
 delete mode 100644 patches/collateral-evolutions/network/46-use_other_workqueue/net_bluetooth_hci_core.patch
patches/collateral-evolutions/network/0005-netlink-portid/nl80211.patch +30 -30
index 5f49cb3..d5a6a12 100644
@@ -1,24 +1,24 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -1564,7 +1564,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -1593,7 +1593,7 @@ static int nl80211_dump_wiphy(struct sk_
  		/* attempt to fit multiple wiphy data chunks into the skb */
  		do {
  			ret = nl80211_send_wiphy(dev, skb,
 -						 NETLINK_CB(cb->skb).portid,
 +						 NETLINK_CB_PORTID(cb->skb),
  						 cb->nlh->nlmsg_seq,
- 						 NLM_F_MULTI,
- 						 split, &cb->args[1],
-@@ -1613,7 +1613,7 @@ static int nl80211_get_wiphy(struct sk_b
+ 						 NLM_F_MULTI, state);
+ 			if (ret < 0) {
+@@ -1646,7 +1646,7 @@ static int nl80211_get_wiphy(struct sk_b
  	if (!msg)
  		return -ENOMEM;
  
 -	if (nl80211_send_wiphy(dev, msg, info->snd_portid, info->snd_seq, 0,
 +	if (nl80211_send_wiphy(dev, msg, genl_info_snd_portid(info), info->snd_seq, 0,
- 			       false, NULL, NULL, NULL) < 0) {
+ 			       &state) < 0) {
  		nlmsg_free(msg);
  		return -ENOBUFS;
-@@ -2183,7 +2183,7 @@ static int nl80211_dump_interface(struct
+@@ -2221,7 +2221,7 @@ static int nl80211_dump_interface(struct
  				if_idx++;
  				continue;
  			}
@@ -27,7 +27,7 @@
  					       cb->nlh->nlmsg_seq, NLM_F_MULTI,
  					       rdev, wdev) < 0) {
  				goto out;
-@@ -2212,7 +2212,7 @@ static int nl80211_get_interface(struct
+@@ -2250,7 +2250,7 @@ static int nl80211_get_interface(struct
  	if (!msg)
  		return -ENOMEM;
  
@@ -36,7 +36,7 @@
  			       dev, wdev) < 0) {
  		nlmsg_free(msg);
  		return -ENOBUFS;
-@@ -2445,7 +2445,7 @@ static int nl80211_new_interface(struct
+@@ -2483,7 +2483,7 @@ static int nl80211_new_interface(struct
  		break;
  	}
  
@@ -45,7 +45,7 @@
  			       rdev, wdev) < 0) {
  		nlmsg_free(msg);
  		return -ENOBUFS;
-@@ -2580,7 +2580,7 @@ static int nl80211_get_key(struct sk_buf
+@@ -2618,7 +2618,7 @@ static int nl80211_get_key(struct sk_buf
  	if (!msg)
  		return -ENOMEM;
  
@@ -54,7 +54,7 @@
  			     NL80211_CMD_NEW_KEY);
  	if (IS_ERR(hdr))
  		return PTR_ERR(hdr);
-@@ -3552,7 +3552,7 @@ static int nl80211_dump_station(struct s
+@@ -3587,7 +3587,7 @@ static int nl80211_dump_station(struct s
  			goto out_err;
  
  		if (nl80211_send_station(skb,
@@ -63,7 +63,7 @@
  				cb->nlh->nlmsg_seq, NLM_F_MULTI,
  				dev, wdev->netdev, mac_addr,
  				&sinfo) < 0)
-@@ -3598,7 +3598,7 @@ static int nl80211_get_station(struct sk
+@@ -3633,7 +3633,7 @@ static int nl80211_get_station(struct sk
  	if (!msg)
  		return -ENOMEM;
  
@@ -72,7 +72,7 @@
  				 rdev, dev, mac_addr, &sinfo) < 0) {
  		nlmsg_free(msg);
  		return -ENOBUFS;
-@@ -4206,7 +4206,7 @@ static int nl80211_dump_mpath(struct sk_
+@@ -4241,7 +4241,7 @@ static int nl80211_dump_mpath(struct sk_
  		if (err)
  			goto out_err;
  
@@ -81,7 +81,7 @@
  				       cb->nlh->nlmsg_seq, NLM_F_MULTI,
  				       wdev->netdev, dst, next_hop,
  				       &pinfo) < 0)
-@@ -4255,7 +4255,7 @@ static int nl80211_get_mpath(struct sk_b
+@@ -4290,7 +4290,7 @@ static int nl80211_get_mpath(struct sk_b
  	if (!msg)
  		return -ENOMEM;
  
@@ -90,7 +90,7 @@
  				 dev, dst, next_hop, &pinfo) < 0) {
  		nlmsg_free(msg);
  		return -ENOBUFS;
-@@ -4519,7 +4519,7 @@ static int nl80211_get_mesh_config(struc
+@@ -4554,7 +4554,7 @@ static int nl80211_get_mesh_config(struc
  	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
  	if (!msg)
  		return -ENOMEM;
@@ -99,7 +99,7 @@
  			     NL80211_CMD_GET_MESH_CONFIG);
  	if (!hdr)
  		goto out;
-@@ -4878,7 +4878,7 @@ static int nl80211_get_reg(struct sk_buf
+@@ -4913,7 +4913,7 @@ static int nl80211_get_reg(struct sk_buf
  	if (!msg)
  		return -ENOBUFS;
  
@@ -108,7 +108,7 @@
  			     NL80211_CMD_GET_REG);
  	if (!hdr)
  		goto put_failure;
-@@ -5557,7 +5557,7 @@ static int nl80211_send_bss(struct sk_bu
+@@ -5592,7 +5592,7 @@ static int nl80211_send_bss(struct sk_bu
  
  	ASSERT_WDEV_LOCK(wdev);
  
@@ -117,7 +117,7 @@
  			     NL80211_CMD_NEW_SCAN_RESULTS);
  	if (!hdr)
  		return -1;
-@@ -5793,7 +5793,7 @@ static int nl80211_dump_survey(struct sk
+@@ -5828,7 +5828,7 @@ static int nl80211_dump_survey(struct sk
  		}
  
  		if (nl80211_send_survey(skb,
@@ -126,7 +126,7 @@
  				cb->nlh->nlmsg_seq, NLM_F_MULTI,
  				wdev->netdev, &survey) < 0)
  			goto out;
-@@ -6460,7 +6460,7 @@ static int nl80211_testmode_dump(struct
+@@ -6500,7 +6500,7 @@ static int nl80211_testmode_dump(struct
  	}
  
  	while (1) {
@@ -135,7 +135,7 @@
  					   cb->nlh->nlmsg_seq, NLM_F_MULTI,
  					   NL80211_CMD_TESTMODE);
  		struct nlattr *tmdata;
-@@ -6539,7 +6539,7 @@ struct sk_buff *cfg80211_testmode_alloc_
+@@ -6579,7 +6579,7 @@ struct sk_buff *cfg80211_testmode_alloc_
  		return NULL;
  
  	return __cfg80211_testmode_alloc_skb(rdev, approxlen,
@@ -144,7 +144,7 @@
  				rdev->testmode_info->snd_seq,
  				GFP_KERNEL);
  }
-@@ -6905,7 +6905,7 @@ static int nl80211_remain_on_channel(str
+@@ -6945,7 +6945,7 @@ static int nl80211_remain_on_channel(str
  	if (!msg)
  		return -ENOMEM;
  
@@ -153,7 +153,7 @@
  			     NL80211_CMD_REMAIN_ON_CHANNEL);
  
  	if (IS_ERR(hdr)) {
-@@ -7124,7 +7124,7 @@ static int nl80211_register_mgmt(struct
+@@ -7164,7 +7164,7 @@ static int nl80211_register_mgmt(struct
  	if (!rdev->ops->mgmt_tx)
  		return -EOPNOTSUPP;
  
@@ -162,7 +162,7 @@
  			nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]),
  			nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH]));
  }
-@@ -7205,7 +7205,7 @@ static int nl80211_tx_mgmt(struct sk_buf
+@@ -7245,7 +7245,7 @@ static int nl80211_tx_mgmt(struct sk_buf
  		if (!msg)
  			return -ENOMEM;
  
@@ -171,7 +171,7 @@
  				     NL80211_CMD_FRAME);
  
  		if (IS_ERR(hdr)) {
-@@ -7320,7 +7320,7 @@ static int nl80211_get_power_save(struct
+@@ -7360,7 +7360,7 @@ static int nl80211_get_power_save(struct
  	if (!msg)
  		return -ENOMEM;
  
@@ -180,7 +180,7 @@
  			     NL80211_CMD_GET_POWER_SAVE);
  	if (!hdr) {
  		err = -ENOBUFS;
-@@ -7631,7 +7631,7 @@ static int nl80211_get_wowlan(struct sk_
+@@ -7671,7 +7671,7 @@ static int nl80211_get_wowlan(struct sk_
  	if (!msg)
  		return -ENOMEM;
  
@@ -189,7 +189,7 @@
  			     NL80211_CMD_GET_WOWLAN);
  	if (!hdr)
  		goto nla_put_failure;
-@@ -8056,7 +8056,7 @@ static int nl80211_register_unexpected_f
+@@ -8096,7 +8096,7 @@ static int nl80211_register_unexpected_f
  	if (wdev->ap_unexpected_nlportid)
  		return -EBUSY;
  
@@ -198,7 +198,7 @@
  	return 0;
  }
  
-@@ -8086,7 +8086,7 @@ static int nl80211_probe_client(struct s
+@@ -8126,7 +8126,7 @@ static int nl80211_probe_client(struct s
  	if (!msg)
  		return -ENOMEM;
  
@@ -207,7 +207,7 @@
  			     NL80211_CMD_PROBE_CLIENT);
  
  	if (IS_ERR(hdr)) {
-@@ -8130,13 +8130,13 @@ static int nl80211_register_beacons(stru
+@@ -8170,13 +8170,13 @@ static int nl80211_register_beacons(stru
  	/* First, check if already registered. */
  	spin_lock_bh(&rdev->beacon_registrations_lock);
  	list_for_each_entry(reg, &rdev->beacon_registrations, list) {
@@ -223,7 +223,7 @@
  	list_add(&nreg->list, &rdev->beacon_registrations);
  
  	spin_unlock_bh(&rdev->beacon_registrations_lock);
-@@ -8203,7 +8203,7 @@ static int nl80211_get_protocol_features
+@@ -8243,7 +8243,7 @@ static int nl80211_get_protocol_features
  	if (!msg)
  		return -ENOMEM;
  
@@ -232,7 +232,7 @@
  			     NL80211_CMD_GET_PROTOCOL_FEATURES);
  	if (!hdr)
  		goto nla_put_failure;
-@@ -8278,7 +8278,7 @@ static int nl80211_crit_protocol_start(s
+@@ -8318,7 +8318,7 @@ static int nl80211_crit_protocol_start(s
  
  	ret = rdev_crit_proto_start(rdev, wdev, proto, duration);
  	if (!ret)
@@ -241,7 +241,7 @@
  
  	return ret;
  }
-@@ -10652,12 +10652,12 @@ static int nl80211_netlink_notify(struct
+@@ -10693,12 +10693,12 @@ static int nl80211_netlink_notify(struct
  
  	list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
  		list_for_each_entry_rcu(wdev, &rdev->wdev_list, list)
patches/collateral-evolutions/network/46-use_other_workqueue/INFO deleted +0 -4
deleted file mode 100644
index c9f4f37..0000000
@@ -1,4 +0,0 @@
-Old kernel versions do not support WQ_HIGHPRI and WQ_MEM_RECLAIM so we
-should use create_singlethread_workqueue() which was used at this
-position before.
-
patches/collateral-evolutions/network/46-use_other_workqueue/net_bluetooth_hci_core.patch deleted +0 -27
deleted file mode 100644
index b9fe51b..0000000
@@ -1,27 +0,0 @@
---- a/net/bluetooth/hci_core.c
-+++ b/net/bluetooth/hci_core.c
-@@ -2161,16 +2161,24 @@ int hci_register_dev(struct hci_dev *hde
- 	list_add(&hdev->list, &hci_dev_list);
- 	write_unlock(&hci_dev_list_lock);
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- 	hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND |
- 					  WQ_MEM_RECLAIM, 1);
-+#else
-+	hdev->workqueue = create_singlethread_workqueue(hdev->name);
-+#endif
- 	if (!hdev->workqueue) {
- 		error = -ENOMEM;
- 		goto err;
- 	}
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- 	hdev->req_workqueue = alloc_workqueue(hdev->name,
- 					      WQ_HIGHPRI | WQ_UNBOUND |
- 					      WQ_MEM_RECLAIM, 1);
-+#else
-+	hdev->req_workqueue = create_singlethread_workqueue(hdev->name);
-+#endif
- 	if (!hdev->req_workqueue) {
- 		destroy_workqueue(hdev->workqueue);
- 		error = -ENOMEM;
patches/collateral-evolutions/network/71-bin_attribute-api-change/drivers_net_wireless_ti_wlcore_main.patch +3 -3
index 2425660..919aafa 100644
@@ -1,6 +1,6 @@
---- a/drivers/net/wireless/ti/wlcore/main.c
-+++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -5518,7 +5518,11 @@ static ssize_t wl1271_sysfs_show_hw_pg_v
+--- a/drivers/net/wireless/ti/wlcore/sysfs.c
++++ b/drivers/net/wireless/ti/wlcore/sysfs.c
+@@ -106,7 +106,11 @@ static ssize_t wl1271_sysfs_show_hw_pg_v
  static DEVICE_ATTR(hw_pg_ver, S_IRUGO,
  		   wl1271_sysfs_show_hw_pg_ver, NULL);
  
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v2 4/10 backports: refresh patches for next-20130627

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

---
 .../drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.patch   |    2 +-
 .../drm/14-shrinkers-api/drivers_gpu_drm_i915.patch        |   12 ++++++------
 .../network/0001-netdev_ops/ipw2200.patch                  |    4 ++--
 .../network/0006-disable-dump-adjust-on-old-kernels.patch  |    8 ++++----
 .../collateral-evolutions/network/05-usb/ath9k_htc.patch   |    2 +-
 .../09-cfg80211-wext-padding/include_net_cfg80211.patch    |    2 +-
 .../drivers_net_wireless_iwlwifi_pcie_trans.patch          |    2 +-
 .../drivers_net_wireless_ti_wlcore_main.patch              |    6 +++---
 .../11-dev-pm-ops/drivers_net_wireless_ath_ath9k_pci.patch |    4 ++--
 .../drivers_net_wireless_ti_wlcore_main.patch              |    4 ++--
 .../25-multicast-list_head/include_net_mac80211.patch      |    2 +-
 ...vers_net_wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.patch |    8 ++++----
 .../network/30-bridge-port/net_wireless_nl80211.patch      |    2 +-
 .../network/42-netlink_seq/net_wireless_nl80211.patch      |    2 +-
 .../drivers_net_wireless_mwifiex_init.patch                |    2 +-
 .../62-usb_driver_lpm/drivers_bluetooth_ath3k.patch        |    2 +-
 .../62-usb_driver_lpm/drivers_bluetooth_btusb.patch        |    2 +-
 .../drivers_net_wireless_ath_ath9k_hif_usb.patch           |    2 +-
 .../drivers_net_wireless_rt2x00_rt73usb.patch              |    2 +-
 .../network/69-wowlan-no-socket/net_wireless_nl80211.patch |    2 +-
 20 files changed, 36 insertions(+), 36 deletions(-)
patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.patch +1 -1
index d58bdaf..354face 100644
@@ -1,6 +1,6 @@
 --- a/drivers/gpu/drm/i915/i915_gem.c
 +++ b/drivers/gpu/drm/i915/i915_gem.c
-@@ -4185,9 +4185,14 @@ i915_gem_init_hw(struct drm_device *dev)
+@@ -4178,9 +4178,14 @@ i915_gem_init_hw(struct drm_device *dev)
  	drm_i915_private_t *dev_priv = dev->dev_private;
  	int ret;
  
patches/collateral-evolutions/drm/14-shrinkers-api/drivers_gpu_drm_i915.patch +6 -6
index f60bdf2..aef9aa3 100644
@@ -42,7 +42,7 @@
  static long i915_gem_purge(struct drm_i915_private *dev_priv, long target);
  static long i915_gem_shrink_all(struct drm_i915_private *dev_priv);
  static void i915_gem_object_truncate(struct drm_i915_gem_object *obj);
-@@ -4397,8 +4402,12 @@ i915_gem_load(struct drm_device *dev)
+@@ -4390,8 +4395,12 @@ i915_gem_load(struct drm_device *dev)
  
  	dev_priv->mm.interruptible = true;
  
@@ -55,7 +55,7 @@
  	dev_priv->mm.inactive_shrinker.seeks = DEFAULT_SEEKS;
  	register_shrinker(&dev_priv->mm.inactive_shrinker);
  }
-@@ -4621,8 +4630,14 @@ static bool mutex_is_locked_by(struct mu
+@@ -4614,8 +4623,14 @@ static bool mutex_is_locked_by(struct mu
  #endif
  }
  
@@ -70,7 +70,7 @@
  {
  	struct drm_i915_private *dev_priv =
  		container_of(shrinker,
-@@ -4631,7 +4646,12 @@ i915_gem_inactive_count(struct shrinker
+@@ -4624,7 +4639,12 @@ i915_gem_inactive_count(struct shrinker
  	struct drm_device *dev = dev_priv->dev;
  	struct drm_i915_gem_object *obj;
  	bool unlock = true;
@@ -83,7 +83,7 @@
  
  	if (!mutex_trylock(&dev->struct_mutex)) {
  		if (!mutex_is_locked_by(&dev->struct_mutex, current))
-@@ -4643,6 +4663,17 @@ i915_gem_inactive_count(struct shrinker
+@@ -4636,6 +4656,17 @@ i915_gem_inactive_count(struct shrinker
  		unlock = false;
  	}
  
@@ -101,7 +101,7 @@
  	count = 0;
  	list_for_each_entry(obj, &dev_priv->mm.unbound_list, global_list)
  		if (obj->pages_pin_count == 0)
-@@ -4656,6 +4687,7 @@ i915_gem_inactive_count(struct shrinker
+@@ -4649,6 +4680,7 @@ i915_gem_inactive_count(struct shrinker
  	return count;
  }
  
@@ -109,7 +109,7 @@
  static unsigned long
  i915_gem_inactive_scan(struct shrinker *shrinker, struct shrink_control *sc)
  {
-@@ -4689,3 +4721,4 @@ i915_gem_inactive_scan(struct shrinker *
+@@ -4682,3 +4714,4 @@ i915_gem_inactive_scan(struct shrinker *
  		mutex_unlock(&dev->struct_mutex);
  	return freed;
  }
patches/collateral-evolutions/network/0001-netdev_ops/ipw2200.patch +2 -2
index afa84cd..b2baafa 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ipw2x00/ipw2200.c
 +++ b/drivers/net/wireless/ipw2x00/ipw2200.c
-@@ -11680,7 +11680,7 @@ static int ipw_prom_alloc(struct ipw_pri
+@@ -11681,7 +11681,7 @@ static int ipw_prom_alloc(struct ipw_pri
  	memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
  
  	priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
@@ -9,7 +9,7 @@
  
  	priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
  	SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
-@@ -11818,7 +11818,7 @@ static int ipw_pci_probe(struct pci_dev
+@@ -11819,7 +11819,7 @@ static int ipw_pci_probe(struct pci_dev
  	priv->ieee->perfect_rssi = -20;
  	priv->ieee->worst_rssi = -85;
  
patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels.patch +4 -4
index c13d053..7b48d3d 100644
@@ -28,15 +28,15 @@ Date:   Fri Mar 1 14:03:49 2013 +0100
 
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -1571,6 +1571,7 @@ static int nl80211_dump_wiphy(struct sk_
- 						 &cb->args[2],
- 						 &cb->args[3]);
+@@ -1597,6 +1597,7 @@ static int nl80211_dump_wiphy(struct sk_
+ 						 cb->nlh->nlmsg_seq,
+ 						 NLM_F_MULTI, state);
  			if (ret < 0) {
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
  				/*
  				 * If sending the wiphy data didn't fit (ENOBUFS
  				 * or EMSGSIZE returned), this SKB is still
-@@ -1591,6 +1592,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -1617,6 +1618,7 @@ static int nl80211_dump_wiphy(struct sk_
  					rtnl_unlock();
  					return 1;
  				}
patches/collateral-evolutions/network/05-usb/ath9k_htc.patch +1 -1
index a681f60..78ebbf8 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
 +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
-@@ -1370,7 +1370,9 @@ static struct usb_driver ath9k_hif_usb_d
+@@ -1376,7 +1376,9 @@ static struct usb_driver ath9k_hif_usb_d
  	.reset_resume = ath9k_hif_usb_resume,
  #endif
  	.id_table = ath9k_hif_usb_ids,
patches/collateral-evolutions/network/09-cfg80211-wext-padding/include_net_cfg80211.patch +1 -1
index 3a7a9e2..b4e56c1 100644
@@ -1,6 +1,6 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -2615,6 +2615,9 @@ struct wiphy_wowlan_support {
+@@ -2645,6 +2645,9 @@ struct wiphy_wowlan_support {
  struct wiphy {
  	/* assign these fields before you register the wiphy */
  
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.patch +1 -1
index d117011..86e99ff 100644
@@ -22,7 +22,7 @@
  	iwl_pcie_free_ict(trans);
  
  	pci_disable_msi(trans_pcie->pci_dev);
-@@ -1581,9 +1590,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(s
+@@ -1582,9 +1591,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(s
  	if (iwl_pcie_alloc_ict(trans))
  		goto out_free_cmd_pool;
  
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.patch +3 -3
index 50a8510..aefb69e 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ti/wlcore/main.c
 +++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -6063,13 +6063,24 @@ static void wlcore_nvs_cb(const struct f
+@@ -5931,13 +5931,24 @@ static void wlcore_nvs_cb(const struct f
  	wl->platform_quirks = pdata->platform_quirks;
  	wl->if_ops = pdev_data->if_ops;
  
@@ -25,7 +25,7 @@
  	if (ret < 0) {
  		wl1271_error("request_irq() failed: %d", ret);
  		goto out_free_nvs;
-@@ -6138,7 +6149,11 @@ out_unreg:
+@@ -5983,7 +5994,11 @@ out_unreg:
  	wl1271_unregister_hw(wl);
  
  out_irq:
@@ -37,7 +37,7 @@
  
  out_free_nvs:
  	kfree(wl->nvs);
-@@ -6184,7 +6199,12 @@ int wlcore_remove(struct platform_device
+@@ -6029,7 +6044,12 @@ int wlcore_remove(struct platform_device
  		disable_irq_wake(wl->irq);
  	}
  	wl1271_unregister_hw(wl);
patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_ath_ath9k_pci.patch +2 -2
index 5e0bf91..edc345c 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/pci.c
 +++ b/drivers/net/wireless/ath/ath9k/pci.c
-@@ -339,6 +339,9 @@ static int ath_pci_resume(struct device
+@@ -411,6 +411,9 @@ static int ath_pci_resume(struct device
  	return 0;
  }
  
@@ -10,7 +10,7 @@
  static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume);
  
  #define ATH9K_PM_OPS	(&ath9k_pm_ops)
-@@ -357,7 +360,12 @@ static struct pci_driver ath_pci_driver
+@@ -429,7 +432,12 @@ static struct pci_driver ath_pci_driver
  	.id_table   = ath_pci_id_table,
  	.probe      = ath_pci_probe,
  	.remove     = ath_pci_remove,
patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_ti_wlcore_main.patch +2 -2
index 38c2b1a..7ea5d15 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ti/wlcore/main.c
 +++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -2952,11 +2952,20 @@ struct wl1271_filter_params {
+@@ -2939,11 +2939,20 @@ struct wl1271_filter_params {
  	u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN];
  };
  
@@ -21,7 +21,7 @@
  
  	fp = kzalloc(sizeof(*fp), GFP_ATOMIC);
  	if (!fp) {
-@@ -2965,16 +2974,40 @@ static u64 wl1271_op_prepare_multicast(s
+@@ -2952,16 +2961,40 @@ static u64 wl1271_op_prepare_multicast(s
  	}
  
  	/* update multicast filtering parameters */
patches/collateral-evolutions/network/25-multicast-list_head/include_net_mac80211.patch +1 -1
index 40c73e1..fb22de2 100644
@@ -1,6 +1,6 @@
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -2660,14 +2660,24 @@ struct ieee80211_ops {
+@@ -2662,14 +2662,24 @@ struct ieee80211_ops {
  	void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  
  	u64 (*prepare_multicast)(struct ieee80211_hw *hw,
patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_brcm80211_brcmfmac_bcmsdh_sdmmc.patch +4 -4
index ab95682..3c6671c 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
 +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
-@@ -70,7 +70,7 @@ static bool
+@@ -70,7 +70,7 @@ bool
  brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev)
  {
  	bool is_err = false;
@@ -10,7 +10,7 @@
  #endif
  	return is_err;
 @@ -79,7 +79,7 @@ brcmf_pm_resume_error(struct brcmf_sdio_
- static void
+ void
  brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev, wait_queue_head_t *wq)
  {
 -#ifdef CONFIG_PM_SLEEP
@@ -18,7 +18,7 @@
  	int retry = 0;
  	while (atomic_read(&sdiodev->suspend) && retry++ != 30)
  		wait_event_timeout(*wq, false, HZ/100);
-@@ -516,7 +516,7 @@ static void brcmf_ops_sdio_remove(struct
+@@ -406,7 +406,7 @@ static void brcmf_ops_sdio_remove(struct
  	brcmf_dbg(SDIO, "Exit\n");
  }
  
@@ -27,7 +27,7 @@
  static int brcmf_sdio_suspend(struct device *dev)
  {
  	mmc_pm_flag_t sdio_flags;
-@@ -566,7 +566,7 @@ static struct sdio_driver brcmf_sdmmc_dr
+@@ -456,7 +456,7 @@ static struct sdio_driver brcmf_sdmmc_dr
  	.remove = brcmf_ops_sdio_remove,
  	.name = BRCMFMAC_SDIO_PDATA_NAME,
  	.id_table = brcmf_sdmmc_ids,
patches/collateral-evolutions/network/30-bridge-port/net_wireless_nl80211.patch +1 -1
index 95f8cf3..886cde4 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -2258,7 +2258,7 @@ static int nl80211_valid_4addr(struct cf
+@@ -2296,7 +2296,7 @@ static int nl80211_valid_4addr(struct cf
  			       enum nl80211_iftype iftype)
  {
  	if (!use_4addr) {
patches/collateral-evolutions/network/42-netlink_seq/net_wireless_nl80211.patch +1 -1
index f57cd4e..3b6ef8a 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -5668,7 +5668,9 @@ static int nl80211_dump_scan(struct sk_b
+@@ -5703,7 +5703,9 @@ static int nl80211_dump_scan(struct sk_b
  	spin_lock_bh(&rdev->bss_lock);
  	cfg80211_bss_expire(rdev);
  
patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/drivers_net_wireless_mwifiex_init.patch +1 -1
index de1e0d7..30bc0c2 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mwifiex/init.c
 +++ b/drivers/net/wireless/mwifiex/init.c
-@@ -285,8 +285,10 @@ void mwifiex_set_trans_start(struct net_
+@@ -288,8 +288,10 @@ void mwifiex_set_trans_start(struct net_
  {
  	int i;
  
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_ath3k.patch +1 -1
index ce5b6d7..9735d1e 100644
@@ -1,6 +1,6 @@
 --- a/drivers/bluetooth/ath3k.c
 +++ b/drivers/bluetooth/ath3k.c
-@@ -473,7 +473,9 @@ static struct usb_driver ath3k_driver =
+@@ -475,7 +475,9 @@ static struct usb_driver ath3k_driver =
  	.probe		= ath3k_probe,
  	.disconnect	= ath3k_disconnect,
  	.id_table	= ath3k_table,
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_bluetooth_btusb.patch +1 -1
index 9a2c9e3..82e4f89 100644
@@ -1,6 +1,6 @@
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -1623,7 +1623,9 @@ static struct usb_driver btusb_driver =
+@@ -1624,7 +1624,9 @@ static struct usb_driver btusb_driver =
  #endif
  	.id_table	= btusb_table,
  	.supports_autosuspend = 1,
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_ath_ath9k_hif_usb.patch +1 -1
index 6882f08..5753b5e 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
 +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
-@@ -1373,7 +1373,9 @@ static struct usb_driver ath9k_hif_usb_d
+@@ -1379,7 +1379,9 @@ static struct usb_driver ath9k_hif_usb_d
  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
  	.soft_unbind = 1,
  #endif
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rt2x00_rt73usb.patch +1 -1
index dc6b99c..3f1c4b8 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/rt2x00/rt73usb.c
 +++ b/drivers/net/wireless/rt2x00/rt73usb.c
-@@ -2547,7 +2547,9 @@ static struct usb_driver rt73usb_driver
+@@ -2548,7 +2548,9 @@ static struct usb_driver rt73usb_driver
  	.suspend	= rt2x00usb_suspend,
  	.resume		= rt2x00usb_resume,
  	.reset_resume	= rt2x00usb_resume,
patches/collateral-evolutions/network/69-wowlan-no-socket/net_wireless_nl80211.patch +1 -1
index 093b17a..06c882d 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -7775,7 +7775,7 @@ static int nl80211_parse_wowlan_tcp(stru
+@@ -7815,7 +7815,7 @@ static int nl80211_parse_wowlan_tcp(stru
  		port = nla_get_u16(tb[NL80211_WOWLAN_TCP_SRC_PORT]);
  	else
  		port = 0;
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH v2 5/10 backports: simplify swiotlb_nr_tbl() backport

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3. Since it uses an internal global state variable, it is impossible to backport it to. Instead of reverting the changes added just let this return 0 as the code will not do anything. This simplifies the backport.

---
 backport/backport-include/linux/swiotlb.h          |   17 +++++++
 patches/collateral-evolutions/drm/03-swiotlb/INFO  |    5 ---
 .../drivers_gpu_drm_nouveau_nouveau_bo.patch       |   31 -------------
 .../drivers_gpu_drm_radeon_radeon_ttm.patch        |   47 --------------------
 4 files changed, 17 insertions(+), 83 deletions(-)
 create mode 100644 backport/backport-include/linux/swiotlb.h
 delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb/INFO
 delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.patch
 delete mode 100644 patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.patch
backport/backport-include/linux/swiotlb.h new file +17 -0
new file mode 100644
index 0000000..836b353
@@ -0,0 +1,17 @@
+#ifndef __BACKPORT_LINUX_SWIOTLB_H
+#define __BACKPORT_LINUX_SWIOTLB_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+#include_next <linux/swiotlb.h>
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) */
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+static inline unsigned long swiotlb_nr_tbl(void)
+{
+	return 0;
+}
+#endif
+
+#endif /* __BACKPORT_LINUX_SWIOTLB_H */
patches/collateral-evolutions/drm/03-swiotlb/INFO deleted +0 -5
deleted file mode 100644
index 5b7265f..0000000
@@ -1,5 +0,0 @@
-
-swiotlb_nr_tbl() was available since 3.2 but was exported since 3.3.
-Since it uses an internal global state variable, it is impossible
-to backport it to compat.git. So revert the changes.
-
patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_nouveau_nouveau_bo.patch deleted +0 -31
deleted file mode 100644
index 33a68b1..0000000
@@ -1,31 +0,0 @@
---- a/drivers/gpu/drm/nouveau/nouveau_bo.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
-@@ -1374,11 +1374,13 @@ nouveau_ttm_tt_populate(struct ttm_tt *t
- 	}
- #endif
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
- #ifdef CONFIG_SWIOTLB
- 	if (swiotlb_nr_tbl()) {
- 		return ttm_dma_populate((void *)ttm, dev->dev);
- 	}
- #endif
-+#endif
- 
- 	r = ttm_pool_populate(ttm);
- 	if (r) {
-@@ -1424,12 +1426,14 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt
- 	}
- #endif
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
- #ifdef CONFIG_SWIOTLB
- 	if (swiotlb_nr_tbl()) {
- 		ttm_dma_unpopulate((void *)ttm, dev->dev);
- 		return;
- 	}
- #endif
-+#endif
- 
- 	for (i = 0; i < ttm->num_pages; i++) {
- 		if (ttm_dma->dma_address[i]) {
patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_radeon_radeon_ttm.patch deleted +0 -47

47 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#8 lore raw

PATCH v2 6/10 backports: copy the max77693-private.h header file

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

---
 copy-list |    1 +
 1 file changed, 1 insertion(+)
copy-list +1 -0
index 5d7acd9..9c7be4a 100644
@@ -139,6 +139,7 @@ include/linux/regulator/max8649.h
 include/linux/regulator/max8660.h
 include/linux/regulator/max8952.h
 include/linux/regulator/max8973-regulator.h
+include/linux/mfd/max77693-private.h
 include/linux/regulator/of_regulator.h
 include/linux/regulator/tps51632-regulator.h
 include/linux/regulator/tps62360.h
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH v2 7/10 backports: revert DMI_EXACT_MATCH() for older kernels

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

struct dmi_strmatch was modified on v3.11 with a exact_match member. The DMI_EXACT_MATCH() macro was added as a mod version of DMI_MATCH() to account for dmi strings that look closely like each other. An example is D510MO Vs D510MOV.

Since exact_match is is not available on older kernels we can't use it and must revert to the old DMI_MATCH(). Addressing the desired behaviour will require a separate change to deal with addressing the difference in the behaviour.

Chris Wilson recommends that if we can't use this we should also rever the DMI related fixes. I believe these are:

dcf6d294830d46b0e6901477fb4bf455281d90c8 - drm/i915: quirk away phantom LVDS on Intel's D525MW mainboard e5614f0c2d0f4d7f0b8ef745d34593baf2c5dbf8 - drm/i915: quirk away phantom LVDS on Intel's D510MO mainboard

Once we get confirmation we can do that.

Proof of why we can't backport DMI_EXACT_MATCH():

DMI_EXACT_MATCH uses struct dmi_strmatch's new
member exact_match:

	@@ -456,7 +456,8 @@ enum dmi_field {
	 };

	 struct dmi_strmatch {
	-       unsigned char slot;
	+       unsigned char slot:7;
	+       unsigned char exact_match:1;
		char substr[79];
	 };

Prior to 5017b285 we only had slot member so to use DMI_EXACT_MATCH() with its intent we'd have to do something like:

	slot |= 1

if its called. This however assumes though that older code has the sanity check as changed in 5017b285 on drivers/firmware/dmi_scan.c. dmi_scan.o gets linked with CONFIG_DMI. At least for x86 that gets objects sprinkled on arch/x86/, but more importantly CONFIG_DMI is bool. I've argued how I envision us being able to backport core components before (see 0935deab for the hint) but as it is right now we can't. We only backport things we can throw in as modular.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 5017b285 v3.11-rc1~99^2~254

commit 5017b2851373ee15c7035151853bb1448800cae2

Author: Jani Nikula <[email protected]>
Date:   Wed Jul 3 15:05:02 2013 -0700

dmi: add support for exact DMI matches in addition to substring matching

dmi_match() considers a substring match to be a successful match. This is not always sufficient to distinguish between DMI data for different systems. Add support for exact string matching using strcmp() in addition to the substring matching using strstr().

The specific use case in the i915 driver is to allow us to use an exact match for D510MO, without also incorrectly matching D510MOV:

{
.ident = "Intel D510MO",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Intel"), DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
},
}

---
 backport/backport-include/linux/mod_devicetable.h |    4 ++++
 1 file changed, 4 insertions(+)
backport/backport-include/linux/mod_devicetable.h +4 -0
index 1f85ce6..5b63637 100644
@@ -2,6 +2,10 @@
 #define __BACKPORT_MOD_DEVICETABLE_H
 #include_next <linux/mod_devicetable.h>
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+#define DMI_EXACT_MATCH(a, b)  { a, b }
+#endif
+
 #ifndef HID_BUS_ANY
 #define HID_BUS_ANY                            0xffff
 #endif
Signature · 1 line
1.7.10.4
#10 lore raw

Re: [PATCH v2 07/10] backports: revert DMI_EXACT_MATCH() for older kernels

Hi Luis -

Quoted 14 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

struct dmi_strmatch was modified on v3.11 with a exact_match member. The DMI_EXACT_MATCH() macro was added as a mod version of DMI_MATCH() to account for dmi strings that look closely like each other. An example is D510MO Vs D510MOV.

Since exact_match is is not available on older kernels we can't use it and must revert to the old DMI_MATCH(). Addressing the desired behaviour will require a separate change to deal with addressing the difference in the behaviour.

Quoted 7 lines

Chris Wilson recommends that if we can't use this we should also rever the DMI related fixes. I believe these are:

dcf6d294830d46b0e6901477fb4bf455281d90c8 - drm/i915: quirk away phantom LVDS on Intel's D525MW mainboard e5614f0c2d0f4d7f0b8ef745d34593baf2c5dbf8 - drm/i915: quirk away phantom LVDS on Intel's D510MO mainboard

Once we get confirmation we can do that.

I agree with Chris about dropping the above two instead of carrying this patch, if you can't backport DMI_EXACT_MATCH implementation. As is, this would regress the longer named variants of D525MW and D510MO.

If more users for DMI_EXACT_MATCH start showing up, you may need to figure out a better way if you want to backport the quirks.

BR,
Jani.

Quoted 92 lines

Proof of why we can't backport DMI_EXACT_MATCH():

DMI_EXACT_MATCH uses struct dmi_strmatch's new
member exact_match:

	@@ -456,7 +456,8 @@ enum dmi_field {
	 };

	 struct dmi_strmatch {
	-       unsigned char slot;
	+       unsigned char slot:7;
	+       unsigned char exact_match:1;
		char substr[79];
	 };

Prior to 5017b285 we only had slot member so to use DMI_EXACT_MATCH() with its intent we'd have to do something like:

	slot |= 1

if its called. This however assumes though that older code has the sanity check as changed in 5017b285 on drivers/firmware/dmi_scan.c. dmi_scan.o gets linked with CONFIG_DMI. At least for x86 that gets objects sprinkled on arch/x86/, but more importantly CONFIG_DMI is bool. I've argued how I envision us being able to backport core components before (see 0935deab for the hint) but as it is right now we can't. We only backport things we can throw in as modular.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 5017b285 v3.11-rc1~99^2~254

commit 5017b2851373ee15c7035151853bb1448800cae2

Author: Jani Nikula <[email protected]>
Date:   Wed Jul 3 15:05:02 2013 -0700

dmi: add support for exact DMI matches in addition to substring matching

dmi_match() considers a substring match to be a successful match. This is not always sufficient to distinguish between DMI data for different systems. Add support for exact string matching using strcmp() in addition to the substring matching using strstr().

The specific use case in the i915 driver is to allow us to use an exact match for D510MO, without also incorrectly matching D510MOV:

{
.ident = "Intel D510MO",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Intel"), DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
},
}

---
 backport/backport-include/linux/mod_devicetable.h |    4 ++++
 1 file changed, 4 insertions(+)
backport/backport-include/linux/mod_devicetable.h +4 -0
index 1f85ce6..5b63637 100644
@@ -2,6 +2,10 @@
 #define __BACKPORT_MOD_DEVICETABLE_H
 #include_next <linux/mod_devicetable.h>
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+#define DMI_EXACT_MATCH(a, b)  { a, b }
+#endif
+
 #ifndef HID_BUS_ANY
 #define HID_BUS_ANY                            0xffff
 #endif
Signature · 1 line
1.7.10.4
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#11 lore raw

PATCH v2 8/10 backports: add clock enable/disable on soc_camera_power_[on|off]()

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

v4l2-core now supports enabling and disabling its own clock on turning the camera on / off. We backport v4l2-core fully so just backport the soc calls appropriately to let SOC cameras to turn the clock on / off when the v4l2-core clock ops are implemented on a device driver.

---
 .../backport-include/uapi/linux/v4l2-mediabus.h    |    8 +++--
 backport/compat/compat-3.4.c                       |   31 ++++++++++++++++----
 2 files changed, 31 insertions(+), 8 deletions(-)
backport/backport-include/uapi/linux/v4l2-mediabus.h +6 -2
index 9979c23..962f044 100644
@@ -20,15 +20,19 @@
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
 #if defined(CPTCFG_VIDEO_DEV_MODULE)
 
+#include <media/v4l2-clk.h>
+
 struct soc_camera_subdev_desc;
 
 #define soc_camera_power_on LINUX_BACKPORT(soc_camera_power_on)
 int soc_camera_power_on(struct device *dev,
-			struct soc_camera_subdev_desc *ssdd);
+			struct soc_camera_subdev_desc *ssdd,
+			struct v4l2_clk *clk);
 
 #define soc_camera_power_off LINUX_BACKPORT(soc_camera_power_off)
 int soc_camera_power_off(struct device *dev,
-			struct soc_camera_subdev_desc *ssdd);
+			struct soc_camera_subdev_desc *ssdd,
+			struct v4l2_clk *clk);
 
 #endif /* defined(CPTCFG_VIDEO_DEV_MODULE) */
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) */
backport/compat/compat-3.4.c +25 -6
index b72c69c..99dfb0c 100644
@@ -38,14 +38,21 @@
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
 
 #if defined(CPTCFG_VIDEO_V4L2_MODULE)
+#include <media/v4l2-clk.h>
 int soc_camera_power_on(struct device *dev,
-			struct soc_camera_subdev_desc *ssdd)
+			struct soc_camera_subdev_desc *ssdd,
+			struct v4l2_clk *clk)
 {
-	int ret = regulator_bulk_enable(ssdd->num_regulators,
+	int ret = clk ? v4l2_clk_enable(clk) : 0;
+	if (ret < 0) {
+		dev_err(dev, "Cannot enable clock: %d\n", ret);
+		return ret;
+	}
+	ret = regulator_bulk_enable(ssdd->num_regulators,
 					ssdd->regulators);
 	if (ret < 0) {
 		dev_err(dev, "Cannot enable regulators\n");
-		return ret;
+		goto eregenable;
 	}
 
 	if (ssdd->power) {
@@ -53,17 +60,26 @@ int soc_camera_power_on(struct device *dev,
 		if (ret < 0) {
 			dev_err(dev,
 				"Platform failed to power-on the camera.\n");
-			regulator_bulk_disable(ssdd->num_regulators,
-					       ssdd->regulators);
+			goto epwron;
 		}
 	}
 
+	return 0;
+
+epwron:
+	regulator_bulk_disable(ssdd->num_regulators,
+			       ssdd->regulators);
+eregenable:
+	if (clk)
+		v4l2_clk_disable(clk);
+
 	return ret;
 }
 EXPORT_SYMBOL_GPL(soc_camera_power_on);
 
 int soc_camera_power_off(struct device *dev,
-			 struct soc_camera_subdev_desc *ssdd)
+			 struct soc_camera_subdev_desc *ssdd,
+			 struct v4l2_clk *clk)
 {
 	int ret = 0;
 	int err;
@@ -84,6 +100,9 @@ int soc_camera_power_off(struct device *dev,
 		ret = ret ? : err;
 	}
 
+	if (clk)
+		v4l2_clk_disable(clk);
+
 	return ret;
 }
 EXPORT_SYMBOL_GPL(soc_camera_power_off);
Signature · 1 line
1.7.10.4
#12 lore raw

PATCH v2 9/10 backports: enable REGULATOR_MAX77693 on >= 3.6

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

There is a symbol missing otherwise that is currently only provided by the core, ie, non modular.

---
 copy-list    |    1 +
 dependencies |    1 +
 2 files changed, 2 insertions(+)
copy-list +1 -0
index 9c7be4a..9957811 100644
@@ -139,6 +139,7 @@ include/linux/regulator/max8649.h
 include/linux/regulator/max8660.h
 include/linux/regulator/max8952.h
 include/linux/regulator/max8973-regulator.h
+include/linux/mfd/max77693.h
 include/linux/mfd/max77693-private.h
 include/linux/regulator/of_regulator.h
 include/linux/regulator/tps51632-regulator.h
dependencies +1 -0
index e226b7a..6841613 100644
@@ -64,6 +64,7 @@ REGULATOR 3.4
 # requires some work
 REGULATOR_ARIZONA DISABLE
 REGULATOR_MAX8973 DISABLE
+REGULATOR_MAX77693 3.6
 REGULATOR_MAX77686 DISABLE
 REGULATOR_MAX8997 DISABLE
 REGULATOR_RC5T583 DISABLE
Signature · 1 line
1.7.10.4
#13 lore raw

PATCH v2 10/10 backports: lib/kconfig.py - fix src line regexp

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

The source line can be prefixed by spaces and tabs. Without this a slew of kconfig options were not being parsed for dependency checking and at compile time they'd obviously fail.

Tested with ckmake against next-20130627

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.79              [  OK  ]
18  3.1.10              [  OK  ]
19  3.10-rc1            [  OK  ]
20  3.2.45              [  OK  ]
21  3.3.8               [  OK  ]
22  3.4.46              [  OK  ]
23  3.5.7               [  OK  ]
24  3.6.11              [  OK  ]
25  3.7.10              [  OK  ]
26  3.8.13              [  OK  ]
27  3.9.3               [  OK  ]
real    34m5.379s
user    921m5.112s
sys     128m8.156s
---
 lib/kconfig.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/kconfig.py +1 -1
index 880d7c3..8a30ddc 100644
@@ -4,7 +4,7 @@
 
 import os, re
 
-src_line = re.compile(r'^source\s+"?(?P<src>[^\s"]*)"?\s*$')
+src_line = re.compile(r'^[\s]*source\s+"?(?P<src>[^\s"]*)"?\s*$')
 tri_line = re.compile(r'^(?P<spc>\s+)tristate')
 bool_line = re.compile(r'^(?P<spc>\s+)bool')
 cfg_line = re.compile(r'^(config|menuconfig)\s+(?P<sym>[^\s]*)')
Signature · 1 line
1.7.10.4
#14 lore raw

Re: [PATCH v2 10/10] backports: lib/kconfig.py - fix src line regexp

lib/kconfig.py line 7

Quoted 2 lines · Luis R. Rodriguez
lib/kconfig.py +1 -1
-src_line = re.compile(r'^source\s+"?(?P<src>[^\s"]*)"?\s*$')
+src_line = re.compile(r'^[\s]*source\s+"?(?P<src>[^\s"]*)"?\s*$')

Looks fine, not that I understand why you added [] when you have just a single character in there? Might be better to just write "\s*" (without the quotes, obviously)

johannes

#15 lore raw

Re: [PATCH v2 10/10] backports: lib/kconfig.py - fix src line regexp

Quoted 8 lines · Johannes Berg

lib/kconfig.py line 7

Quoted 2 lines · Luis R. Rodriguez
lib/kconfig.py +1 -1
-src_line = re.compile(r'^source\s+"?(?P<src>[^\s"]*)"?\s*$')
+src_line = re.compile(r'^[\s]*source\s+"?(?P<src>[^\s"]*)"?\s*$')

Looks fine, not that I understand why you added [] when you have just a single character in there? Might be better to just write "\s*" (without the quotes, obviously)

Will update, thanks for the review.

Lis