Gentoo Archives: gentoo-commits

From: Alice Ferrazzi <alicef@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.13 commit in: /
Date: Tue, 21 Nov 2017 09:43:52
Message-Id: 1511257108.1e22ee21bb5c0cf7b0f171214fe2df3323b61db9.alicef@gentoo
1 commit: 1e22ee21bb5c0cf7b0f171214fe2df3323b61db9
2 Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 21 09:38:28 2017 +0000
4 Commit: Alice Ferrazzi <alicef <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 21 09:38:28 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1e22ee21
7
8 linux kernel 4.13.15
9
10 0000_README | 4 +
11 1014_linux-4.13.15.patch | 1057 ++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 1061 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index 8777a91..7f93bc3 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -99,6 +99,10 @@ Patch: 1013_linux-4.13.14.patch
19 From: http://www.kernel.org
20 Desc: Linux 4.13.14
21
22 +Patch: 1014_linux-4.13.15.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 4.13.15
25 +
26 Patch: 1500_XATTR_USER_PREFIX.patch
27 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
28 Desc: Support for namespace user.pax.* on tmpfs.
29
30 diff --git a/1014_linux-4.13.15.patch b/1014_linux-4.13.15.patch
31 new file mode 100644
32 index 0000000..9e3a0bd
33 --- /dev/null
34 +++ b/1014_linux-4.13.15.patch
35 @@ -0,0 +1,1057 @@
36 +diff --git a/Makefile b/Makefile
37 +index 4aabae365a6c..3bd5d9d148d3 100644
38 +--- a/Makefile
39 ++++ b/Makefile
40 +@@ -1,6 +1,6 @@
41 + VERSION = 4
42 + PATCHLEVEL = 13
43 +-SUBLEVEL = 14
44 ++SUBLEVEL = 15
45 + EXTRAVERSION =
46 + NAME = Fearless Coyote
47 +
48 +diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
49 +index 87cc9ab7a13c..4b8187639c2d 100644
50 +--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
51 ++++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
52 +@@ -245,6 +245,9 @@ static int mce_severity_amd(struct mce *m, int tolerant, char **msg, bool is_exc
53 +
54 + if (m->status & MCI_STATUS_UC) {
55 +
56 ++ if (ctx == IN_KERNEL)
57 ++ return MCE_PANIC_SEVERITY;
58 ++
59 + /*
60 + * On older systems where overflow_recov flag is not present, we
61 + * should simply panic if an error overflow occurs. If
62 +@@ -255,10 +258,6 @@ static int mce_severity_amd(struct mce *m, int tolerant, char **msg, bool is_exc
63 + if (mce_flags.smca)
64 + return mce_severity_amd_smca(m, ctx);
65 +
66 +- /* software can try to contain */
67 +- if (!(m->mcgstatus & MCG_STATUS_RIPV) && (ctx == IN_KERNEL))
68 +- return MCE_PANIC_SEVERITY;
69 +-
70 + /* kill current process */
71 + return MCE_AR_SEVERITY;
72 + } else {
73 +diff --git a/crypto/dh.c b/crypto/dh.c
74 +index b1032a5c1bfa..aadaf36fb56f 100644
75 +--- a/crypto/dh.c
76 ++++ b/crypto/dh.c
77 +@@ -21,19 +21,12 @@ struct dh_ctx {
78 + MPI xa;
79 + };
80 +
81 +-static inline void dh_clear_params(struct dh_ctx *ctx)
82 ++static void dh_clear_ctx(struct dh_ctx *ctx)
83 + {
84 + mpi_free(ctx->p);
85 + mpi_free(ctx->g);
86 +- ctx->p = NULL;
87 +- ctx->g = NULL;
88 +-}
89 +-
90 +-static void dh_free_ctx(struct dh_ctx *ctx)
91 +-{
92 +- dh_clear_params(ctx);
93 + mpi_free(ctx->xa);
94 +- ctx->xa = NULL;
95 ++ memset(ctx, 0, sizeof(*ctx));
96 + }
97 +
98 + /*
99 +@@ -71,10 +64,8 @@ static int dh_set_params(struct dh_ctx *ctx, struct dh *params)
100 + return -EINVAL;
101 +
102 + ctx->g = mpi_read_raw_data(params->g, params->g_size);
103 +- if (!ctx->g) {
104 +- mpi_free(ctx->p);
105 ++ if (!ctx->g)
106 + return -EINVAL;
107 +- }
108 +
109 + return 0;
110 + }
111 +@@ -86,21 +77,23 @@ static int dh_set_secret(struct crypto_kpp *tfm, const void *buf,
112 + struct dh params;
113 +
114 + /* Free the old MPI key if any */
115 +- dh_free_ctx(ctx);
116 ++ dh_clear_ctx(ctx);
117 +
118 + if (crypto_dh_decode_key(buf, len, &params) < 0)
119 +- return -EINVAL;
120 ++ goto err_clear_ctx;
121 +
122 + if (dh_set_params(ctx, &params) < 0)
123 +- return -EINVAL;
124 ++ goto err_clear_ctx;
125 +
126 + ctx->xa = mpi_read_raw_data(params.key, params.key_size);
127 +- if (!ctx->xa) {
128 +- dh_clear_params(ctx);
129 +- return -EINVAL;
130 +- }
131 ++ if (!ctx->xa)
132 ++ goto err_clear_ctx;
133 +
134 + return 0;
135 ++
136 ++err_clear_ctx:
137 ++ dh_clear_ctx(ctx);
138 ++ return -EINVAL;
139 + }
140 +
141 + static int dh_compute_value(struct kpp_request *req)
142 +@@ -158,7 +151,7 @@ static void dh_exit_tfm(struct crypto_kpp *tfm)
143 + {
144 + struct dh_ctx *ctx = dh_get_ctx(tfm);
145 +
146 +- dh_free_ctx(ctx);
147 ++ dh_clear_ctx(ctx);
148 + }
149 +
150 + static struct kpp_alg dh = {
151 +diff --git a/crypto/dh_helper.c b/crypto/dh_helper.c
152 +index 8ba8a3f82620..7f00c771fe8d 100644
153 +--- a/crypto/dh_helper.c
154 ++++ b/crypto/dh_helper.c
155 +@@ -83,6 +83,14 @@ int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params)
156 + if (secret.len != crypto_dh_key_len(params))
157 + return -EINVAL;
158 +
159 ++ /*
160 ++ * Don't permit the buffer for 'key' or 'g' to be larger than 'p', since
161 ++ * some drivers assume otherwise.
162 ++ */
163 ++ if (params->key_size > params->p_size ||
164 ++ params->g_size > params->p_size)
165 ++ return -EINVAL;
166 ++
167 + /* Don't allocate memory. Set pointers to data within
168 + * the given buffer
169 + */
170 +@@ -90,6 +98,14 @@ int crypto_dh_decode_key(const char *buf, unsigned int len, struct dh *params)
171 + params->p = (void *)(ptr + params->key_size);
172 + params->g = (void *)(ptr + params->key_size + params->p_size);
173 +
174 ++ /*
175 ++ * Don't permit 'p' to be 0. It's not a prime number, and it's subject
176 ++ * to corner cases such as 'mod 0' being undefined or
177 ++ * crypto_kpp_maxsize() returning 0.
178 ++ */
179 ++ if (memchr_inv(params->p, 0, params->p_size) == NULL)
180 ++ return -EINVAL;
181 ++
182 + return 0;
183 + }
184 + EXPORT_SYMBOL_GPL(crypto_dh_decode_key);
185 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
186 +index e331e212f5fc..99c97f65149e 100644
187 +--- a/drivers/bluetooth/btusb.c
188 ++++ b/drivers/bluetooth/btusb.c
189 +@@ -3068,6 +3068,12 @@ static int btusb_probe(struct usb_interface *intf,
190 + if (id->driver_info & BTUSB_QCA_ROME) {
191 + data->setup_on_usb = btusb_setup_qca;
192 + hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
193 ++
194 ++ /* QCA Rome devices lose their updated firmware over suspend,
195 ++ * but the USB hub doesn't notice any status change.
196 ++ * Explicitly request a device reset on resume.
197 ++ */
198 ++ set_bit(BTUSB_RESET_RESUME, &data->flags);
199 + }
200 +
201 + #ifdef CONFIG_BT_HCIBTUSB_RTL
202 +diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
203 +index 8b27211f6c50..b8093b3bf7c7 100644
204 +--- a/drivers/hid/Kconfig
205 ++++ b/drivers/hid/Kconfig
206 +@@ -230,7 +230,7 @@ config HID_CMEDIA
207 +
208 + config HID_CP2112
209 + tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
210 +- depends on USB_HID && I2C && GPIOLIB
211 ++ depends on USB_HID && HIDRAW && I2C && GPIOLIB
212 + select GPIOLIB_IRQCHIP
213 + ---help---
214 + Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge.
215 +diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
216 +index 8a03654048bf..feb62fd4dfc3 100644
217 +--- a/drivers/hid/wacom_wac.h
218 ++++ b/drivers/hid/wacom_wac.h
219 +@@ -166,6 +166,7 @@
220 + ((f)->physical == HID_DG_PEN) || \
221 + ((f)->application == HID_DG_PEN) || \
222 + ((f)->application == HID_DG_DIGITIZER) || \
223 ++ ((f)->application == WACOM_HID_WD_PEN) || \
224 + ((f)->application == WACOM_HID_WD_DIGITIZER) || \
225 + ((f)->application == WACOM_HID_G9_PEN) || \
226 + ((f)->application == WACOM_HID_G11_PEN))
227 +diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
228 +index bd76534a2749..9672b696d428 100644
229 +--- a/drivers/media/rc/imon.c
230 ++++ b/drivers/media/rc/imon.c
231 +@@ -2516,6 +2516,11 @@ static int imon_probe(struct usb_interface *interface,
232 + mutex_lock(&driver_lock);
233 +
234 + first_if = usb_ifnum_to_if(usbdev, 0);
235 ++ if (!first_if) {
236 ++ ret = -ENODEV;
237 ++ goto fail;
238 ++ }
239 ++
240 + first_if_ctx = usb_get_intfdata(first_if);
241 +
242 + if (ifnum == 0) {
243 +diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
244 +index 6a57fc6d3472..a04101d1e716 100644
245 +--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
246 ++++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
247 +@@ -291,7 +291,7 @@ static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap)
248 + stk7700d_dib7000p_mt2266_config)
249 + != 0) {
250 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
251 +- dvb_detach(&state->dib7000p_ops);
252 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
253 + return -ENODEV;
254 + }
255 + }
256 +@@ -325,7 +325,7 @@ static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap)
257 + stk7700d_dib7000p_mt2266_config)
258 + != 0) {
259 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
260 +- dvb_detach(&state->dib7000p_ops);
261 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
262 + return -ENODEV;
263 + }
264 + }
265 +@@ -478,7 +478,7 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap)
266 + &stk7700ph_dib7700_xc3028_config) != 0) {
267 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
268 + __func__);
269 +- dvb_detach(&state->dib7000p_ops);
270 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
271 + return -ENODEV;
272 + }
273 +
274 +@@ -1010,7 +1010,7 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
275 + &dib7070p_dib7000p_config) != 0) {
276 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
277 + __func__);
278 +- dvb_detach(&state->dib7000p_ops);
279 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
280 + return -ENODEV;
281 + }
282 +
283 +@@ -1068,7 +1068,7 @@ static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap)
284 + &dib7770p_dib7000p_config) != 0) {
285 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
286 + __func__);
287 +- dvb_detach(&state->dib7000p_ops);
288 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
289 + return -ENODEV;
290 + }
291 +
292 +@@ -3056,7 +3056,7 @@ static int nim7090_frontend_attach(struct dvb_usb_adapter *adap)
293 +
294 + if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) {
295 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
296 +- dvb_detach(&state->dib7000p_ops);
297 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
298 + return -ENODEV;
299 + }
300 + adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config);
301 +@@ -3109,7 +3109,7 @@ static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap)
302 + /* initialize IC 0 */
303 + if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0) {
304 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
305 +- dvb_detach(&state->dib7000p_ops);
306 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
307 + return -ENODEV;
308 + }
309 +
310 +@@ -3139,7 +3139,7 @@ static int tfe7090pvr_frontend1_attach(struct dvb_usb_adapter *adap)
311 + i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1);
312 + if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) {
313 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__);
314 +- dvb_detach(&state->dib7000p_ops);
315 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
316 + return -ENODEV;
317 + }
318 +
319 +@@ -3214,7 +3214,7 @@ static int tfe7790p_frontend_attach(struct dvb_usb_adapter *adap)
320 + 1, 0x10, &tfe7790p_dib7000p_config) != 0) {
321 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
322 + __func__);
323 +- dvb_detach(&state->dib7000p_ops);
324 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
325 + return -ENODEV;
326 + }
327 + adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap,
328 +@@ -3309,7 +3309,7 @@ static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap)
329 + stk7070pd_dib7000p_config) != 0) {
330 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
331 + __func__);
332 +- dvb_detach(&state->dib7000p_ops);
333 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
334 + return -ENODEV;
335 + }
336 +
337 +@@ -3384,7 +3384,7 @@ static int novatd_frontend_attach(struct dvb_usb_adapter *adap)
338 + stk7070pd_dib7000p_config) != 0) {
339 + err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n",
340 + __func__);
341 +- dvb_detach(&state->dib7000p_ops);
342 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
343 + return -ENODEV;
344 + }
345 + }
346 +@@ -3620,7 +3620,7 @@ static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap)
347 +
348 + if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) {
349 + /* Demodulator not found for some reason? */
350 +- dvb_detach(&state->dib7000p_ops);
351 ++ dvb_detach(state->dib7000p_ops.set_wbd_ref);
352 + return -ENODEV;
353 + }
354 +
355 +diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c
356 +index 77d1f90b0794..684e9593547a 100644
357 +--- a/drivers/platform/x86/peaq-wmi.c
358 ++++ b/drivers/platform/x86/peaq-wmi.c
359 +@@ -8,6 +8,7 @@
360 + */
361 +
362 + #include <linux/acpi.h>
363 ++#include <linux/dmi.h>
364 + #include <linux/input-polldev.h>
365 + #include <linux/kernel.h>
366 + #include <linux/module.h>
367 +@@ -64,8 +65,23 @@ static void peaq_wmi_poll(struct input_polled_dev *dev)
368 + }
369 + }
370 +
371 ++/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */
372 ++static const struct dmi_system_id peaq_dmi_table[] = {
373 ++ {
374 ++ .matches = {
375 ++ DMI_MATCH(DMI_SYS_VENDOR, "PEAQ"),
376 ++ DMI_MATCH(DMI_PRODUCT_NAME, "PEAQ PMM C1010 MD99187"),
377 ++ },
378 ++ },
379 ++ {}
380 ++};
381 ++
382 + static int __init peaq_wmi_init(void)
383 + {
384 ++ /* WMI GUID is not unique, also check for a DMI match */
385 ++ if (!dmi_check_system(peaq_dmi_table))
386 ++ return -ENODEV;
387 ++
388 + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID))
389 + return -ENODEV;
390 +
391 +@@ -86,6 +102,9 @@ static int __init peaq_wmi_init(void)
392 +
393 + static void __exit peaq_wmi_exit(void)
394 + {
395 ++ if (!dmi_check_system(peaq_dmi_table))
396 ++ return;
397 ++
398 + if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID))
399 + return;
400 +
401 +diff --git a/drivers/staging/ccree/cc_lli_defs.h b/drivers/staging/ccree/cc_lli_defs.h
402 +index 851d3907167e..a9c417b07b04 100644
403 +--- a/drivers/staging/ccree/cc_lli_defs.h
404 ++++ b/drivers/staging/ccree/cc_lli_defs.h
405 +@@ -59,7 +59,7 @@ static inline void cc_lli_set_addr(u32 *lli_p, dma_addr_t addr)
406 + lli_p[LLI_WORD0_OFFSET] = (addr & U32_MAX);
407 + #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
408 + lli_p[LLI_WORD1_OFFSET] &= ~LLI_HADDR_MASK;
409 +- lli_p[LLI_WORD1_OFFSET] |= FIELD_PREP(LLI_HADDR_MASK, (addr >> 16));
410 ++ lli_p[LLI_WORD1_OFFSET] |= FIELD_PREP(LLI_HADDR_MASK, (addr >> 32));
411 + #endif /* CONFIG_ARCH_DMA_ADDR_T_64BIT */
412 + }
413 +
414 +diff --git a/drivers/staging/greybus/spilib.c b/drivers/staging/greybus/spilib.c
415 +index e97b19148497..1e7321a1404c 100644
416 +--- a/drivers/staging/greybus/spilib.c
417 ++++ b/drivers/staging/greybus/spilib.c
418 +@@ -544,11 +544,14 @@ int gb_spilib_master_init(struct gb_connection *connection, struct device *dev,
419 +
420 + return 0;
421 +
422 +-exit_spi_unregister:
423 +- spi_unregister_master(master);
424 + exit_spi_put:
425 + spi_master_put(master);
426 +
427 ++ return ret;
428 ++
429 ++exit_spi_unregister:
430 ++ spi_unregister_master(master);
431 ++
432 + return ret;
433 + }
434 + EXPORT_SYMBOL_GPL(gb_spilib_master_init);
435 +@@ -558,7 +561,6 @@ void gb_spilib_master_exit(struct gb_connection *connection)
436 + struct spi_master *master = gb_connection_get_data(connection);
437 +
438 + spi_unregister_master(master);
439 +- spi_master_put(master);
440 + }
441 + EXPORT_SYMBOL_GPL(gb_spilib_master_exit);
442 +
443 +diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
444 +index 3fd5f4102b36..afb9dadc1cfe 100644
445 +--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
446 ++++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
447 +@@ -259,10 +259,12 @@ static int recvframe_chkmic(struct adapter *adapter,
448 + }
449 +
450 + /* icv_len included the mic code */
451 +- datalen = precvframe->pkt->len-prxattrib->hdrlen - 8;
452 ++ datalen = precvframe->pkt->len-prxattrib->hdrlen -
453 ++ prxattrib->iv_len-prxattrib->icv_len-8;
454 + pframe = precvframe->pkt->data;
455 +- payload = pframe+prxattrib->hdrlen;
456 ++ payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
457 +
458 ++ RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n prxattrib->iv_len=%d prxattrib->icv_len=%d\n", prxattrib->iv_len, prxattrib->icv_len));
459 + rtw_seccalctkipmic(mickey, pframe, payload, datalen, &miccode[0],
460 + (unsigned char)prxattrib->priority); /* care the length of the data */
461 +
462 +@@ -407,15 +409,9 @@ static struct recv_frame *decryptor(struct adapter *padapter,
463 + default:
464 + break;
465 + }
466 +- if (res != _FAIL) {
467 +- memmove(precv_frame->pkt->data + precv_frame->attrib.iv_len, precv_frame->pkt->data, precv_frame->attrib.hdrlen);
468 +- skb_pull(precv_frame->pkt, precv_frame->attrib.iv_len);
469 +- skb_trim(precv_frame->pkt, precv_frame->pkt->len - precv_frame->attrib.icv_len);
470 +- }
471 + } else if (prxattrib->bdecrypted == 1 && prxattrib->encrypt > 0 &&
472 +- (psecuritypriv->busetkipkey == 1 || prxattrib->encrypt != _TKIP_)) {
473 +- psecuritypriv->hw_decrypted = true;
474 +- }
475 ++ (psecuritypriv->busetkipkey == 1 || prxattrib->encrypt != _TKIP_))
476 ++ psecuritypriv->hw_decrypted = true;
477 +
478 + if (res == _FAIL) {
479 + rtw_free_recvframe(return_packet, &padapter->recvpriv.free_recv_queue);
480 +@@ -456,7 +452,7 @@ static struct recv_frame *portctrl(struct adapter *adapter,
481 +
482 + if (auth_alg == 2) {
483 + /* get ether_type */
484 +- ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
485 ++ ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE + pfhdr->attrib.iv_len;
486 + memcpy(&be_tmp, ptr, 2);
487 + ether_type = ntohs(be_tmp);
488 +
489 +@@ -1138,8 +1134,6 @@ static int validate_recv_data_frame(struct adapter *adapter,
490 + }
491 +
492 + if (pattrib->privacy) {
493 +- struct sk_buff *skb = precv_frame->pkt;
494 +-
495 + RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("validate_recv_data_frame:pattrib->privacy=%x\n", pattrib->privacy));
496 + RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n ^^^^^^^^^^^IS_MCAST(pattrib->ra(0x%02x))=%d^^^^^^^^^^^^^^^6\n", pattrib->ra[0], IS_MCAST(pattrib->ra)));
497 +
498 +@@ -1148,13 +1142,6 @@ static int validate_recv_data_frame(struct adapter *adapter,
499 + RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n pattrib->encrypt=%d\n", pattrib->encrypt));
500 +
501 + SET_ICE_IV_LEN(pattrib->iv_len, pattrib->icv_len, pattrib->encrypt);
502 +-
503 +- if (pattrib->bdecrypted == 1 && pattrib->encrypt > 0) {
504 +- memmove(skb->data + pattrib->iv_len,
505 +- skb->data, pattrib->hdrlen);
506 +- skb_pull(skb, pattrib->iv_len);
507 +- skb_trim(skb, skb->len - pattrib->icv_len);
508 +- }
509 + } else {
510 + pattrib->encrypt = 0;
511 + pattrib->iv_len = 0;
512 +@@ -1274,7 +1261,6 @@ static int validate_recv_frame(struct adapter *adapter,
513 + * Hence forward the frame to the monitor anyway to preserve the order
514 + * in which frames were received.
515 + */
516 +-
517 + rtl88eu_mon_recv_hook(adapter->pmondev, precv_frame);
518 +
519 + exit:
520 +@@ -1296,8 +1282,11 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
521 + u8 *ptr = precvframe->pkt->data;
522 + struct rx_pkt_attrib *pattrib = &precvframe->attrib;
523 +
524 +- psnap = (struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen);
525 +- psnap_type = ptr+pattrib->hdrlen + SNAP_SIZE;
526 ++ if (pattrib->encrypt)
527 ++ skb_trim(precvframe->pkt, precvframe->pkt->len - pattrib->icv_len);
528 ++
529 ++ psnap = (struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
530 ++ psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
531 + /* convert hdr + possible LLC headers into Ethernet header */
532 + if ((!memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
533 + (!memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == false) &&
534 +@@ -1310,9 +1299,12 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
535 + bsnaphdr = false;
536 + }
537 +
538 +- rmv_len = pattrib->hdrlen + (bsnaphdr ? SNAP_SIZE : 0);
539 ++ rmv_len = pattrib->hdrlen + pattrib->iv_len + (bsnaphdr ? SNAP_SIZE : 0);
540 + len = precvframe->pkt->len - rmv_len;
541 +
542 ++ RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
543 ++ ("\n===pattrib->hdrlen: %x, pattrib->iv_len:%x===\n\n", pattrib->hdrlen, pattrib->iv_len));
544 ++
545 + memcpy(&be_tmp, ptr+rmv_len, 2);
546 + eth_type = ntohs(be_tmp); /* pattrib->ether_type */
547 + pattrib->eth_type = eth_type;
548 +@@ -1337,6 +1329,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
549 + struct __queue *defrag_q)
550 + {
551 + struct list_head *plist, *phead;
552 ++ u8 wlanhdr_offset;
553 + u8 curfragnum;
554 + struct recv_frame *pfhdr, *pnfhdr;
555 + struct recv_frame *prframe, *pnextrframe;
556 +@@ -1385,7 +1378,12 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
557 + /* copy the 2nd~n fragment frame's payload to the first fragment */
558 + /* get the 2nd~last fragment frame's payload */
559 +
560 +- skb_pull(pnextrframe->pkt, pnfhdr->attrib.hdrlen);
561 ++ wlanhdr_offset = pnfhdr->attrib.hdrlen + pnfhdr->attrib.iv_len;
562 ++
563 ++ skb_pull(pnextrframe->pkt, wlanhdr_offset);
564 ++
565 ++ /* append to first fragment frame's tail (if privacy frame, pull the ICV) */
566 ++ skb_trim(prframe->pkt, prframe->pkt->len - pfhdr->attrib.icv_len);
567 +
568 + /* memcpy */
569 + memcpy(skb_tail_pointer(pfhdr->pkt), pnfhdr->pkt->data,
570 +@@ -1393,7 +1391,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
571 +
572 + skb_put(prframe->pkt, pnfhdr->pkt->len);
573 +
574 +- pfhdr->attrib.icv_len = 0;
575 ++ pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len;
576 + plist = plist->next;
577 + }
578 +
579 +@@ -1519,6 +1517,11 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
580 + nr_subframes = 0;
581 + pattrib = &prframe->attrib;
582 +
583 ++ skb_pull(prframe->pkt, prframe->attrib.hdrlen);
584 ++
585 ++ if (prframe->attrib.iv_len > 0)
586 ++ skb_pull(prframe->pkt, prframe->attrib.iv_len);
587 ++
588 + a_len = prframe->pkt->len;
589 +
590 + pdata = prframe->pkt->data;
591 +@@ -1887,6 +1890,24 @@ static int process_recv_indicatepkts(struct adapter *padapter,
592 + return retval;
593 + }
594 +
595 ++static int recv_func_prehandle(struct adapter *padapter,
596 ++ struct recv_frame *rframe)
597 ++{
598 ++ int ret = _SUCCESS;
599 ++ struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
600 ++
601 ++ /* check the frame crtl field and decache */
602 ++ ret = validate_recv_frame(padapter, rframe);
603 ++ if (ret != _SUCCESS) {
604 ++ RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("recv_func: validate_recv_frame fail! drop pkt\n"));
605 ++ rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */
606 ++ goto exit;
607 ++ }
608 ++
609 ++exit:
610 ++ return ret;
611 ++}
612 ++
613 + static int recv_func_posthandle(struct adapter *padapter,
614 + struct recv_frame *prframe)
615 + {
616 +@@ -1939,7 +1960,6 @@ static int recv_func(struct adapter *padapter, struct recv_frame *rframe)
617 + struct rx_pkt_attrib *prxattrib = &rframe->attrib;
618 + struct security_priv *psecuritypriv = &padapter->securitypriv;
619 + struct mlme_priv *mlmepriv = &padapter->mlmepriv;
620 +- struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
621 +
622 + /* check if need to handle uc_swdec_pending_queue*/
623 + if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) {
624 +@@ -1951,12 +1971,9 @@ static int recv_func(struct adapter *padapter, struct recv_frame *rframe)
625 + }
626 + }
627 +
628 +- /* check the frame crtl field and decache */
629 +- ret = validate_recv_frame(padapter, rframe);
630 +- if (ret != _SUCCESS) {
631 +- RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("recv_func: validate_recv_frame fail! drop pkt\n"));
632 +- rtw_free_recvframe(rframe, pfree_recv_queue);/* free this recv_frame */
633 +- } else {
634 ++ ret = recv_func_prehandle(padapter, rframe);
635 ++
636 ++ if (ret == _SUCCESS) {
637 + /* check if need to enqueue into uc_swdec_pending_queue*/
638 + if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
639 + !IS_MCAST(prxattrib->ra) && prxattrib->encrypt > 0 &&
640 +diff --git a/drivers/staging/rtl8188eu/os_dep/mon.c b/drivers/staging/rtl8188eu/os_dep/mon.c
641 +index 37fd52d7364f..225c23fc69dc 100644
642 +--- a/drivers/staging/rtl8188eu/os_dep/mon.c
643 ++++ b/drivers/staging/rtl8188eu/os_dep/mon.c
644 +@@ -66,34 +66,6 @@ static void mon_recv_decrypted(struct net_device *dev, const u8 *data,
645 + netif_rx(skb);
646 + }
647 +
648 +-static void mon_recv_decrypted_recv(struct net_device *dev, const u8 *data,
649 +- int data_len)
650 +-{
651 +- struct sk_buff *skb;
652 +- struct ieee80211_hdr *hdr;
653 +- int hdr_len;
654 +-
655 +- skb = netdev_alloc_skb(dev, data_len);
656 +- if (!skb)
657 +- return;
658 +- memcpy(skb_put(skb, data_len), data, data_len);
659 +-
660 +- /*
661 +- * Frame data is not encrypted. Strip off protection so
662 +- * userspace doesn't think that it is.
663 +- */
664 +-
665 +- hdr = (struct ieee80211_hdr *)skb->data;
666 +- hdr_len = ieee80211_hdrlen(hdr->frame_control);
667 +-
668 +- if (ieee80211_has_protected(hdr->frame_control))
669 +- hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_PROTECTED);
670 +-
671 +- skb->ip_summed = CHECKSUM_UNNECESSARY;
672 +- skb->protocol = eth_type_trans(skb, dev);
673 +- netif_rx(skb);
674 +-}
675 +-
676 + static void mon_recv_encrypted(struct net_device *dev, const u8 *data,
677 + int data_len)
678 + {
679 +@@ -110,6 +82,7 @@ static void mon_recv_encrypted(struct net_device *dev, const u8 *data,
680 + void rtl88eu_mon_recv_hook(struct net_device *dev, struct recv_frame *frame)
681 + {
682 + struct rx_pkt_attrib *attr;
683 ++ int iv_len, icv_len;
684 + int data_len;
685 + u8 *data;
686 +
687 +@@ -122,8 +95,11 @@ void rtl88eu_mon_recv_hook(struct net_device *dev, struct recv_frame *frame)
688 + data = frame->pkt->data;
689 + data_len = frame->pkt->len;
690 +
691 ++ /* Broadcast and multicast frames don't have attr->{iv,icv}_len set */
692 ++ SET_ICE_IV_LEN(iv_len, icv_len, attr->encrypt);
693 ++
694 + if (attr->bdecrypted)
695 +- mon_recv_decrypted_recv(dev, data, data_len);
696 ++ mon_recv_decrypted(dev, data, data_len, iv_len, icv_len);
697 + else
698 + mon_recv_encrypted(dev, data, data_len);
699 + }
700 +diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h
701 +index 2c7a9b9a7c8a..d9d4c485e54c 100644
702 +--- a/drivers/staging/sm750fb/ddk750_chip.h
703 ++++ b/drivers/staging/sm750fb/ddk750_chip.h
704 +@@ -17,7 +17,7 @@ static inline u32 peek32(u32 addr)
705 + return readl(addr + mmio750);
706 + }
707 +
708 +-static inline void poke32(u32 data, u32 addr)
709 ++static inline void poke32(u32 addr, u32 data)
710 + {
711 + writel(data, addr + mmio750);
712 + }
713 +diff --git a/drivers/staging/vboxvideo/vbox_drv.h b/drivers/staging/vboxvideo/vbox_drv.h
714 +index 4b9302703b36..eeac4f0cb2c6 100644
715 +--- a/drivers/staging/vboxvideo/vbox_drv.h
716 ++++ b/drivers/staging/vboxvideo/vbox_drv.h
717 +@@ -137,8 +137,8 @@ struct vbox_connector {
718 + char name[32];
719 + struct vbox_crtc *vbox_crtc;
720 + struct {
721 +- u16 width;
722 +- u16 height;
723 ++ u32 width;
724 ++ u32 height;
725 + bool disconnected;
726 + } mode_hint;
727 + };
728 +@@ -150,8 +150,8 @@ struct vbox_crtc {
729 + unsigned int crtc_id;
730 + u32 fb_offset;
731 + bool cursor_enabled;
732 +- u16 x_hint;
733 +- u16 y_hint;
734 ++ u32 x_hint;
735 ++ u32 y_hint;
736 + };
737 +
738 + struct vbox_encoder {
739 +diff --git a/drivers/staging/vboxvideo/vbox_irq.c b/drivers/staging/vboxvideo/vbox_irq.c
740 +index 3ca8bec62ac4..74abdf02d9fd 100644
741 +--- a/drivers/staging/vboxvideo/vbox_irq.c
742 ++++ b/drivers/staging/vboxvideo/vbox_irq.c
743 +@@ -150,8 +150,8 @@ static void vbox_update_mode_hints(struct vbox_private *vbox)
744 +
745 + disconnected = !(hints->enabled);
746 + crtc_id = vbox_conn->vbox_crtc->crtc_id;
747 +- vbox_conn->mode_hint.width = hints->cx & 0x8fff;
748 +- vbox_conn->mode_hint.height = hints->cy & 0x8fff;
749 ++ vbox_conn->mode_hint.width = hints->cx;
750 ++ vbox_conn->mode_hint.height = hints->cy;
751 + vbox_conn->vbox_crtc->x_hint = hints->dx;
752 + vbox_conn->vbox_crtc->y_hint = hints->dy;
753 + vbox_conn->mode_hint.disconnected = disconnected;
754 +diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c
755 +index f2b85f3256fa..14b59ab782d0 100644
756 +--- a/drivers/staging/vboxvideo/vbox_mode.c
757 ++++ b/drivers/staging/vboxvideo/vbox_mode.c
758 +@@ -560,12 +560,22 @@ static int vbox_get_modes(struct drm_connector *connector)
759 + ++num_modes;
760 + }
761 + vbox_set_edid(connector, preferred_width, preferred_height);
762 +- drm_object_property_set_value(
763 +- &connector->base, vbox->dev->mode_config.suggested_x_property,
764 +- vbox_connector->vbox_crtc->x_hint);
765 +- drm_object_property_set_value(
766 +- &connector->base, vbox->dev->mode_config.suggested_y_property,
767 +- vbox_connector->vbox_crtc->y_hint);
768 ++
769 ++ if (vbox_connector->vbox_crtc->x_hint != -1)
770 ++ drm_object_property_set_value(&connector->base,
771 ++ vbox->dev->mode_config.suggested_x_property,
772 ++ vbox_connector->vbox_crtc->x_hint);
773 ++ else
774 ++ drm_object_property_set_value(&connector->base,
775 ++ vbox->dev->mode_config.suggested_x_property, 0);
776 ++
777 ++ if (vbox_connector->vbox_crtc->y_hint != -1)
778 ++ drm_object_property_set_value(&connector->base,
779 ++ vbox->dev->mode_config.suggested_y_property,
780 ++ vbox_connector->vbox_crtc->y_hint);
781 ++ else
782 ++ drm_object_property_set_value(&connector->base,
783 ++ vbox->dev->mode_config.suggested_y_property, 0);
784 +
785 + return num_modes;
786 + }
787 +@@ -650,9 +660,9 @@ static int vbox_connector_init(struct drm_device *dev,
788 +
789 + drm_mode_create_suggested_offset_properties(dev);
790 + drm_object_attach_property(&connector->base,
791 +- dev->mode_config.suggested_x_property, -1);
792 ++ dev->mode_config.suggested_x_property, 0);
793 + drm_object_attach_property(&connector->base,
794 +- dev->mode_config.suggested_y_property, -1);
795 ++ dev->mode_config.suggested_y_property, 0);
796 + drm_connector_register(connector);
797 +
798 + drm_mode_connector_attach_encoder(connector, encoder);
799 +diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
800 +index 9addef1f1e12..f49dfa82f1b8 100644
801 +--- a/drivers/staging/wilc1000/wilc_wlan.c
802 ++++ b/drivers/staging/wilc1000/wilc_wlan.c
803 +@@ -714,7 +714,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
804 + char *bssid = ((struct tx_complete_data *)(tqe->priv))->bssid;
805 +
806 + buffer_offset = ETH_ETHERNET_HDR_OFFSET;
807 +- memcpy(&txb[offset + 4], bssid, 6);
808 ++ memcpy(&txb[offset + 8], bssid, 6);
809 + } else {
810 + buffer_offset = HOST_HDR_OFFSET;
811 + }
812 +diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
813 +index 066b58cb6c98..54d7134ea991 100644
814 +--- a/drivers/usb/core/devio.c
815 ++++ b/drivers/usb/core/devio.c
816 +@@ -1833,6 +1833,18 @@ static int proc_unlinkurb(struct usb_dev_state *ps, void __user *arg)
817 + return 0;
818 + }
819 +
820 ++static void compute_isochronous_actual_length(struct urb *urb)
821 ++{
822 ++ unsigned int i;
823 ++
824 ++ if (urb->number_of_packets > 0) {
825 ++ urb->actual_length = 0;
826 ++ for (i = 0; i < urb->number_of_packets; i++)
827 ++ urb->actual_length +=
828 ++ urb->iso_frame_desc[i].actual_length;
829 ++ }
830 ++}
831 ++
832 + static int processcompl(struct async *as, void __user * __user *arg)
833 + {
834 + struct urb *urb = as->urb;
835 +@@ -1840,6 +1852,7 @@ static int processcompl(struct async *as, void __user * __user *arg)
836 + void __user *addr = as->userurb;
837 + unsigned int i;
838 +
839 ++ compute_isochronous_actual_length(urb);
840 + if (as->userbuffer && urb->actual_length) {
841 + if (copy_urb_data_to_user(as->userbuffer, urb))
842 + goto err_out;
843 +@@ -2008,6 +2021,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
844 + void __user *addr = as->userurb;
845 + unsigned int i;
846 +
847 ++ compute_isochronous_actual_length(urb);
848 + if (as->userbuffer && urb->actual_length) {
849 + if (copy_urb_data_to_user(as->userbuffer, urb))
850 + return -EFAULT;
851 +diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
852 +index a6aaf2f193a4..37c418e581fb 100644
853 +--- a/drivers/usb/core/quirks.c
854 ++++ b/drivers/usb/core/quirks.c
855 +@@ -221,6 +221,9 @@ static const struct usb_device_id usb_quirk_list[] = {
856 + /* Corsair Strafe RGB */
857 + { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT },
858 +
859 ++ /* Corsair K70 LUX */
860 ++ { USB_DEVICE(0x1b1c, 0x1b36), .driver_info = USB_QUIRK_DELAY_INIT },
861 ++
862 + /* MIDI keyboard WORLDE MINI */
863 + { USB_DEVICE(0x1c75, 0x0204), .driver_info =
864 + USB_QUIRK_CONFIG_INTF_STRINGS },
865 +diff --git a/drivers/usb/early/xhci-dbc.h b/drivers/usb/early/xhci-dbc.h
866 +index 2df0f6e613fe..a516cab0bf4a 100644
867 +--- a/drivers/usb/early/xhci-dbc.h
868 ++++ b/drivers/usb/early/xhci-dbc.h
869 +@@ -90,8 +90,8 @@ struct xdbc_context {
870 +
871 + #define XDBC_INFO_CONTEXT_SIZE 48
872 + #define XDBC_MAX_STRING_LENGTH 64
873 +-#define XDBC_STRING_MANUFACTURER "Linux"
874 +-#define XDBC_STRING_PRODUCT "Remote GDB"
875 ++#define XDBC_STRING_MANUFACTURER "Linux Foundation"
876 ++#define XDBC_STRING_PRODUCT "Linux USB GDB Target"
877 + #define XDBC_STRING_SERIAL "0001"
878 +
879 + struct xdbc_strings {
880 +@@ -103,7 +103,7 @@ struct xdbc_strings {
881 +
882 + #define XDBC_PROTOCOL 1 /* GNU Remote Debug Command Set */
883 + #define XDBC_VENDOR_ID 0x1d6b /* Linux Foundation 0x1d6b */
884 +-#define XDBC_PRODUCT_ID 0x0004 /* __le16 idProduct; device 0004 */
885 ++#define XDBC_PRODUCT_ID 0x0011 /* __le16 idProduct; device 0011 */
886 + #define XDBC_DEVICE_REV 0x0010 /* 0.10 */
887 +
888 + /*
889 +diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
890 +index d21874b35cf6..6121ab4b29bb 100644
891 +--- a/drivers/usb/gadget/function/f_fs.c
892 ++++ b/drivers/usb/gadget/function/f_fs.c
893 +@@ -3669,6 +3669,7 @@ static void ffs_closed(struct ffs_data *ffs)
894 + goto done;
895 +
896 + ffs_obj->desc_ready = false;
897 ++ ffs_obj->ffs_data = NULL;
898 +
899 + if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags) &&
900 + ffs_obj->ffs_closed_callback)
901 +diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
902 +index b2f2e87aed94..91e7e3a166a5 100644
903 +--- a/drivers/usb/serial/garmin_gps.c
904 ++++ b/drivers/usb/serial/garmin_gps.c
905 +@@ -138,6 +138,7 @@ struct garmin_data {
906 + __u8 privpkt[4*6];
907 + spinlock_t lock;
908 + struct list_head pktlist;
909 ++ struct usb_anchor write_urbs;
910 + };
911 +
912 +
913 +@@ -905,13 +906,19 @@ static int garmin_init_session(struct usb_serial_port *port)
914 + sizeof(GARMIN_START_SESSION_REQ), 0);
915 +
916 + if (status < 0)
917 +- break;
918 ++ goto err_kill_urbs;
919 + }
920 +
921 + if (status > 0)
922 + status = 0;
923 + }
924 +
925 ++ return status;
926 ++
927 ++err_kill_urbs:
928 ++ usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
929 ++ usb_kill_urb(port->interrupt_in_urb);
930 ++
931 + return status;
932 + }
933 +
934 +@@ -930,7 +937,6 @@ static int garmin_open(struct tty_struct *tty, struct usb_serial_port *port)
935 + spin_unlock_irqrestore(&garmin_data_p->lock, flags);
936 +
937 + /* shutdown any bulk reads that might be going on */
938 +- usb_kill_urb(port->write_urb);
939 + usb_kill_urb(port->read_urb);
940 +
941 + if (garmin_data_p->state == STATE_RESET)
942 +@@ -953,7 +959,7 @@ static void garmin_close(struct usb_serial_port *port)
943 +
944 + /* shutdown our urbs */
945 + usb_kill_urb(port->read_urb);
946 +- usb_kill_urb(port->write_urb);
947 ++ usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
948 +
949 + /* keep reset state so we know that we must start a new session */
950 + if (garmin_data_p->state != STATE_RESET)
951 +@@ -1037,12 +1043,14 @@ static int garmin_write_bulk(struct usb_serial_port *port,
952 + }
953 +
954 + /* send it down the pipe */
955 ++ usb_anchor_urb(urb, &garmin_data_p->write_urbs);
956 + status = usb_submit_urb(urb, GFP_ATOMIC);
957 + if (status) {
958 + dev_err(&port->dev,
959 + "%s - usb_submit_urb(write bulk) failed with status = %d\n",
960 + __func__, status);
961 + count = status;
962 ++ usb_unanchor_urb(urb);
963 + kfree(buffer);
964 + }
965 +
966 +@@ -1401,9 +1409,16 @@ static int garmin_port_probe(struct usb_serial_port *port)
967 + garmin_data_p->state = 0;
968 + garmin_data_p->flags = 0;
969 + garmin_data_p->count = 0;
970 ++ init_usb_anchor(&garmin_data_p->write_urbs);
971 + usb_set_serial_port_data(port, garmin_data_p);
972 +
973 + status = garmin_init_session(port);
974 ++ if (status)
975 ++ goto err_free;
976 ++
977 ++ return 0;
978 ++err_free:
979 ++ kfree(garmin_data_p);
980 +
981 + return status;
982 + }
983 +@@ -1413,6 +1428,7 @@ static int garmin_port_remove(struct usb_serial_port *port)
984 + {
985 + struct garmin_data *garmin_data_p = usb_get_serial_port_data(port);
986 +
987 ++ usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
988 + usb_kill_urb(port->interrupt_in_urb);
989 + del_timer_sync(&garmin_data_p->timer);
990 + kfree(garmin_data_p);
991 +diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
992 +index 14511d6a7d44..3950d44b80f1 100644
993 +--- a/drivers/usb/serial/metro-usb.c
994 ++++ b/drivers/usb/serial/metro-usb.c
995 +@@ -189,7 +189,7 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)
996 + dev_err(&port->dev,
997 + "%s - failed submitting interrupt in urb, error code=%d\n",
998 + __func__, result);
999 +- goto exit;
1000 ++ return result;
1001 + }
1002 +
1003 + /* Send activate cmd to device */
1004 +@@ -198,9 +198,14 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)
1005 + dev_err(&port->dev,
1006 + "%s - failed to configure device, error code=%d\n",
1007 + __func__, result);
1008 +- goto exit;
1009 ++ goto err_kill_urb;
1010 + }
1011 +-exit:
1012 ++
1013 ++ return 0;
1014 ++
1015 ++err_kill_urb:
1016 ++ usb_kill_urb(port->interrupt_in_urb);
1017 ++
1018 + return result;
1019 + }
1020 +
1021 +diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
1022 +index eb9928963a53..9f9d3a904464 100644
1023 +--- a/drivers/usb/serial/qcserial.c
1024 ++++ b/drivers/usb/serial/qcserial.c
1025 +@@ -148,6 +148,7 @@ static const struct usb_device_id id_table[] = {
1026 + {DEVICE_SWI(0x1199, 0x68a2)}, /* Sierra Wireless MC7710 */
1027 + {DEVICE_SWI(0x1199, 0x68c0)}, /* Sierra Wireless MC7304/MC7354 */
1028 + {DEVICE_SWI(0x1199, 0x901c)}, /* Sierra Wireless EM7700 */
1029 ++ {DEVICE_SWI(0x1199, 0x901e)}, /* Sierra Wireless EM7355 QDL */
1030 + {DEVICE_SWI(0x1199, 0x901f)}, /* Sierra Wireless EM7355 */
1031 + {DEVICE_SWI(0x1199, 0x9040)}, /* Sierra Wireless Modem */
1032 + {DEVICE_SWI(0x1199, 0x9041)}, /* Sierra Wireless MC7305/MC7355 */
1033 +diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
1034 +index 12f4c5a91e62..48f285a1ad00 100644
1035 +--- a/drivers/usb/serial/usb_debug.c
1036 ++++ b/drivers/usb/serial/usb_debug.c
1037 +@@ -34,13 +34,13 @@ static const struct usb_device_id id_table[] = {
1038 + };
1039 +
1040 + static const struct usb_device_id dbc_id_table[] = {
1041 +- { USB_DEVICE(0x1d6b, 0x0004) },
1042 ++ { USB_DEVICE(0x1d6b, 0x0011) },
1043 + { },
1044 + };
1045 +
1046 + static const struct usb_device_id id_table_combined[] = {
1047 + { USB_DEVICE(0x0525, 0x127a) },
1048 +- { USB_DEVICE(0x1d6b, 0x0004) },
1049 ++ { USB_DEVICE(0x1d6b, 0x0011) },
1050 + { },
1051 + };
1052 + MODULE_DEVICE_TABLE(usb, id_table_combined);
1053 +diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
1054 +index 3237bc010e1c..3c54d5c40952 100644
1055 +--- a/tools/testing/selftests/x86/protection_keys.c
1056 ++++ b/tools/testing/selftests/x86/protection_keys.c
1057 +@@ -188,17 +188,29 @@ void lots_o_noops_around_write(int *write_to_me)
1058 + #define u64 uint64_t
1059 +
1060 + #ifdef __i386__
1061 +-#define SYS_mprotect_key 380
1062 +-#define SYS_pkey_alloc 381
1063 +-#define SYS_pkey_free 382
1064 ++
1065 ++#ifndef SYS_mprotect_key
1066 ++# define SYS_mprotect_key 380
1067 ++#endif
1068 ++#ifndef SYS_pkey_alloc
1069 ++# define SYS_pkey_alloc 381
1070 ++# define SYS_pkey_free 382
1071 ++#endif
1072 + #define REG_IP_IDX REG_EIP
1073 + #define si_pkey_offset 0x14
1074 ++
1075 + #else
1076 +-#define SYS_mprotect_key 329
1077 +-#define SYS_pkey_alloc 330
1078 +-#define SYS_pkey_free 331
1079 ++
1080 ++#ifndef SYS_mprotect_key
1081 ++# define SYS_mprotect_key 329
1082 ++#endif
1083 ++#ifndef SYS_pkey_alloc
1084 ++# define SYS_pkey_alloc 330
1085 ++# define SYS_pkey_free 331
1086 ++#endif
1087 + #define REG_IP_IDX REG_RIP
1088 + #define si_pkey_offset 0x20
1089 ++
1090 + #endif
1091 +
1092 + void dump_mem(void *dumpme, int len_bytes)