1 |
commit: 7ea8f1d01cce2c830bb7374831c9eec4b9fc1e32 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 1 10:33:07 2020 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 1 10:33:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7ea8f1d0 |
7 |
|
8 |
Linux patch 5.5.1 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1001_linux-5.5.1.patch | 2082 ++++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 2086 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index e1d45be..b1a233d 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -43,6 +43,10 @@ EXPERIMENTAL |
21 |
Individual Patch Descriptions: |
22 |
-------------------------------------------------------------------------- |
23 |
|
24 |
+Patch: 1000_linux-5.5.1.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.5.1 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1001_linux-5.5.1.patch b/1001_linux-5.5.1.patch |
33 |
new file mode 100644 |
34 |
index 0000000..b3d73e1 |
35 |
--- /dev/null |
36 |
+++ b/1001_linux-5.5.1.patch |
37 |
@@ -0,0 +1,2082 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 6a01b073915e..ec2caaef8b2d 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 5 |
46 |
+-SUBLEVEL = 0 |
47 |
++SUBLEVEL = 1 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Kleptomaniac Octopus |
50 |
+ |
51 |
+diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c |
52 |
+index 43487f035385..7a7e425616b5 100644 |
53 |
+--- a/arch/arm64/kvm/debug.c |
54 |
++++ b/arch/arm64/kvm/debug.c |
55 |
+@@ -101,7 +101,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) |
56 |
+ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) |
57 |
+ { |
58 |
+ bool trap_debug = !(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY); |
59 |
+- unsigned long mdscr; |
60 |
++ unsigned long mdscr, orig_mdcr_el2 = vcpu->arch.mdcr_el2; |
61 |
+ |
62 |
+ trace_kvm_arm_setup_debug(vcpu, vcpu->guest_debug); |
63 |
+ |
64 |
+@@ -197,6 +197,10 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) |
65 |
+ if (vcpu_read_sys_reg(vcpu, MDSCR_EL1) & (DBG_MDSCR_KDE | DBG_MDSCR_MDE)) |
66 |
+ vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY; |
67 |
+ |
68 |
++ /* Write mdcr_el2 changes since vcpu_load on VHE systems */ |
69 |
++ if (has_vhe() && orig_mdcr_el2 != vcpu->arch.mdcr_el2) |
70 |
++ write_sysreg(vcpu->arch.mdcr_el2, mdcr_el2); |
71 |
++ |
72 |
+ trace_kvm_arm_set_dreg32("MDCR_EL2", vcpu->arch.mdcr_el2); |
73 |
+ trace_kvm_arm_set_dreg32("MDSCR_EL1", vcpu_read_sys_reg(vcpu, MDSCR_EL1)); |
74 |
+ } |
75 |
+diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S |
76 |
+index 7145ce699982..eca6c452a41b 100644 |
77 |
+--- a/arch/um/include/asm/common.lds.S |
78 |
++++ b/arch/um/include/asm/common.lds.S |
79 |
+@@ -82,8 +82,8 @@ |
80 |
+ __preinit_array_end = .; |
81 |
+ } |
82 |
+ .init_array : { |
83 |
+- /* dummy - we call this ourselves */ |
84 |
+ __init_array_start = .; |
85 |
++ *(.init_array) |
86 |
+ __init_array_end = .; |
87 |
+ } |
88 |
+ .fini_array : { |
89 |
+diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S |
90 |
+index c69d69ee96be..f5001481010c 100644 |
91 |
+--- a/arch/um/kernel/dyn.lds.S |
92 |
++++ b/arch/um/kernel/dyn.lds.S |
93 |
+@@ -103,6 +103,7 @@ SECTIONS |
94 |
+ be empty, which isn't pretty. */ |
95 |
+ . = ALIGN(32 / 8); |
96 |
+ .preinit_array : { *(.preinit_array) } |
97 |
++ .init_array : { *(.init_array) } |
98 |
+ .fini_array : { *(.fini_array) } |
99 |
+ .data : { |
100 |
+ INIT_TASK_DATA(KERNEL_STACK_SIZE) |
101 |
+diff --git a/crypto/af_alg.c b/crypto/af_alg.c |
102 |
+index 0dceaabc6321..3d8e53010cda 100644 |
103 |
+--- a/crypto/af_alg.c |
104 |
++++ b/crypto/af_alg.c |
105 |
+@@ -134,11 +134,13 @@ void af_alg_release_parent(struct sock *sk) |
106 |
+ sk = ask->parent; |
107 |
+ ask = alg_sk(sk); |
108 |
+ |
109 |
+- lock_sock(sk); |
110 |
++ local_bh_disable(); |
111 |
++ bh_lock_sock(sk); |
112 |
+ ask->nokey_refcnt -= nokey; |
113 |
+ if (!last) |
114 |
+ last = !--ask->refcnt; |
115 |
+- release_sock(sk); |
116 |
++ bh_unlock_sock(sk); |
117 |
++ local_bh_enable(); |
118 |
+ |
119 |
+ if (last) |
120 |
+ sock_put(sk); |
121 |
+diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c |
122 |
+index 543792e0ebf0..81bbea7f2ba6 100644 |
123 |
+--- a/crypto/pcrypt.c |
124 |
++++ b/crypto/pcrypt.c |
125 |
+@@ -362,11 +362,12 @@ err: |
126 |
+ |
127 |
+ static void __exit pcrypt_exit(void) |
128 |
+ { |
129 |
++ crypto_unregister_template(&pcrypt_tmpl); |
130 |
++ |
131 |
+ pcrypt_fini_padata(pencrypt); |
132 |
+ pcrypt_fini_padata(pdecrypt); |
133 |
+ |
134 |
+ kset_unregister(pcrypt_kset); |
135 |
+- crypto_unregister_template(&pcrypt_tmpl); |
136 |
+ } |
137 |
+ |
138 |
+ subsys_initcall(pcrypt_init); |
139 |
+diff --git a/drivers/android/binder.c b/drivers/android/binder.c |
140 |
+index b2dad43dbf82..9fcc761031d8 100644 |
141 |
+--- a/drivers/android/binder.c |
142 |
++++ b/drivers/android/binder.c |
143 |
+@@ -5199,10 +5199,11 @@ err_bad_arg: |
144 |
+ |
145 |
+ static int binder_open(struct inode *nodp, struct file *filp) |
146 |
+ { |
147 |
+- struct binder_proc *proc; |
148 |
++ struct binder_proc *proc, *itr; |
149 |
+ struct binder_device *binder_dev; |
150 |
+ struct binderfs_info *info; |
151 |
+ struct dentry *binder_binderfs_dir_entry_proc = NULL; |
152 |
++ bool existing_pid = false; |
153 |
+ |
154 |
+ binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d:%d\n", __func__, |
155 |
+ current->group_leader->pid, current->pid); |
156 |
+@@ -5235,19 +5236,24 @@ static int binder_open(struct inode *nodp, struct file *filp) |
157 |
+ filp->private_data = proc; |
158 |
+ |
159 |
+ mutex_lock(&binder_procs_lock); |
160 |
++ hlist_for_each_entry(itr, &binder_procs, proc_node) { |
161 |
++ if (itr->pid == proc->pid) { |
162 |
++ existing_pid = true; |
163 |
++ break; |
164 |
++ } |
165 |
++ } |
166 |
+ hlist_add_head(&proc->proc_node, &binder_procs); |
167 |
+ mutex_unlock(&binder_procs_lock); |
168 |
+ |
169 |
+- if (binder_debugfs_dir_entry_proc) { |
170 |
++ if (binder_debugfs_dir_entry_proc && !existing_pid) { |
171 |
+ char strbuf[11]; |
172 |
+ |
173 |
+ snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); |
174 |
+ /* |
175 |
+- * proc debug entries are shared between contexts, so |
176 |
+- * this will fail if the process tries to open the driver |
177 |
+- * again with a different context. The priting code will |
178 |
+- * anyway print all contexts that a given PID has, so this |
179 |
+- * is not a problem. |
180 |
++ * proc debug entries are shared between contexts. |
181 |
++ * Only create for the first PID to avoid debugfs log spamming |
182 |
++ * The printing code will anyway print all contexts for a given |
183 |
++ * PID so this is not a problem. |
184 |
+ */ |
185 |
+ proc->debugfs_entry = debugfs_create_file(strbuf, 0444, |
186 |
+ binder_debugfs_dir_entry_proc, |
187 |
+@@ -5255,19 +5261,16 @@ static int binder_open(struct inode *nodp, struct file *filp) |
188 |
+ &proc_fops); |
189 |
+ } |
190 |
+ |
191 |
+- if (binder_binderfs_dir_entry_proc) { |
192 |
++ if (binder_binderfs_dir_entry_proc && !existing_pid) { |
193 |
+ char strbuf[11]; |
194 |
+ struct dentry *binderfs_entry; |
195 |
+ |
196 |
+ snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); |
197 |
+ /* |
198 |
+ * Similar to debugfs, the process specific log file is shared |
199 |
+- * between contexts. If the file has already been created for a |
200 |
+- * process, the following binderfs_create_file() call will |
201 |
+- * fail with error code EEXIST if another context of the same |
202 |
+- * process invoked binder_open(). This is ok since same as |
203 |
+- * debugfs, the log file will contain information on all |
204 |
+- * contexts of a given PID. |
205 |
++ * between contexts. Only create for the first PID. |
206 |
++ * This is ok since same as debugfs, the log file will contain |
207 |
++ * information on all contexts of a given PID. |
208 |
+ */ |
209 |
+ binderfs_entry = binderfs_create_file(binder_binderfs_dir_entry_proc, |
210 |
+ strbuf, &proc_fops, (void *)(unsigned long)proc->pid); |
211 |
+@@ -5277,10 +5280,8 @@ static int binder_open(struct inode *nodp, struct file *filp) |
212 |
+ int error; |
213 |
+ |
214 |
+ error = PTR_ERR(binderfs_entry); |
215 |
+- if (error != -EEXIST) { |
216 |
+- pr_warn("Unable to create file %s in binderfs (error %d)\n", |
217 |
+- strbuf, error); |
218 |
+- } |
219 |
++ pr_warn("Unable to create file %s in binderfs (error %d)\n", |
220 |
++ strbuf, error); |
221 |
+ } |
222 |
+ } |
223 |
+ |
224 |
+diff --git a/drivers/base/component.c b/drivers/base/component.c |
225 |
+index 532a3a5d8f63..1fdbd6ff2058 100644 |
226 |
+--- a/drivers/base/component.c |
227 |
++++ b/drivers/base/component.c |
228 |
+@@ -102,11 +102,11 @@ static int component_devices_show(struct seq_file *s, void *data) |
229 |
+ seq_printf(s, "%-40s %20s\n", "device name", "status"); |
230 |
+ seq_puts(s, "-------------------------------------------------------------\n"); |
231 |
+ for (i = 0; i < match->num; i++) { |
232 |
+- struct device *d = (struct device *)match->compare[i].data; |
233 |
++ struct component *component = match->compare[i].component; |
234 |
+ |
235 |
+- seq_printf(s, "%-40s %20s\n", dev_name(d), |
236 |
+- match->compare[i].component ? |
237 |
+- "registered" : "not registered"); |
238 |
++ seq_printf(s, "%-40s %20s\n", |
239 |
++ component ? dev_name(component->dev) : "(unknown)", |
240 |
++ component ? (component->bound ? "bound" : "not bound") : "not registered"); |
241 |
+ } |
242 |
+ mutex_unlock(&component_mutex); |
243 |
+ |
244 |
+diff --git a/drivers/base/test/test_async_driver_probe.c b/drivers/base/test/test_async_driver_probe.c |
245 |
+index f4b1d8e54daf..3bb7beb127a9 100644 |
246 |
+--- a/drivers/base/test/test_async_driver_probe.c |
247 |
++++ b/drivers/base/test/test_async_driver_probe.c |
248 |
+@@ -44,7 +44,8 @@ static int test_probe(struct platform_device *pdev) |
249 |
+ * performing an async init on that node. |
250 |
+ */ |
251 |
+ if (dev->driver->probe_type == PROBE_PREFER_ASYNCHRONOUS) { |
252 |
+- if (dev_to_node(dev) != numa_node_id()) { |
253 |
++ if (IS_ENABLED(CONFIG_NUMA) && |
254 |
++ dev_to_node(dev) != numa_node_id()) { |
255 |
+ dev_warn(dev, "NUMA node mismatch %d != %d\n", |
256 |
+ dev_to_node(dev), numa_node_id()); |
257 |
+ atomic_inc(&warnings); |
258 |
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c |
259 |
+index 70e385987d41..b6bf5c195d94 100644 |
260 |
+--- a/drivers/bluetooth/btusb.c |
261 |
++++ b/drivers/bluetooth/btusb.c |
262 |
+@@ -2602,7 +2602,7 @@ static void btusb_mtk_wmt_recv(struct urb *urb) |
263 |
+ * and being processed the events from there then. |
264 |
+ */ |
265 |
+ if (test_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags)) { |
266 |
+- data->evt_skb = skb_clone(skb, GFP_KERNEL); |
267 |
++ data->evt_skb = skb_clone(skb, GFP_ATOMIC); |
268 |
+ if (!data->evt_skb) |
269 |
+ goto err_out; |
270 |
+ } |
271 |
+diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c |
272 |
+index d7c3c3805693..3e811fcc6b83 100644 |
273 |
+--- a/drivers/crypto/caam/ctrl.c |
274 |
++++ b/drivers/crypto/caam/ctrl.c |
275 |
+@@ -671,11 +671,9 @@ static int caam_probe(struct platform_device *pdev) |
276 |
+ of_node_put(np); |
277 |
+ |
278 |
+ if (!ctrlpriv->mc_en) |
279 |
+- clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK | MCFGR_LONG_PTR, |
280 |
++ clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK, |
281 |
+ MCFGR_AWCACHE_CACH | MCFGR_AWCACHE_BUFF | |
282 |
+- MCFGR_WDENABLE | MCFGR_LARGE_BURST | |
283 |
+- (sizeof(dma_addr_t) == sizeof(u64) ? |
284 |
+- MCFGR_LONG_PTR : 0)); |
285 |
++ MCFGR_WDENABLE | MCFGR_LARGE_BURST); |
286 |
+ |
287 |
+ handle_imx6_err005766(&ctrl->mcr); |
288 |
+ |
289 |
+diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c |
290 |
+index 1b4a5664e604..d483eed030ee 100644 |
291 |
+--- a/drivers/crypto/chelsio/chcr_algo.c |
292 |
++++ b/drivers/crypto/chelsio/chcr_algo.c |
293 |
+@@ -3195,9 +3195,6 @@ static int chcr_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) |
294 |
+ aeadctx->mayverify = VERIFY_SW; |
295 |
+ break; |
296 |
+ default: |
297 |
+- |
298 |
+- crypto_tfm_set_flags((struct crypto_tfm *) tfm, |
299 |
+- CRYPTO_TFM_RES_BAD_KEY_LEN); |
300 |
+ return -EINVAL; |
301 |
+ } |
302 |
+ return crypto_aead_setauthsize(aeadctx->sw_cipher, authsize); |
303 |
+@@ -3222,8 +3219,6 @@ static int chcr_4106_4309_setauthsize(struct crypto_aead *tfm, |
304 |
+ aeadctx->mayverify = VERIFY_HW; |
305 |
+ break; |
306 |
+ default: |
307 |
+- crypto_tfm_set_flags((struct crypto_tfm *)tfm, |
308 |
+- CRYPTO_TFM_RES_BAD_KEY_LEN); |
309 |
+ return -EINVAL; |
310 |
+ } |
311 |
+ return crypto_aead_setauthsize(aeadctx->sw_cipher, authsize); |
312 |
+@@ -3264,8 +3259,6 @@ static int chcr_ccm_setauthsize(struct crypto_aead *tfm, |
313 |
+ aeadctx->mayverify = VERIFY_HW; |
314 |
+ break; |
315 |
+ default: |
316 |
+- crypto_tfm_set_flags((struct crypto_tfm *)tfm, |
317 |
+- CRYPTO_TFM_RES_BAD_KEY_LEN); |
318 |
+ return -EINVAL; |
319 |
+ } |
320 |
+ return crypto_aead_setauthsize(aeadctx->sw_cipher, authsize); |
321 |
+@@ -3290,8 +3283,7 @@ static int chcr_ccm_common_setkey(struct crypto_aead *aead, |
322 |
+ ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256; |
323 |
+ mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_256; |
324 |
+ } else { |
325 |
+- crypto_tfm_set_flags((struct crypto_tfm *)aead, |
326 |
+- CRYPTO_TFM_RES_BAD_KEY_LEN); |
327 |
++ crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN); |
328 |
+ aeadctx->enckey_len = 0; |
329 |
+ return -EINVAL; |
330 |
+ } |
331 |
+@@ -3329,8 +3321,7 @@ static int chcr_aead_rfc4309_setkey(struct crypto_aead *aead, const u8 *key, |
332 |
+ int error; |
333 |
+ |
334 |
+ if (keylen < 3) { |
335 |
+- crypto_tfm_set_flags((struct crypto_tfm *)aead, |
336 |
+- CRYPTO_TFM_RES_BAD_KEY_LEN); |
337 |
++ crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN); |
338 |
+ aeadctx->enckey_len = 0; |
339 |
+ return -EINVAL; |
340 |
+ } |
341 |
+@@ -3380,8 +3371,7 @@ static int chcr_gcm_setkey(struct crypto_aead *aead, const u8 *key, |
342 |
+ } else if (keylen == AES_KEYSIZE_256) { |
343 |
+ ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256; |
344 |
+ } else { |
345 |
+- crypto_tfm_set_flags((struct crypto_tfm *)aead, |
346 |
+- CRYPTO_TFM_RES_BAD_KEY_LEN); |
347 |
++ crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN); |
348 |
+ pr_err("GCM: Invalid key length %d\n", keylen); |
349 |
+ ret = -EINVAL; |
350 |
+ goto out; |
351 |
+diff --git a/drivers/crypto/vmx/aes_xts.c b/drivers/crypto/vmx/aes_xts.c |
352 |
+index d59e736882f6..9fee1b1532a4 100644 |
353 |
+--- a/drivers/crypto/vmx/aes_xts.c |
354 |
++++ b/drivers/crypto/vmx/aes_xts.c |
355 |
+@@ -84,6 +84,9 @@ static int p8_aes_xts_crypt(struct skcipher_request *req, int enc) |
356 |
+ u8 tweak[AES_BLOCK_SIZE]; |
357 |
+ int ret; |
358 |
+ |
359 |
++ if (req->cryptlen < AES_BLOCK_SIZE) |
360 |
++ return -EINVAL; |
361 |
++ |
362 |
+ if (!crypto_simd_usable() || (req->cryptlen % XTS_BLOCK_SIZE) != 0) { |
363 |
+ struct skcipher_request *subreq = skcipher_request_ctx(req); |
364 |
+ |
365 |
+diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c |
366 |
+index e493242c266e..0339ecdd06bd 100644 |
367 |
+--- a/drivers/iio/adc/stm32-dfsdm-adc.c |
368 |
++++ b/drivers/iio/adc/stm32-dfsdm-adc.c |
369 |
+@@ -1204,6 +1204,8 @@ static int stm32_dfsdm_single_conv(struct iio_dev *indio_dev, |
370 |
+ |
371 |
+ stm32_dfsdm_stop_conv(adc); |
372 |
+ |
373 |
++ stm32_dfsdm_process_data(adc, res); |
374 |
++ |
375 |
+ stop_dfsdm: |
376 |
+ stm32_dfsdm_stop_dfsdm(adc->dfsdm); |
377 |
+ |
378 |
+diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c |
379 |
+index 57be68b291fa..26c50b24bc08 100644 |
380 |
+--- a/drivers/iio/gyro/st_gyro_core.c |
381 |
++++ b/drivers/iio/gyro/st_gyro_core.c |
382 |
+@@ -138,7 +138,6 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = { |
383 |
+ [2] = LSM330DLC_GYRO_DEV_NAME, |
384 |
+ [3] = L3G4IS_GYRO_DEV_NAME, |
385 |
+ [4] = LSM330_GYRO_DEV_NAME, |
386 |
+- [5] = LSM9DS0_GYRO_DEV_NAME, |
387 |
+ }, |
388 |
+ .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, |
389 |
+ .odr = { |
390 |
+@@ -208,6 +207,80 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = { |
391 |
+ .multi_read_bit = true, |
392 |
+ .bootime = 2, |
393 |
+ }, |
394 |
++ { |
395 |
++ .wai = 0xd4, |
396 |
++ .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, |
397 |
++ .sensors_supported = { |
398 |
++ [0] = LSM9DS0_GYRO_DEV_NAME, |
399 |
++ }, |
400 |
++ .ch = (struct iio_chan_spec *)st_gyro_16bit_channels, |
401 |
++ .odr = { |
402 |
++ .addr = 0x20, |
403 |
++ .mask = GENMASK(7, 6), |
404 |
++ .odr_avl = { |
405 |
++ { .hz = 95, .value = 0x00, }, |
406 |
++ { .hz = 190, .value = 0x01, }, |
407 |
++ { .hz = 380, .value = 0x02, }, |
408 |
++ { .hz = 760, .value = 0x03, }, |
409 |
++ }, |
410 |
++ }, |
411 |
++ .pw = { |
412 |
++ .addr = 0x20, |
413 |
++ .mask = BIT(3), |
414 |
++ .value_on = ST_SENSORS_DEFAULT_POWER_ON_VALUE, |
415 |
++ .value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE, |
416 |
++ }, |
417 |
++ .enable_axis = { |
418 |
++ .addr = ST_SENSORS_DEFAULT_AXIS_ADDR, |
419 |
++ .mask = ST_SENSORS_DEFAULT_AXIS_MASK, |
420 |
++ }, |
421 |
++ .fs = { |
422 |
++ .addr = 0x23, |
423 |
++ .mask = GENMASK(5, 4), |
424 |
++ .fs_avl = { |
425 |
++ [0] = { |
426 |
++ .num = ST_GYRO_FS_AVL_245DPS, |
427 |
++ .value = 0x00, |
428 |
++ .gain = IIO_DEGREE_TO_RAD(8750), |
429 |
++ }, |
430 |
++ [1] = { |
431 |
++ .num = ST_GYRO_FS_AVL_500DPS, |
432 |
++ .value = 0x01, |
433 |
++ .gain = IIO_DEGREE_TO_RAD(17500), |
434 |
++ }, |
435 |
++ [2] = { |
436 |
++ .num = ST_GYRO_FS_AVL_2000DPS, |
437 |
++ .value = 0x02, |
438 |
++ .gain = IIO_DEGREE_TO_RAD(70000), |
439 |
++ }, |
440 |
++ }, |
441 |
++ }, |
442 |
++ .bdu = { |
443 |
++ .addr = 0x23, |
444 |
++ .mask = BIT(7), |
445 |
++ }, |
446 |
++ .drdy_irq = { |
447 |
++ .int2 = { |
448 |
++ .addr = 0x22, |
449 |
++ .mask = BIT(3), |
450 |
++ }, |
451 |
++ /* |
452 |
++ * The sensor has IHL (active low) and open |
453 |
++ * drain settings, but only for INT1 and not |
454 |
++ * for the DRDY line on INT2. |
455 |
++ */ |
456 |
++ .stat_drdy = { |
457 |
++ .addr = ST_SENSORS_DEFAULT_STAT_ADDR, |
458 |
++ .mask = GENMASK(2, 0), |
459 |
++ }, |
460 |
++ }, |
461 |
++ .sim = { |
462 |
++ .addr = 0x23, |
463 |
++ .value = BIT(0), |
464 |
++ }, |
465 |
++ .multi_read_bit = true, |
466 |
++ .bootime = 2, |
467 |
++ }, |
468 |
+ { |
469 |
+ .wai = 0xd7, |
470 |
+ .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, |
471 |
+diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c |
472 |
+index 93027fd96c71..4c596c646ac0 100644 |
473 |
+--- a/drivers/misc/mei/hdcp/mei_hdcp.c |
474 |
++++ b/drivers/misc/mei/hdcp/mei_hdcp.c |
475 |
+@@ -757,11 +757,38 @@ static const struct component_master_ops mei_component_master_ops = { |
476 |
+ .unbind = mei_component_master_unbind, |
477 |
+ }; |
478 |
+ |
479 |
++/** |
480 |
++ * mei_hdcp_component_match - compare function for matching mei hdcp. |
481 |
++ * |
482 |
++ * The function checks if the driver is i915, the subcomponent is HDCP |
483 |
++ * and the grand parent of hdcp and the parent of i915 are the same |
484 |
++ * PCH device. |
485 |
++ * |
486 |
++ * @dev: master device |
487 |
++ * @subcomponent: subcomponent to match (I915_COMPONENT_HDCP) |
488 |
++ * @data: compare data (mei hdcp device) |
489 |
++ * |
490 |
++ * Return: |
491 |
++ * * 1 - if components match |
492 |
++ * * 0 - otherwise |
493 |
++ */ |
494 |
+ static int mei_hdcp_component_match(struct device *dev, int subcomponent, |
495 |
+ void *data) |
496 |
+ { |
497 |
+- return !strcmp(dev->driver->name, "i915") && |
498 |
+- subcomponent == I915_COMPONENT_HDCP; |
499 |
++ struct device *base = data; |
500 |
++ |
501 |
++ if (strcmp(dev->driver->name, "i915") || |
502 |
++ subcomponent != I915_COMPONENT_HDCP) |
503 |
++ return 0; |
504 |
++ |
505 |
++ base = base->parent; |
506 |
++ if (!base) |
507 |
++ return 0; |
508 |
++ |
509 |
++ base = base->parent; |
510 |
++ dev = dev->parent; |
511 |
++ |
512 |
++ return (base && dev && dev == base); |
513 |
+ } |
514 |
+ |
515 |
+ static int mei_hdcp_probe(struct mei_cl_device *cldev, |
516 |
+@@ -785,7 +812,7 @@ static int mei_hdcp_probe(struct mei_cl_device *cldev, |
517 |
+ |
518 |
+ master_match = NULL; |
519 |
+ component_match_add_typed(&cldev->dev, &master_match, |
520 |
+- mei_hdcp_component_match, comp_master); |
521 |
++ mei_hdcp_component_match, &cldev->dev); |
522 |
+ if (IS_ERR_OR_NULL(master_match)) { |
523 |
+ ret = -ENOMEM; |
524 |
+ goto err_exit; |
525 |
+diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h |
526 |
+index 7cd67fb2365d..87a0201ba6b3 100644 |
527 |
+--- a/drivers/misc/mei/hw-me-regs.h |
528 |
++++ b/drivers/misc/mei/hw-me-regs.h |
529 |
+@@ -81,10 +81,16 @@ |
530 |
+ |
531 |
+ #define MEI_DEV_ID_CMP_LP 0x02e0 /* Comet Point LP */ |
532 |
+ #define MEI_DEV_ID_CMP_LP_3 0x02e4 /* Comet Point LP 3 (iTouch) */ |
533 |
++ |
534 |
+ #define MEI_DEV_ID_CMP_V 0xA3BA /* Comet Point Lake V */ |
535 |
+ |
536 |
++#define MEI_DEV_ID_CMP_H 0x06e0 /* Comet Lake H */ |
537 |
++#define MEI_DEV_ID_CMP_H_3 0x06e4 /* Comet Lake H 3 (iTouch) */ |
538 |
++ |
539 |
+ #define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */ |
540 |
+ |
541 |
++#define MEI_DEV_ID_JSP_N 0x4DE0 /* Jasper Lake Point N */ |
542 |
++ |
543 |
+ #define MEI_DEV_ID_TGP_LP 0xA0E0 /* Tiger Lake Point LP */ |
544 |
+ |
545 |
+ #define MEI_DEV_ID_MCC 0x4B70 /* Mule Creek Canyon (EHL) */ |
546 |
+diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c |
547 |
+index c845b7e40f26..2711451b3d87 100644 |
548 |
+--- a/drivers/misc/mei/pci-me.c |
549 |
++++ b/drivers/misc/mei/pci-me.c |
550 |
+@@ -99,11 +99,15 @@ static const struct pci_device_id mei_me_pci_tbl[] = { |
551 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP, MEI_ME_PCH12_CFG)}, |
552 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP_3, MEI_ME_PCH8_CFG)}, |
553 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_V, MEI_ME_PCH12_CFG)}, |
554 |
++ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H, MEI_ME_PCH12_CFG)}, |
555 |
++ {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H_3, MEI_ME_PCH8_CFG)}, |
556 |
+ |
557 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)}, |
558 |
+ |
559 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)}, |
560 |
+ |
561 |
++ {MEI_PCI_DEVICE(MEI_DEV_ID_JSP_N, MEI_ME_PCH15_CFG)}, |
562 |
++ |
563 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_MCC, MEI_ME_PCH15_CFG)}, |
564 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_MCC_4, MEI_ME_PCH8_CFG)}, |
565 |
+ |
566 |
+diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c |
567 |
+index 67ad8b8b127d..8bad5b864682 100644 |
568 |
+--- a/drivers/net/ethernet/marvell/mvneta.c |
569 |
++++ b/drivers/net/ethernet/marvell/mvneta.c |
570 |
+@@ -4226,6 +4226,12 @@ static int mvneta_xdp_setup(struct net_device *dev, struct bpf_prog *prog, |
571 |
+ return -EOPNOTSUPP; |
572 |
+ } |
573 |
+ |
574 |
++ if (pp->bm_priv) { |
575 |
++ NL_SET_ERR_MSG_MOD(extack, |
576 |
++ "Hardware Buffer Management not supported on XDP"); |
577 |
++ return -EOPNOTSUPP; |
578 |
++ } |
579 |
++ |
580 |
+ need_update = !!pp->xdp_prog != !!prog; |
581 |
+ if (running && need_update) |
582 |
+ mvneta_stop(dev); |
583 |
+diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c |
584 |
+index 2b543911ae00..c4caeeadcba9 100644 |
585 |
+--- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c |
586 |
++++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c |
587 |
+@@ -213,8 +213,8 @@ mlxsw_m_port_create(struct mlxsw_m *mlxsw_m, u8 local_port, u8 module) |
588 |
+ |
589 |
+ err_register_netdev: |
590 |
+ mlxsw_m->ports[local_port] = NULL; |
591 |
+- free_netdev(dev); |
592 |
+ err_dev_addr_get: |
593 |
++ free_netdev(dev); |
594 |
+ err_alloc_etherdev: |
595 |
+ mlxsw_core_port_fini(mlxsw_m->core, local_port); |
596 |
+ return err; |
597 |
+diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c |
598 |
+index 869a498e3b5e..56c0e643f430 100644 |
599 |
+--- a/drivers/net/ethernet/socionext/netsec.c |
600 |
++++ b/drivers/net/ethernet/socionext/netsec.c |
601 |
+@@ -929,7 +929,6 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget) |
602 |
+ struct netsec_rx_pkt_info rx_info; |
603 |
+ enum dma_data_direction dma_dir; |
604 |
+ struct bpf_prog *xdp_prog; |
605 |
+- struct sk_buff *skb = NULL; |
606 |
+ u16 xdp_xmit = 0; |
607 |
+ u32 xdp_act = 0; |
608 |
+ int done = 0; |
609 |
+@@ -943,7 +942,8 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget) |
610 |
+ struct netsec_de *de = dring->vaddr + (DESC_SZ * idx); |
611 |
+ struct netsec_desc *desc = &dring->desc[idx]; |
612 |
+ struct page *page = virt_to_page(desc->addr); |
613 |
+- u32 xdp_result = XDP_PASS; |
614 |
++ u32 xdp_result = NETSEC_XDP_PASS; |
615 |
++ struct sk_buff *skb = NULL; |
616 |
+ u16 pkt_len, desc_len; |
617 |
+ dma_addr_t dma_handle; |
618 |
+ struct xdp_buff xdp; |
619 |
+diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c |
620 |
+index fb649d85b8fc..dd0c32379375 100644 |
621 |
+--- a/drivers/net/wireless/ath/ath9k/hif_usb.c |
622 |
++++ b/drivers/net/wireless/ath/ath9k/hif_usb.c |
623 |
+@@ -1216,7 +1216,7 @@ err_fw: |
624 |
+ static int send_eject_command(struct usb_interface *interface) |
625 |
+ { |
626 |
+ struct usb_device *udev = interface_to_usbdev(interface); |
627 |
+- struct usb_host_interface *iface_desc = &interface->altsetting[0]; |
628 |
++ struct usb_host_interface *iface_desc = interface->cur_altsetting; |
629 |
+ struct usb_endpoint_descriptor *endpoint; |
630 |
+ unsigned char *cmd; |
631 |
+ u8 bulk_out_ep; |
632 |
+diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c |
633 |
+index 06f3c01f10b3..7cdfde9b3dea 100644 |
634 |
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c |
635 |
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c |
636 |
+@@ -1348,7 +1348,7 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) |
637 |
+ goto fail; |
638 |
+ } |
639 |
+ |
640 |
+- desc = &intf->altsetting[0].desc; |
641 |
++ desc = &intf->cur_altsetting->desc; |
642 |
+ if ((desc->bInterfaceClass != USB_CLASS_VENDOR_SPEC) || |
643 |
+ (desc->bInterfaceSubClass != 2) || |
644 |
+ (desc->bInterfaceProtocol != 0xff)) { |
645 |
+@@ -1361,7 +1361,7 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) |
646 |
+ |
647 |
+ num_of_eps = desc->bNumEndpoints; |
648 |
+ for (ep = 0; ep < num_of_eps; ep++) { |
649 |
+- endpoint = &intf->altsetting[0].endpoint[ep].desc; |
650 |
++ endpoint = &intf->cur_altsetting->endpoint[ep].desc; |
651 |
+ endpoint_num = usb_endpoint_num(endpoint); |
652 |
+ if (!usb_endpoint_xfer_bulk(endpoint)) |
653 |
+ continue; |
654 |
+diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c |
655 |
+index 40a8b941ad5c..8c79b963bcff 100644 |
656 |
+--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c |
657 |
++++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c |
658 |
+@@ -1608,9 +1608,9 @@ static int ezusb_probe(struct usb_interface *interface, |
659 |
+ /* set up the endpoint information */ |
660 |
+ /* check out the endpoints */ |
661 |
+ |
662 |
+- iface_desc = &interface->altsetting[0].desc; |
663 |
++ iface_desc = &interface->cur_altsetting->desc; |
664 |
+ for (i = 0; i < iface_desc->bNumEndpoints; ++i) { |
665 |
+- ep = &interface->altsetting[0].endpoint[i].desc; |
666 |
++ ep = &interface->cur_altsetting->endpoint[i].desc; |
667 |
+ |
668 |
+ if (usb_endpoint_is_bulk_in(ep)) { |
669 |
+ /* we found a bulk in endpoint */ |
670 |
+diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c |
671 |
+index aa2bb2ae9809..54a1a4ea107b 100644 |
672 |
+--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c |
673 |
++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c |
674 |
+@@ -6384,7 +6384,7 @@ static int rtl8xxxu_parse_usb(struct rtl8xxxu_priv *priv, |
675 |
+ u8 dir, xtype, num; |
676 |
+ int ret = 0; |
677 |
+ |
678 |
+- host_interface = &interface->altsetting[0]; |
679 |
++ host_interface = interface->cur_altsetting; |
680 |
+ interface_desc = &host_interface->desc; |
681 |
+ endpoints = interface_desc->bNumEndpoints; |
682 |
+ |
683 |
+diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c |
684 |
+index f84250bdb8cf..6f8d5f9a9f7e 100644 |
685 |
+--- a/drivers/net/wireless/rsi/rsi_91x_hal.c |
686 |
++++ b/drivers/net/wireless/rsi/rsi_91x_hal.c |
687 |
+@@ -622,6 +622,7 @@ static int bl_cmd(struct rsi_hw *adapter, u8 cmd, u8 exp_resp, char *str) |
688 |
+ bl_start_cmd_timer(adapter, timeout); |
689 |
+ status = bl_write_cmd(adapter, cmd, exp_resp, ®out_val); |
690 |
+ if (status < 0) { |
691 |
++ bl_stop_cmd_timer(adapter); |
692 |
+ rsi_dbg(ERR_ZONE, |
693 |
+ "%s: Command %s (%0x) writing failed..\n", |
694 |
+ __func__, str, cmd); |
695 |
+@@ -737,10 +738,9 @@ static int ping_pong_write(struct rsi_hw *adapter, u8 cmd, u8 *addr, u32 size) |
696 |
+ } |
697 |
+ |
698 |
+ status = bl_cmd(adapter, cmd_req, cmd_resp, str); |
699 |
+- if (status) { |
700 |
+- bl_stop_cmd_timer(adapter); |
701 |
++ if (status) |
702 |
+ return status; |
703 |
+- } |
704 |
++ |
705 |
+ return 0; |
706 |
+ } |
707 |
+ |
708 |
+@@ -828,10 +828,9 @@ static int auto_fw_upgrade(struct rsi_hw *adapter, u8 *flash_content, |
709 |
+ |
710 |
+ status = bl_cmd(adapter, EOF_REACHED, FW_LOADING_SUCCESSFUL, |
711 |
+ "EOF_REACHED"); |
712 |
+- if (status) { |
713 |
+- bl_stop_cmd_timer(adapter); |
714 |
++ if (status) |
715 |
+ return status; |
716 |
+- } |
717 |
++ |
718 |
+ rsi_dbg(INFO_ZONE, "FW loading is done and FW is running..\n"); |
719 |
+ return 0; |
720 |
+ } |
721 |
+@@ -849,6 +848,7 @@ static int rsi_hal_prepare_fwload(struct rsi_hw *adapter) |
722 |
+ ®out_val, |
723 |
+ RSI_COMMON_REG_SIZE); |
724 |
+ if (status < 0) { |
725 |
++ bl_stop_cmd_timer(adapter); |
726 |
+ rsi_dbg(ERR_ZONE, |
727 |
+ "%s: REGOUT read failed\n", __func__); |
728 |
+ return status; |
729 |
+diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c |
730 |
+index 53f41fc2cadf..668585010cd6 100644 |
731 |
+--- a/drivers/net/wireless/rsi/rsi_91x_usb.c |
732 |
++++ b/drivers/net/wireless/rsi/rsi_91x_usb.c |
733 |
+@@ -16,6 +16,7 @@ |
734 |
+ */ |
735 |
+ |
736 |
+ #include <linux/module.h> |
737 |
++#include <linux/types.h> |
738 |
+ #include <net/rsi_91x.h> |
739 |
+ #include "rsi_usb.h" |
740 |
+ #include "rsi_hal.h" |
741 |
+@@ -29,7 +30,7 @@ MODULE_PARM_DESC(dev_oper_mode, |
742 |
+ "9[Wi-Fi STA + BT LE], 13[Wi-Fi STA + BT classic + BT LE]\n" |
743 |
+ "6[AP + BT classic], 14[AP + BT classic + BT LE]"); |
744 |
+ |
745 |
+-static int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num); |
746 |
++static int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num, gfp_t flags); |
747 |
+ |
748 |
+ /** |
749 |
+ * rsi_usb_card_write() - This function writes to the USB Card. |
750 |
+@@ -117,7 +118,7 @@ static int rsi_find_bulk_in_and_out_endpoints(struct usb_interface *interface, |
751 |
+ __le16 buffer_size; |
752 |
+ int ii, bin_found = 0, bout_found = 0; |
753 |
+ |
754 |
+- iface_desc = &(interface->altsetting[0]); |
755 |
++ iface_desc = interface->cur_altsetting; |
756 |
+ |
757 |
+ for (ii = 0; ii < iface_desc->desc.bNumEndpoints; ++ii) { |
758 |
+ endpoint = &(iface_desc->endpoint[ii].desc); |
759 |
+@@ -285,20 +286,29 @@ static void rsi_rx_done_handler(struct urb *urb) |
760 |
+ status = 0; |
761 |
+ |
762 |
+ out: |
763 |
+- if (rsi_rx_urb_submit(dev->priv, rx_cb->ep_num)) |
764 |
++ if (rsi_rx_urb_submit(dev->priv, rx_cb->ep_num, GFP_ATOMIC)) |
765 |
+ rsi_dbg(ERR_ZONE, "%s: Failed in urb submission", __func__); |
766 |
+ |
767 |
+ if (status) |
768 |
+ dev_kfree_skb(rx_cb->rx_skb); |
769 |
+ } |
770 |
+ |
771 |
++static void rsi_rx_urb_kill(struct rsi_hw *adapter, u8 ep_num) |
772 |
++{ |
773 |
++ struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; |
774 |
++ struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num - 1]; |
775 |
++ struct urb *urb = rx_cb->rx_urb; |
776 |
++ |
777 |
++ usb_kill_urb(urb); |
778 |
++} |
779 |
++ |
780 |
+ /** |
781 |
+ * rsi_rx_urb_submit() - This function submits the given URB to the USB stack. |
782 |
+ * @adapter: Pointer to the adapter structure. |
783 |
+ * |
784 |
+ * Return: 0 on success, a negative error code on failure. |
785 |
+ */ |
786 |
+-static int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num) |
787 |
++static int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num, gfp_t mem_flags) |
788 |
+ { |
789 |
+ struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; |
790 |
+ struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num - 1]; |
791 |
+@@ -328,9 +338,11 @@ static int rsi_rx_urb_submit(struct rsi_hw *adapter, u8 ep_num) |
792 |
+ rsi_rx_done_handler, |
793 |
+ rx_cb); |
794 |
+ |
795 |
+- status = usb_submit_urb(urb, GFP_KERNEL); |
796 |
+- if (status) |
797 |
++ status = usb_submit_urb(urb, mem_flags); |
798 |
++ if (status) { |
799 |
+ rsi_dbg(ERR_ZONE, "%s: Failed in urb submission\n", __func__); |
800 |
++ dev_kfree_skb(skb); |
801 |
++ } |
802 |
+ |
803 |
+ return status; |
804 |
+ } |
805 |
+@@ -816,17 +828,20 @@ static int rsi_probe(struct usb_interface *pfunction, |
806 |
+ rsi_dbg(INIT_ZONE, "%s: Device Init Done\n", __func__); |
807 |
+ } |
808 |
+ |
809 |
+- status = rsi_rx_urb_submit(adapter, WLAN_EP); |
810 |
++ status = rsi_rx_urb_submit(adapter, WLAN_EP, GFP_KERNEL); |
811 |
+ if (status) |
812 |
+ goto err1; |
813 |
+ |
814 |
+ if (adapter->priv->coex_mode > 1) { |
815 |
+- status = rsi_rx_urb_submit(adapter, BT_EP); |
816 |
++ status = rsi_rx_urb_submit(adapter, BT_EP, GFP_KERNEL); |
817 |
+ if (status) |
818 |
+- goto err1; |
819 |
++ goto err_kill_wlan_urb; |
820 |
+ } |
821 |
+ |
822 |
+ return 0; |
823 |
++ |
824 |
++err_kill_wlan_urb: |
825 |
++ rsi_rx_urb_kill(adapter, WLAN_EP); |
826 |
+ err1: |
827 |
+ rsi_deinit_usb_interface(adapter); |
828 |
+ err: |
829 |
+@@ -857,6 +872,10 @@ static void rsi_disconnect(struct usb_interface *pfunction) |
830 |
+ adapter->priv->bt_adapter = NULL; |
831 |
+ } |
832 |
+ |
833 |
++ if (adapter->priv->coex_mode > 1) |
834 |
++ rsi_rx_urb_kill(adapter, BT_EP); |
835 |
++ rsi_rx_urb_kill(adapter, WLAN_EP); |
836 |
++ |
837 |
+ rsi_reset_card(adapter); |
838 |
+ rsi_deinit_usb_interface(adapter); |
839 |
+ rsi_91x_deinit(adapter); |
840 |
+diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c |
841 |
+index 7b5c2fe5bd4d..8ff0374126e4 100644 |
842 |
+--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c |
843 |
++++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c |
844 |
+@@ -1263,7 +1263,7 @@ static void print_id(struct usb_device *udev) |
845 |
+ static int eject_installer(struct usb_interface *intf) |
846 |
+ { |
847 |
+ struct usb_device *udev = interface_to_usbdev(intf); |
848 |
+- struct usb_host_interface *iface_desc = &intf->altsetting[0]; |
849 |
++ struct usb_host_interface *iface_desc = intf->cur_altsetting; |
850 |
+ struct usb_endpoint_descriptor *endpoint; |
851 |
+ unsigned char *cmd; |
852 |
+ u8 bulk_out_ep; |
853 |
+diff --git a/drivers/power/supply/ingenic-battery.c b/drivers/power/supply/ingenic-battery.c |
854 |
+index 35816d4b3012..2748715c4c75 100644 |
855 |
+--- a/drivers/power/supply/ingenic-battery.c |
856 |
++++ b/drivers/power/supply/ingenic-battery.c |
857 |
+@@ -100,10 +100,17 @@ static int ingenic_battery_set_scale(struct ingenic_battery *bat) |
858 |
+ return -EINVAL; |
859 |
+ } |
860 |
+ |
861 |
+- return iio_write_channel_attribute(bat->channel, |
862 |
+- scale_raw[best_idx], |
863 |
+- scale_raw[best_idx + 1], |
864 |
+- IIO_CHAN_INFO_SCALE); |
865 |
++ /* Only set scale if there is more than one (fractional) entry */ |
866 |
++ if (scale_len > 2) { |
867 |
++ ret = iio_write_channel_attribute(bat->channel, |
868 |
++ scale_raw[best_idx], |
869 |
++ scale_raw[best_idx + 1], |
870 |
++ IIO_CHAN_INFO_SCALE); |
871 |
++ if (ret) |
872 |
++ return ret; |
873 |
++ } |
874 |
++ |
875 |
++ return 0; |
876 |
+ } |
877 |
+ |
878 |
+ static enum power_supply_property ingenic_battery_properties[] = { |
879 |
+diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c |
880 |
+index 6cab1bb8956e..faffe6b63be4 100644 |
881 |
+--- a/drivers/staging/most/net/net.c |
882 |
++++ b/drivers/staging/most/net/net.c |
883 |
+@@ -81,6 +81,11 @@ static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo) |
884 |
+ unsigned int payload_len = skb->len - ETH_HLEN; |
885 |
+ unsigned int mdp_len = payload_len + MDP_HDR_LEN; |
886 |
+ |
887 |
++ if (mdp_len < skb->len) { |
888 |
++ pr_err("drop: too large packet! (%u)\n", skb->len); |
889 |
++ return -EINVAL; |
890 |
++ } |
891 |
++ |
892 |
+ if (mbo->buffer_length < mdp_len) { |
893 |
+ pr_err("drop: too small buffer! (%d for %d)\n", |
894 |
+ mbo->buffer_length, mdp_len); |
895 |
+@@ -128,6 +133,11 @@ static int skb_to_mep(const struct sk_buff *skb, struct mbo *mbo) |
896 |
+ u8 *buff = mbo->virt_address; |
897 |
+ unsigned int mep_len = skb->len + MEP_HDR_LEN; |
898 |
+ |
899 |
++ if (mep_len < skb->len) { |
900 |
++ pr_err("drop: too large packet! (%u)\n", skb->len); |
901 |
++ return -EINVAL; |
902 |
++ } |
903 |
++ |
904 |
+ if (mbo->buffer_length < mep_len) { |
905 |
+ pr_err("drop: too small buffer! (%d for %d)\n", |
906 |
+ mbo->buffer_length, mep_len); |
907 |
+diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h |
908 |
+index 50e1c8918040..e2fabe818b19 100644 |
909 |
+--- a/drivers/staging/vt6656/device.h |
910 |
++++ b/drivers/staging/vt6656/device.h |
911 |
+@@ -52,6 +52,8 @@ |
912 |
+ #define RATE_AUTO 12 |
913 |
+ |
914 |
+ #define MAX_RATE 12 |
915 |
++#define VNT_B_RATES (BIT(RATE_1M) | BIT(RATE_2M) |\ |
916 |
++ BIT(RATE_5M) | BIT(RATE_11M)) |
917 |
+ |
918 |
+ /* |
919 |
+ * device specific |
920 |
+diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c |
921 |
+index f40947955675..af215860be4c 100644 |
922 |
+--- a/drivers/staging/vt6656/int.c |
923 |
++++ b/drivers/staging/vt6656/int.c |
924 |
+@@ -99,9 +99,11 @@ static int vnt_int_report_rate(struct vnt_private *priv, u8 pkt_no, u8 tsr) |
925 |
+ |
926 |
+ info->status.rates[0].count = tx_retry; |
927 |
+ |
928 |
+- if (!(tsr & (TSR_TMO | TSR_RETRYTMO))) { |
929 |
++ if (!(tsr & TSR_TMO)) { |
930 |
+ info->status.rates[0].idx = idx; |
931 |
+- info->flags |= IEEE80211_TX_STAT_ACK; |
932 |
++ |
933 |
++ if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) |
934 |
++ info->flags |= IEEE80211_TX_STAT_ACK; |
935 |
+ } |
936 |
+ |
937 |
+ ieee80211_tx_status_irqsafe(priv->hw, context->skb); |
938 |
+diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c |
939 |
+index 9cb924c54571..5e48b3ddb94c 100644 |
940 |
+--- a/drivers/staging/vt6656/main_usb.c |
941 |
++++ b/drivers/staging/vt6656/main_usb.c |
942 |
+@@ -1015,6 +1015,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id) |
943 |
+ ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS); |
944 |
+ ieee80211_hw_set(priv->hw, REPORTS_TX_ACK_STATUS); |
945 |
+ ieee80211_hw_set(priv->hw, SUPPORTS_PS); |
946 |
++ ieee80211_hw_set(priv->hw, PS_NULLFUNC_STACK); |
947 |
+ |
948 |
+ priv->hw->max_signal = 100; |
949 |
+ |
950 |
+diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c |
951 |
+index f9020a4f7bbf..29caba728906 100644 |
952 |
+--- a/drivers/staging/vt6656/rxtx.c |
953 |
++++ b/drivers/staging/vt6656/rxtx.c |
954 |
+@@ -278,11 +278,9 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context, |
955 |
+ PK_TYPE_11B, &buf->b); |
956 |
+ |
957 |
+ /* Get Duration and TimeStamp */ |
958 |
+- if (ieee80211_is_pspoll(hdr->frame_control)) { |
959 |
+- __le16 dur = cpu_to_le16(priv->current_aid | BIT(14) | BIT(15)); |
960 |
+- |
961 |
+- buf->duration_a = dur; |
962 |
+- buf->duration_b = dur; |
963 |
++ if (ieee80211_is_nullfunc(hdr->frame_control)) { |
964 |
++ buf->duration_a = hdr->duration_id; |
965 |
++ buf->duration_b = hdr->duration_id; |
966 |
+ } else { |
967 |
+ buf->duration_a = vnt_get_duration_le(priv, |
968 |
+ tx_context->pkt_type, need_ack); |
969 |
+@@ -371,10 +369,8 @@ static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context, |
970 |
+ tx_context->pkt_type, &buf->ab); |
971 |
+ |
972 |
+ /* Get Duration and TimeStampOff */ |
973 |
+- if (ieee80211_is_pspoll(hdr->frame_control)) { |
974 |
+- __le16 dur = cpu_to_le16(priv->current_aid | BIT(14) | BIT(15)); |
975 |
+- |
976 |
+- buf->duration = dur; |
977 |
++ if (ieee80211_is_nullfunc(hdr->frame_control)) { |
978 |
++ buf->duration = hdr->duration_id; |
979 |
+ } else { |
980 |
+ buf->duration = vnt_get_duration_le(priv, tx_context->pkt_type, |
981 |
+ need_ack); |
982 |
+@@ -815,10 +811,14 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) |
983 |
+ if (info->band == NL80211_BAND_5GHZ) { |
984 |
+ pkt_type = PK_TYPE_11A; |
985 |
+ } else { |
986 |
+- if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) |
987 |
+- pkt_type = PK_TYPE_11GB; |
988 |
+- else |
989 |
+- pkt_type = PK_TYPE_11GA; |
990 |
++ if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) { |
991 |
++ if (priv->basic_rates & VNT_B_RATES) |
992 |
++ pkt_type = PK_TYPE_11GB; |
993 |
++ else |
994 |
++ pkt_type = PK_TYPE_11GA; |
995 |
++ } else { |
996 |
++ pkt_type = PK_TYPE_11A; |
997 |
++ } |
998 |
+ } |
999 |
+ } else { |
1000 |
+ pkt_type = PK_TYPE_11B; |
1001 |
+diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c |
1002 |
+index 7350fe5d96a3..a8860d2aee68 100644 |
1003 |
+--- a/drivers/staging/wlan-ng/prism2mgmt.c |
1004 |
++++ b/drivers/staging/wlan-ng/prism2mgmt.c |
1005 |
+@@ -959,7 +959,7 @@ int prism2mgmt_flashdl_state(struct wlandevice *wlandev, void *msgp) |
1006 |
+ } |
1007 |
+ } |
1008 |
+ |
1009 |
+- return 0; |
1010 |
++ return result; |
1011 |
+ } |
1012 |
+ |
1013 |
+ /*---------------------------------------------------------------- |
1014 |
+diff --git a/drivers/tty/serial/8250/8250_bcm2835aux.c b/drivers/tty/serial/8250/8250_bcm2835aux.c |
1015 |
+index 8ce700c1a7fc..4997c519ebb3 100644 |
1016 |
+--- a/drivers/tty/serial/8250/8250_bcm2835aux.c |
1017 |
++++ b/drivers/tty/serial/8250/8250_bcm2835aux.c |
1018 |
+@@ -113,7 +113,7 @@ static int bcm2835aux_serial_remove(struct platform_device *pdev) |
1019 |
+ { |
1020 |
+ struct bcm2835aux_data *data = platform_get_drvdata(pdev); |
1021 |
+ |
1022 |
+- serial8250_unregister_port(data->uart.port.line); |
1023 |
++ serial8250_unregister_port(data->line); |
1024 |
+ clk_disable_unprepare(data->clk); |
1025 |
+ |
1026 |
+ return 0; |
1027 |
+diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c |
1028 |
+index a9e20e6c63ad..dd3120c5db2b 100644 |
1029 |
+--- a/drivers/tty/serial/imx.c |
1030 |
++++ b/drivers/tty/serial/imx.c |
1031 |
+@@ -700,22 +700,33 @@ static void imx_uart_start_tx(struct uart_port *port) |
1032 |
+ } |
1033 |
+ } |
1034 |
+ |
1035 |
+-static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) |
1036 |
++static irqreturn_t __imx_uart_rtsint(int irq, void *dev_id) |
1037 |
+ { |
1038 |
+ struct imx_port *sport = dev_id; |
1039 |
+ u32 usr1; |
1040 |
+ |
1041 |
+- spin_lock(&sport->port.lock); |
1042 |
+- |
1043 |
+ imx_uart_writel(sport, USR1_RTSD, USR1); |
1044 |
+ usr1 = imx_uart_readl(sport, USR1) & USR1_RTSS; |
1045 |
+ uart_handle_cts_change(&sport->port, !!usr1); |
1046 |
+ wake_up_interruptible(&sport->port.state->port.delta_msr_wait); |
1047 |
+ |
1048 |
+- spin_unlock(&sport->port.lock); |
1049 |
+ return IRQ_HANDLED; |
1050 |
+ } |
1051 |
+ |
1052 |
++static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) |
1053 |
++{ |
1054 |
++ struct imx_port *sport = dev_id; |
1055 |
++ irqreturn_t ret; |
1056 |
++ |
1057 |
++ spin_lock(&sport->port.lock); |
1058 |
++ |
1059 |
++ ret = __imx_uart_rtsint(irq, dev_id); |
1060 |
++ |
1061 |
++ spin_unlock(&sport->port.lock); |
1062 |
++ |
1063 |
++ return ret; |
1064 |
++} |
1065 |
++ |
1066 |
+ static irqreturn_t imx_uart_txint(int irq, void *dev_id) |
1067 |
+ { |
1068 |
+ struct imx_port *sport = dev_id; |
1069 |
+@@ -726,14 +737,12 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) |
1070 |
+ return IRQ_HANDLED; |
1071 |
+ } |
1072 |
+ |
1073 |
+-static irqreturn_t imx_uart_rxint(int irq, void *dev_id) |
1074 |
++static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) |
1075 |
+ { |
1076 |
+ struct imx_port *sport = dev_id; |
1077 |
+ unsigned int rx, flg, ignored = 0; |
1078 |
+ struct tty_port *port = &sport->port.state->port; |
1079 |
+ |
1080 |
+- spin_lock(&sport->port.lock); |
1081 |
+- |
1082 |
+ while (imx_uart_readl(sport, USR2) & USR2_RDR) { |
1083 |
+ u32 usr2; |
1084 |
+ |
1085 |
+@@ -792,11 +801,25 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) |
1086 |
+ } |
1087 |
+ |
1088 |
+ out: |
1089 |
+- spin_unlock(&sport->port.lock); |
1090 |
+ tty_flip_buffer_push(port); |
1091 |
++ |
1092 |
+ return IRQ_HANDLED; |
1093 |
+ } |
1094 |
+ |
1095 |
++static irqreturn_t imx_uart_rxint(int irq, void *dev_id) |
1096 |
++{ |
1097 |
++ struct imx_port *sport = dev_id; |
1098 |
++ irqreturn_t ret; |
1099 |
++ |
1100 |
++ spin_lock(&sport->port.lock); |
1101 |
++ |
1102 |
++ ret = __imx_uart_rxint(irq, dev_id); |
1103 |
++ |
1104 |
++ spin_unlock(&sport->port.lock); |
1105 |
++ |
1106 |
++ return ret; |
1107 |
++} |
1108 |
++ |
1109 |
+ static void imx_uart_clear_rx_errors(struct imx_port *sport); |
1110 |
+ |
1111 |
+ /* |
1112 |
+@@ -855,6 +878,8 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) |
1113 |
+ unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4; |
1114 |
+ irqreturn_t ret = IRQ_NONE; |
1115 |
+ |
1116 |
++ spin_lock(&sport->port.lock); |
1117 |
++ |
1118 |
+ usr1 = imx_uart_readl(sport, USR1); |
1119 |
+ usr2 = imx_uart_readl(sport, USR2); |
1120 |
+ ucr1 = imx_uart_readl(sport, UCR1); |
1121 |
+@@ -888,27 +913,25 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) |
1122 |
+ usr2 &= ~USR2_ORE; |
1123 |
+ |
1124 |
+ if (usr1 & (USR1_RRDY | USR1_AGTIM)) { |
1125 |
+- imx_uart_rxint(irq, dev_id); |
1126 |
++ __imx_uart_rxint(irq, dev_id); |
1127 |
+ ret = IRQ_HANDLED; |
1128 |
+ } |
1129 |
+ |
1130 |
+ if ((usr1 & USR1_TRDY) || (usr2 & USR2_TXDC)) { |
1131 |
+- imx_uart_txint(irq, dev_id); |
1132 |
++ imx_uart_transmit_buffer(sport); |
1133 |
+ ret = IRQ_HANDLED; |
1134 |
+ } |
1135 |
+ |
1136 |
+ if (usr1 & USR1_DTRD) { |
1137 |
+ imx_uart_writel(sport, USR1_DTRD, USR1); |
1138 |
+ |
1139 |
+- spin_lock(&sport->port.lock); |
1140 |
+ imx_uart_mctrl_check(sport); |
1141 |
+- spin_unlock(&sport->port.lock); |
1142 |
+ |
1143 |
+ ret = IRQ_HANDLED; |
1144 |
+ } |
1145 |
+ |
1146 |
+ if (usr1 & USR1_RTSD) { |
1147 |
+- imx_uart_rtsint(irq, dev_id); |
1148 |
++ __imx_uart_rtsint(irq, dev_id); |
1149 |
+ ret = IRQ_HANDLED; |
1150 |
+ } |
1151 |
+ |
1152 |
+@@ -923,6 +946,8 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) |
1153 |
+ ret = IRQ_HANDLED; |
1154 |
+ } |
1155 |
+ |
1156 |
++ spin_unlock(&sport->port.lock); |
1157 |
++ |
1158 |
+ return ret; |
1159 |
+ } |
1160 |
+ |
1161 |
+diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c |
1162 |
+index f561c6c9e8a9..1d85c42b9c67 100644 |
1163 |
+--- a/drivers/usb/dwc3/core.c |
1164 |
++++ b/drivers/usb/dwc3/core.c |
1165 |
+@@ -1246,6 +1246,9 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) |
1166 |
+ /* do nothing */ |
1167 |
+ break; |
1168 |
+ } |
1169 |
++ |
1170 |
++ /* de-assert DRVVBUS for HOST and OTG mode */ |
1171 |
++ dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE); |
1172 |
+ } |
1173 |
+ |
1174 |
+ static void dwc3_get_properties(struct dwc3 *dwc) |
1175 |
+diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c |
1176 |
+index 294276f7deb9..7051611229c9 100644 |
1177 |
+--- a/drivers/usb/dwc3/dwc3-pci.c |
1178 |
++++ b/drivers/usb/dwc3/dwc3-pci.c |
1179 |
+@@ -34,6 +34,7 @@ |
1180 |
+ #define PCI_DEVICE_ID_INTEL_GLK 0x31aa |
1181 |
+ #define PCI_DEVICE_ID_INTEL_CNPLP 0x9dee |
1182 |
+ #define PCI_DEVICE_ID_INTEL_CNPH 0xa36e |
1183 |
++#define PCI_DEVICE_ID_INTEL_CNPV 0xa3b0 |
1184 |
+ #define PCI_DEVICE_ID_INTEL_ICLLP 0x34ee |
1185 |
+ #define PCI_DEVICE_ID_INTEL_EHLLP 0x4b7e |
1186 |
+ #define PCI_DEVICE_ID_INTEL_TGPLP 0xa0ee |
1187 |
+@@ -342,6 +343,9 @@ static const struct pci_device_id dwc3_pci_id_table[] = { |
1188 |
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CNPH), |
1189 |
+ (kernel_ulong_t) &dwc3_pci_intel_properties, }, |
1190 |
+ |
1191 |
++ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CNPV), |
1192 |
++ (kernel_ulong_t) &dwc3_pci_intel_properties, }, |
1193 |
++ |
1194 |
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICLLP), |
1195 |
+ (kernel_ulong_t) &dwc3_pci_intel_properties, }, |
1196 |
+ |
1197 |
+diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c |
1198 |
+index bf9065438320..7b0d175ad708 100644 |
1199 |
+--- a/drivers/usb/host/xhci-tegra.c |
1200 |
++++ b/drivers/usb/host/xhci-tegra.c |
1201 |
+@@ -1432,6 +1432,7 @@ MODULE_FIRMWARE("nvidia/tegra210/xusb.bin"); |
1202 |
+ |
1203 |
+ static const char * const tegra186_supply_names[] = { |
1204 |
+ }; |
1205 |
++MODULE_FIRMWARE("nvidia/tegra186/xusb.bin"); |
1206 |
+ |
1207 |
+ static const struct tegra_xusb_phy_type tegra186_phy_types[] = { |
1208 |
+ { .name = "usb3", .num = 3, }, |
1209 |
+diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c |
1210 |
+index 302eb9530859..627bea7e6cfb 100644 |
1211 |
+--- a/drivers/usb/serial/ir-usb.c |
1212 |
++++ b/drivers/usb/serial/ir-usb.c |
1213 |
+@@ -45,9 +45,10 @@ static int buffer_size; |
1214 |
+ static int xbof = -1; |
1215 |
+ |
1216 |
+ static int ir_startup (struct usb_serial *serial); |
1217 |
+-static int ir_open(struct tty_struct *tty, struct usb_serial_port *port); |
1218 |
+-static int ir_prepare_write_buffer(struct usb_serial_port *port, |
1219 |
+- void *dest, size_t size); |
1220 |
++static int ir_write(struct tty_struct *tty, struct usb_serial_port *port, |
1221 |
++ const unsigned char *buf, int count); |
1222 |
++static int ir_write_room(struct tty_struct *tty); |
1223 |
++static void ir_write_bulk_callback(struct urb *urb); |
1224 |
+ static void ir_process_read_urb(struct urb *urb); |
1225 |
+ static void ir_set_termios(struct tty_struct *tty, |
1226 |
+ struct usb_serial_port *port, struct ktermios *old_termios); |
1227 |
+@@ -77,8 +78,9 @@ static struct usb_serial_driver ir_device = { |
1228 |
+ .num_ports = 1, |
1229 |
+ .set_termios = ir_set_termios, |
1230 |
+ .attach = ir_startup, |
1231 |
+- .open = ir_open, |
1232 |
+- .prepare_write_buffer = ir_prepare_write_buffer, |
1233 |
++ .write = ir_write, |
1234 |
++ .write_room = ir_write_room, |
1235 |
++ .write_bulk_callback = ir_write_bulk_callback, |
1236 |
+ .process_read_urb = ir_process_read_urb, |
1237 |
+ }; |
1238 |
+ |
1239 |
+@@ -195,6 +197,9 @@ static int ir_startup(struct usb_serial *serial) |
1240 |
+ struct usb_irda_cs_descriptor *irda_desc; |
1241 |
+ int rates; |
1242 |
+ |
1243 |
++ if (serial->num_bulk_in < 1 || serial->num_bulk_out < 1) |
1244 |
++ return -ENODEV; |
1245 |
++ |
1246 |
+ irda_desc = irda_usb_find_class_desc(serial, 0); |
1247 |
+ if (!irda_desc) { |
1248 |
+ dev_err(&serial->dev->dev, |
1249 |
+@@ -251,35 +256,102 @@ static int ir_startup(struct usb_serial *serial) |
1250 |
+ return 0; |
1251 |
+ } |
1252 |
+ |
1253 |
+-static int ir_open(struct tty_struct *tty, struct usb_serial_port *port) |
1254 |
++static int ir_write(struct tty_struct *tty, struct usb_serial_port *port, |
1255 |
++ const unsigned char *buf, int count) |
1256 |
+ { |
1257 |
+- int i; |
1258 |
++ struct urb *urb = NULL; |
1259 |
++ unsigned long flags; |
1260 |
++ int ret; |
1261 |
+ |
1262 |
+- for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) |
1263 |
+- port->write_urbs[i]->transfer_flags = URB_ZERO_PACKET; |
1264 |
++ if (port->bulk_out_size == 0) |
1265 |
++ return -EINVAL; |
1266 |
+ |
1267 |
+- /* Start reading from the device */ |
1268 |
+- return usb_serial_generic_open(tty, port); |
1269 |
+-} |
1270 |
++ if (count == 0) |
1271 |
++ return 0; |
1272 |
+ |
1273 |
+-static int ir_prepare_write_buffer(struct usb_serial_port *port, |
1274 |
+- void *dest, size_t size) |
1275 |
+-{ |
1276 |
+- unsigned char *buf = dest; |
1277 |
+- int count; |
1278 |
++ count = min(count, port->bulk_out_size - 1); |
1279 |
++ |
1280 |
++ spin_lock_irqsave(&port->lock, flags); |
1281 |
++ if (__test_and_clear_bit(0, &port->write_urbs_free)) { |
1282 |
++ urb = port->write_urbs[0]; |
1283 |
++ port->tx_bytes += count; |
1284 |
++ } |
1285 |
++ spin_unlock_irqrestore(&port->lock, flags); |
1286 |
++ |
1287 |
++ if (!urb) |
1288 |
++ return 0; |
1289 |
+ |
1290 |
+ /* |
1291 |
+ * The first byte of the packet we send to the device contains an |
1292 |
+- * inbound header which indicates an additional number of BOFs and |
1293 |
++ * outbound header which indicates an additional number of BOFs and |
1294 |
+ * a baud rate change. |
1295 |
+ * |
1296 |
+ * See section 5.4.2.2 of the USB IrDA spec. |
1297 |
+ */ |
1298 |
+- *buf = ir_xbof | ir_baud; |
1299 |
++ *(u8 *)urb->transfer_buffer = ir_xbof | ir_baud; |
1300 |
++ |
1301 |
++ memcpy(urb->transfer_buffer + 1, buf, count); |
1302 |
++ |
1303 |
++ urb->transfer_buffer_length = count + 1; |
1304 |
++ urb->transfer_flags = URB_ZERO_PACKET; |
1305 |
++ |
1306 |
++ ret = usb_submit_urb(urb, GFP_ATOMIC); |
1307 |
++ if (ret) { |
1308 |
++ dev_err(&port->dev, "failed to submit write urb: %d\n", ret); |
1309 |
++ |
1310 |
++ spin_lock_irqsave(&port->lock, flags); |
1311 |
++ __set_bit(0, &port->write_urbs_free); |
1312 |
++ port->tx_bytes -= count; |
1313 |
++ spin_unlock_irqrestore(&port->lock, flags); |
1314 |
++ |
1315 |
++ return ret; |
1316 |
++ } |
1317 |
++ |
1318 |
++ return count; |
1319 |
++} |
1320 |
++ |
1321 |
++static void ir_write_bulk_callback(struct urb *urb) |
1322 |
++{ |
1323 |
++ struct usb_serial_port *port = urb->context; |
1324 |
++ int status = urb->status; |
1325 |
++ unsigned long flags; |
1326 |
++ |
1327 |
++ spin_lock_irqsave(&port->lock, flags); |
1328 |
++ __set_bit(0, &port->write_urbs_free); |
1329 |
++ port->tx_bytes -= urb->transfer_buffer_length - 1; |
1330 |
++ spin_unlock_irqrestore(&port->lock, flags); |
1331 |
++ |
1332 |
++ switch (status) { |
1333 |
++ case 0: |
1334 |
++ break; |
1335 |
++ case -ENOENT: |
1336 |
++ case -ECONNRESET: |
1337 |
++ case -ESHUTDOWN: |
1338 |
++ dev_dbg(&port->dev, "write urb stopped: %d\n", status); |
1339 |
++ return; |
1340 |
++ case -EPIPE: |
1341 |
++ dev_err(&port->dev, "write urb stopped: %d\n", status); |
1342 |
++ return; |
1343 |
++ default: |
1344 |
++ dev_err(&port->dev, "nonzero write-urb status: %d\n", status); |
1345 |
++ break; |
1346 |
++ } |
1347 |
++ |
1348 |
++ usb_serial_port_softint(port); |
1349 |
++} |
1350 |
++ |
1351 |
++static int ir_write_room(struct tty_struct *tty) |
1352 |
++{ |
1353 |
++ struct usb_serial_port *port = tty->driver_data; |
1354 |
++ int count = 0; |
1355 |
++ |
1356 |
++ if (port->bulk_out_size == 0) |
1357 |
++ return 0; |
1358 |
++ |
1359 |
++ if (test_bit(0, &port->write_urbs_free)) |
1360 |
++ count = port->bulk_out_size - 1; |
1361 |
+ |
1362 |
+- count = kfifo_out_locked(&port->write_fifo, buf + 1, size - 1, |
1363 |
+- &port->lock); |
1364 |
+- return count + 1; |
1365 |
++ return count; |
1366 |
+ } |
1367 |
+ |
1368 |
+ static void ir_process_read_urb(struct urb *urb) |
1369 |
+@@ -332,34 +404,34 @@ static void ir_set_termios(struct tty_struct *tty, |
1370 |
+ |
1371 |
+ switch (baud) { |
1372 |
+ case 2400: |
1373 |
+- ir_baud = USB_IRDA_BR_2400; |
1374 |
++ ir_baud = USB_IRDA_LS_2400; |
1375 |
+ break; |
1376 |
+ case 9600: |
1377 |
+- ir_baud = USB_IRDA_BR_9600; |
1378 |
++ ir_baud = USB_IRDA_LS_9600; |
1379 |
+ break; |
1380 |
+ case 19200: |
1381 |
+- ir_baud = USB_IRDA_BR_19200; |
1382 |
++ ir_baud = USB_IRDA_LS_19200; |
1383 |
+ break; |
1384 |
+ case 38400: |
1385 |
+- ir_baud = USB_IRDA_BR_38400; |
1386 |
++ ir_baud = USB_IRDA_LS_38400; |
1387 |
+ break; |
1388 |
+ case 57600: |
1389 |
+- ir_baud = USB_IRDA_BR_57600; |
1390 |
++ ir_baud = USB_IRDA_LS_57600; |
1391 |
+ break; |
1392 |
+ case 115200: |
1393 |
+- ir_baud = USB_IRDA_BR_115200; |
1394 |
++ ir_baud = USB_IRDA_LS_115200; |
1395 |
+ break; |
1396 |
+ case 576000: |
1397 |
+- ir_baud = USB_IRDA_BR_576000; |
1398 |
++ ir_baud = USB_IRDA_LS_576000; |
1399 |
+ break; |
1400 |
+ case 1152000: |
1401 |
+- ir_baud = USB_IRDA_BR_1152000; |
1402 |
++ ir_baud = USB_IRDA_LS_1152000; |
1403 |
+ break; |
1404 |
+ case 4000000: |
1405 |
+- ir_baud = USB_IRDA_BR_4000000; |
1406 |
++ ir_baud = USB_IRDA_LS_4000000; |
1407 |
+ break; |
1408 |
+ default: |
1409 |
+- ir_baud = USB_IRDA_BR_9600; |
1410 |
++ ir_baud = USB_IRDA_LS_9600; |
1411 |
+ baud = 9600; |
1412 |
+ } |
1413 |
+ |
1414 |
+diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c |
1415 |
+index ed8655c6af8c..b498960ff72b 100644 |
1416 |
+--- a/drivers/usb/typec/tcpm/fusb302.c |
1417 |
++++ b/drivers/usb/typec/tcpm/fusb302.c |
1418 |
+@@ -1666,7 +1666,7 @@ static const struct property_entry port_props[] = { |
1419 |
+ PROPERTY_ENTRY_STRING("try-power-role", "sink"), |
1420 |
+ PROPERTY_ENTRY_U32_ARRAY("source-pdos", src_pdo), |
1421 |
+ PROPERTY_ENTRY_U32_ARRAY("sink-pdos", snk_pdo), |
1422 |
+- PROPERTY_ENTRY_U32("op-sink-microwatt", 2500), |
1423 |
++ PROPERTY_ENTRY_U32("op-sink-microwatt", 2500000), |
1424 |
+ { } |
1425 |
+ }; |
1426 |
+ |
1427 |
+diff --git a/drivers/usb/typec/tcpm/wcove.c b/drivers/usb/typec/tcpm/wcove.c |
1428 |
+index edc271da14f4..9b745f432c91 100644 |
1429 |
+--- a/drivers/usb/typec/tcpm/wcove.c |
1430 |
++++ b/drivers/usb/typec/tcpm/wcove.c |
1431 |
+@@ -597,7 +597,7 @@ static const struct property_entry wcove_props[] = { |
1432 |
+ PROPERTY_ENTRY_STRING("try-power-role", "sink"), |
1433 |
+ PROPERTY_ENTRY_U32_ARRAY("source-pdos", src_pdo), |
1434 |
+ PROPERTY_ENTRY_U32_ARRAY("sink-pdos", snk_pdo), |
1435 |
+- PROPERTY_ENTRY_U32("op-sink-microwatt", 15000), |
1436 |
++ PROPERTY_ENTRY_U32("op-sink-microwatt", 15000000), |
1437 |
+ { } |
1438 |
+ }; |
1439 |
+ |
1440 |
+diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h |
1441 |
+index 40705e862451..239338d57086 100644 |
1442 |
+--- a/fs/cifs/cifsglob.h |
1443 |
++++ b/fs/cifs/cifsglob.h |
1444 |
+@@ -1588,6 +1588,7 @@ struct mid_q_entry { |
1445 |
+ mid_callback_t *callback; /* call completion callback */ |
1446 |
+ mid_handle_t *handle; /* call handle mid callback */ |
1447 |
+ void *callback_data; /* general purpose pointer for callback */ |
1448 |
++ struct task_struct *creator; |
1449 |
+ void *resp_buf; /* pointer to received SMB header */ |
1450 |
+ unsigned int resp_buf_size; |
1451 |
+ int mid_state; /* wish this were enum but can not pass to wait_event */ |
1452 |
+diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c |
1453 |
+index 0516fc482d43..0511aaf451d4 100644 |
1454 |
+--- a/fs/cifs/smb2misc.c |
1455 |
++++ b/fs/cifs/smb2misc.c |
1456 |
+@@ -743,7 +743,7 @@ __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, |
1457 |
+ { |
1458 |
+ struct close_cancelled_open *cancelled; |
1459 |
+ |
1460 |
+- cancelled = kzalloc(sizeof(*cancelled), GFP_KERNEL); |
1461 |
++ cancelled = kzalloc(sizeof(*cancelled), GFP_ATOMIC); |
1462 |
+ if (!cancelled) |
1463 |
+ return -ENOMEM; |
1464 |
+ |
1465 |
+diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c |
1466 |
+index 6250370c1170..4b9c805ae5e1 100644 |
1467 |
+--- a/fs/cifs/smb2ops.c |
1468 |
++++ b/fs/cifs/smb2ops.c |
1469 |
+@@ -1523,7 +1523,9 @@ smb2_ioctl_query_info(const unsigned int xid, |
1470 |
+ COMPOUND_FID, COMPOUND_FID, |
1471 |
+ qi.info_type, true, buffer, |
1472 |
+ qi.output_buffer_length, |
1473 |
+- CIFSMaxBufSize); |
1474 |
++ CIFSMaxBufSize - |
1475 |
++ MAX_SMB2_CREATE_RESPONSE_SIZE - |
1476 |
++ MAX_SMB2_CLOSE_RESPONSE_SIZE); |
1477 |
+ } |
1478 |
+ } else if (qi.flags == PASSTHRU_SET_INFO) { |
1479 |
+ /* Can eventually relax perm check since server enforces too */ |
1480 |
+@@ -2697,7 +2699,10 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon, |
1481 |
+ |
1482 |
+ rc = SMB2_ioctl_init(tcon, &rqst[1], fid.persistent_fid, |
1483 |
+ fid.volatile_fid, FSCTL_GET_REPARSE_POINT, |
1484 |
+- true /* is_fctl */, NULL, 0, CIFSMaxBufSize); |
1485 |
++ true /* is_fctl */, NULL, 0, |
1486 |
++ CIFSMaxBufSize - |
1487 |
++ MAX_SMB2_CREATE_RESPONSE_SIZE - |
1488 |
++ MAX_SMB2_CLOSE_RESPONSE_SIZE); |
1489 |
+ if (rc) |
1490 |
+ goto querty_exit; |
1491 |
+ |
1492 |
+diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c |
1493 |
+index 387c88704c52..fe6acfce3390 100644 |
1494 |
+--- a/fs/cifs/smb2transport.c |
1495 |
++++ b/fs/cifs/smb2transport.c |
1496 |
+@@ -685,6 +685,8 @@ smb2_mid_entry_alloc(const struct smb2_sync_hdr *shdr, |
1497 |
+ * The default is for the mid to be synchronous, so the |
1498 |
+ * default callback just wakes up the current task. |
1499 |
+ */ |
1500 |
++ get_task_struct(current); |
1501 |
++ temp->creator = current; |
1502 |
+ temp->callback = cifs_wake_up_task; |
1503 |
+ temp->callback_data = current; |
1504 |
+ |
1505 |
+diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c |
1506 |
+index 3d2e11f85cba..cb3ee916f527 100644 |
1507 |
+--- a/fs/cifs/transport.c |
1508 |
++++ b/fs/cifs/transport.c |
1509 |
+@@ -76,6 +76,8 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server) |
1510 |
+ * The default is for the mid to be synchronous, so the |
1511 |
+ * default callback just wakes up the current task. |
1512 |
+ */ |
1513 |
++ get_task_struct(current); |
1514 |
++ temp->creator = current; |
1515 |
+ temp->callback = cifs_wake_up_task; |
1516 |
+ temp->callback_data = current; |
1517 |
+ |
1518 |
+@@ -158,6 +160,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount) |
1519 |
+ } |
1520 |
+ } |
1521 |
+ #endif |
1522 |
++ put_task_struct(midEntry->creator); |
1523 |
+ |
1524 |
+ mempool_free(midEntry, cifs_mid_poolp); |
1525 |
+ } |
1526 |
+diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c |
1527 |
+index dede25247b81..18eeeb093a68 100644 |
1528 |
+--- a/fs/debugfs/file.c |
1529 |
++++ b/fs/debugfs/file.c |
1530 |
+@@ -142,18 +142,21 @@ EXPORT_SYMBOL_GPL(debugfs_file_put); |
1531 |
+ * We also need to exclude any file that has ways to write or alter it as root |
1532 |
+ * can bypass the permissions check. |
1533 |
+ */ |
1534 |
+-static bool debugfs_is_locked_down(struct inode *inode, |
1535 |
+- struct file *filp, |
1536 |
+- const struct file_operations *real_fops) |
1537 |
++static int debugfs_locked_down(struct inode *inode, |
1538 |
++ struct file *filp, |
1539 |
++ const struct file_operations *real_fops) |
1540 |
+ { |
1541 |
+ if ((inode->i_mode & 07777) == 0444 && |
1542 |
+ !(filp->f_mode & FMODE_WRITE) && |
1543 |
+ !real_fops->unlocked_ioctl && |
1544 |
+ !real_fops->compat_ioctl && |
1545 |
+ !real_fops->mmap) |
1546 |
+- return false; |
1547 |
++ return 0; |
1548 |
+ |
1549 |
+- return security_locked_down(LOCKDOWN_DEBUGFS); |
1550 |
++ if (security_locked_down(LOCKDOWN_DEBUGFS)) |
1551 |
++ return -EPERM; |
1552 |
++ |
1553 |
++ return 0; |
1554 |
+ } |
1555 |
+ |
1556 |
+ static int open_proxy_open(struct inode *inode, struct file *filp) |
1557 |
+@@ -168,7 +171,7 @@ static int open_proxy_open(struct inode *inode, struct file *filp) |
1558 |
+ |
1559 |
+ real_fops = debugfs_real_fops(filp); |
1560 |
+ |
1561 |
+- r = debugfs_is_locked_down(inode, filp, real_fops); |
1562 |
++ r = debugfs_locked_down(inode, filp, real_fops); |
1563 |
+ if (r) |
1564 |
+ goto out; |
1565 |
+ |
1566 |
+@@ -298,7 +301,7 @@ static int full_proxy_open(struct inode *inode, struct file *filp) |
1567 |
+ |
1568 |
+ real_fops = debugfs_real_fops(filp); |
1569 |
+ |
1570 |
+- r = debugfs_is_locked_down(inode, filp, real_fops); |
1571 |
++ r = debugfs_locked_down(inode, filp, real_fops); |
1572 |
+ if (r) |
1573 |
+ goto out; |
1574 |
+ |
1575 |
+diff --git a/include/linux/usb/irda.h b/include/linux/usb/irda.h |
1576 |
+index 396d2b043e64..556a801efce3 100644 |
1577 |
+--- a/include/linux/usb/irda.h |
1578 |
++++ b/include/linux/usb/irda.h |
1579 |
+@@ -119,11 +119,22 @@ struct usb_irda_cs_descriptor { |
1580 |
+ * 6 - 115200 bps |
1581 |
+ * 7 - 576000 bps |
1582 |
+ * 8 - 1.152 Mbps |
1583 |
+- * 9 - 5 mbps |
1584 |
++ * 9 - 4 Mbps |
1585 |
+ * 10..15 - Reserved |
1586 |
+ */ |
1587 |
+ #define USB_IRDA_STATUS_LINK_SPEED 0x0f |
1588 |
+ |
1589 |
++#define USB_IRDA_LS_NO_CHANGE 0 |
1590 |
++#define USB_IRDA_LS_2400 1 |
1591 |
++#define USB_IRDA_LS_9600 2 |
1592 |
++#define USB_IRDA_LS_19200 3 |
1593 |
++#define USB_IRDA_LS_38400 4 |
1594 |
++#define USB_IRDA_LS_57600 5 |
1595 |
++#define USB_IRDA_LS_115200 6 |
1596 |
++#define USB_IRDA_LS_576000 7 |
1597 |
++#define USB_IRDA_LS_1152000 8 |
1598 |
++#define USB_IRDA_LS_4000000 9 |
1599 |
++ |
1600 |
+ /* The following is a 4-bit value used only for |
1601 |
+ * outbound header: |
1602 |
+ * |
1603 |
+diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h |
1604 |
+index e553fc80eb23..9976ad2f54fd 100644 |
1605 |
+--- a/include/net/pkt_cls.h |
1606 |
++++ b/include/net/pkt_cls.h |
1607 |
+@@ -141,31 +141,38 @@ __cls_set_class(unsigned long *clp, unsigned long cl) |
1608 |
+ return xchg(clp, cl); |
1609 |
+ } |
1610 |
+ |
1611 |
+-static inline unsigned long |
1612 |
+-cls_set_class(struct Qdisc *q, unsigned long *clp, unsigned long cl) |
1613 |
++static inline void |
1614 |
++__tcf_bind_filter(struct Qdisc *q, struct tcf_result *r, unsigned long base) |
1615 |
+ { |
1616 |
+- unsigned long old_cl; |
1617 |
++ unsigned long cl; |
1618 |
+ |
1619 |
+- sch_tree_lock(q); |
1620 |
+- old_cl = __cls_set_class(clp, cl); |
1621 |
+- sch_tree_unlock(q); |
1622 |
+- return old_cl; |
1623 |
++ cl = q->ops->cl_ops->bind_tcf(q, base, r->classid); |
1624 |
++ cl = __cls_set_class(&r->class, cl); |
1625 |
++ if (cl) |
1626 |
++ q->ops->cl_ops->unbind_tcf(q, cl); |
1627 |
+ } |
1628 |
+ |
1629 |
+ static inline void |
1630 |
+ tcf_bind_filter(struct tcf_proto *tp, struct tcf_result *r, unsigned long base) |
1631 |
+ { |
1632 |
+ struct Qdisc *q = tp->chain->block->q; |
1633 |
+- unsigned long cl; |
1634 |
+ |
1635 |
+ /* Check q as it is not set for shared blocks. In that case, |
1636 |
+ * setting class is not supported. |
1637 |
+ */ |
1638 |
+ if (!q) |
1639 |
+ return; |
1640 |
+- cl = q->ops->cl_ops->bind_tcf(q, base, r->classid); |
1641 |
+- cl = cls_set_class(q, &r->class, cl); |
1642 |
+- if (cl) |
1643 |
++ sch_tree_lock(q); |
1644 |
++ __tcf_bind_filter(q, r, base); |
1645 |
++ sch_tree_unlock(q); |
1646 |
++} |
1647 |
++ |
1648 |
++static inline void |
1649 |
++__tcf_unbind_filter(struct Qdisc *q, struct tcf_result *r) |
1650 |
++{ |
1651 |
++ unsigned long cl; |
1652 |
++ |
1653 |
++ if ((cl = __cls_set_class(&r->class, 0)) != 0) |
1654 |
+ q->ops->cl_ops->unbind_tcf(q, cl); |
1655 |
+ } |
1656 |
+ |
1657 |
+@@ -173,12 +180,10 @@ static inline void |
1658 |
+ tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r) |
1659 |
+ { |
1660 |
+ struct Qdisc *q = tp->chain->block->q; |
1661 |
+- unsigned long cl; |
1662 |
+ |
1663 |
+ if (!q) |
1664 |
+ return; |
1665 |
+- if ((cl = __cls_set_class(&r->class, 0)) != 0) |
1666 |
+- q->ops->cl_ops->unbind_tcf(q, cl); |
1667 |
++ __tcf_unbind_filter(q, r); |
1668 |
+ } |
1669 |
+ |
1670 |
+ struct tcf_exts { |
1671 |
+diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h |
1672 |
+index fceddf89592a..151208704ed2 100644 |
1673 |
+--- a/include/net/sch_generic.h |
1674 |
++++ b/include/net/sch_generic.h |
1675 |
+@@ -318,7 +318,8 @@ struct tcf_proto_ops { |
1676 |
+ void *type_data); |
1677 |
+ void (*hw_del)(struct tcf_proto *tp, |
1678 |
+ void *type_data); |
1679 |
+- void (*bind_class)(void *, u32, unsigned long); |
1680 |
++ void (*bind_class)(void *, u32, unsigned long, |
1681 |
++ void *, unsigned long); |
1682 |
+ void * (*tmplt_create)(struct net *net, |
1683 |
+ struct tcf_chain *chain, |
1684 |
+ struct nlattr **tca, |
1685 |
+diff --git a/include/net/udp.h b/include/net/udp.h |
1686 |
+index bad74f780831..8f163d674f07 100644 |
1687 |
+--- a/include/net/udp.h |
1688 |
++++ b/include/net/udp.h |
1689 |
+@@ -476,6 +476,9 @@ static inline struct sk_buff *udp_rcv_segment(struct sock *sk, |
1690 |
+ if (!inet_get_convert_csum(sk)) |
1691 |
+ features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; |
1692 |
+ |
1693 |
++ if (skb->pkt_type == PACKET_LOOPBACK) |
1694 |
++ skb->ip_summed = CHECKSUM_PARTIAL; |
1695 |
++ |
1696 |
+ /* the GSO CB lays after the UDP one, no need to save and restore any |
1697 |
+ * CB fragment |
1698 |
+ */ |
1699 |
+diff --git a/init/Kconfig b/init/Kconfig |
1700 |
+index a34064a031a5..47d40f399000 100644 |
1701 |
+--- a/init/Kconfig |
1702 |
++++ b/init/Kconfig |
1703 |
+@@ -54,6 +54,7 @@ config CC_DISABLE_WARN_MAYBE_UNINITIALIZED |
1704 |
+ |
1705 |
+ config CONSTRUCTORS |
1706 |
+ bool |
1707 |
++ depends on !UML |
1708 |
+ |
1709 |
+ config IRQ_WORK |
1710 |
+ bool |
1711 |
+diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig |
1712 |
+index 060e8e726755..3941a9c48f83 100644 |
1713 |
+--- a/kernel/gcov/Kconfig |
1714 |
++++ b/kernel/gcov/Kconfig |
1715 |
+@@ -4,7 +4,7 @@ menu "GCOV-based kernel profiling" |
1716 |
+ config GCOV_KERNEL |
1717 |
+ bool "Enable gcov-based kernel profiling" |
1718 |
+ depends on DEBUG_FS |
1719 |
+- select CONSTRUCTORS |
1720 |
++ select CONSTRUCTORS if !UML |
1721 |
+ default n |
1722 |
+ ---help--- |
1723 |
+ This option enables gcov-based code profiling (e.g. for code coverage |
1724 |
+diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c |
1725 |
+index 511eaa94e2d1..d072c326dd64 100644 |
1726 |
+--- a/net/ipv4/nexthop.c |
1727 |
++++ b/net/ipv4/nexthop.c |
1728 |
+@@ -321,7 +321,9 @@ static size_t nh_nlmsg_size_single(struct nexthop *nh) |
1729 |
+ |
1730 |
+ static size_t nh_nlmsg_size(struct nexthop *nh) |
1731 |
+ { |
1732 |
+- size_t sz = nla_total_size(4); /* NHA_ID */ |
1733 |
++ size_t sz = NLMSG_ALIGN(sizeof(struct nhmsg)); |
1734 |
++ |
1735 |
++ sz += nla_total_size(4); /* NHA_ID */ |
1736 |
+ |
1737 |
+ if (nh->is_group) |
1738 |
+ sz += nh_nlmsg_size_grp(nh); |
1739 |
+diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c |
1740 |
+index 86bd133b4fa0..96d54e5bf7bc 100644 |
1741 |
+--- a/net/rxrpc/input.c |
1742 |
++++ b/net/rxrpc/input.c |
1743 |
+@@ -413,7 +413,7 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) |
1744 |
+ { |
1745 |
+ struct rxrpc_skb_priv *sp = rxrpc_skb(skb); |
1746 |
+ enum rxrpc_call_state state; |
1747 |
+- unsigned int j; |
1748 |
++ unsigned int j, nr_subpackets; |
1749 |
+ rxrpc_serial_t serial = sp->hdr.serial, ack_serial = 0; |
1750 |
+ rxrpc_seq_t seq0 = sp->hdr.seq, hard_ack; |
1751 |
+ bool immediate_ack = false, jumbo_bad = false; |
1752 |
+@@ -457,7 +457,8 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) |
1753 |
+ call->ackr_prev_seq = seq0; |
1754 |
+ hard_ack = READ_ONCE(call->rx_hard_ack); |
1755 |
+ |
1756 |
+- if (sp->nr_subpackets > 1) { |
1757 |
++ nr_subpackets = sp->nr_subpackets; |
1758 |
++ if (nr_subpackets > 1) { |
1759 |
+ if (call->nr_jumbo_bad > 3) { |
1760 |
+ ack = RXRPC_ACK_NOSPACE; |
1761 |
+ ack_serial = serial; |
1762 |
+@@ -465,11 +466,11 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) |
1763 |
+ } |
1764 |
+ } |
1765 |
+ |
1766 |
+- for (j = 0; j < sp->nr_subpackets; j++) { |
1767 |
++ for (j = 0; j < nr_subpackets; j++) { |
1768 |
+ rxrpc_serial_t serial = sp->hdr.serial + j; |
1769 |
+ rxrpc_seq_t seq = seq0 + j; |
1770 |
+ unsigned int ix = seq & RXRPC_RXTX_BUFF_MASK; |
1771 |
+- bool terminal = (j == sp->nr_subpackets - 1); |
1772 |
++ bool terminal = (j == nr_subpackets - 1); |
1773 |
+ bool last = terminal && (sp->rx_flags & RXRPC_SKB_INCL_LAST); |
1774 |
+ u8 flags, annotation = j; |
1775 |
+ |
1776 |
+@@ -506,7 +507,7 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) |
1777 |
+ } |
1778 |
+ |
1779 |
+ if (call->rxtx_buffer[ix]) { |
1780 |
+- rxrpc_input_dup_data(call, seq, sp->nr_subpackets > 1, |
1781 |
++ rxrpc_input_dup_data(call, seq, nr_subpackets > 1, |
1782 |
+ &jumbo_bad); |
1783 |
+ if (ack != RXRPC_ACK_DUPLICATE) { |
1784 |
+ ack = RXRPC_ACK_DUPLICATE; |
1785 |
+@@ -564,6 +565,7 @@ static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) |
1786 |
+ * ring. |
1787 |
+ */ |
1788 |
+ skb = NULL; |
1789 |
++ sp = NULL; |
1790 |
+ } |
1791 |
+ |
1792 |
+ if (last) { |
1793 |
+diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c |
1794 |
+index 4aafbe3d435c..f256a7c69093 100644 |
1795 |
+--- a/net/sched/cls_basic.c |
1796 |
++++ b/net/sched/cls_basic.c |
1797 |
+@@ -263,12 +263,17 @@ skip: |
1798 |
+ } |
1799 |
+ } |
1800 |
+ |
1801 |
+-static void basic_bind_class(void *fh, u32 classid, unsigned long cl) |
1802 |
++static void basic_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
1803 |
++ unsigned long base) |
1804 |
+ { |
1805 |
+ struct basic_filter *f = fh; |
1806 |
+ |
1807 |
+- if (f && f->res.classid == classid) |
1808 |
+- f->res.class = cl; |
1809 |
++ if (f && f->res.classid == classid) { |
1810 |
++ if (cl) |
1811 |
++ __tcf_bind_filter(q, &f->res, base); |
1812 |
++ else |
1813 |
++ __tcf_unbind_filter(q, &f->res); |
1814 |
++ } |
1815 |
+ } |
1816 |
+ |
1817 |
+ static int basic_dump(struct net *net, struct tcf_proto *tp, void *fh, |
1818 |
+diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c |
1819 |
+index 8229ed4a67be..6e3e63db0e01 100644 |
1820 |
+--- a/net/sched/cls_bpf.c |
1821 |
++++ b/net/sched/cls_bpf.c |
1822 |
+@@ -631,12 +631,17 @@ nla_put_failure: |
1823 |
+ return -1; |
1824 |
+ } |
1825 |
+ |
1826 |
+-static void cls_bpf_bind_class(void *fh, u32 classid, unsigned long cl) |
1827 |
++static void cls_bpf_bind_class(void *fh, u32 classid, unsigned long cl, |
1828 |
++ void *q, unsigned long base) |
1829 |
+ { |
1830 |
+ struct cls_bpf_prog *prog = fh; |
1831 |
+ |
1832 |
+- if (prog && prog->res.classid == classid) |
1833 |
+- prog->res.class = cl; |
1834 |
++ if (prog && prog->res.classid == classid) { |
1835 |
++ if (cl) |
1836 |
++ __tcf_bind_filter(q, &prog->res, base); |
1837 |
++ else |
1838 |
++ __tcf_unbind_filter(q, &prog->res); |
1839 |
++ } |
1840 |
+ } |
1841 |
+ |
1842 |
+ static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg, |
1843 |
+diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c |
1844 |
+index b0f42e62dd76..f9c0d1e8d380 100644 |
1845 |
+--- a/net/sched/cls_flower.c |
1846 |
++++ b/net/sched/cls_flower.c |
1847 |
+@@ -2765,12 +2765,17 @@ nla_put_failure: |
1848 |
+ return -EMSGSIZE; |
1849 |
+ } |
1850 |
+ |
1851 |
+-static void fl_bind_class(void *fh, u32 classid, unsigned long cl) |
1852 |
++static void fl_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
1853 |
++ unsigned long base) |
1854 |
+ { |
1855 |
+ struct cls_fl_filter *f = fh; |
1856 |
+ |
1857 |
+- if (f && f->res.classid == classid) |
1858 |
+- f->res.class = cl; |
1859 |
++ if (f && f->res.classid == classid) { |
1860 |
++ if (cl) |
1861 |
++ __tcf_bind_filter(q, &f->res, base); |
1862 |
++ else |
1863 |
++ __tcf_unbind_filter(q, &f->res); |
1864 |
++ } |
1865 |
+ } |
1866 |
+ |
1867 |
+ static bool fl_delete_empty(struct tcf_proto *tp) |
1868 |
+diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c |
1869 |
+index c9496c920d6f..ec945294626a 100644 |
1870 |
+--- a/net/sched/cls_fw.c |
1871 |
++++ b/net/sched/cls_fw.c |
1872 |
+@@ -419,12 +419,17 @@ nla_put_failure: |
1873 |
+ return -1; |
1874 |
+ } |
1875 |
+ |
1876 |
+-static void fw_bind_class(void *fh, u32 classid, unsigned long cl) |
1877 |
++static void fw_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
1878 |
++ unsigned long base) |
1879 |
+ { |
1880 |
+ struct fw_filter *f = fh; |
1881 |
+ |
1882 |
+- if (f && f->res.classid == classid) |
1883 |
+- f->res.class = cl; |
1884 |
++ if (f && f->res.classid == classid) { |
1885 |
++ if (cl) |
1886 |
++ __tcf_bind_filter(q, &f->res, base); |
1887 |
++ else |
1888 |
++ __tcf_unbind_filter(q, &f->res); |
1889 |
++ } |
1890 |
+ } |
1891 |
+ |
1892 |
+ static struct tcf_proto_ops cls_fw_ops __read_mostly = { |
1893 |
+diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c |
1894 |
+index 7fc2eb62aa98..039cc86974f4 100644 |
1895 |
+--- a/net/sched/cls_matchall.c |
1896 |
++++ b/net/sched/cls_matchall.c |
1897 |
+@@ -393,12 +393,17 @@ nla_put_failure: |
1898 |
+ return -1; |
1899 |
+ } |
1900 |
+ |
1901 |
+-static void mall_bind_class(void *fh, u32 classid, unsigned long cl) |
1902 |
++static void mall_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
1903 |
++ unsigned long base) |
1904 |
+ { |
1905 |
+ struct cls_mall_head *head = fh; |
1906 |
+ |
1907 |
+- if (head && head->res.classid == classid) |
1908 |
+- head->res.class = cl; |
1909 |
++ if (head && head->res.classid == classid) { |
1910 |
++ if (cl) |
1911 |
++ __tcf_bind_filter(q, &head->res, base); |
1912 |
++ else |
1913 |
++ __tcf_unbind_filter(q, &head->res); |
1914 |
++ } |
1915 |
+ } |
1916 |
+ |
1917 |
+ static struct tcf_proto_ops cls_mall_ops __read_mostly = { |
1918 |
+diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c |
1919 |
+index 2d9e0b4484ea..6f8786b06bde 100644 |
1920 |
+--- a/net/sched/cls_route.c |
1921 |
++++ b/net/sched/cls_route.c |
1922 |
+@@ -641,12 +641,17 @@ nla_put_failure: |
1923 |
+ return -1; |
1924 |
+ } |
1925 |
+ |
1926 |
+-static void route4_bind_class(void *fh, u32 classid, unsigned long cl) |
1927 |
++static void route4_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
1928 |
++ unsigned long base) |
1929 |
+ { |
1930 |
+ struct route4_filter *f = fh; |
1931 |
+ |
1932 |
+- if (f && f->res.classid == classid) |
1933 |
+- f->res.class = cl; |
1934 |
++ if (f && f->res.classid == classid) { |
1935 |
++ if (cl) |
1936 |
++ __tcf_bind_filter(q, &f->res, base); |
1937 |
++ else |
1938 |
++ __tcf_unbind_filter(q, &f->res); |
1939 |
++ } |
1940 |
+ } |
1941 |
+ |
1942 |
+ static struct tcf_proto_ops cls_route4_ops __read_mostly = { |
1943 |
+diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h |
1944 |
+index 2f3c03b25d5d..c22624131949 100644 |
1945 |
+--- a/net/sched/cls_rsvp.h |
1946 |
++++ b/net/sched/cls_rsvp.h |
1947 |
+@@ -738,12 +738,17 @@ nla_put_failure: |
1948 |
+ return -1; |
1949 |
+ } |
1950 |
+ |
1951 |
+-static void rsvp_bind_class(void *fh, u32 classid, unsigned long cl) |
1952 |
++static void rsvp_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
1953 |
++ unsigned long base) |
1954 |
+ { |
1955 |
+ struct rsvp_filter *f = fh; |
1956 |
+ |
1957 |
+- if (f && f->res.classid == classid) |
1958 |
+- f->res.class = cl; |
1959 |
++ if (f && f->res.classid == classid) { |
1960 |
++ if (cl) |
1961 |
++ __tcf_bind_filter(q, &f->res, base); |
1962 |
++ else |
1963 |
++ __tcf_unbind_filter(q, &f->res); |
1964 |
++ } |
1965 |
+ } |
1966 |
+ |
1967 |
+ static struct tcf_proto_ops RSVP_OPS __read_mostly = { |
1968 |
+diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c |
1969 |
+index e573e5a5c794..3d4a1280352f 100644 |
1970 |
+--- a/net/sched/cls_tcindex.c |
1971 |
++++ b/net/sched/cls_tcindex.c |
1972 |
+@@ -654,12 +654,17 @@ nla_put_failure: |
1973 |
+ return -1; |
1974 |
+ } |
1975 |
+ |
1976 |
+-static void tcindex_bind_class(void *fh, u32 classid, unsigned long cl) |
1977 |
++static void tcindex_bind_class(void *fh, u32 classid, unsigned long cl, |
1978 |
++ void *q, unsigned long base) |
1979 |
+ { |
1980 |
+ struct tcindex_filter_result *r = fh; |
1981 |
+ |
1982 |
+- if (r && r->res.classid == classid) |
1983 |
+- r->res.class = cl; |
1984 |
++ if (r && r->res.classid == classid) { |
1985 |
++ if (cl) |
1986 |
++ __tcf_bind_filter(q, &r->res, base); |
1987 |
++ else |
1988 |
++ __tcf_unbind_filter(q, &r->res); |
1989 |
++ } |
1990 |
+ } |
1991 |
+ |
1992 |
+ static struct tcf_proto_ops cls_tcindex_ops __read_mostly = { |
1993 |
+diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c |
1994 |
+index a0e6fac613de..e15ff335953d 100644 |
1995 |
+--- a/net/sched/cls_u32.c |
1996 |
++++ b/net/sched/cls_u32.c |
1997 |
+@@ -1255,12 +1255,17 @@ static int u32_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, |
1998 |
+ return 0; |
1999 |
+ } |
2000 |
+ |
2001 |
+-static void u32_bind_class(void *fh, u32 classid, unsigned long cl) |
2002 |
++static void u32_bind_class(void *fh, u32 classid, unsigned long cl, void *q, |
2003 |
++ unsigned long base) |
2004 |
+ { |
2005 |
+ struct tc_u_knode *n = fh; |
2006 |
+ |
2007 |
+- if (n && n->res.classid == classid) |
2008 |
+- n->res.class = cl; |
2009 |
++ if (n && n->res.classid == classid) { |
2010 |
++ if (cl) |
2011 |
++ __tcf_bind_filter(q, &n->res, base); |
2012 |
++ else |
2013 |
++ __tcf_unbind_filter(q, &n->res); |
2014 |
++ } |
2015 |
+ } |
2016 |
+ |
2017 |
+ static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh, |
2018 |
+diff --git a/net/sched/ematch.c b/net/sched/ematch.c |
2019 |
+index d0140a92694a..dd3b8c11a2e0 100644 |
2020 |
+--- a/net/sched/ematch.c |
2021 |
++++ b/net/sched/ematch.c |
2022 |
+@@ -238,6 +238,9 @@ static int tcf_em_validate(struct tcf_proto *tp, |
2023 |
+ goto errout; |
2024 |
+ |
2025 |
+ if (em->ops->change) { |
2026 |
++ err = -EINVAL; |
2027 |
++ if (em_hdr->flags & TCF_EM_SIMPLE) |
2028 |
++ goto errout; |
2029 |
+ err = em->ops->change(net, data, data_len, em); |
2030 |
+ if (err < 0) |
2031 |
+ goto errout; |
2032 |
+diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c |
2033 |
+index 1047825d9f48..50794125bf02 100644 |
2034 |
+--- a/net/sched/sch_api.c |
2035 |
++++ b/net/sched/sch_api.c |
2036 |
+@@ -1891,8 +1891,9 @@ static int tclass_del_notify(struct net *net, |
2037 |
+ |
2038 |
+ struct tcf_bind_args { |
2039 |
+ struct tcf_walker w; |
2040 |
+- u32 classid; |
2041 |
++ unsigned long base; |
2042 |
+ unsigned long cl; |
2043 |
++ u32 classid; |
2044 |
+ }; |
2045 |
+ |
2046 |
+ static int tcf_node_bind(struct tcf_proto *tp, void *n, struct tcf_walker *arg) |
2047 |
+@@ -1903,28 +1904,30 @@ static int tcf_node_bind(struct tcf_proto *tp, void *n, struct tcf_walker *arg) |
2048 |
+ struct Qdisc *q = tcf_block_q(tp->chain->block); |
2049 |
+ |
2050 |
+ sch_tree_lock(q); |
2051 |
+- tp->ops->bind_class(n, a->classid, a->cl); |
2052 |
++ tp->ops->bind_class(n, a->classid, a->cl, q, a->base); |
2053 |
+ sch_tree_unlock(q); |
2054 |
+ } |
2055 |
+ return 0; |
2056 |
+ } |
2057 |
+ |
2058 |
+-static void tc_bind_tclass(struct Qdisc *q, u32 portid, u32 clid, |
2059 |
+- unsigned long new_cl) |
2060 |
++struct tc_bind_class_args { |
2061 |
++ struct qdisc_walker w; |
2062 |
++ unsigned long new_cl; |
2063 |
++ u32 portid; |
2064 |
++ u32 clid; |
2065 |
++}; |
2066 |
++ |
2067 |
++static int tc_bind_class_walker(struct Qdisc *q, unsigned long cl, |
2068 |
++ struct qdisc_walker *w) |
2069 |
+ { |
2070 |
++ struct tc_bind_class_args *a = (struct tc_bind_class_args *)w; |
2071 |
+ const struct Qdisc_class_ops *cops = q->ops->cl_ops; |
2072 |
+ struct tcf_block *block; |
2073 |
+ struct tcf_chain *chain; |
2074 |
+- unsigned long cl; |
2075 |
+ |
2076 |
+- cl = cops->find(q, portid); |
2077 |
+- if (!cl) |
2078 |
+- return; |
2079 |
+- if (!cops->tcf_block) |
2080 |
+- return; |
2081 |
+ block = cops->tcf_block(q, cl, NULL); |
2082 |
+ if (!block) |
2083 |
+- return; |
2084 |
++ return 0; |
2085 |
+ for (chain = tcf_get_next_chain(block, NULL); |
2086 |
+ chain; |
2087 |
+ chain = tcf_get_next_chain(block, chain)) { |
2088 |
+@@ -1935,11 +1938,29 @@ static void tc_bind_tclass(struct Qdisc *q, u32 portid, u32 clid, |
2089 |
+ struct tcf_bind_args arg = {}; |
2090 |
+ |
2091 |
+ arg.w.fn = tcf_node_bind; |
2092 |
+- arg.classid = clid; |
2093 |
+- arg.cl = new_cl; |
2094 |
++ arg.classid = a->clid; |
2095 |
++ arg.base = cl; |
2096 |
++ arg.cl = a->new_cl; |
2097 |
+ tp->ops->walk(tp, &arg.w, true); |
2098 |
+ } |
2099 |
+ } |
2100 |
++ |
2101 |
++ return 0; |
2102 |
++} |
2103 |
++ |
2104 |
++static void tc_bind_tclass(struct Qdisc *q, u32 portid, u32 clid, |
2105 |
++ unsigned long new_cl) |
2106 |
++{ |
2107 |
++ const struct Qdisc_class_ops *cops = q->ops->cl_ops; |
2108 |
++ struct tc_bind_class_args args = {}; |
2109 |
++ |
2110 |
++ if (!cops->tcf_block) |
2111 |
++ return; |
2112 |
++ args.portid = portid; |
2113 |
++ args.clid = clid; |
2114 |
++ args.new_cl = new_cl; |
2115 |
++ args.w.fn = tc_bind_class_walker; |
2116 |
++ q->ops->cl_ops->walk(q, &args.w); |
2117 |
+ } |
2118 |
+ |
2119 |
+ #else |