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