Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.14 commit in: /
Date: Wed, 09 May 2018 10:56:04
Message-Id: 1525863349.2f864f13e29d21eadf9074dce72ead7defba7c3d.mpagano@gentoo
1 commit: 2f864f13e29d21eadf9074dce72ead7defba7c3d
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 9 10:55:49 2018 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed May 9 10:55:49 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2f864f13
7
8 Linux patch 4.14.40
9
10 0000_README | 4 +
11 1039_linux-4.14.40.patch | 2562 ++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 2566 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index 648c705..35b5351 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -199,6 +199,10 @@ Patch: 1038_linux-4.14.39.patch
19 From: http://www.kernel.org
20 Desc: Linux 4.14.39
21
22 +Patch: 1039_linux-4.14.40.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 4.14.40
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/1039_linux-4.14.40.patch b/1039_linux-4.14.40.patch
31 new file mode 100644
32 index 0000000..f0610e0
33 --- /dev/null
34 +++ b/1039_linux-4.14.40.patch
35 @@ -0,0 +1,2562 @@
36 +diff --git a/Makefile b/Makefile
37 +index 248b99283f71..6eede39f898a 100644
38 +--- a/Makefile
39 ++++ b/Makefile
40 +@@ -1,7 +1,7 @@
41 + # SPDX-License-Identifier: GPL-2.0
42 + VERSION = 4
43 + PATCHLEVEL = 14
44 +-SUBLEVEL = 39
45 ++SUBLEVEL = 40
46 + EXTRAVERSION =
47 + NAME = Petit Gorille
48 +
49 +diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
50 +index ef1856b15488..9e80802e3603 100644
51 +--- a/drivers/acpi/button.c
52 ++++ b/drivers/acpi/button.c
53 +@@ -595,4 +595,26 @@ module_param_call(lid_init_state,
54 + NULL, 0644);
55 + MODULE_PARM_DESC(lid_init_state, "Behavior for reporting LID initial state");
56 +
57 +-module_acpi_driver(acpi_button_driver);
58 ++static int acpi_button_register_driver(struct acpi_driver *driver)
59 ++{
60 ++ /*
61 ++ * Modules such as nouveau.ko and i915.ko have a link time dependency
62 ++ * on acpi_lid_open(), and would therefore not be loadable on ACPI
63 ++ * capable kernels booted in non-ACPI mode if the return value of
64 ++ * acpi_bus_register_driver() is returned from here with ACPI disabled
65 ++ * when this driver is built as a module.
66 ++ */
67 ++ if (acpi_disabled)
68 ++ return 0;
69 ++
70 ++ return acpi_bus_register_driver(driver);
71 ++}
72 ++
73 ++static void acpi_button_unregister_driver(struct acpi_driver *driver)
74 ++{
75 ++ if (!acpi_disabled)
76 ++ acpi_bus_unregister_driver(driver);
77 ++}
78 ++
79 ++module_driver(acpi_button_driver, acpi_button_register_driver,
80 ++ acpi_button_unregister_driver);
81 +diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
82 +index ceae25112acd..57e1b203cf36 100644
83 +--- a/drivers/crypto/talitos.c
84 ++++ b/drivers/crypto/talitos.c
85 +@@ -1116,10 +1116,10 @@ static int sg_to_link_tbl_offset(struct scatterlist *sg, int sg_count,
86 + return count;
87 + }
88 +
89 +-int talitos_sg_map(struct device *dev, struct scatterlist *src,
90 +- unsigned int len, struct talitos_edesc *edesc,
91 +- struct talitos_ptr *ptr,
92 +- int sg_count, unsigned int offset, int tbl_off)
93 ++static int talitos_sg_map_ext(struct device *dev, struct scatterlist *src,
94 ++ unsigned int len, struct talitos_edesc *edesc,
95 ++ struct talitos_ptr *ptr, int sg_count,
96 ++ unsigned int offset, int tbl_off, int elen)
97 + {
98 + struct talitos_private *priv = dev_get_drvdata(dev);
99 + bool is_sec1 = has_ftr_sec1(priv);
100 +@@ -1130,7 +1130,7 @@ int talitos_sg_map(struct device *dev, struct scatterlist *src,
101 + }
102 +
103 + to_talitos_ptr_len(ptr, len, is_sec1);
104 +- to_talitos_ptr_ext_set(ptr, 0, is_sec1);
105 ++ to_talitos_ptr_ext_set(ptr, elen, is_sec1);
106 +
107 + if (sg_count == 1) {
108 + to_talitos_ptr(ptr, sg_dma_address(src) + offset, is_sec1);
109 +@@ -1140,7 +1140,7 @@ int talitos_sg_map(struct device *dev, struct scatterlist *src,
110 + to_talitos_ptr(ptr, edesc->dma_link_tbl + offset, is_sec1);
111 + return sg_count;
112 + }
113 +- sg_count = sg_to_link_tbl_offset(src, sg_count, offset, len,
114 ++ sg_count = sg_to_link_tbl_offset(src, sg_count, offset, len + elen,
115 + &edesc->link_tbl[tbl_off]);
116 + if (sg_count == 1) {
117 + /* Only one segment now, so no link tbl needed*/
118 +@@ -1154,6 +1154,15 @@ int talitos_sg_map(struct device *dev, struct scatterlist *src,
119 + return sg_count;
120 + }
121 +
122 ++static int talitos_sg_map(struct device *dev, struct scatterlist *src,
123 ++ unsigned int len, struct talitos_edesc *edesc,
124 ++ struct talitos_ptr *ptr, int sg_count,
125 ++ unsigned int offset, int tbl_off)
126 ++{
127 ++ return talitos_sg_map_ext(dev, src, len, edesc, ptr, sg_count, offset,
128 ++ tbl_off, 0);
129 ++}
130 ++
131 + /*
132 + * fill in and submit ipsec_esp descriptor
133 + */
134 +@@ -1171,7 +1180,7 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
135 + unsigned int ivsize = crypto_aead_ivsize(aead);
136 + int tbl_off = 0;
137 + int sg_count, ret;
138 +- int sg_link_tbl_len;
139 ++ int elen = 0;
140 + bool sync_needed = false;
141 + struct talitos_private *priv = dev_get_drvdata(dev);
142 + bool is_sec1 = has_ftr_sec1(priv);
143 +@@ -1225,20 +1234,12 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
144 + * extent is bytes of HMAC postpended to ciphertext,
145 + * typically 12 for ipsec
146 + */
147 +- to_talitos_ptr_len(&desc->ptr[4], cryptlen, is_sec1);
148 +- to_talitos_ptr_ext_set(&desc->ptr[4], 0, is_sec1);
149 +-
150 +- sg_link_tbl_len = cryptlen;
151 +-
152 +- if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP) {
153 +- to_talitos_ptr_ext_set(&desc->ptr[4], authsize, is_sec1);
154 +-
155 +- if (edesc->desc.hdr & DESC_HDR_MODE1_MDEU_CICV)
156 +- sg_link_tbl_len += authsize;
157 +- }
158 ++ if ((desc->hdr & DESC_HDR_TYPE_IPSEC_ESP) &&
159 ++ (desc->hdr & DESC_HDR_MODE1_MDEU_CICV))
160 ++ elen = authsize;
161 +
162 +- ret = talitos_sg_map(dev, areq->src, sg_link_tbl_len, edesc,
163 +- &desc->ptr[4], sg_count, areq->assoclen, tbl_off);
164 ++ ret = talitos_sg_map_ext(dev, areq->src, cryptlen, edesc, &desc->ptr[4],
165 ++ sg_count, areq->assoclen, tbl_off, elen);
166 +
167 + if (ret > 1) {
168 + tbl_off += ret;
169 +diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
170 +index de5e7dee7ad6..2e6c61d9b8ea 100644
171 +--- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
172 ++++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
173 +@@ -55,7 +55,9 @@ static int dumb_vga_get_modes(struct drm_connector *connector)
174 + }
175 +
176 + drm_mode_connector_update_edid_property(connector, edid);
177 +- return drm_add_edid_modes(connector, edid);
178 ++ ret = drm_add_edid_modes(connector, edid);
179 ++ kfree(edid);
180 ++ return ret;
181 +
182 + fallback:
183 + /*
184 +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
185 +index 9e010f8c36a1..11f1c30ead54 100644
186 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
187 ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
188 +@@ -2612,6 +2612,7 @@ void vmw_kms_helper_resource_finish(struct vmw_validation_ctx *ctx,
189 + vmw_kms_helper_buffer_finish(res->dev_priv, NULL, ctx->buf,
190 + out_fence, NULL);
191 +
192 ++ vmw_dmabuf_unreference(&ctx->buf);
193 + vmw_resource_unreserve(res, false, NULL, 0);
194 + mutex_unlock(&res->dev_priv->cmdbuf_mutex);
195 + }
196 +diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
197 +index 0698d92e2656..c65f0e8ecbd6 100644
198 +--- a/drivers/infiniband/core/ucma.c
199 ++++ b/drivers/infiniband/core/ucma.c
200 +@@ -678,7 +678,7 @@ static ssize_t ucma_resolve_ip(struct ucma_file *file,
201 + if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
202 + return -EFAULT;
203 +
204 +- if (!rdma_addr_size_in6(&cmd.src_addr) ||
205 ++ if ((cmd.src_addr.sin6_family && !rdma_addr_size_in6(&cmd.src_addr)) ||
206 + !rdma_addr_size_in6(&cmd.dst_addr))
207 + return -EINVAL;
208 +
209 +diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c
210 +index 73feeeeb4283..6b15508ce17e 100644
211 +--- a/drivers/infiniband/hw/cxgb4/cq.c
212 ++++ b/drivers/infiniband/hw/cxgb4/cq.c
213 +@@ -330,7 +330,7 @@ static void advance_oldest_read(struct t4_wq *wq)
214 + * Deal with out-of-order and/or completions that complete
215 + * prior unsignalled WRs.
216 + */
217 +-void c4iw_flush_hw_cq(struct c4iw_cq *chp)
218 ++void c4iw_flush_hw_cq(struct c4iw_cq *chp, struct c4iw_qp *flush_qhp)
219 + {
220 + struct t4_cqe *hw_cqe, *swcqe, read_cqe;
221 + struct c4iw_qp *qhp;
222 +@@ -354,6 +354,13 @@ void c4iw_flush_hw_cq(struct c4iw_cq *chp)
223 + if (qhp == NULL)
224 + goto next_cqe;
225 +
226 ++ if (flush_qhp != qhp) {
227 ++ spin_lock(&qhp->lock);
228 ++
229 ++ if (qhp->wq.flushed == 1)
230 ++ goto next_cqe;
231 ++ }
232 ++
233 + if (CQE_OPCODE(hw_cqe) == FW_RI_TERMINATE)
234 + goto next_cqe;
235 +
236 +@@ -405,6 +412,8 @@ void c4iw_flush_hw_cq(struct c4iw_cq *chp)
237 + next_cqe:
238 + t4_hwcq_consume(&chp->cq);
239 + ret = t4_next_hw_cqe(&chp->cq, &hw_cqe);
240 ++ if (qhp && flush_qhp != qhp)
241 ++ spin_unlock(&qhp->lock);
242 + }
243 + }
244 +
245 +diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
246 +index fc886f81b885..99f232e3ea93 100644
247 +--- a/drivers/infiniband/hw/cxgb4/device.c
248 ++++ b/drivers/infiniband/hw/cxgb4/device.c
249 +@@ -884,6 +884,11 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
250 +
251 + rdev->status_page->db_off = 0;
252 +
253 ++ init_completion(&rdev->rqt_compl);
254 ++ init_completion(&rdev->pbl_compl);
255 ++ kref_init(&rdev->rqt_kref);
256 ++ kref_init(&rdev->pbl_kref);
257 ++
258 + return 0;
259 + err_free_status_page_and_wr_log:
260 + if (c4iw_wr_log && rdev->wr_log)
261 +@@ -902,13 +907,15 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
262 +
263 + static void c4iw_rdev_close(struct c4iw_rdev *rdev)
264 + {
265 +- destroy_workqueue(rdev->free_workq);
266 + kfree(rdev->wr_log);
267 + c4iw_release_dev_ucontext(rdev, &rdev->uctx);
268 + free_page((unsigned long)rdev->status_page);
269 + c4iw_pblpool_destroy(rdev);
270 + c4iw_rqtpool_destroy(rdev);
271 ++ wait_for_completion(&rdev->pbl_compl);
272 ++ wait_for_completion(&rdev->rqt_compl);
273 + c4iw_ocqp_pool_destroy(rdev);
274 ++ destroy_workqueue(rdev->free_workq);
275 + c4iw_destroy_resource(&rdev->resource);
276 + }
277 +
278 +diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
279 +index 20c481115a99..f52779871d04 100644
280 +--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
281 ++++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
282 +@@ -185,6 +185,10 @@ struct c4iw_rdev {
283 + struct wr_log_entry *wr_log;
284 + int wr_log_size;
285 + struct workqueue_struct *free_workq;
286 ++ struct completion rqt_compl;
287 ++ struct completion pbl_compl;
288 ++ struct kref rqt_kref;
289 ++ struct kref pbl_kref;
290 + };
291 +
292 + static inline int c4iw_fatal_error(struct c4iw_rdev *rdev)
293 +@@ -989,7 +993,7 @@ void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 addr, int size);
294 + u32 c4iw_ocqp_pool_alloc(struct c4iw_rdev *rdev, int size);
295 + void c4iw_ocqp_pool_free(struct c4iw_rdev *rdev, u32 addr, int size);
296 + int c4iw_ofld_send(struct c4iw_rdev *rdev, struct sk_buff *skb);
297 +-void c4iw_flush_hw_cq(struct c4iw_cq *chp);
298 ++void c4iw_flush_hw_cq(struct c4iw_cq *chp, struct c4iw_qp *flush_qhp);
299 + void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count);
300 + int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, gfp_t gfp);
301 + int c4iw_flush_rq(struct t4_wq *wq, struct t4_cq *cq, int count);
302 +diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
303 +index f311ea73c806..a8a8f65a1e51 100644
304 +--- a/drivers/infiniband/hw/cxgb4/qp.c
305 ++++ b/drivers/infiniband/hw/cxgb4/qp.c
306 +@@ -1349,12 +1349,12 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
307 + qhp->wq.flushed = 1;
308 + t4_set_wq_in_error(&qhp->wq);
309 +
310 +- c4iw_flush_hw_cq(rchp);
311 ++ c4iw_flush_hw_cq(rchp, qhp);
312 + c4iw_count_rcqes(&rchp->cq, &qhp->wq, &count);
313 + rq_flushed = c4iw_flush_rq(&qhp->wq, &rchp->cq, count);
314 +
315 + if (schp != rchp)
316 +- c4iw_flush_hw_cq(schp);
317 ++ c4iw_flush_hw_cq(schp, qhp);
318 + sq_flushed = c4iw_flush_sq(qhp);
319 +
320 + spin_unlock(&qhp->lock);
321 +diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c
322 +index 8ff0cbe5cb16..755a77a9178b 100644
323 +--- a/drivers/infiniband/hw/cxgb4/resource.c
324 ++++ b/drivers/infiniband/hw/cxgb4/resource.c
325 +@@ -260,12 +260,22 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size)
326 + rdev->stats.pbl.cur += roundup(size, 1 << MIN_PBL_SHIFT);
327 + if (rdev->stats.pbl.cur > rdev->stats.pbl.max)
328 + rdev->stats.pbl.max = rdev->stats.pbl.cur;
329 ++ kref_get(&rdev->pbl_kref);
330 + } else
331 + rdev->stats.pbl.fail++;
332 + mutex_unlock(&rdev->stats.lock);
333 + return (u32)addr;
334 + }
335 +
336 ++static void destroy_pblpool(struct kref *kref)
337 ++{
338 ++ struct c4iw_rdev *rdev;
339 ++
340 ++ rdev = container_of(kref, struct c4iw_rdev, pbl_kref);
341 ++ gen_pool_destroy(rdev->pbl_pool);
342 ++ complete(&rdev->pbl_compl);
343 ++}
344 ++
345 + void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 addr, int size)
346 + {
347 + pr_debug("%s addr 0x%x size %d\n", __func__, addr, size);
348 +@@ -273,6 +283,7 @@ void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 addr, int size)
349 + rdev->stats.pbl.cur -= roundup(size, 1 << MIN_PBL_SHIFT);
350 + mutex_unlock(&rdev->stats.lock);
351 + gen_pool_free(rdev->pbl_pool, (unsigned long)addr, size);
352 ++ kref_put(&rdev->pbl_kref, destroy_pblpool);
353 + }
354 +
355 + int c4iw_pblpool_create(struct c4iw_rdev *rdev)
356 +@@ -310,7 +321,7 @@ int c4iw_pblpool_create(struct c4iw_rdev *rdev)
357 +
358 + void c4iw_pblpool_destroy(struct c4iw_rdev *rdev)
359 + {
360 +- gen_pool_destroy(rdev->pbl_pool);
361 ++ kref_put(&rdev->pbl_kref, destroy_pblpool);
362 + }
363 +
364 + /*
365 +@@ -331,12 +342,22 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size)
366 + rdev->stats.rqt.cur += roundup(size << 6, 1 << MIN_RQT_SHIFT);
367 + if (rdev->stats.rqt.cur > rdev->stats.rqt.max)
368 + rdev->stats.rqt.max = rdev->stats.rqt.cur;
369 ++ kref_get(&rdev->rqt_kref);
370 + } else
371 + rdev->stats.rqt.fail++;
372 + mutex_unlock(&rdev->stats.lock);
373 + return (u32)addr;
374 + }
375 +
376 ++static void destroy_rqtpool(struct kref *kref)
377 ++{
378 ++ struct c4iw_rdev *rdev;
379 ++
380 ++ rdev = container_of(kref, struct c4iw_rdev, rqt_kref);
381 ++ gen_pool_destroy(rdev->rqt_pool);
382 ++ complete(&rdev->rqt_compl);
383 ++}
384 ++
385 + void c4iw_rqtpool_free(struct c4iw_rdev *rdev, u32 addr, int size)
386 + {
387 + pr_debug("%s addr 0x%x size %d\n", __func__, addr, size << 6);
388 +@@ -344,6 +365,7 @@ void c4iw_rqtpool_free(struct c4iw_rdev *rdev, u32 addr, int size)
389 + rdev->stats.rqt.cur -= roundup(size << 6, 1 << MIN_RQT_SHIFT);
390 + mutex_unlock(&rdev->stats.lock);
391 + gen_pool_free(rdev->rqt_pool, (unsigned long)addr, size << 6);
392 ++ kref_put(&rdev->rqt_kref, destroy_rqtpool);
393 + }
394 +
395 + int c4iw_rqtpool_create(struct c4iw_rdev *rdev)
396 +@@ -380,7 +402,7 @@ int c4iw_rqtpool_create(struct c4iw_rdev *rdev)
397 +
398 + void c4iw_rqtpool_destroy(struct c4iw_rdev *rdev)
399 + {
400 +- gen_pool_destroy(rdev->rqt_pool);
401 ++ kref_put(&rdev->rqt_kref, destroy_rqtpool);
402 + }
403 +
404 + /*
405 +diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c
406 +index 7372cc00cb2d..72c836b826ca 100644
407 +--- a/drivers/infiniband/hw/hfi1/driver.c
408 ++++ b/drivers/infiniband/hw/hfi1/driver.c
409 +@@ -437,31 +437,43 @@ void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
410 + bool do_cnp)
411 + {
412 + struct hfi1_ibport *ibp = to_iport(qp->ibqp.device, qp->port_num);
413 ++ struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
414 + struct ib_other_headers *ohdr = pkt->ohdr;
415 + struct ib_grh *grh = pkt->grh;
416 + u32 rqpn = 0, bth1;
417 +- u16 pkey, rlid, dlid = ib_get_dlid(pkt->hdr);
418 ++ u16 pkey;
419 ++ u32 rlid, slid, dlid = 0;
420 + u8 hdr_type, sc, svc_type;
421 + bool is_mcast = false;
422 +
423 ++ /* can be called from prescan */
424 + if (pkt->etype == RHF_RCV_TYPE_BYPASS) {
425 + is_mcast = hfi1_is_16B_mcast(dlid);
426 + pkey = hfi1_16B_get_pkey(pkt->hdr);
427 + sc = hfi1_16B_get_sc(pkt->hdr);
428 ++ dlid = hfi1_16B_get_dlid(pkt->hdr);
429 ++ slid = hfi1_16B_get_slid(pkt->hdr);
430 + hdr_type = HFI1_PKT_TYPE_16B;
431 + } else {
432 + is_mcast = (dlid > be16_to_cpu(IB_MULTICAST_LID_BASE)) &&
433 + (dlid != be16_to_cpu(IB_LID_PERMISSIVE));
434 + pkey = ib_bth_get_pkey(ohdr);
435 + sc = hfi1_9B_get_sc5(pkt->hdr, pkt->rhf);
436 ++ dlid = ib_get_dlid(pkt->hdr);
437 ++ slid = ib_get_slid(pkt->hdr);
438 + hdr_type = HFI1_PKT_TYPE_9B;
439 + }
440 +
441 + switch (qp->ibqp.qp_type) {
442 ++ case IB_QPT_UD:
443 ++ dlid = ppd->lid;
444 ++ rlid = slid;
445 ++ rqpn = ib_get_sqpn(pkt->ohdr);
446 ++ svc_type = IB_CC_SVCTYPE_UD;
447 ++ break;
448 + case IB_QPT_SMI:
449 + case IB_QPT_GSI:
450 +- case IB_QPT_UD:
451 +- rlid = ib_get_slid(pkt->hdr);
452 ++ rlid = slid;
453 + rqpn = ib_get_sqpn(pkt->ohdr);
454 + svc_type = IB_CC_SVCTYPE_UD;
455 + break;
456 +@@ -486,7 +498,6 @@ void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
457 + dlid, rlid, sc, grh);
458 +
459 + if (!is_mcast && (bth1 & IB_BECN_SMASK)) {
460 +- struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
461 + u32 lqpn = bth1 & RVT_QPN_MASK;
462 + u8 sl = ibp->sc_to_sl[sc];
463 +
464 +diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h
465 +index dc9c951ef946..ccc7b9b8637e 100644
466 +--- a/drivers/infiniband/hw/hfi1/hfi.h
467 ++++ b/drivers/infiniband/hw/hfi1/hfi.h
468 +@@ -1523,13 +1523,13 @@ void set_link_ipg(struct hfi1_pportdata *ppd);
469 + void process_becn(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, u32 lqpn,
470 + u32 rqpn, u8 svc_type);
471 + void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
472 +- u32 pkey, u32 slid, u32 dlid, u8 sc5,
473 ++ u16 pkey, u32 slid, u32 dlid, u8 sc5,
474 + const struct ib_grh *old_grh);
475 + void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
476 +- u32 remote_qpn, u32 pkey, u32 slid, u32 dlid,
477 ++ u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
478 + u8 sc5, const struct ib_grh *old_grh);
479 + typedef void (*hfi1_handle_cnp)(struct hfi1_ibport *ibp, struct rvt_qp *qp,
480 +- u32 remote_qpn, u32 pkey, u32 slid, u32 dlid,
481 ++ u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
482 + u8 sc5, const struct ib_grh *old_grh);
483 +
484 + /* We support only two types - 9B and 16B for now */
485 +@@ -2431,7 +2431,7 @@ static inline void hfi1_make_16b_hdr(struct hfi1_16b_header *hdr,
486 + ((slid >> OPA_16B_SLID_SHIFT) << OPA_16B_SLID_HIGH_SHIFT);
487 + lrh2 = (lrh2 & ~OPA_16B_DLID_MASK) |
488 + ((dlid >> OPA_16B_DLID_SHIFT) << OPA_16B_DLID_HIGH_SHIFT);
489 +- lrh2 = (lrh2 & ~OPA_16B_PKEY_MASK) | (pkey << OPA_16B_PKEY_SHIFT);
490 ++ lrh2 = (lrh2 & ~OPA_16B_PKEY_MASK) | ((u32)pkey << OPA_16B_PKEY_SHIFT);
491 + lrh2 = (lrh2 & ~OPA_16B_L4_MASK) | l4;
492 +
493 + hdr->lrh[0] = lrh0;
494 +diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c
495 +index d4fc8795cdf6..d5c6ff843fc6 100644
496 +--- a/drivers/infiniband/hw/hfi1/init.c
497 ++++ b/drivers/infiniband/hw/hfi1/init.c
498 +@@ -1234,6 +1234,8 @@ struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, size_t extra)
499 + return ERR_PTR(-ENOMEM);
500 + dd->num_pports = nports;
501 + dd->pport = (struct hfi1_pportdata *)(dd + 1);
502 ++ dd->pcidev = pdev;
503 ++ pci_set_drvdata(pdev, dd);
504 +
505 + INIT_LIST_HEAD(&dd->list);
506 + idr_preload(GFP_KERNEL);
507 +diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c
508 +index 8c7e7a60b715..51a5416b1da4 100644
509 +--- a/drivers/infiniband/hw/hfi1/pcie.c
510 ++++ b/drivers/infiniband/hw/hfi1/pcie.c
511 +@@ -163,9 +163,6 @@ int hfi1_pcie_ddinit(struct hfi1_devdata *dd, struct pci_dev *pdev)
512 + resource_size_t addr;
513 + int ret = 0;
514 +
515 +- dd->pcidev = pdev;
516 +- pci_set_drvdata(pdev, dd);
517 +-
518 + addr = pci_resource_start(pdev, 0);
519 + len = pci_resource_len(pdev, 0);
520 +
521 +diff --git a/drivers/infiniband/hw/hfi1/ruc.c b/drivers/infiniband/hw/hfi1/ruc.c
522 +index b3291f0fde9a..5866ccc0fc21 100644
523 +--- a/drivers/infiniband/hw/hfi1/ruc.c
524 ++++ b/drivers/infiniband/hw/hfi1/ruc.c
525 +@@ -745,6 +745,20 @@ static inline void hfi1_make_ruc_bth(struct rvt_qp *qp,
526 + ohdr->bth[2] = cpu_to_be32(bth2);
527 + }
528 +
529 ++/**
530 ++ * hfi1_make_ruc_header_16B - build a 16B header
531 ++ * @qp: the queue pair
532 ++ * @ohdr: a pointer to the destination header memory
533 ++ * @bth0: bth0 passed in from the RC/UC builder
534 ++ * @bth2: bth2 passed in from the RC/UC builder
535 ++ * @middle: non zero implies indicates ahg "could" be used
536 ++ * @ps: the current packet state
537 ++ *
538 ++ * This routine may disarm ahg under these situations:
539 ++ * - packet needs a GRH
540 ++ * - BECN needed
541 ++ * - migration state not IB_MIG_MIGRATED
542 ++ */
543 + static inline void hfi1_make_ruc_header_16B(struct rvt_qp *qp,
544 + struct ib_other_headers *ohdr,
545 + u32 bth0, u32 bth2, int middle,
546 +@@ -789,6 +803,12 @@ static inline void hfi1_make_ruc_header_16B(struct rvt_qp *qp,
547 + else
548 + middle = 0;
549 +
550 ++ if (qp->s_flags & RVT_S_ECN) {
551 ++ qp->s_flags &= ~RVT_S_ECN;
552 ++ /* we recently received a FECN, so return a BECN */
553 ++ becn = true;
554 ++ middle = 0;
555 ++ }
556 + if (middle)
557 + build_ahg(qp, bth2);
558 + else
559 +@@ -796,11 +816,6 @@ static inline void hfi1_make_ruc_header_16B(struct rvt_qp *qp,
560 +
561 + bth0 |= pkey;
562 + bth0 |= extra_bytes << 20;
563 +- if (qp->s_flags & RVT_S_ECN) {
564 +- qp->s_flags &= ~RVT_S_ECN;
565 +- /* we recently received a FECN, so return a BECN */
566 +- becn = 1;
567 +- }
568 + hfi1_make_ruc_bth(qp, ohdr, bth0, bth1, bth2);
569 +
570 + if (!ppd->lid)
571 +@@ -818,6 +833,20 @@ static inline void hfi1_make_ruc_header_16B(struct rvt_qp *qp,
572 + pkey, becn, 0, l4, priv->s_sc);
573 + }
574 +
575 ++/**
576 ++ * hfi1_make_ruc_header_9B - build a 9B header
577 ++ * @qp: the queue pair
578 ++ * @ohdr: a pointer to the destination header memory
579 ++ * @bth0: bth0 passed in from the RC/UC builder
580 ++ * @bth2: bth2 passed in from the RC/UC builder
581 ++ * @middle: non zero implies indicates ahg "could" be used
582 ++ * @ps: the current packet state
583 ++ *
584 ++ * This routine may disarm ahg under these situations:
585 ++ * - packet needs a GRH
586 ++ * - BECN needed
587 ++ * - migration state not IB_MIG_MIGRATED
588 ++ */
589 + static inline void hfi1_make_ruc_header_9B(struct rvt_qp *qp,
590 + struct ib_other_headers *ohdr,
591 + u32 bth0, u32 bth2, int middle,
592 +@@ -853,6 +882,12 @@ static inline void hfi1_make_ruc_header_9B(struct rvt_qp *qp,
593 + else
594 + middle = 0;
595 +
596 ++ if (qp->s_flags & RVT_S_ECN) {
597 ++ qp->s_flags &= ~RVT_S_ECN;
598 ++ /* we recently received a FECN, so return a BECN */
599 ++ bth1 |= (IB_BECN_MASK << IB_BECN_SHIFT);
600 ++ middle = 0;
601 ++ }
602 + if (middle)
603 + build_ahg(qp, bth2);
604 + else
605 +@@ -860,11 +895,6 @@ static inline void hfi1_make_ruc_header_9B(struct rvt_qp *qp,
606 +
607 + bth0 |= pkey;
608 + bth0 |= extra_bytes << 20;
609 +- if (qp->s_flags & RVT_S_ECN) {
610 +- qp->s_flags &= ~RVT_S_ECN;
611 +- /* we recently received a FECN, so return a BECN */
612 +- bth1 |= (IB_BECN_MASK << IB_BECN_SHIFT);
613 +- }
614 + hfi1_make_ruc_bth(qp, ohdr, bth0, bth1, bth2);
615 +
616 + if (!ppd->lid)
617 +diff --git a/drivers/infiniband/hw/hfi1/ud.c b/drivers/infiniband/hw/hfi1/ud.c
618 +index 2ba74fdd6f15..38c7d9c456fe 100644
619 +--- a/drivers/infiniband/hw/hfi1/ud.c
620 ++++ b/drivers/infiniband/hw/hfi1/ud.c
621 +@@ -630,7 +630,7 @@ int hfi1_lookup_pkey_idx(struct hfi1_ibport *ibp, u16 pkey)
622 + }
623 +
624 + void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
625 +- u32 remote_qpn, u32 pkey, u32 slid, u32 dlid,
626 ++ u32 remote_qpn, u16 pkey, u32 slid, u32 dlid,
627 + u8 sc5, const struct ib_grh *old_grh)
628 + {
629 + u64 pbc, pbc_flags = 0;
630 +@@ -688,7 +688,7 @@ void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
631 + }
632 +
633 + void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
634 +- u32 pkey, u32 slid, u32 dlid, u8 sc5,
635 ++ u16 pkey, u32 slid, u32 dlid, u8 sc5,
636 + const struct ib_grh *old_grh)
637 + {
638 + u64 pbc, pbc_flags = 0;
639 +diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
640 +index 538f1784863a..9866c5d1b99f 100644
641 +--- a/drivers/infiniband/hw/mlx5/mr.c
642 ++++ b/drivers/infiniband/hw/mlx5/mr.c
643 +@@ -833,25 +833,28 @@ static int mr_umem_get(struct ib_pd *pd, u64 start, u64 length,
644 + int *order)
645 + {
646 + struct mlx5_ib_dev *dev = to_mdev(pd->device);
647 ++ struct ib_umem *u;
648 + int err;
649 +
650 +- *umem = ib_umem_get(pd->uobject->context, start, length,
651 +- access_flags, 0);
652 +- err = PTR_ERR_OR_ZERO(*umem);
653 ++ *umem = NULL;
654 ++
655 ++ u = ib_umem_get(pd->uobject->context, start, length, access_flags, 0);
656 ++ err = PTR_ERR_OR_ZERO(u);
657 + if (err) {
658 +- *umem = NULL;
659 +- mlx5_ib_err(dev, "umem get failed (%d)\n", err);
660 ++ mlx5_ib_dbg(dev, "umem get failed (%d)\n", err);
661 + return err;
662 + }
663 +
664 +- mlx5_ib_cont_pages(*umem, start, MLX5_MKEY_PAGE_SHIFT_MASK, npages,
665 ++ mlx5_ib_cont_pages(u, start, MLX5_MKEY_PAGE_SHIFT_MASK, npages,
666 + page_shift, ncont, order);
667 + if (!*npages) {
668 + mlx5_ib_warn(dev, "avoid zero region\n");
669 +- ib_umem_release(*umem);
670 ++ ib_umem_release(u);
671 + return -EINVAL;
672 + }
673 +
674 ++ *umem = u;
675 ++
676 + mlx5_ib_dbg(dev, "npages %d, ncont %d, order %d, page_shift %d\n",
677 + *npages, *ncont, *order, *page_shift);
678 +
679 +@@ -1340,13 +1343,12 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
680 + int access_flags = flags & IB_MR_REREG_ACCESS ?
681 + new_access_flags :
682 + mr->access_flags;
683 +- u64 addr = (flags & IB_MR_REREG_TRANS) ? virt_addr : mr->umem->address;
684 +- u64 len = (flags & IB_MR_REREG_TRANS) ? length : mr->umem->length;
685 + int page_shift = 0;
686 + int upd_flags = 0;
687 + int npages = 0;
688 + int ncont = 0;
689 + int order = 0;
690 ++ u64 addr, len;
691 + int err;
692 +
693 + mlx5_ib_dbg(dev, "start 0x%llx, virt_addr 0x%llx, length 0x%llx, access_flags 0x%x\n",
694 +@@ -1354,6 +1356,17 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
695 +
696 + atomic_sub(mr->npages, &dev->mdev->priv.reg_pages);
697 +
698 ++ if (!mr->umem)
699 ++ return -EINVAL;
700 ++
701 ++ if (flags & IB_MR_REREG_TRANS) {
702 ++ addr = virt_addr;
703 ++ len = length;
704 ++ } else {
705 ++ addr = mr->umem->address;
706 ++ len = mr->umem->length;
707 ++ }
708 ++
709 + if (flags != IB_MR_REREG_PD) {
710 + /*
711 + * Replace umem. This needs to be done whether or not UMR is
712 +@@ -1361,6 +1374,7 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
713 + */
714 + flags |= IB_MR_REREG_TRANS;
715 + ib_umem_release(mr->umem);
716 ++ mr->umem = NULL;
717 + err = mr_umem_get(pd, addr, len, access_flags, &mr->umem,
718 + &npages, &page_shift, &ncont, &order);
719 + if (err < 0) {
720 +diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
721 +index 464c78f8cec9..749fe906a5b6 100644
722 +--- a/drivers/infiniband/hw/mlx5/qp.c
723 ++++ b/drivers/infiniband/hw/mlx5/qp.c
724 +@@ -256,7 +256,11 @@ static int set_rq_size(struct mlx5_ib_dev *dev, struct ib_qp_cap *cap,
725 + } else {
726 + if (ucmd) {
727 + qp->rq.wqe_cnt = ucmd->rq_wqe_count;
728 ++ if (ucmd->rq_wqe_shift > BITS_PER_BYTE * sizeof(ucmd->rq_wqe_shift))
729 ++ return -EINVAL;
730 + qp->rq.wqe_shift = ucmd->rq_wqe_shift;
731 ++ if ((1 << qp->rq.wqe_shift) / sizeof(struct mlx5_wqe_data_seg) < qp->wq_sig)
732 ++ return -EINVAL;
733 + qp->rq.max_gs = (1 << qp->rq.wqe_shift) / sizeof(struct mlx5_wqe_data_seg) - qp->wq_sig;
734 + qp->rq.max_post = qp->rq.wqe_cnt;
735 + } else {
736 +@@ -2195,18 +2199,18 @@ enum {
737 +
738 + static int ib_rate_to_mlx5(struct mlx5_ib_dev *dev, u8 rate)
739 + {
740 +- if (rate == IB_RATE_PORT_CURRENT) {
741 ++ if (rate == IB_RATE_PORT_CURRENT)
742 + return 0;
743 +- } else if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_300_GBPS) {
744 ++
745 ++ if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_300_GBPS)
746 + return -EINVAL;
747 +- } else {
748 +- while (rate != IB_RATE_2_5_GBPS &&
749 +- !(1 << (rate + MLX5_STAT_RATE_OFFSET) &
750 +- MLX5_CAP_GEN(dev->mdev, stat_rate_support)))
751 +- --rate;
752 +- }
753 +
754 +- return rate + MLX5_STAT_RATE_OFFSET;
755 ++ while (rate != IB_RATE_PORT_CURRENT &&
756 ++ !(1 << (rate + MLX5_STAT_RATE_OFFSET) &
757 ++ MLX5_CAP_GEN(dev->mdev, stat_rate_support)))
758 ++ --rate;
759 ++
760 ++ return rate ? rate + MLX5_STAT_RATE_OFFSET : rate;
761 + }
762 +
763 + static int modify_raw_packet_eth_prio(struct mlx5_core_dev *dev,
764 +diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
765 +index 7774654c2ccb..7a5ed5a5391e 100644
766 +--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
767 ++++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
768 +@@ -1447,8 +1447,7 @@ void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
769 + struct ipoib_dev_priv *priv = ipoib_priv(dev);
770 + int e = skb_queue_empty(&priv->cm.skb_queue);
771 +
772 +- if (skb_dst(skb))
773 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
774 ++ skb_dst_update_pmtu(skb, mtu);
775 +
776 + skb_queue_tail(&priv->cm.skb_queue, skb);
777 + if (e)
778 +diff --git a/drivers/input/input-leds.c b/drivers/input/input-leds.c
779 +index 766bf2660116..5f04b2d94635 100644
780 +--- a/drivers/input/input-leds.c
781 ++++ b/drivers/input/input-leds.c
782 +@@ -88,6 +88,7 @@ static int input_leds_connect(struct input_handler *handler,
783 + const struct input_device_id *id)
784 + {
785 + struct input_leds *leds;
786 ++ struct input_led *led;
787 + unsigned int num_leds;
788 + unsigned int led_code;
789 + int led_no;
790 +@@ -119,14 +120,13 @@ static int input_leds_connect(struct input_handler *handler,
791 +
792 + led_no = 0;
793 + for_each_set_bit(led_code, dev->ledbit, LED_CNT) {
794 +- struct input_led *led = &leds->leds[led_no];
795 ++ if (!input_led_info[led_code].name)
796 ++ continue;
797 +
798 ++ led = &leds->leds[led_no];
799 + led->handle = &leds->handle;
800 + led->code = led_code;
801 +
802 +- if (!input_led_info[led_code].name)
803 +- continue;
804 +-
805 + led->cdev.name = kasprintf(GFP_KERNEL, "%s::%s",
806 + dev_name(&dev->dev),
807 + input_led_info[led_code].name);
808 +diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
809 +index 7659bc48f1db..429b694405c7 100644
810 +--- a/drivers/input/touchscreen/atmel_mxt_ts.c
811 ++++ b/drivers/input/touchscreen/atmel_mxt_ts.c
812 +@@ -3030,6 +3030,15 @@ static const struct dmi_system_id mxt_dmi_table[] = {
813 + },
814 + .driver_data = samus_platform_data,
815 + },
816 ++ {
817 ++ /* Samsung Chromebook Pro */
818 ++ .ident = "Samsung Chromebook Pro",
819 ++ .matches = {
820 ++ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
821 ++ DMI_MATCH(DMI_PRODUCT_NAME, "Caroline"),
822 ++ },
823 ++ .driver_data = samus_platform_data,
824 ++ },
825 + {
826 + /* Other Google Chromebooks */
827 + .ident = "Chromebook",
828 +diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
829 +index f31265937439..7f0c0be322e0 100644
830 +--- a/drivers/irqchip/qcom-irq-combiner.c
831 ++++ b/drivers/irqchip/qcom-irq-combiner.c
832 +@@ -1,4 +1,4 @@
833 +-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
834 ++/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
835 + *
836 + * This program is free software; you can redistribute it and/or modify
837 + * it under the terms of the GNU General Public License version 2 and
838 +@@ -68,7 +68,7 @@ static void combiner_handle_irq(struct irq_desc *desc)
839 +
840 + bit = readl_relaxed(combiner->regs[reg].addr);
841 + status = bit & combiner->regs[reg].enabled;
842 +- if (!status)
843 ++ if (bit && !status)
844 + pr_warn_ratelimited("Unexpected IRQ on CPU%d: (%08x %08lx %p)\n",
845 + smp_processor_id(), bit,
846 + combiner->regs[reg].enabled,
847 +diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
848 +index b9d8d71a6ecc..fbc825ac97ab 100644
849 +--- a/drivers/net/geneve.c
850 ++++ b/drivers/net/geneve.c
851 +@@ -825,6 +825,13 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
852 + if (IS_ERR(rt))
853 + return PTR_ERR(rt);
854 +
855 ++ if (skb_dst(skb)) {
856 ++ int mtu = dst_mtu(&rt->dst) - sizeof(struct iphdr) -
857 ++ GENEVE_BASE_HLEN - info->options_len - 14;
858 ++
859 ++ skb_dst_update_pmtu(skb, mtu);
860 ++ }
861 ++
862 + sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
863 + if (geneve->collect_md) {
864 + tos = ip_tunnel_ecn_encap(key->tos, ip_hdr(skb), skb);
865 +@@ -864,6 +871,13 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
866 + if (IS_ERR(dst))
867 + return PTR_ERR(dst);
868 +
869 ++ if (skb_dst(skb)) {
870 ++ int mtu = dst_mtu(dst) - sizeof(struct ipv6hdr) -
871 ++ GENEVE_BASE_HLEN - info->options_len - 14;
872 ++
873 ++ skb_dst_update_pmtu(skb, mtu);
874 ++ }
875 ++
876 + sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
877 + if (geneve->collect_md) {
878 + prio = ip_tunnel_ecn_encap(key->tos, ip_hdr(skb), skb);
879 +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
880 +index 5d3d31f5933b..1aad0568dcc6 100644
881 +--- a/drivers/net/usb/qmi_wwan.c
882 ++++ b/drivers/net/usb/qmi_wwan.c
883 +@@ -1098,6 +1098,7 @@ static const struct usb_device_id products[] = {
884 + {QMI_FIXED_INTF(0x05c6, 0x9080, 8)},
885 + {QMI_FIXED_INTF(0x05c6, 0x9083, 3)},
886 + {QMI_FIXED_INTF(0x05c6, 0x9084, 4)},
887 ++ {QMI_FIXED_INTF(0x05c6, 0x90b2, 3)}, /* ublox R410M */
888 + {QMI_FIXED_INTF(0x05c6, 0x920d, 0)},
889 + {QMI_FIXED_INTF(0x05c6, 0x920d, 5)},
890 + {QMI_QUIRK_SET_DTR(0x05c6, 0x9625, 4)}, /* YUGA CLM920-NC5 */
891 +diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
892 +index bb44f0c6891f..3d9c5b35a4a7 100644
893 +--- a/drivers/net/vxlan.c
894 ++++ b/drivers/net/vxlan.c
895 +@@ -2158,8 +2158,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
896 + if (skb_dst(skb)) {
897 + int mtu = dst_mtu(ndst) - VXLAN_HEADROOM;
898 +
899 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL,
900 +- skb, mtu);
901 ++ skb_dst_update_pmtu(skb, mtu);
902 + }
903 +
904 + tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
905 +@@ -2200,8 +2199,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
906 + if (skb_dst(skb)) {
907 + int mtu = dst_mtu(ndst) - VXLAN6_HEADROOM;
908 +
909 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL,
910 +- skb, mtu);
911 ++ skb_dst_update_pmtu(skb, mtu);
912 + }
913 +
914 + tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
915 +diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
916 +index b5e9877d935c..a9e1239ff21b 100644
917 +--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
918 ++++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
919 +@@ -173,16 +173,6 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist)
920 +
921 + u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv)
922 + {
923 +- struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
924 +-
925 +- /* override ant_num / ant_path */
926 +- if (mod_params->ant_sel) {
927 +- rtlpriv->btcoexist.btc_info.ant_num =
928 +- (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1);
929 +-
930 +- rtlpriv->btcoexist.btc_info.single_ant_path =
931 +- (mod_params->ant_sel == 1 ? 0 : 1);
932 +- }
933 + return rtlpriv->btcoexist.btc_info.single_ant_path;
934 + }
935 +
936 +@@ -193,7 +183,6 @@ u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv)
937 +
938 + u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
939 + {
940 +- struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
941 + u8 num;
942 +
943 + if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
944 +@@ -201,10 +190,6 @@ u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
945 + else
946 + num = 1;
947 +
948 +- /* override ant_num / ant_path */
949 +- if (mod_params->ant_sel)
950 +- num = (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1) + 1;
951 +-
952 + return num;
953 + }
954 +
955 +diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
956 +index f9b87c12db09..ed1725cf091c 100644
957 +--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
958 ++++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
959 +@@ -601,6 +601,7 @@ extern struct btc_coexist gl_bt_coexist;
960 +
961 + bool exhalbtc_initlize_variables(void);
962 + bool exhalbtc_bind_bt_coex_withadapter(void *adapter);
963 ++void exhalbtc_power_on_setting(struct btc_coexist *btcoexist);
964 + void exhalbtc_init_hw_config(struct btc_coexist *btcoexist, bool wifi_only);
965 + void exhalbtc_init_coex_dm(struct btc_coexist *btcoexist);
966 + void exhalbtc_ips_notify(struct btc_coexist *btcoexist, u8 type);
967 +diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
968 +index 7d296a401b6f..c394e0412982 100644
969 +--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
970 ++++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
971 +@@ -32,6 +32,7 @@
972 + static struct rtl_btc_ops rtl_btc_operation = {
973 + .btc_init_variables = rtl_btc_init_variables,
974 + .btc_init_hal_vars = rtl_btc_init_hal_vars,
975 ++ .btc_power_on_setting = rtl_btc_power_on_setting,
976 + .btc_init_hw_config = rtl_btc_init_hw_config,
977 + .btc_ips_notify = rtl_btc_ips_notify,
978 + .btc_lps_notify = rtl_btc_lps_notify,
979 +@@ -110,6 +111,11 @@ void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv)
980 + */
981 + }
982 +
983 ++void rtl_btc_power_on_setting(struct rtl_priv *rtlpriv)
984 ++{
985 ++ exhalbtc_power_on_setting(&gl_bt_coexist);
986 ++}
987 ++
988 + void rtl_btc_init_hw_config(struct rtl_priv *rtlpriv)
989 + {
990 + u8 bt_exist;
991 +diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
992 +index ac1253c46f44..c2735e4fa5d3 100644
993 +--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
994 ++++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h
995 +@@ -29,6 +29,7 @@
996 +
997 + void rtl_btc_init_variables(struct rtl_priv *rtlpriv);
998 + void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv);
999 ++void rtl_btc_power_on_setting(struct rtl_priv *rtlpriv);
1000 + void rtl_btc_init_hw_config(struct rtl_priv *rtlpriv);
1001 + void rtl_btc_ips_notify(struct rtl_priv *rtlpriv, u8 type);
1002 + void rtl_btc_lps_notify(struct rtl_priv *rtlpriv, u8 type);
1003 +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
1004 +index 0034ebd3e5ba..f019eebe41d1 100644
1005 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
1006 ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
1007 +@@ -846,6 +846,9 @@ static bool _rtl8723be_init_mac(struct ieee80211_hw *hw)
1008 + return false;
1009 + }
1010 +
1011 ++ if (rtlpriv->cfg->ops->get_btc_status())
1012 ++ rtlpriv->btcoexist.btc_ops->btc_power_on_setting(rtlpriv);
1013 ++
1014 + bytetmp = rtl_read_byte(rtlpriv, REG_MULTI_FUNC_CTRL);
1015 + rtl_write_byte(rtlpriv, REG_MULTI_FUNC_CTRL, bytetmp | BIT(3));
1016 +
1017 +@@ -2696,21 +2699,21 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
1018 + rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;
1019 + rtlpriv->btcoexist.btc_info.ant_num = (value & 0x1);
1020 + rtlpriv->btcoexist.btc_info.single_ant_path =
1021 +- (value & 0x40); /*0xc3[6]*/
1022 ++ (value & 0x40 ? ANT_AUX : ANT_MAIN); /*0xc3[6]*/
1023 + } else {
1024 + rtlpriv->btcoexist.btc_info.btcoexist = 0;
1025 + rtlpriv->btcoexist.btc_info.bt_type = BT_RTL8723B;
1026 + rtlpriv->btcoexist.btc_info.ant_num = ANT_X2;
1027 +- rtlpriv->btcoexist.btc_info.single_ant_path = 0;
1028 ++ rtlpriv->btcoexist.btc_info.single_ant_path = ANT_MAIN;
1029 + }
1030 +
1031 + /* override ant_num / ant_path */
1032 + if (mod_params->ant_sel) {
1033 + rtlpriv->btcoexist.btc_info.ant_num =
1034 +- (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1);
1035 ++ (mod_params->ant_sel == 1 ? ANT_X1 : ANT_X2);
1036 +
1037 + rtlpriv->btcoexist.btc_info.single_ant_path =
1038 +- (mod_params->ant_sel == 1 ? 0 : 1);
1039 ++ (mod_params->ant_sel == 1 ? ANT_AUX : ANT_MAIN);
1040 + }
1041 + }
1042 +
1043 +diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
1044 +index 25c4e3e55921..c73ce334ce6c 100644
1045 +--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
1046 ++++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
1047 +@@ -2545,6 +2545,7 @@ struct bt_coexist_info {
1048 + struct rtl_btc_ops {
1049 + void (*btc_init_variables) (struct rtl_priv *rtlpriv);
1050 + void (*btc_init_hal_vars) (struct rtl_priv *rtlpriv);
1051 ++ void (*btc_power_on_setting)(struct rtl_priv *rtlpriv);
1052 + void (*btc_init_hw_config) (struct rtl_priv *rtlpriv);
1053 + void (*btc_ips_notify) (struct rtl_priv *rtlpriv, u8 type);
1054 + void (*btc_lps_notify)(struct rtl_priv *rtlpriv, u8 type);
1055 +@@ -2707,6 +2708,11 @@ enum bt_ant_num {
1056 + ANT_X1 = 1,
1057 + };
1058 +
1059 ++enum bt_ant_path {
1060 ++ ANT_MAIN = 0,
1061 ++ ANT_AUX = 1,
1062 ++};
1063 ++
1064 + enum bt_co_type {
1065 + BT_2WIRE = 0,
1066 + BT_ISSC_3WIRE = 1,
1067 +diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
1068 +index d4aeac3477f5..f086469ea740 100644
1069 +--- a/drivers/platform/x86/asus-wireless.c
1070 ++++ b/drivers/platform/x86/asus-wireless.c
1071 +@@ -178,8 +178,10 @@ static int asus_wireless_remove(struct acpi_device *adev)
1072 + {
1073 + struct asus_wireless_data *data = acpi_driver_data(adev);
1074 +
1075 +- if (data->wq)
1076 ++ if (data->wq) {
1077 ++ devm_led_classdev_unregister(&adev->dev, &data->led);
1078 + destroy_workqueue(data->wq);
1079 ++ }
1080 + return 0;
1081 + }
1082 +
1083 +diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
1084 +index 07c814c42648..60429011292a 100644
1085 +--- a/drivers/target/target_core_iblock.c
1086 ++++ b/drivers/target/target_core_iblock.c
1087 +@@ -427,8 +427,8 @@ iblock_execute_zero_out(struct block_device *bdev, struct se_cmd *cmd)
1088 + {
1089 + struct se_device *dev = cmd->se_dev;
1090 + struct scatterlist *sg = &cmd->t_data_sg[0];
1091 +- unsigned char *buf, zero = 0x00, *p = &zero;
1092 +- int rc, ret;
1093 ++ unsigned char *buf, *not_zero;
1094 ++ int ret;
1095 +
1096 + buf = kmap(sg_page(sg)) + sg->offset;
1097 + if (!buf)
1098 +@@ -437,10 +437,10 @@ iblock_execute_zero_out(struct block_device *bdev, struct se_cmd *cmd)
1099 + * Fall back to block_execute_write_same() slow-path if
1100 + * incoming WRITE_SAME payload does not contain zeros.
1101 + */
1102 +- rc = memcmp(buf, p, cmd->data_length);
1103 ++ not_zero = memchr_inv(buf, 0x00, cmd->data_length);
1104 + kunmap(sg_page(sg));
1105 +
1106 +- if (rc)
1107 ++ if (not_zero)
1108 + return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
1109 +
1110 + ret = blkdev_issue_zeroout(bdev,
1111 +diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
1112 +index 9e3355b97396..bd749e78df59 100644
1113 +--- a/drivers/usb/core/config.c
1114 ++++ b/drivers/usb/core/config.c
1115 +@@ -191,7 +191,9 @@ static const unsigned short full_speed_maxpacket_maxes[4] = {
1116 + static const unsigned short high_speed_maxpacket_maxes[4] = {
1117 + [USB_ENDPOINT_XFER_CONTROL] = 64,
1118 + [USB_ENDPOINT_XFER_ISOC] = 1024,
1119 +- [USB_ENDPOINT_XFER_BULK] = 512,
1120 ++
1121 ++ /* Bulk should be 512, but some devices use 1024: we will warn below */
1122 ++ [USB_ENDPOINT_XFER_BULK] = 1024,
1123 + [USB_ENDPOINT_XFER_INT] = 1024,
1124 + };
1125 + static const unsigned short super_speed_maxpacket_maxes[4] = {
1126 +diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
1127 +index fe75e969f5ac..d7fae66a0681 100644
1128 +--- a/drivers/usb/dwc3/gadget.c
1129 ++++ b/drivers/usb/dwc3/gadget.c
1130 +@@ -1444,7 +1444,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
1131 + dwc->lock);
1132 +
1133 + if (!r->trb)
1134 +- goto out1;
1135 ++ goto out0;
1136 +
1137 + if (r->num_pending_sgs) {
1138 + struct dwc3_trb *trb;
1139 +diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
1140 +index bc6d1717c9ec..87f932d4b72c 100644
1141 +--- a/drivers/usb/musb/musb_gadget.c
1142 ++++ b/drivers/usb/musb/musb_gadget.c
1143 +@@ -442,7 +442,6 @@ void musb_g_tx(struct musb *musb, u8 epnum)
1144 + req = next_request(musb_ep);
1145 + request = &req->request;
1146 +
1147 +- trace_musb_req_tx(req);
1148 + csr = musb_readw(epio, MUSB_TXCSR);
1149 + musb_dbg(musb, "<== %s, txcsr %04x", musb_ep->end_point.name, csr);
1150 +
1151 +@@ -481,6 +480,8 @@ void musb_g_tx(struct musb *musb, u8 epnum)
1152 + u8 is_dma = 0;
1153 + bool short_packet = false;
1154 +
1155 ++ trace_musb_req_tx(req);
1156 ++
1157 + if (dma && (csr & MUSB_TXCSR_DMAENAB)) {
1158 + is_dma = 1;
1159 + csr |= MUSB_TXCSR_P_WZC_BITS;
1160 +diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
1161 +index b5cc08d8aa22..5a6dca01a1d0 100644
1162 +--- a/drivers/usb/musb/musb_host.c
1163 ++++ b/drivers/usb/musb/musb_host.c
1164 +@@ -1023,7 +1023,9 @@ static void musb_bulk_nak_timeout(struct musb *musb, struct musb_hw_ep *ep,
1165 + /* set tx_reinit and schedule the next qh */
1166 + ep->tx_reinit = 1;
1167 + }
1168 +- musb_start_urb(musb, is_in, next_qh);
1169 ++
1170 ++ if (next_qh)
1171 ++ musb_start_urb(musb, is_in, next_qh);
1172 + }
1173 + }
1174 +
1175 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
1176 +index dcf78a498927..d4124551fb56 100644
1177 +--- a/drivers/usb/serial/option.c
1178 ++++ b/drivers/usb/serial/option.c
1179 +@@ -236,6 +236,8 @@ static void option_instat_callback(struct urb *urb);
1180 + /* These Quectel products use Qualcomm's vendor ID */
1181 + #define QUECTEL_PRODUCT_UC20 0x9003
1182 + #define QUECTEL_PRODUCT_UC15 0x9090
1183 ++/* These u-blox products use Qualcomm's vendor ID */
1184 ++#define UBLOX_PRODUCT_R410M 0x90b2
1185 + /* These Yuga products use Qualcomm's vendor ID */
1186 + #define YUGA_PRODUCT_CLM920_NC5 0x9625
1187 +
1188 +@@ -244,6 +246,7 @@ static void option_instat_callback(struct urb *urb);
1189 + #define QUECTEL_PRODUCT_EC21 0x0121
1190 + #define QUECTEL_PRODUCT_EC25 0x0125
1191 + #define QUECTEL_PRODUCT_BG96 0x0296
1192 ++#define QUECTEL_PRODUCT_EP06 0x0306
1193 +
1194 + #define CMOTECH_VENDOR_ID 0x16d8
1195 + #define CMOTECH_PRODUCT_6001 0x6001
1196 +@@ -550,147 +553,15 @@ static void option_instat_callback(struct urb *urb);
1197 + #define WETELECOM_PRODUCT_6802 0x6802
1198 + #define WETELECOM_PRODUCT_WMD300 0x6803
1199 +
1200 +-struct option_blacklist_info {
1201 +- /* bitmask of interface numbers blacklisted for send_setup */
1202 +- const unsigned long sendsetup;
1203 +- /* bitmask of interface numbers that are reserved */
1204 +- const unsigned long reserved;
1205 +-};
1206 +-
1207 +-static const struct option_blacklist_info four_g_w14_blacklist = {
1208 +- .sendsetup = BIT(0) | BIT(1),
1209 +-};
1210 +-
1211 +-static const struct option_blacklist_info four_g_w100_blacklist = {
1212 +- .sendsetup = BIT(1) | BIT(2),
1213 +- .reserved = BIT(3),
1214 +-};
1215 +-
1216 +-static const struct option_blacklist_info alcatel_x200_blacklist = {
1217 +- .sendsetup = BIT(0) | BIT(1),
1218 +- .reserved = BIT(4),
1219 +-};
1220 +-
1221 +-static const struct option_blacklist_info zte_0037_blacklist = {
1222 +- .sendsetup = BIT(0) | BIT(1),
1223 +-};
1224 +-
1225 +-static const struct option_blacklist_info zte_k3765_z_blacklist = {
1226 +- .sendsetup = BIT(0) | BIT(1) | BIT(2),
1227 +- .reserved = BIT(4),
1228 +-};
1229 +-
1230 +-static const struct option_blacklist_info zte_ad3812_z_blacklist = {
1231 +- .sendsetup = BIT(0) | BIT(1) | BIT(2),
1232 +-};
1233 +-
1234 +-static const struct option_blacklist_info zte_mc2718_z_blacklist = {
1235 +- .sendsetup = BIT(1) | BIT(2) | BIT(3) | BIT(4),
1236 +-};
1237 +-
1238 +-static const struct option_blacklist_info zte_mc2716_z_blacklist = {
1239 +- .sendsetup = BIT(1) | BIT(2) | BIT(3),
1240 +-};
1241 +-
1242 +-static const struct option_blacklist_info zte_me3620_mbim_blacklist = {
1243 +- .reserved = BIT(2) | BIT(3) | BIT(4),
1244 +-};
1245 +-
1246 +-static const struct option_blacklist_info zte_me3620_xl_blacklist = {
1247 +- .reserved = BIT(3) | BIT(4) | BIT(5),
1248 +-};
1249 +-
1250 +-static const struct option_blacklist_info zte_zm8620_x_blacklist = {
1251 +- .reserved = BIT(3) | BIT(4) | BIT(5),
1252 +-};
1253 +-
1254 +-static const struct option_blacklist_info huawei_cdc12_blacklist = {
1255 +- .reserved = BIT(1) | BIT(2),
1256 +-};
1257 +-
1258 +-static const struct option_blacklist_info net_intf0_blacklist = {
1259 +- .reserved = BIT(0),
1260 +-};
1261 +
1262 +-static const struct option_blacklist_info net_intf1_blacklist = {
1263 +- .reserved = BIT(1),
1264 +-};
1265 ++/* Device flags */
1266 +
1267 +-static const struct option_blacklist_info net_intf2_blacklist = {
1268 +- .reserved = BIT(2),
1269 +-};
1270 ++/* Interface does not support modem-control requests */
1271 ++#define NCTRL(ifnum) ((BIT(ifnum) & 0xff) << 8)
1272 +
1273 +-static const struct option_blacklist_info net_intf3_blacklist = {
1274 +- .reserved = BIT(3),
1275 +-};
1276 ++/* Interface is reserved */
1277 ++#define RSVD(ifnum) ((BIT(ifnum) & 0xff) << 0)
1278 +
1279 +-static const struct option_blacklist_info net_intf4_blacklist = {
1280 +- .reserved = BIT(4),
1281 +-};
1282 +-
1283 +-static const struct option_blacklist_info net_intf5_blacklist = {
1284 +- .reserved = BIT(5),
1285 +-};
1286 +-
1287 +-static const struct option_blacklist_info net_intf6_blacklist = {
1288 +- .reserved = BIT(6),
1289 +-};
1290 +-
1291 +-static const struct option_blacklist_info zte_mf626_blacklist = {
1292 +- .sendsetup = BIT(0) | BIT(1),
1293 +- .reserved = BIT(4),
1294 +-};
1295 +-
1296 +-static const struct option_blacklist_info zte_1255_blacklist = {
1297 +- .reserved = BIT(3) | BIT(4),
1298 +-};
1299 +-
1300 +-static const struct option_blacklist_info simcom_sim7100e_blacklist = {
1301 +- .reserved = BIT(5) | BIT(6),
1302 +-};
1303 +-
1304 +-static const struct option_blacklist_info telit_me910_blacklist = {
1305 +- .sendsetup = BIT(0),
1306 +- .reserved = BIT(1) | BIT(3),
1307 +-};
1308 +-
1309 +-static const struct option_blacklist_info telit_me910_dual_modem_blacklist = {
1310 +- .sendsetup = BIT(0),
1311 +- .reserved = BIT(3),
1312 +-};
1313 +-
1314 +-static const struct option_blacklist_info telit_le910_blacklist = {
1315 +- .sendsetup = BIT(0),
1316 +- .reserved = BIT(1) | BIT(2),
1317 +-};
1318 +-
1319 +-static const struct option_blacklist_info telit_le920_blacklist = {
1320 +- .sendsetup = BIT(0),
1321 +- .reserved = BIT(1) | BIT(5),
1322 +-};
1323 +-
1324 +-static const struct option_blacklist_info telit_le920a4_blacklist_1 = {
1325 +- .sendsetup = BIT(0),
1326 +- .reserved = BIT(1),
1327 +-};
1328 +-
1329 +-static const struct option_blacklist_info telit_le922_blacklist_usbcfg0 = {
1330 +- .sendsetup = BIT(2),
1331 +- .reserved = BIT(0) | BIT(1) | BIT(3),
1332 +-};
1333 +-
1334 +-static const struct option_blacklist_info telit_le922_blacklist_usbcfg3 = {
1335 +- .sendsetup = BIT(0),
1336 +- .reserved = BIT(1) | BIT(2) | BIT(3),
1337 +-};
1338 +-
1339 +-static const struct option_blacklist_info cinterion_rmnet2_blacklist = {
1340 +- .reserved = BIT(4) | BIT(5),
1341 +-};
1342 +-
1343 +-static const struct option_blacklist_info yuga_clm920_nc5_blacklist = {
1344 +- .reserved = BIT(1) | BIT(4),
1345 +-};
1346 +
1347 + static const struct usb_device_id option_ids[] = {
1348 + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
1349 +@@ -724,26 +595,26 @@ static const struct usb_device_id option_ids[] = {
1350 + { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) },
1351 + { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
1352 + { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42),
1353 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1354 ++ .driver_info = RSVD(4) },
1355 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) },
1356 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c1f, USB_CLASS_COMM, 0x02, 0xff) },
1357 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) },
1358 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff),
1359 +- .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
1360 ++ .driver_info = RSVD(1) },
1361 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S6, 0xff, 0xff, 0xff),
1362 +- .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
1363 ++ .driver_info = RSVD(1) },
1364 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1750, 0xff, 0xff, 0xff),
1365 +- .driver_info = (kernel_ulong_t) &net_intf2_blacklist },
1366 ++ .driver_info = RSVD(2) },
1367 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1441, USB_CLASS_COMM, 0x02, 0xff) },
1368 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1442, USB_CLASS_COMM, 0x02, 0xff) },
1369 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff),
1370 +- .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
1371 ++ .driver_info = RSVD(1) | RSVD(2) },
1372 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
1373 +- .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
1374 ++ .driver_info = RSVD(1) | RSVD(2) },
1375 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff), /* Huawei E1820 */
1376 +- .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
1377 ++ .driver_info = RSVD(1) },
1378 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
1379 +- .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
1380 ++ .driver_info = RSVD(1) | RSVD(2) },
1381 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
1382 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x01) },
1383 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x02) },
1384 +@@ -1188,65 +1059,70 @@ static const struct usb_device_id option_ids[] = {
1385 + { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
1386 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
1387 + { USB_DEVICE_AND_INTERFACE_INFO(QUALCOMM_VENDOR_ID, 0x6001, 0xff, 0xff, 0xff), /* 4G LTE usb-modem U901 */
1388 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1389 ++ .driver_info = RSVD(3) },
1390 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
1391 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
1392 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
1393 + /* Quectel products using Qualcomm vendor ID */
1394 + { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
1395 + { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
1396 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1397 ++ .driver_info = RSVD(4) },
1398 + /* Yuga products use Qualcomm vendor ID */
1399 + { USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PRODUCT_CLM920_NC5),
1400 +- .driver_info = (kernel_ulong_t)&yuga_clm920_nc5_blacklist },
1401 ++ .driver_info = RSVD(1) | RSVD(4) },
1402 ++ /* u-blox products using Qualcomm vendor ID */
1403 ++ { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),
1404 ++ .driver_info = RSVD(1) | RSVD(3) },
1405 + /* Quectel products using Quectel vendor ID */
1406 + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21),
1407 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1408 ++ .driver_info = RSVD(4) },
1409 + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25),
1410 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1411 ++ .driver_info = RSVD(4) },
1412 + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
1413 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1414 ++ .driver_info = RSVD(4) },
1415 ++ { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06),
1416 ++ .driver_info = RSVD(4) | RSVD(5) },
1417 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
1418 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
1419 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
1420 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1421 ++ .driver_info = RSVD(0) },
1422 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6004) },
1423 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6005) },
1424 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_628A) },
1425 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHE_628S),
1426 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1427 ++ .driver_info = RSVD(0) },
1428 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_301),
1429 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1430 ++ .driver_info = RSVD(0) },
1431 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628),
1432 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1433 ++ .driver_info = RSVD(0) },
1434 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628S) },
1435 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_680) },
1436 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_685A) },
1437 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720S),
1438 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1439 ++ .driver_info = RSVD(0) },
1440 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7002),
1441 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1442 ++ .driver_info = RSVD(0) },
1443 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629K),
1444 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1445 ++ .driver_info = RSVD(4) },
1446 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7004),
1447 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1448 ++ .driver_info = RSVD(3) },
1449 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7005) },
1450 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_629),
1451 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1452 ++ .driver_info = RSVD(5) },
1453 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629S),
1454 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1455 ++ .driver_info = RSVD(4) },
1456 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720I),
1457 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1458 ++ .driver_info = RSVD(0) },
1459 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7212),
1460 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1461 ++ .driver_info = RSVD(0) },
1462 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7213),
1463 +- .driver_info = (kernel_ulong_t)&net_intf0_blacklist },
1464 ++ .driver_info = RSVD(0) },
1465 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7251),
1466 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1467 ++ .driver_info = RSVD(1) },
1468 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7252),
1469 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1470 ++ .driver_info = RSVD(1) },
1471 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7253),
1472 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1473 ++ .driver_info = RSVD(1) },
1474 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
1475 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
1476 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) },
1477 +@@ -1254,38 +1130,38 @@ static const struct usb_device_id option_ids[] = {
1478 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
1479 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) },
1480 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0),
1481 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 },
1482 ++ .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) },
1483 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),
1484 +- .driver_info = (kernel_ulong_t)&telit_le910_blacklist },
1485 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
1486 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG2),
1487 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1488 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
1489 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG3),
1490 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1491 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
1492 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG5, 0xff),
1493 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 },
1494 ++ .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) },
1495 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
1496 +- .driver_info = (kernel_ulong_t)&telit_me910_blacklist },
1497 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
1498 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
1499 +- .driver_info = (kernel_ulong_t)&telit_me910_dual_modem_blacklist },
1500 ++ .driver_info = NCTRL(0) | RSVD(3) },
1501 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910),
1502 +- .driver_info = (kernel_ulong_t)&telit_le910_blacklist },
1503 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
1504 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
1505 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1506 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
1507 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
1508 +- .driver_info = (kernel_ulong_t)&telit_le920_blacklist },
1509 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(5) },
1510 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1207) },
1511 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1208),
1512 +- .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },
1513 ++ .driver_info = NCTRL(0) | RSVD(1) },
1514 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1211),
1515 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1516 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
1517 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1212),
1518 +- .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },
1519 ++ .driver_info = NCTRL(0) | RSVD(1) },
1520 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1213, 0xff) },
1521 + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1214),
1522 +- .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1523 ++ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
1524 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
1525 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff),
1526 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1527 ++ .driver_info = RSVD(1) },
1528 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0003, 0xff, 0xff, 0xff) },
1529 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0004, 0xff, 0xff, 0xff) },
1530 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0005, 0xff, 0xff, 0xff) },
1531 +@@ -1301,58 +1177,58 @@ static const struct usb_device_id option_ids[] = {
1532 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0010, 0xff, 0xff, 0xff) },
1533 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) },
1534 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff),
1535 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1536 ++ .driver_info = RSVD(1) },
1537 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) },
1538 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) },
1539 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) },
1540 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff),
1541 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1542 ++ .driver_info = RSVD(3) },
1543 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) },
1544 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff),
1545 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1546 ++ .driver_info = RSVD(3) },
1547 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) },
1548 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff),
1549 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1550 ++ .driver_info = RSVD(4) },
1551 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0022, 0xff, 0xff, 0xff) },
1552 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) },
1553 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) },
1554 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff),
1555 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1556 ++ .driver_info = RSVD(1) },
1557 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
1558 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
1559 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
1560 +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff,
1561 +- 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_mf626_blacklist },
1562 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff),
1563 ++ .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) },
1564 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
1565 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
1566 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) },
1567 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff),
1568 +- .driver_info = (kernel_ulong_t)&zte_0037_blacklist },
1569 ++ .driver_info = NCTRL(0) | NCTRL(1) },
1570 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) },
1571 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) },
1572 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) },
1573 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff),
1574 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1575 ++ .driver_info = RSVD(4) },
1576 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) },
1577 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0044, 0xff, 0xff, 0xff) },
1578 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) },
1579 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff),
1580 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1581 ++ .driver_info = RSVD(5) },
1582 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0050, 0xff, 0xff, 0xff) },
1583 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) },
1584 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff),
1585 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1586 ++ .driver_info = RSVD(4) },
1587 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) },
1588 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff),
1589 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1590 ++ .driver_info = RSVD(1) },
1591 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0056, 0xff, 0xff, 0xff) },
1592 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) },
1593 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff),
1594 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1595 ++ .driver_info = RSVD(4) },
1596 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) },
1597 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) },
1598 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff),
1599 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1600 ++ .driver_info = RSVD(4) },
1601 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) },
1602 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0065, 0xff, 0xff, 0xff) },
1603 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) },
1604 +@@ -1377,26 +1253,26 @@ static const struct usb_device_id option_ids[] = {
1605 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) },
1606 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) },
1607 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff),
1608 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1609 ++ .driver_info = RSVD(4) },
1610 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) },
1611 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) },
1612 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) },
1613 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff),
1614 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1615 ++ .driver_info = RSVD(5) },
1616 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0117, 0xff, 0xff, 0xff) },
1617 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0118, 0xff, 0xff, 0xff),
1618 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1619 ++ .driver_info = RSVD(5) },
1620 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0121, 0xff, 0xff, 0xff),
1621 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1622 ++ .driver_info = RSVD(5) },
1623 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0122, 0xff, 0xff, 0xff) },
1624 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0123, 0xff, 0xff, 0xff),
1625 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1626 ++ .driver_info = RSVD(4) },
1627 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0124, 0xff, 0xff, 0xff),
1628 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1629 ++ .driver_info = RSVD(5) },
1630 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0125, 0xff, 0xff, 0xff),
1631 +- .driver_info = (kernel_ulong_t)&net_intf6_blacklist },
1632 ++ .driver_info = RSVD(6) },
1633 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0126, 0xff, 0xff, 0xff),
1634 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1635 ++ .driver_info = RSVD(5) },
1636 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0128, 0xff, 0xff, 0xff) },
1637 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0135, 0xff, 0xff, 0xff) },
1638 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0136, 0xff, 0xff, 0xff) },
1639 +@@ -1412,50 +1288,50 @@ static const struct usb_device_id option_ids[] = {
1640 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) },
1641 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) },
1642 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff),
1643 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1644 ++ .driver_info = RSVD(5) },
1645 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff),
1646 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1647 ++ .driver_info = RSVD(3) },
1648 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) },
1649 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) },
1650 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) },
1651 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) },
1652 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) },
1653 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff),
1654 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1655 ++ .driver_info = RSVD(4) },
1656 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) },
1657 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */
1658 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1659 ++ .driver_info = RSVD(4) },
1660 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) },
1661 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0197, 0xff, 0xff, 0xff) },
1662 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0199, 0xff, 0xff, 0xff), /* ZTE MF820S */
1663 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1664 ++ .driver_info = RSVD(1) },
1665 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0200, 0xff, 0xff, 0xff) },
1666 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0201, 0xff, 0xff, 0xff) },
1667 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) },
1668 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */
1669 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1670 ++ .driver_info = RSVD(3) },
1671 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff), /* ONDA MT8205 */
1672 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1673 ++ .driver_info = RSVD(4) },
1674 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */
1675 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1676 ++ .driver_info = RSVD(4) },
1677 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },
1678 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff),
1679 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1680 ++ .driver_info = RSVD(4) },
1681 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0330, 0xff, 0xff, 0xff) },
1682 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0395, 0xff, 0xff, 0xff) },
1683 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0412, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G */
1684 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1685 ++ .driver_info = RSVD(4) },
1686 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0414, 0xff, 0xff, 0xff) },
1687 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0417, 0xff, 0xff, 0xff) },
1688 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff),
1689 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1690 ++ .driver_info = RSVD(4) },
1691 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff),
1692 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1693 ++ .driver_info = RSVD(4) },
1694 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff),
1695 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1696 ++ .driver_info = RSVD(4) },
1697 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff) },
1698 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1021, 0xff, 0xff, 0xff),
1699 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1700 ++ .driver_info = RSVD(2) },
1701 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) },
1702 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) },
1703 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) },
1704 +@@ -1572,23 +1448,23 @@ static const struct usb_device_id option_ids[] = {
1705 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1170, 0xff, 0xff, 0xff) },
1706 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1244, 0xff, 0xff, 0xff) },
1707 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1245, 0xff, 0xff, 0xff),
1708 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1709 ++ .driver_info = RSVD(4) },
1710 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1246, 0xff, 0xff, 0xff) },
1711 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1247, 0xff, 0xff, 0xff),
1712 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1713 ++ .driver_info = RSVD(4) },
1714 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1248, 0xff, 0xff, 0xff) },
1715 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1249, 0xff, 0xff, 0xff) },
1716 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1250, 0xff, 0xff, 0xff) },
1717 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1251, 0xff, 0xff, 0xff) },
1718 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1252, 0xff, 0xff, 0xff),
1719 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1720 ++ .driver_info = RSVD(4) },
1721 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1253, 0xff, 0xff, 0xff) },
1722 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1254, 0xff, 0xff, 0xff),
1723 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1724 ++ .driver_info = RSVD(4) },
1725 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1255, 0xff, 0xff, 0xff),
1726 +- .driver_info = (kernel_ulong_t)&zte_1255_blacklist },
1727 ++ .driver_info = RSVD(3) | RSVD(4) },
1728 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1256, 0xff, 0xff, 0xff),
1729 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1730 ++ .driver_info = RSVD(4) },
1731 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1257, 0xff, 0xff, 0xff) },
1732 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1258, 0xff, 0xff, 0xff) },
1733 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1259, 0xff, 0xff, 0xff) },
1734 +@@ -1603,7 +1479,7 @@ static const struct usb_device_id option_ids[] = {
1735 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) },
1736 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) },
1737 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff),
1738 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1739 ++ .driver_info = RSVD(5) },
1740 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) },
1741 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) },
1742 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) },
1743 +@@ -1639,17 +1515,17 @@ static const struct usb_device_id option_ids[] = {
1744 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1303, 0xff, 0xff, 0xff) },
1745 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1333, 0xff, 0xff, 0xff) },
1746 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff),
1747 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1748 ++ .driver_info = RSVD(2) },
1749 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff),
1750 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1751 ++ .driver_info = RSVD(2) },
1752 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1424, 0xff, 0xff, 0xff),
1753 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1754 ++ .driver_info = RSVD(2) },
1755 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1425, 0xff, 0xff, 0xff),
1756 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1757 ++ .driver_info = RSVD(2) },
1758 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */
1759 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1760 ++ .driver_info = RSVD(2) },
1761 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */
1762 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1763 ++ .driver_info = RSVD(2) },
1764 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
1765 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
1766 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
1767 +@@ -1667,8 +1543,8 @@ static const struct usb_device_id option_ids[] = {
1768 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1596, 0xff, 0xff, 0xff) },
1769 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1598, 0xff, 0xff, 0xff) },
1770 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1600, 0xff, 0xff, 0xff) },
1771 +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff,
1772 +- 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist },
1773 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff),
1774 ++ .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | RSVD(4) },
1775 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
1776 +
1777 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */
1778 +@@ -1679,20 +1555,20 @@ static const struct usb_device_id option_ids[] = {
1779 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) },
1780 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) },
1781 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff),
1782 +- .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
1783 ++ .driver_info = RSVD(1) },
1784 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff),
1785 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1786 ++ .driver_info = RSVD(3) },
1787 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff),
1788 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1789 ++ .driver_info = RSVD(5) },
1790 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) },
1791 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) },
1792 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff),
1793 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1794 ++ .driver_info = RSVD(4) },
1795 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) },
1796 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff),
1797 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1798 ++ .driver_info = RSVD(3) },
1799 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
1800 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1801 ++ .driver_info = RSVD(3) },
1802 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff42, 0xff, 0xff, 0xff) },
1803 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff43, 0xff, 0xff, 0xff) },
1804 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff44, 0xff, 0xff, 0xff) },
1805 +@@ -1844,19 +1720,19 @@ static const struct usb_device_id option_ids[] = {
1806 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
1807 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) },
1808 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
1809 +- .driver_info = (kernel_ulong_t)&zte_mc2718_z_blacklist },
1810 ++ .driver_info = NCTRL(1) | NCTRL(2) | NCTRL(3) | NCTRL(4) },
1811 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AD3812, 0xff, 0xff, 0xff),
1812 +- .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist },
1813 ++ .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) },
1814 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
1815 +- .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist },
1816 ++ .driver_info = NCTRL(1) | NCTRL(2) | NCTRL(3) },
1817 + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_L),
1818 +- .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist },
1819 ++ .driver_info = RSVD(3) | RSVD(4) | RSVD(5) },
1820 + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_MBIM),
1821 +- .driver_info = (kernel_ulong_t)&zte_me3620_mbim_blacklist },
1822 ++ .driver_info = RSVD(2) | RSVD(3) | RSVD(4) },
1823 + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_X),
1824 +- .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist },
1825 ++ .driver_info = RSVD(3) | RSVD(4) | RSVD(5) },
1826 + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ZM8620_X),
1827 +- .driver_info = (kernel_ulong_t)&zte_zm8620_x_blacklist },
1828 ++ .driver_info = RSVD(3) | RSVD(4) | RSVD(5) },
1829 + { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
1830 + { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
1831 + { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
1832 +@@ -1876,37 +1752,34 @@ static const struct usb_device_id option_ids[] = {
1833 + { USB_DEVICE(ALINK_VENDOR_ID, ALINK_PRODUCT_PH300) },
1834 + { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },
1835 + { USB_DEVICE(ALINK_VENDOR_ID, SIMCOM_PRODUCT_SIM7100E),
1836 +- .driver_info = (kernel_ulong_t)&simcom_sim7100e_blacklist },
1837 ++ .driver_info = RSVD(5) | RSVD(6) },
1838 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200),
1839 +- .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist
1840 +- },
1841 ++ .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) },
1842 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D),
1843 +- .driver_info = (kernel_ulong_t)&net_intf6_blacklist },
1844 ++ .driver_info = RSVD(6) },
1845 + { USB_DEVICE(ALCATEL_VENDOR_ID, 0x0052),
1846 +- .driver_info = (kernel_ulong_t)&net_intf6_blacklist },
1847 ++ .driver_info = RSVD(6) },
1848 + { USB_DEVICE(ALCATEL_VENDOR_ID, 0x00b6),
1849 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1850 ++ .driver_info = RSVD(3) },
1851 + { USB_DEVICE(ALCATEL_VENDOR_ID, 0x00b7),
1852 +- .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
1853 ++ .driver_info = RSVD(5) },
1854 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V),
1855 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1856 ++ .driver_info = RSVD(4) },
1857 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L800MA),
1858 +- .driver_info = (kernel_ulong_t)&net_intf2_blacklist },
1859 ++ .driver_info = RSVD(2) },
1860 + { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
1861 + { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
1862 + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
1863 +- .driver_info = (kernel_ulong_t)&four_g_w14_blacklist
1864 +- },
1865 ++ .driver_info = NCTRL(0) | NCTRL(1) },
1866 + { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100),
1867 +- .driver_info = (kernel_ulong_t)&four_g_w100_blacklist
1868 +- },
1869 ++ .driver_info = NCTRL(1) | NCTRL(2) | RSVD(3) },
1870 + {USB_DEVICE(LONGCHEER_VENDOR_ID, FUJISOFT_PRODUCT_FS040U),
1871 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist},
1872 ++ .driver_info = RSVD(3)},
1873 + { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, SPEEDUP_PRODUCT_SU9800, 0xff) },
1874 + { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9801, 0xff),
1875 +- .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1876 ++ .driver_info = RSVD(3) },
1877 + { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9803, 0xff),
1878 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1879 ++ .driver_info = RSVD(4) },
1880 + { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
1881 + { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
1882 + { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
1883 +@@ -1932,14 +1805,14 @@ static const struct usb_device_id option_ids[] = {
1884 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) },
1885 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) },
1886 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8),
1887 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1888 ++ .driver_info = RSVD(4) },
1889 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX, 0xff) },
1890 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX),
1891 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1892 ++ .driver_info = RSVD(4) },
1893 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8_2RMNET, 0xff),
1894 +- .driver_info = (kernel_ulong_t)&cinterion_rmnet2_blacklist },
1895 ++ .driver_info = RSVD(4) | RSVD(5) },
1896 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8_AUDIO, 0xff),
1897 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1898 ++ .driver_info = RSVD(4) },
1899 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX_2RMNET, 0xff) },
1900 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX_AUDIO, 0xff) },
1901 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) },
1902 +@@ -1949,20 +1822,20 @@ static const struct usb_device_id option_ids[] = {
1903 + { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */
1904 + { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) },
1905 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100),
1906 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1907 ++ .driver_info = RSVD(4) },
1908 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
1909 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1910 ++ .driver_info = RSVD(4) },
1911 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD140),
1912 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1913 ++ .driver_info = RSVD(4) },
1914 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) },
1915 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD155),
1916 +- .driver_info = (kernel_ulong_t)&net_intf6_blacklist },
1917 ++ .driver_info = RSVD(6) },
1918 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200),
1919 +- .driver_info = (kernel_ulong_t)&net_intf6_blacklist },
1920 ++ .driver_info = RSVD(6) },
1921 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD160),
1922 +- .driver_info = (kernel_ulong_t)&net_intf6_blacklist },
1923 ++ .driver_info = RSVD(6) },
1924 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD500),
1925 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1926 ++ .driver_info = RSVD(4) },
1927 + { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
1928 + { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
1929 + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
1930 +@@ -2039,9 +1912,9 @@ static const struct usb_device_id option_ids[] = {
1931 + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
1932 + { USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) }, /* TP-Link LTE Module */
1933 + { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
1934 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1935 ++ .driver_info = RSVD(4) },
1936 + { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */
1937 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1938 ++ .driver_info = RSVD(4) },
1939 + { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) },
1940 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
1941 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
1942 +@@ -2049,9 +1922,9 @@ static const struct usb_device_id option_ids[] = {
1943 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
1944 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */
1945 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
1946 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1947 ++ .driver_info = RSVD(4) },
1948 + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */
1949 +- .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1950 ++ .driver_info = RSVD(4) },
1951 + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
1952 + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
1953 + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
1954 +@@ -2111,7 +1984,7 @@ static int option_probe(struct usb_serial *serial,
1955 + struct usb_interface_descriptor *iface_desc =
1956 + &serial->interface->cur_altsetting->desc;
1957 + struct usb_device_descriptor *dev_desc = &serial->dev->descriptor;
1958 +- const struct option_blacklist_info *blacklist;
1959 ++ unsigned long device_flags = id->driver_info;
1960 +
1961 + /* Never bind to the CD-Rom emulation interface */
1962 + if (iface_desc->bInterfaceClass == 0x08)
1963 +@@ -2122,9 +1995,7 @@ static int option_probe(struct usb_serial *serial,
1964 + * the same class/subclass/protocol as the serial interfaces. Look at
1965 + * the Windows driver .INF files for reserved interface numbers.
1966 + */
1967 +- blacklist = (void *)id->driver_info;
1968 +- if (blacklist && test_bit(iface_desc->bInterfaceNumber,
1969 +- &blacklist->reserved))
1970 ++ if (device_flags & RSVD(iface_desc->bInterfaceNumber))
1971 + return -ENODEV;
1972 + /*
1973 + * Don't bind network interface on Samsung GT-B3730, it is handled by
1974 +@@ -2135,8 +2006,8 @@ static int option_probe(struct usb_serial *serial,
1975 + iface_desc->bInterfaceClass != USB_CLASS_CDC_DATA)
1976 + return -ENODEV;
1977 +
1978 +- /* Store the blacklist info so we can use it during attach. */
1979 +- usb_set_serial_data(serial, (void *)blacklist);
1980 ++ /* Store the device flags so we can use them during attach. */
1981 ++ usb_set_serial_data(serial, (void *)device_flags);
1982 +
1983 + return 0;
1984 + }
1985 +@@ -2144,22 +2015,21 @@ static int option_probe(struct usb_serial *serial,
1986 + static int option_attach(struct usb_serial *serial)
1987 + {
1988 + struct usb_interface_descriptor *iface_desc;
1989 +- const struct option_blacklist_info *blacklist;
1990 + struct usb_wwan_intf_private *data;
1991 ++ unsigned long device_flags;
1992 +
1993 + data = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL);
1994 + if (!data)
1995 + return -ENOMEM;
1996 +
1997 +- /* Retrieve blacklist info stored at probe. */
1998 +- blacklist = usb_get_serial_data(serial);
1999 ++ /* Retrieve device flags stored at probe. */
2000 ++ device_flags = (unsigned long)usb_get_serial_data(serial);
2001 +
2002 + iface_desc = &serial->interface->cur_altsetting->desc;
2003 +
2004 +- if (!blacklist || !test_bit(iface_desc->bInterfaceNumber,
2005 +- &blacklist->sendsetup)) {
2006 ++ if (!(device_flags & NCTRL(iface_desc->bInterfaceNumber)))
2007 + data->use_send_setup = 1;
2008 +- }
2009 ++
2010 + spin_lock_init(&data->susp_lock);
2011 +
2012 + usb_set_serial_data(serial, data);
2013 +diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
2014 +index 9f3317a940ef..879840ec0658 100644
2015 +--- a/drivers/usb/serial/visor.c
2016 ++++ b/drivers/usb/serial/visor.c
2017 +@@ -338,47 +338,48 @@ static int palm_os_3_probe(struct usb_serial *serial,
2018 + goto exit;
2019 + }
2020 +
2021 +- if (retval == sizeof(*connection_info)) {
2022 +- connection_info = (struct visor_connection_info *)
2023 +- transfer_buffer;
2024 +-
2025 +- num_ports = le16_to_cpu(connection_info->num_ports);
2026 +- for (i = 0; i < num_ports; ++i) {
2027 +- switch (
2028 +- connection_info->connections[i].port_function_id) {
2029 +- case VISOR_FUNCTION_GENERIC:
2030 +- string = "Generic";
2031 +- break;
2032 +- case VISOR_FUNCTION_DEBUGGER:
2033 +- string = "Debugger";
2034 +- break;
2035 +- case VISOR_FUNCTION_HOTSYNC:
2036 +- string = "HotSync";
2037 +- break;
2038 +- case VISOR_FUNCTION_CONSOLE:
2039 +- string = "Console";
2040 +- break;
2041 +- case VISOR_FUNCTION_REMOTE_FILE_SYS:
2042 +- string = "Remote File System";
2043 +- break;
2044 +- default:
2045 +- string = "unknown";
2046 +- break;
2047 +- }
2048 +- dev_info(dev, "%s: port %d, is for %s use\n",
2049 +- serial->type->description,
2050 +- connection_info->connections[i].port, string);
2051 +- }
2052 ++ if (retval != sizeof(*connection_info)) {
2053 ++ dev_err(dev, "Invalid connection information received from device\n");
2054 ++ retval = -ENODEV;
2055 ++ goto exit;
2056 + }
2057 +- /*
2058 +- * Handle devices that report invalid stuff here.
2059 +- */
2060 ++
2061 ++ connection_info = (struct visor_connection_info *)transfer_buffer;
2062 ++
2063 ++ num_ports = le16_to_cpu(connection_info->num_ports);
2064 ++
2065 ++ /* Handle devices that report invalid stuff here. */
2066 + if (num_ports == 0 || num_ports > 2) {
2067 + dev_warn(dev, "%s: No valid connect info available\n",
2068 + serial->type->description);
2069 + num_ports = 2;
2070 + }
2071 +
2072 ++ for (i = 0; i < num_ports; ++i) {
2073 ++ switch (connection_info->connections[i].port_function_id) {
2074 ++ case VISOR_FUNCTION_GENERIC:
2075 ++ string = "Generic";
2076 ++ break;
2077 ++ case VISOR_FUNCTION_DEBUGGER:
2078 ++ string = "Debugger";
2079 ++ break;
2080 ++ case VISOR_FUNCTION_HOTSYNC:
2081 ++ string = "HotSync";
2082 ++ break;
2083 ++ case VISOR_FUNCTION_CONSOLE:
2084 ++ string = "Console";
2085 ++ break;
2086 ++ case VISOR_FUNCTION_REMOTE_FILE_SYS:
2087 ++ string = "Remote File System";
2088 ++ break;
2089 ++ default:
2090 ++ string = "unknown";
2091 ++ break;
2092 ++ }
2093 ++ dev_info(dev, "%s: port %d, is for %s use\n",
2094 ++ serial->type->description,
2095 ++ connection_info->connections[i].port, string);
2096 ++ }
2097 + dev_info(dev, "%s: Number of ports: %d\n", serial->type->description,
2098 + num_ports);
2099 +
2100 +diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
2101 +index 6526ef0e2a23..fa68e81e9671 100644
2102 +--- a/fs/xfs/xfs_file.c
2103 ++++ b/fs/xfs/xfs_file.c
2104 +@@ -811,22 +811,26 @@ xfs_file_fallocate(
2105 + if (error)
2106 + goto out_unlock;
2107 + } else if (mode & FALLOC_FL_INSERT_RANGE) {
2108 +- unsigned int blksize_mask = i_blocksize(inode) - 1;
2109 ++ unsigned int blksize_mask = i_blocksize(inode) - 1;
2110 ++ loff_t isize = i_size_read(inode);
2111 +
2112 +- new_size = i_size_read(inode) + len;
2113 + if (offset & blksize_mask || len & blksize_mask) {
2114 + error = -EINVAL;
2115 + goto out_unlock;
2116 + }
2117 +
2118 +- /* check the new inode size does not wrap through zero */
2119 +- if (new_size > inode->i_sb->s_maxbytes) {
2120 ++ /*
2121 ++ * New inode size must not exceed ->s_maxbytes, accounting for
2122 ++ * possible signed overflow.
2123 ++ */
2124 ++ if (inode->i_sb->s_maxbytes - isize < len) {
2125 + error = -EFBIG;
2126 + goto out_unlock;
2127 + }
2128 ++ new_size = isize + len;
2129 +
2130 + /* Offset should be less than i_size */
2131 +- if (offset >= i_size_read(inode)) {
2132 ++ if (offset >= isize) {
2133 + error = -EINVAL;
2134 + goto out_unlock;
2135 + }
2136 +diff --git a/include/net/dst.h b/include/net/dst.h
2137 +index 694c2e6ae618..ebfb4328fdb1 100644
2138 +--- a/include/net/dst.h
2139 ++++ b/include/net/dst.h
2140 +@@ -520,4 +520,12 @@ static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst)
2141 + }
2142 + #endif
2143 +
2144 ++static inline void skb_dst_update_pmtu(struct sk_buff *skb, u32 mtu)
2145 ++{
2146 ++ struct dst_entry *dst = skb_dst(skb);
2147 ++
2148 ++ if (dst && dst->ops->update_pmtu)
2149 ++ dst->ops->update_pmtu(dst, NULL, skb, mtu);
2150 ++}
2151 ++
2152 + #endif /* _NET_DST_H */
2153 +diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
2154 +index 4525e0271a53..14d3af6a2953 100644
2155 +--- a/kernel/trace/trace_uprobe.c
2156 ++++ b/kernel/trace/trace_uprobe.c
2157 +@@ -55,6 +55,7 @@ struct trace_uprobe {
2158 + struct list_head list;
2159 + struct trace_uprobe_filter filter;
2160 + struct uprobe_consumer consumer;
2161 ++ struct path path;
2162 + struct inode *inode;
2163 + char *filename;
2164 + unsigned long offset;
2165 +@@ -287,7 +288,7 @@ static void free_trace_uprobe(struct trace_uprobe *tu)
2166 + for (i = 0; i < tu->tp.nr_args; i++)
2167 + traceprobe_free_probe_arg(&tu->tp.args[i]);
2168 +
2169 +- iput(tu->inode);
2170 ++ path_put(&tu->path);
2171 + kfree(tu->tp.call.class->system);
2172 + kfree(tu->tp.call.name);
2173 + kfree(tu->filename);
2174 +@@ -361,7 +362,6 @@ static int register_trace_uprobe(struct trace_uprobe *tu)
2175 + static int create_trace_uprobe(int argc, char **argv)
2176 + {
2177 + struct trace_uprobe *tu;
2178 +- struct inode *inode;
2179 + char *arg, *event, *group, *filename;
2180 + char buf[MAX_EVENT_NAME_LEN];
2181 + struct path path;
2182 +@@ -369,7 +369,6 @@ static int create_trace_uprobe(int argc, char **argv)
2183 + bool is_delete, is_return;
2184 + int i, ret;
2185 +
2186 +- inode = NULL;
2187 + ret = 0;
2188 + is_delete = false;
2189 + is_return = false;
2190 +@@ -435,21 +434,16 @@ static int create_trace_uprobe(int argc, char **argv)
2191 + }
2192 + /* Find the last occurrence, in case the path contains ':' too. */
2193 + arg = strrchr(argv[1], ':');
2194 +- if (!arg) {
2195 +- ret = -EINVAL;
2196 +- goto fail_address_parse;
2197 +- }
2198 ++ if (!arg)
2199 ++ return -EINVAL;
2200 +
2201 + *arg++ = '\0';
2202 + filename = argv[1];
2203 + ret = kern_path(filename, LOOKUP_FOLLOW, &path);
2204 + if (ret)
2205 +- goto fail_address_parse;
2206 +-
2207 +- inode = igrab(d_inode(path.dentry));
2208 +- path_put(&path);
2209 ++ return ret;
2210 +
2211 +- if (!inode || !S_ISREG(inode->i_mode)) {
2212 ++ if (!d_is_reg(path.dentry)) {
2213 + ret = -EINVAL;
2214 + goto fail_address_parse;
2215 + }
2216 +@@ -488,7 +482,7 @@ static int create_trace_uprobe(int argc, char **argv)
2217 + goto fail_address_parse;
2218 + }
2219 + tu->offset = offset;
2220 +- tu->inode = inode;
2221 ++ tu->path = path;
2222 + tu->filename = kstrdup(filename, GFP_KERNEL);
2223 +
2224 + if (!tu->filename) {
2225 +@@ -556,7 +550,7 @@ static int create_trace_uprobe(int argc, char **argv)
2226 + return ret;
2227 +
2228 + fail_address_parse:
2229 +- iput(inode);
2230 ++ path_put(&path);
2231 +
2232 + pr_info("Failed to parse address or file.\n");
2233 +
2234 +@@ -935,6 +929,7 @@ probe_event_enable(struct trace_uprobe *tu, struct trace_event_file *file,
2235 + goto err_flags;
2236 +
2237 + tu->consumer.filter = filter;
2238 ++ tu->inode = d_real_inode(tu->path.dentry);
2239 + ret = uprobe_register(tu->inode, tu->offset, &tu->consumer);
2240 + if (ret)
2241 + goto err_buffer;
2242 +@@ -980,6 +975,7 @@ probe_event_disable(struct trace_uprobe *tu, struct trace_event_file *file)
2243 + WARN_ON(!uprobe_filter_is_empty(&tu->filter));
2244 +
2245 + uprobe_unregister(tu->inode, tu->offset, &tu->consumer);
2246 ++ tu->inode = NULL;
2247 + tu->tp.flags &= file ? ~TP_FLAG_TRACE : ~TP_FLAG_PROFILE;
2248 +
2249 + uprobe_buffer_disable();
2250 +diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
2251 +index 685c50ae6300..a170d83043a5 100644
2252 +--- a/kernel/tracepoint.c
2253 ++++ b/kernel/tracepoint.c
2254 +@@ -207,7 +207,7 @@ static int tracepoint_add_func(struct tracepoint *tp,
2255 + lockdep_is_held(&tracepoints_mutex));
2256 + old = func_add(&tp_funcs, func, prio);
2257 + if (IS_ERR(old)) {
2258 +- WARN_ON_ONCE(1);
2259 ++ WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM);
2260 + return PTR_ERR(old);
2261 + }
2262 +
2263 +@@ -240,7 +240,7 @@ static int tracepoint_remove_func(struct tracepoint *tp,
2264 + lockdep_is_held(&tracepoints_mutex));
2265 + old = func_remove(&tp_funcs, func);
2266 + if (IS_ERR(old)) {
2267 +- WARN_ON_ONCE(1);
2268 ++ WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM);
2269 + return PTR_ERR(old);
2270 + }
2271 +
2272 +diff --git a/lib/errseq.c b/lib/errseq.c
2273 +index 79cc66897db4..b6ed81ec788d 100644
2274 +--- a/lib/errseq.c
2275 ++++ b/lib/errseq.c
2276 +@@ -111,25 +111,22 @@ EXPORT_SYMBOL(errseq_set);
2277 + * errseq_sample - grab current errseq_t value
2278 + * @eseq: pointer to errseq_t to be sampled
2279 + *
2280 +- * This function allows callers to sample an errseq_t value, marking it as
2281 +- * "seen" if required.
2282 ++ * This function allows callers to initialise their errseq_t variable.
2283 ++ * If the error has been "seen", new callers will not see an old error.
2284 ++ * If there is an unseen error in @eseq, the caller of this function will
2285 ++ * see it the next time it checks for an error.
2286 ++ *
2287 ++ * Context: Any context.
2288 ++ * Return: The current errseq value.
2289 + */
2290 + errseq_t errseq_sample(errseq_t *eseq)
2291 + {
2292 + errseq_t old = READ_ONCE(*eseq);
2293 +- errseq_t new = old;
2294 +
2295 +- /*
2296 +- * For the common case of no errors ever having been set, we can skip
2297 +- * marking the SEEN bit. Once an error has been set, the value will
2298 +- * never go back to zero.
2299 +- */
2300 +- if (old != 0) {
2301 +- new |= ERRSEQ_SEEN;
2302 +- if (old != new)
2303 +- cmpxchg(eseq, old, new);
2304 +- }
2305 +- return new;
2306 ++ /* If nobody has seen this error yet, then we can be the first. */
2307 ++ if (!(old & ERRSEQ_SEEN))
2308 ++ old = 0;
2309 ++ return old;
2310 + }
2311 + EXPORT_SYMBOL(errseq_sample);
2312 +
2313 +diff --git a/mm/percpu.c b/mm/percpu.c
2314 +index c80e796bf35c..5fa5e79b69f0 100644
2315 +--- a/mm/percpu.c
2316 ++++ b/mm/percpu.c
2317 +@@ -80,6 +80,7 @@
2318 + #include <linux/vmalloc.h>
2319 + #include <linux/workqueue.h>
2320 + #include <linux/kmemleak.h>
2321 ++#include <linux/sched.h>
2322 +
2323 + #include <asm/cacheflush.h>
2324 + #include <asm/sections.h>
2325 +diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
2326 +index 13f7bbc0168d..a2fcc20774a6 100644
2327 +--- a/net/ipv4/ip_tunnel.c
2328 ++++ b/net/ipv4/ip_tunnel.c
2329 +@@ -521,8 +521,7 @@ static int tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
2330 + else
2331 + mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
2332 +
2333 +- if (skb_dst(skb))
2334 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
2335 ++ skb_dst_update_pmtu(skb, mtu);
2336 +
2337 + if (skb->protocol == htons(ETH_P_IP)) {
2338 + if (!skb_is_gso(skb) &&
2339 +diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
2340 +index 89453cf62158..c9cd891f69c2 100644
2341 +--- a/net/ipv4/ip_vti.c
2342 ++++ b/net/ipv4/ip_vti.c
2343 +@@ -209,7 +209,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,
2344 +
2345 + mtu = dst_mtu(dst);
2346 + if (skb->len > mtu) {
2347 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
2348 ++ skb_dst_update_pmtu(skb, mtu);
2349 + if (skb->protocol == htons(ETH_P_IP)) {
2350 + icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
2351 + htonl(mtu));
2352 +diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
2353 +index 7e11f6a811f5..d61a82fd4b60 100644
2354 +--- a/net/ipv6/ip6_tunnel.c
2355 ++++ b/net/ipv6/ip6_tunnel.c
2356 +@@ -652,7 +652,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
2357 + if (rel_info > dst_mtu(skb_dst(skb2)))
2358 + goto out;
2359 +
2360 +- skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), NULL, skb2, rel_info);
2361 ++ skb_dst_update_pmtu(skb2, rel_info);
2362 + }
2363 + if (rel_type == ICMP_REDIRECT)
2364 + skb_dst(skb2)->ops->redirect(skb_dst(skb2), NULL, skb2);
2365 +@@ -1141,8 +1141,7 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
2366 + mtu = 576;
2367 + }
2368 +
2369 +- if (skb_dst(skb) && !t->parms.collect_md)
2370 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
2371 ++ skb_dst_update_pmtu(skb, mtu);
2372 + if (skb->len - t->tun_hlen - eth_hlen > mtu && !skb_is_gso(skb)) {
2373 + *pmtu = mtu;
2374 + err = -EMSGSIZE;
2375 +diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
2376 +index 7c0f647b5195..2493a40bc4b1 100644
2377 +--- a/net/ipv6/ip6_vti.c
2378 ++++ b/net/ipv6/ip6_vti.c
2379 +@@ -486,7 +486,7 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
2380 +
2381 + mtu = dst_mtu(dst);
2382 + if (!skb->ignore_df && skb->len > mtu) {
2383 +- skb_dst(skb)->ops->update_pmtu(dst, NULL, skb, mtu);
2384 ++ skb_dst_update_pmtu(skb, mtu);
2385 +
2386 + if (skb->protocol == htons(ETH_P_IPV6)) {
2387 + if (mtu < IPV6_MIN_MTU)
2388 +diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
2389 +index f03c1a562135..b35d8905794c 100644
2390 +--- a/net/ipv6/sit.c
2391 ++++ b/net/ipv6/sit.c
2392 +@@ -925,8 +925,8 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
2393 + df = 0;
2394 + }
2395 +
2396 +- if (tunnel->parms.iph.daddr && skb_dst(skb))
2397 +- skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
2398 ++ if (tunnel->parms.iph.daddr)
2399 ++ skb_dst_update_pmtu(skb, mtu);
2400 +
2401 + if (skb->len > mtu && !skb_is_gso(skb)) {
2402 + icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
2403 +diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
2404 +index 06d7c40af570..6491afbb5fd5 100644
2405 +--- a/sound/core/pcm_compat.c
2406 ++++ b/sound/core/pcm_compat.c
2407 +@@ -423,6 +423,8 @@ static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream,
2408 + return -ENOTTY;
2409 + if (substream->stream != dir)
2410 + return -EINVAL;
2411 ++ if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN)
2412 ++ return -EBADFD;
2413 +
2414 + if ((ch = substream->runtime->channels) > 128)
2415 + return -EINVAL;
2416 +diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
2417 +index f48a4cd24ffc..289ae6bb81d9 100644
2418 +--- a/sound/core/seq/seq_virmidi.c
2419 ++++ b/sound/core/seq/seq_virmidi.c
2420 +@@ -174,12 +174,12 @@ static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream,
2421 + }
2422 + return;
2423 + }
2424 ++ spin_lock_irqsave(&substream->runtime->lock, flags);
2425 + if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) {
2426 + if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0)
2427 +- return;
2428 ++ goto out;
2429 + vmidi->event.type = SNDRV_SEQ_EVENT_NONE;
2430 + }
2431 +- spin_lock_irqsave(&substream->runtime->lock, flags);
2432 + while (1) {
2433 + count = __snd_rawmidi_transmit_peek(substream, buf, sizeof(buf));
2434 + if (count <= 0)
2435 +diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
2436 +index 829e2f6bfb73..dfd30a80ece8 100644
2437 +--- a/sound/drivers/aloop.c
2438 ++++ b/sound/drivers/aloop.c
2439 +@@ -296,6 +296,8 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
2440 + cable->pause |= stream;
2441 + loopback_timer_stop(dpcm);
2442 + spin_unlock(&cable->lock);
2443 ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
2444 ++ loopback_active_notify(dpcm);
2445 + break;
2446 + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
2447 + case SNDRV_PCM_TRIGGER_RESUME:
2448 +@@ -304,6 +306,8 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
2449 + cable->pause &= ~stream;
2450 + loopback_timer_start(dpcm);
2451 + spin_unlock(&cable->lock);
2452 ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
2453 ++ loopback_active_notify(dpcm);
2454 + break;
2455 + default:
2456 + return -EINVAL;
2457 +@@ -828,9 +832,11 @@ static int loopback_rate_shift_get(struct snd_kcontrol *kcontrol,
2458 + {
2459 + struct loopback *loopback = snd_kcontrol_chip(kcontrol);
2460 +
2461 ++ mutex_lock(&loopback->cable_lock);
2462 + ucontrol->value.integer.value[0] =
2463 + loopback->setup[kcontrol->id.subdevice]
2464 + [kcontrol->id.device].rate_shift;
2465 ++ mutex_unlock(&loopback->cable_lock);
2466 + return 0;
2467 + }
2468 +
2469 +@@ -862,9 +868,11 @@ static int loopback_notify_get(struct snd_kcontrol *kcontrol,
2470 + {
2471 + struct loopback *loopback = snd_kcontrol_chip(kcontrol);
2472 +
2473 ++ mutex_lock(&loopback->cable_lock);
2474 + ucontrol->value.integer.value[0] =
2475 + loopback->setup[kcontrol->id.subdevice]
2476 + [kcontrol->id.device].notify;
2477 ++ mutex_unlock(&loopback->cable_lock);
2478 + return 0;
2479 + }
2480 +
2481 +@@ -876,12 +884,14 @@ static int loopback_notify_put(struct snd_kcontrol *kcontrol,
2482 + int change = 0;
2483 +
2484 + val = ucontrol->value.integer.value[0] ? 1 : 0;
2485 ++ mutex_lock(&loopback->cable_lock);
2486 + if (val != loopback->setup[kcontrol->id.subdevice]
2487 + [kcontrol->id.device].notify) {
2488 + loopback->setup[kcontrol->id.subdevice]
2489 + [kcontrol->id.device].notify = val;
2490 + change = 1;
2491 + }
2492 ++ mutex_unlock(&loopback->cable_lock);
2493 + return change;
2494 + }
2495 +
2496 +@@ -889,13 +899,18 @@ static int loopback_active_get(struct snd_kcontrol *kcontrol,
2497 + struct snd_ctl_elem_value *ucontrol)
2498 + {
2499 + struct loopback *loopback = snd_kcontrol_chip(kcontrol);
2500 +- struct loopback_cable *cable = loopback->cables
2501 +- [kcontrol->id.subdevice][kcontrol->id.device ^ 1];
2502 ++ struct loopback_cable *cable;
2503 ++
2504 + unsigned int val = 0;
2505 +
2506 +- if (cable != NULL)
2507 +- val = (cable->running & (1 << SNDRV_PCM_STREAM_PLAYBACK)) ?
2508 +- 1 : 0;
2509 ++ mutex_lock(&loopback->cable_lock);
2510 ++ cable = loopback->cables[kcontrol->id.subdevice][kcontrol->id.device ^ 1];
2511 ++ if (cable != NULL) {
2512 ++ unsigned int running = cable->running ^ cable->pause;
2513 ++
2514 ++ val = (running & (1 << SNDRV_PCM_STREAM_PLAYBACK)) ? 1 : 0;
2515 ++ }
2516 ++ mutex_unlock(&loopback->cable_lock);
2517 + ucontrol->value.integer.value[0] = val;
2518 + return 0;
2519 + }
2520 +@@ -938,9 +953,11 @@ static int loopback_rate_get(struct snd_kcontrol *kcontrol,
2521 + {
2522 + struct loopback *loopback = snd_kcontrol_chip(kcontrol);
2523 +
2524 ++ mutex_lock(&loopback->cable_lock);
2525 + ucontrol->value.integer.value[0] =
2526 + loopback->setup[kcontrol->id.subdevice]
2527 + [kcontrol->id.device].rate;
2528 ++ mutex_unlock(&loopback->cable_lock);
2529 + return 0;
2530 + }
2531 +
2532 +@@ -960,9 +977,11 @@ static int loopback_channels_get(struct snd_kcontrol *kcontrol,
2533 + {
2534 + struct loopback *loopback = snd_kcontrol_chip(kcontrol);
2535 +
2536 ++ mutex_lock(&loopback->cable_lock);
2537 + ucontrol->value.integer.value[0] =
2538 + loopback->setup[kcontrol->id.subdevice]
2539 + [kcontrol->id.device].channels;
2540 ++ mutex_unlock(&loopback->cable_lock);
2541 + return 0;
2542 + }
2543 +
2544 +diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
2545 +index 3fc581a5ad62..d7d47dc8b5f1 100644
2546 +--- a/sound/firewire/amdtp-stream.c
2547 ++++ b/sound/firewire/amdtp-stream.c
2548 +@@ -773,8 +773,6 @@ static void amdtp_stream_first_callback(struct fw_iso_context *context,
2549 + u32 cycle;
2550 + unsigned int packets;
2551 +
2552 +- s->max_payload_length = amdtp_stream_get_max_payload(s);
2553 +-
2554 + /*
2555 + * For in-stream, first packet has come.
2556 + * For out-stream, prepared to transmit first packet
2557 +@@ -879,6 +877,9 @@ int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed)
2558 +
2559 + amdtp_stream_update(s);
2560 +
2561 ++ if (s->direction == AMDTP_IN_STREAM)
2562 ++ s->max_payload_length = amdtp_stream_get_max_payload(s);
2563 ++
2564 + if (s->flags & CIP_NO_HEADER)
2565 + s->tag = TAG_NO_CIP_HEADER;
2566 + else
2567 +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
2568 +index 59daf9901466..6ae061183eff 100644
2569 +--- a/sound/pci/hda/patch_realtek.c
2570 ++++ b/sound/pci/hda/patch_realtek.c
2571 +@@ -3722,7 +3722,7 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
2572 + }
2573 + }
2574 +
2575 +-#if IS_REACHABLE(INPUT)
2576 ++#if IS_REACHABLE(CONFIG_INPUT)
2577 + static void gpio2_mic_hotkey_event(struct hda_codec *codec,
2578 + struct hda_jack_callback *event)
2579 + {
2580 +diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh
2581 +index 13ade39fe832..13ecf4b61b2b 100755
2582 +--- a/tools/testing/selftests/firmware/fw_filesystem.sh
2583 ++++ b/tools/testing/selftests/firmware/fw_filesystem.sh
2584 +@@ -46,9 +46,11 @@ test_finish()
2585 + echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout
2586 + fi
2587 + if [ "$OLD_FWPATH" = "" ]; then
2588 +- OLD_FWPATH=" "
2589 ++ # A zero-length write won't work; write a null byte
2590 ++ printf '\000' >/sys/module/firmware_class/parameters/path
2591 ++ else
2592 ++ echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path
2593 + fi
2594 +- echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path
2595 + rm -f "$FW"
2596 + rmdir "$FWPATH"
2597 + }