1 |
Author: mpagano |
2 |
Date: 2012-08-27 17:27:55 +0000 (Mon, 27 Aug 2012) |
3 |
New Revision: 2199 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/3.4/1009_linux-3.4.10.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/3.4/0000_README |
9 |
Log: |
10 |
Linux patch 3.4.10 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/3.4/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/3.4/0000_README 2012-08-26 17:04:51 UTC (rev 2198) |
15 |
+++ genpatches-2.6/trunk/3.4/0000_README 2012-08-27 17:27:55 UTC (rev 2199) |
16 |
@@ -75,6 +75,10 @@ |
17 |
From: http://www.kernel.org |
18 |
Desc: Linux 3.4.9 |
19 |
|
20 |
+Patch: 1009_linux-3.4.10.patch |
21 |
+From: http://www.kernel.org |
22 |
+Desc: Linux 3.4.10 |
23 |
+ |
24 |
Patch: 1700_correct-bnx2-firware-ver-mips.patch |
25 |
From: https://bugs.gentoo.org/show_bug.cgi?id=424609 |
26 |
Desc: Correct firmware version for bnx2 on mips |
27 |
|
28 |
Added: genpatches-2.6/trunk/3.4/1009_linux-3.4.10.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/3.4/1009_linux-3.4.10.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/3.4/1009_linux-3.4.10.patch 2012-08-27 17:27:55 UTC (rev 2199) |
32 |
@@ -0,0 +1,1464 @@ |
33 |
+diff --git a/Makefile b/Makefile |
34 |
+index 9549547..a1624b9 100644 |
35 |
+--- a/Makefile |
36 |
++++ b/Makefile |
37 |
+@@ -1,6 +1,6 @@ |
38 |
+ VERSION = 3 |
39 |
+ PATCHLEVEL = 4 |
40 |
+-SUBLEVEL = 9 |
41 |
++SUBLEVEL = 10 |
42 |
+ EXTRAVERSION = |
43 |
+ NAME = Saber-toothed Squirrel |
44 |
+ |
45 |
+diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c |
46 |
+index ab64bdb..36e6c30 100644 |
47 |
+--- a/arch/s390/kernel/compat_linux.c |
48 |
++++ b/arch/s390/kernel/compat_linux.c |
49 |
+@@ -612,7 +612,6 @@ asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) |
50 |
+ return -EFAULT; |
51 |
+ if (a.offset & ~PAGE_MASK) |
52 |
+ return -EINVAL; |
53 |
+- a.addr = (unsigned long) compat_ptr(a.addr); |
54 |
+ return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, |
55 |
+ a.offset >> PAGE_SHIFT); |
56 |
+ } |
57 |
+@@ -623,7 +622,6 @@ asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) |
58 |
+ |
59 |
+ if (copy_from_user(&a, arg, sizeof(a))) |
60 |
+ return -EFAULT; |
61 |
+- a.addr = (unsigned long) compat_ptr(a.addr); |
62 |
+ return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); |
63 |
+ } |
64 |
+ |
65 |
+diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S |
66 |
+index ff605a3..cfe3efd 100644 |
67 |
+--- a/arch/s390/kernel/compat_wrapper.S |
68 |
++++ b/arch/s390/kernel/compat_wrapper.S |
69 |
+@@ -1636,7 +1636,7 @@ ENTRY(compat_sys_process_vm_readv_wrapper) |
70 |
+ llgfr %r6,%r6 # unsigned long |
71 |
+ llgf %r0,164(%r15) # unsigned long |
72 |
+ stg %r0,160(%r15) |
73 |
+- jg sys_process_vm_readv |
74 |
++ jg compat_sys_process_vm_readv |
75 |
+ |
76 |
+ ENTRY(compat_sys_process_vm_writev_wrapper) |
77 |
+ lgfr %r2,%r2 # compat_pid_t |
78 |
+@@ -1646,4 +1646,4 @@ ENTRY(compat_sys_process_vm_writev_wrapper) |
79 |
+ llgfr %r6,%r6 # unsigned long |
80 |
+ llgf %r0,164(%r15) # unsigned long |
81 |
+ stg %r0,160(%r15) |
82 |
+- jg sys_process_vm_writev |
83 |
++ jg compat_sys_process_vm_writev |
84 |
+diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c |
85 |
+index 1b267e7..00a0385 100644 |
86 |
+--- a/arch/x86/xen/p2m.c |
87 |
++++ b/arch/x86/xen/p2m.c |
88 |
+@@ -686,6 +686,7 @@ int m2p_add_override(unsigned long mfn, struct page *page, |
89 |
+ unsigned long uninitialized_var(address); |
90 |
+ unsigned level; |
91 |
+ pte_t *ptep = NULL; |
92 |
++ int ret = 0; |
93 |
+ |
94 |
+ pfn = page_to_pfn(page); |
95 |
+ if (!PageHighMem(page)) { |
96 |
+@@ -721,6 +722,24 @@ int m2p_add_override(unsigned long mfn, struct page *page, |
97 |
+ list_add(&page->lru, &m2p_overrides[mfn_hash(mfn)]); |
98 |
+ spin_unlock_irqrestore(&m2p_override_lock, flags); |
99 |
+ |
100 |
++ /* p2m(m2p(mfn)) == mfn: the mfn is already present somewhere in |
101 |
++ * this domain. Set the FOREIGN_FRAME_BIT in the p2m for the other |
102 |
++ * pfn so that the following mfn_to_pfn(mfn) calls will return the |
103 |
++ * pfn from the m2p_override (the backend pfn) instead. |
104 |
++ * We need to do this because the pages shared by the frontend |
105 |
++ * (xen-blkfront) can be already locked (lock_page, called by |
106 |
++ * do_read_cache_page); when the userspace backend tries to use them |
107 |
++ * with direct_IO, mfn_to_pfn returns the pfn of the frontend, so |
108 |
++ * do_blockdev_direct_IO is going to try to lock the same pages |
109 |
++ * again resulting in a deadlock. |
110 |
++ * As a side effect get_user_pages_fast might not be safe on the |
111 |
++ * frontend pages while they are being shared with the backend, |
112 |
++ * because mfn_to_pfn (that ends up being called by GUPF) will |
113 |
++ * return the backend pfn rather than the frontend pfn. */ |
114 |
++ ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); |
115 |
++ if (ret == 0 && get_phys_to_machine(pfn) == mfn) |
116 |
++ set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); |
117 |
++ |
118 |
+ return 0; |
119 |
+ } |
120 |
+ EXPORT_SYMBOL_GPL(m2p_add_override); |
121 |
+@@ -732,6 +751,7 @@ int m2p_remove_override(struct page *page, bool clear_pte) |
122 |
+ unsigned long uninitialized_var(address); |
123 |
+ unsigned level; |
124 |
+ pte_t *ptep = NULL; |
125 |
++ int ret = 0; |
126 |
+ |
127 |
+ pfn = page_to_pfn(page); |
128 |
+ mfn = get_phys_to_machine(pfn); |
129 |
+@@ -801,6 +821,22 @@ int m2p_remove_override(struct page *page, bool clear_pte) |
130 |
+ } else |
131 |
+ set_phys_to_machine(pfn, page->index); |
132 |
+ |
133 |
++ /* p2m(m2p(mfn)) == FOREIGN_FRAME(mfn): the mfn is already present |
134 |
++ * somewhere in this domain, even before being added to the |
135 |
++ * m2p_override (see comment above in m2p_add_override). |
136 |
++ * If there are no other entries in the m2p_override corresponding |
137 |
++ * to this mfn, then remove the FOREIGN_FRAME_BIT from the p2m for |
138 |
++ * the original pfn (the one shared by the frontend): the backend |
139 |
++ * cannot do any IO on this page anymore because it has been |
140 |
++ * unshared. Removing the FOREIGN_FRAME_BIT from the p2m entry of |
141 |
++ * the original pfn causes mfn_to_pfn(mfn) to return the frontend |
142 |
++ * pfn again. */ |
143 |
++ mfn &= ~FOREIGN_FRAME_BIT; |
144 |
++ ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); |
145 |
++ if (ret == 0 && get_phys_to_machine(pfn) == FOREIGN_FRAME(mfn) && |
146 |
++ m2p_find_override(mfn) == NULL) |
147 |
++ set_phys_to_machine(pfn, mfn); |
148 |
++ |
149 |
+ return 0; |
150 |
+ } |
151 |
+ EXPORT_SYMBOL_GPL(m2p_remove_override); |
152 |
+diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c |
153 |
+index bb787d8..2ca8d3f 100644 |
154 |
+--- a/drivers/dma/imx-dma.c |
155 |
++++ b/drivers/dma/imx-dma.c |
156 |
+@@ -172,7 +172,8 @@ struct imxdma_engine { |
157 |
+ struct device_dma_parameters dma_parms; |
158 |
+ struct dma_device dma_device; |
159 |
+ void __iomem *base; |
160 |
+- struct clk *dma_clk; |
161 |
++ struct clk *dma_ahb; |
162 |
++ struct clk *dma_ipg; |
163 |
+ spinlock_t lock; |
164 |
+ struct imx_dma_2d_config slots_2d[IMX_DMA_2D_SLOTS]; |
165 |
+ struct imxdma_channel channel[IMX_DMA_CHANNELS]; |
166 |
+@@ -976,10 +977,20 @@ static int __init imxdma_probe(struct platform_device *pdev) |
167 |
+ return 0; |
168 |
+ } |
169 |
+ |
170 |
+- imxdma->dma_clk = clk_get(NULL, "dma"); |
171 |
+- if (IS_ERR(imxdma->dma_clk)) |
172 |
+- return PTR_ERR(imxdma->dma_clk); |
173 |
+- clk_enable(imxdma->dma_clk); |
174 |
++ imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg"); |
175 |
++ if (IS_ERR(imxdma->dma_ipg)) { |
176 |
++ ret = PTR_ERR(imxdma->dma_ipg); |
177 |
++ goto err_clk; |
178 |
++ } |
179 |
++ |
180 |
++ imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb"); |
181 |
++ if (IS_ERR(imxdma->dma_ahb)) { |
182 |
++ ret = PTR_ERR(imxdma->dma_ahb); |
183 |
++ goto err_clk; |
184 |
++ } |
185 |
++ |
186 |
++ clk_prepare_enable(imxdma->dma_ipg); |
187 |
++ clk_prepare_enable(imxdma->dma_ahb); |
188 |
+ |
189 |
+ /* reset DMA module */ |
190 |
+ imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR); |
191 |
+@@ -988,16 +999,14 @@ static int __init imxdma_probe(struct platform_device *pdev) |
192 |
+ ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", imxdma); |
193 |
+ if (ret) { |
194 |
+ dev_warn(imxdma->dev, "Can't register IRQ for DMA\n"); |
195 |
+- kfree(imxdma); |
196 |
+- return ret; |
197 |
++ goto err_enable; |
198 |
+ } |
199 |
+ |
200 |
+ ret = request_irq(MX1_DMA_ERR, imxdma_err_handler, 0, "DMA", imxdma); |
201 |
+ if (ret) { |
202 |
+ dev_warn(imxdma->dev, "Can't register ERRIRQ for DMA\n"); |
203 |
+ free_irq(MX1_DMA_INT, NULL); |
204 |
+- kfree(imxdma); |
205 |
+- return ret; |
206 |
++ goto err_enable; |
207 |
+ } |
208 |
+ } |
209 |
+ |
210 |
+@@ -1094,7 +1103,10 @@ err_init: |
211 |
+ free_irq(MX1_DMA_INT, NULL); |
212 |
+ free_irq(MX1_DMA_ERR, NULL); |
213 |
+ } |
214 |
+- |
215 |
++err_enable: |
216 |
++ clk_disable_unprepare(imxdma->dma_ipg); |
217 |
++ clk_disable_unprepare(imxdma->dma_ahb); |
218 |
++err_clk: |
219 |
+ kfree(imxdma); |
220 |
+ return ret; |
221 |
+ } |
222 |
+@@ -1114,7 +1126,9 @@ static int __exit imxdma_remove(struct platform_device *pdev) |
223 |
+ free_irq(MX1_DMA_ERR, NULL); |
224 |
+ } |
225 |
+ |
226 |
+- kfree(imxdma); |
227 |
++ clk_disable_unprepare(imxdma->dma_ipg); |
228 |
++ clk_disable_unprepare(imxdma->dma_ahb); |
229 |
++ kfree(imxdma); |
230 |
+ |
231 |
+ return 0; |
232 |
+ } |
233 |
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c |
234 |
+index d4d162f..3de3d9b 100644 |
235 |
+--- a/drivers/gpu/drm/i915/intel_display.c |
236 |
++++ b/drivers/gpu/drm/i915/intel_display.c |
237 |
+@@ -4982,17 +4982,6 @@ static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc, |
238 |
+ continue; |
239 |
+ } |
240 |
+ |
241 |
+- if (intel_encoder->type == INTEL_OUTPUT_EDP) { |
242 |
+- /* Use VBT settings if we have an eDP panel */ |
243 |
+- unsigned int edp_bpc = dev_priv->edp.bpp / 3; |
244 |
+- |
245 |
+- if (edp_bpc < display_bpc) { |
246 |
+- DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); |
247 |
+- display_bpc = edp_bpc; |
248 |
+- } |
249 |
+- continue; |
250 |
+- } |
251 |
+- |
252 |
+ /* Not one of the known troublemakers, check the EDID */ |
253 |
+ list_for_each_entry(connector, &dev->mode_config.connector_list, |
254 |
+ head) { |
255 |
+diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c |
256 |
+index 6862421..069725c 100644 |
257 |
+--- a/drivers/gpu/drm/i915/intel_dp.c |
258 |
++++ b/drivers/gpu/drm/i915/intel_dp.c |
259 |
+@@ -712,8 +712,8 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, |
260 |
+ |
261 |
+ bpp = adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24; |
262 |
+ |
263 |
+- for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) { |
264 |
+- for (clock = 0; clock <= max_clock; clock++) { |
265 |
++ for (clock = 0; clock <= max_clock; clock++) { |
266 |
++ for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) { |
267 |
+ int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count); |
268 |
+ |
269 |
+ if (intel_dp_link_required(mode->clock, bpp) |
270 |
+@@ -1156,10 +1156,14 @@ static void ironlake_edp_panel_off(struct intel_dp *intel_dp) |
271 |
+ WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n"); |
272 |
+ |
273 |
+ pp = ironlake_get_pp_control(dev_priv); |
274 |
+- pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE); |
275 |
++ /* We need to switch off panel power _and_ force vdd, for otherwise some |
276 |
++ * panels get very unhappy and cease to work. */ |
277 |
++ pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE); |
278 |
+ I915_WRITE(PCH_PP_CONTROL, pp); |
279 |
+ POSTING_READ(PCH_PP_CONTROL); |
280 |
+ |
281 |
++ intel_dp->want_panel_vdd = false; |
282 |
++ |
283 |
+ ironlake_wait_panel_off(intel_dp); |
284 |
+ } |
285 |
+ |
286 |
+@@ -1269,11 +1273,9 @@ static void intel_dp_prepare(struct drm_encoder *encoder) |
287 |
+ * ensure that we have vdd while we switch off the panel. */ |
288 |
+ ironlake_edp_panel_vdd_on(intel_dp); |
289 |
+ ironlake_edp_backlight_off(intel_dp); |
290 |
+- ironlake_edp_panel_off(intel_dp); |
291 |
+- |
292 |
+ intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); |
293 |
++ ironlake_edp_panel_off(intel_dp); |
294 |
+ intel_dp_link_down(intel_dp); |
295 |
+- ironlake_edp_panel_vdd_off(intel_dp, false); |
296 |
+ } |
297 |
+ |
298 |
+ static void intel_dp_commit(struct drm_encoder *encoder) |
299 |
+@@ -1308,11 +1310,9 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode) |
300 |
+ /* Switching the panel off requires vdd. */ |
301 |
+ ironlake_edp_panel_vdd_on(intel_dp); |
302 |
+ ironlake_edp_backlight_off(intel_dp); |
303 |
+- ironlake_edp_panel_off(intel_dp); |
304 |
+- |
305 |
+ intel_dp_sink_dpms(intel_dp, mode); |
306 |
++ ironlake_edp_panel_off(intel_dp); |
307 |
+ intel_dp_link_down(intel_dp); |
308 |
+- ironlake_edp_panel_vdd_off(intel_dp, false); |
309 |
+ |
310 |
+ if (is_cpu_edp(intel_dp)) |
311 |
+ ironlake_edp_pll_off(encoder); |
312 |
+diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c |
313 |
+index 302d3d5..12a9e5f 100644 |
314 |
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c |
315 |
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c |
316 |
+@@ -258,8 +258,6 @@ static int init_ring_common(struct intel_ring_buffer *ring) |
317 |
+ I915_WRITE_HEAD(ring, 0); |
318 |
+ ring->write_tail(ring, 0); |
319 |
+ |
320 |
+- /* Initialize the ring. */ |
321 |
+- I915_WRITE_START(ring, obj->gtt_offset); |
322 |
+ head = I915_READ_HEAD(ring) & HEAD_ADDR; |
323 |
+ |
324 |
+ /* G45 ring initialization fails to reset head to zero */ |
325 |
+@@ -285,6 +283,11 @@ static int init_ring_common(struct intel_ring_buffer *ring) |
326 |
+ } |
327 |
+ } |
328 |
+ |
329 |
++ /* Initialize the ring. This must happen _after_ we've cleared the ring |
330 |
++ * registers with the above sequence (the readback of the HEAD registers |
331 |
++ * also enforces ordering), otherwise the hw might lose the new ring |
332 |
++ * register values. */ |
333 |
++ I915_WRITE_START(ring, obj->gtt_offset); |
334 |
+ I915_WRITE_CTL(ring, |
335 |
+ ((ring->size - PAGE_SIZE) & RING_NR_PAGES) |
336 |
+ | RING_VALID); |
337 |
+diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c |
338 |
+index 0247250..8a555fb 100644 |
339 |
+--- a/drivers/gpu/drm/nouveau/nvd0_display.c |
340 |
++++ b/drivers/gpu/drm/nouveau/nvd0_display.c |
341 |
+@@ -790,7 +790,7 @@ nvd0_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) |
342 |
+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); |
343 |
+ int ch = EVO_CURS(nv_crtc->index); |
344 |
+ |
345 |
+- evo_piow(crtc->dev, ch, 0x0084, (y << 16) | x); |
346 |
++ evo_piow(crtc->dev, ch, 0x0084, (y << 16) | (x & 0xffff)); |
347 |
+ evo_piow(crtc->dev, ch, 0x0080, 0x00000000); |
348 |
+ return 0; |
349 |
+ } |
350 |
+diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c |
351 |
+index af1054f..a53ca30 100644 |
352 |
+--- a/drivers/gpu/drm/radeon/atombios_crtc.c |
353 |
++++ b/drivers/gpu/drm/radeon/atombios_crtc.c |
354 |
+@@ -259,7 +259,7 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode) |
355 |
+ /* adjust pm to dpms changes BEFORE enabling crtcs */ |
356 |
+ radeon_pm_compute_clocks(rdev); |
357 |
+ /* disable crtc pair power gating before programming */ |
358 |
+- if (ASIC_IS_DCE6(rdev)) |
359 |
++ if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set) |
360 |
+ atombios_powergate_crtc(crtc, ATOM_DISABLE); |
361 |
+ atombios_enable_crtc(crtc, ATOM_ENABLE); |
362 |
+ if (ASIC_IS_DCE3(rdev) && !ASIC_IS_DCE6(rdev)) |
363 |
+@@ -279,7 +279,7 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode) |
364 |
+ atombios_enable_crtc(crtc, ATOM_DISABLE); |
365 |
+ radeon_crtc->enabled = false; |
366 |
+ /* power gating is per-pair */ |
367 |
+- if (ASIC_IS_DCE6(rdev)) { |
368 |
++ if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set) { |
369 |
+ struct drm_crtc *other_crtc; |
370 |
+ struct radeon_crtc *other_radeon_crtc; |
371 |
+ list_for_each_entry(other_crtc, &rdev->ddev->mode_config.crtc_list, head) { |
372 |
+@@ -1634,18 +1634,28 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, |
373 |
+ static void atombios_crtc_prepare(struct drm_crtc *crtc) |
374 |
+ { |
375 |
+ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
376 |
++ struct drm_device *dev = crtc->dev; |
377 |
++ struct radeon_device *rdev = dev->dev_private; |
378 |
+ |
379 |
++ radeon_crtc->in_mode_set = true; |
380 |
+ /* pick pll */ |
381 |
+ radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); |
382 |
+ |
383 |
++ /* disable crtc pair power gating before programming */ |
384 |
++ if (ASIC_IS_DCE6(rdev)) |
385 |
++ atombios_powergate_crtc(crtc, ATOM_DISABLE); |
386 |
++ |
387 |
+ atombios_lock_crtc(crtc, ATOM_ENABLE); |
388 |
+ atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); |
389 |
+ } |
390 |
+ |
391 |
+ static void atombios_crtc_commit(struct drm_crtc *crtc) |
392 |
+ { |
393 |
++ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
394 |
++ |
395 |
+ atombios_crtc_dpms(crtc, DRM_MODE_DPMS_ON); |
396 |
+ atombios_lock_crtc(crtc, ATOM_DISABLE); |
397 |
++ radeon_crtc->in_mode_set = false; |
398 |
+ } |
399 |
+ |
400 |
+ static void atombios_crtc_disable(struct drm_crtc *crtc) |
401 |
+diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c |
402 |
+index e72c03f..e5328da 100644 |
403 |
+--- a/drivers/gpu/drm/radeon/evergreen.c |
404 |
++++ b/drivers/gpu/drm/radeon/evergreen.c |
405 |
+@@ -1117,24 +1117,8 @@ void evergreen_agp_enable(struct radeon_device *rdev) |
406 |
+ |
407 |
+ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save) |
408 |
+ { |
409 |
+- save->vga_control[0] = RREG32(D1VGA_CONTROL); |
410 |
+- save->vga_control[1] = RREG32(D2VGA_CONTROL); |
411 |
+ save->vga_render_control = RREG32(VGA_RENDER_CONTROL); |
412 |
+ save->vga_hdp_control = RREG32(VGA_HDP_CONTROL); |
413 |
+- save->crtc_control[0] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET); |
414 |
+- save->crtc_control[1] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET); |
415 |
+- if (rdev->num_crtc >= 4) { |
416 |
+- save->vga_control[2] = RREG32(EVERGREEN_D3VGA_CONTROL); |
417 |
+- save->vga_control[3] = RREG32(EVERGREEN_D4VGA_CONTROL); |
418 |
+- save->crtc_control[2] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET); |
419 |
+- save->crtc_control[3] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET); |
420 |
+- } |
421 |
+- if (rdev->num_crtc >= 6) { |
422 |
+- save->vga_control[4] = RREG32(EVERGREEN_D5VGA_CONTROL); |
423 |
+- save->vga_control[5] = RREG32(EVERGREEN_D6VGA_CONTROL); |
424 |
+- save->crtc_control[4] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET); |
425 |
+- save->crtc_control[5] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET); |
426 |
+- } |
427 |
+ |
428 |
+ /* Stop all video */ |
429 |
+ WREG32(VGA_RENDER_CONTROL, 0); |
430 |
+@@ -1245,47 +1229,6 @@ void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *s |
431 |
+ /* Unlock host access */ |
432 |
+ WREG32(VGA_HDP_CONTROL, save->vga_hdp_control); |
433 |
+ mdelay(1); |
434 |
+- /* Restore video state */ |
435 |
+- WREG32(D1VGA_CONTROL, save->vga_control[0]); |
436 |
+- WREG32(D2VGA_CONTROL, save->vga_control[1]); |
437 |
+- if (rdev->num_crtc >= 4) { |
438 |
+- WREG32(EVERGREEN_D3VGA_CONTROL, save->vga_control[2]); |
439 |
+- WREG32(EVERGREEN_D4VGA_CONTROL, save->vga_control[3]); |
440 |
+- } |
441 |
+- if (rdev->num_crtc >= 6) { |
442 |
+- WREG32(EVERGREEN_D5VGA_CONTROL, save->vga_control[4]); |
443 |
+- WREG32(EVERGREEN_D6VGA_CONTROL, save->vga_control[5]); |
444 |
+- } |
445 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 1); |
446 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 1); |
447 |
+- if (rdev->num_crtc >= 4) { |
448 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 1); |
449 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 1); |
450 |
+- } |
451 |
+- if (rdev->num_crtc >= 6) { |
452 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 1); |
453 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 1); |
454 |
+- } |
455 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, save->crtc_control[0]); |
456 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, save->crtc_control[1]); |
457 |
+- if (rdev->num_crtc >= 4) { |
458 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, save->crtc_control[2]); |
459 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, save->crtc_control[3]); |
460 |
+- } |
461 |
+- if (rdev->num_crtc >= 6) { |
462 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, save->crtc_control[4]); |
463 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, save->crtc_control[5]); |
464 |
+- } |
465 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0); |
466 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0); |
467 |
+- if (rdev->num_crtc >= 4) { |
468 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 0); |
469 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 0); |
470 |
+- } |
471 |
+- if (rdev->num_crtc >= 6) { |
472 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 0); |
473 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 0); |
474 |
+- } |
475 |
+ WREG32(VGA_RENDER_CONTROL, save->vga_render_control); |
476 |
+ } |
477 |
+ |
478 |
+@@ -2142,10 +2085,18 @@ static void evergreen_gpu_init(struct radeon_device *rdev) |
479 |
+ if (rdev->flags & RADEON_IS_IGP) |
480 |
+ rdev->config.evergreen.tile_config |= 1 << 4; |
481 |
+ else { |
482 |
+- if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) |
483 |
+- rdev->config.evergreen.tile_config |= 1 << 4; |
484 |
+- else |
485 |
++ switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { |
486 |
++ case 0: /* four banks */ |
487 |
+ rdev->config.evergreen.tile_config |= 0 << 4; |
488 |
++ break; |
489 |
++ case 1: /* eight banks */ |
490 |
++ rdev->config.evergreen.tile_config |= 1 << 4; |
491 |
++ break; |
492 |
++ case 2: /* sixteen banks */ |
493 |
++ default: |
494 |
++ rdev->config.evergreen.tile_config |= 2 << 4; |
495 |
++ break; |
496 |
++ } |
497 |
+ } |
498 |
+ rdev->config.evergreen.tile_config |= |
499 |
+ ((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT) << 8; |
500 |
+diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c |
501 |
+index ad0a380..9934c9d 100644 |
502 |
+--- a/drivers/gpu/drm/radeon/ni.c |
503 |
++++ b/drivers/gpu/drm/radeon/ni.c |
504 |
+@@ -880,10 +880,18 @@ static void cayman_gpu_init(struct radeon_device *rdev) |
505 |
+ if (rdev->flags & RADEON_IS_IGP) |
506 |
+ rdev->config.cayman.tile_config |= 1 << 4; |
507 |
+ else { |
508 |
+- if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) |
509 |
+- rdev->config.cayman.tile_config |= 1 << 4; |
510 |
+- else |
511 |
++ switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { |
512 |
++ case 0: /* four banks */ |
513 |
+ rdev->config.cayman.tile_config |= 0 << 4; |
514 |
++ break; |
515 |
++ case 1: /* eight banks */ |
516 |
++ rdev->config.cayman.tile_config |= 1 << 4; |
517 |
++ break; |
518 |
++ case 2: /* sixteen banks */ |
519 |
++ default: |
520 |
++ rdev->config.cayman.tile_config |= 2 << 4; |
521 |
++ break; |
522 |
++ } |
523 |
+ } |
524 |
+ rdev->config.cayman.tile_config |= |
525 |
+ ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; |
526 |
+diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h |
527 |
+index 3d9f9f1..665df87 100644 |
528 |
+--- a/drivers/gpu/drm/radeon/radeon_asic.h |
529 |
++++ b/drivers/gpu/drm/radeon/radeon_asic.h |
530 |
+@@ -262,13 +262,10 @@ extern int rs690_mc_wait_for_idle(struct radeon_device *rdev); |
531 |
+ * rv515 |
532 |
+ */ |
533 |
+ struct rv515_mc_save { |
534 |
+- u32 d1vga_control; |
535 |
+- u32 d2vga_control; |
536 |
+ u32 vga_render_control; |
537 |
+ u32 vga_hdp_control; |
538 |
+- u32 d1crtc_control; |
539 |
+- u32 d2crtc_control; |
540 |
+ }; |
541 |
++ |
542 |
+ int rv515_init(struct radeon_device *rdev); |
543 |
+ void rv515_fini(struct radeon_device *rdev); |
544 |
+ uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
545 |
+@@ -401,11 +398,10 @@ void r700_cp_fini(struct radeon_device *rdev); |
546 |
+ * evergreen |
547 |
+ */ |
548 |
+ struct evergreen_mc_save { |
549 |
+- u32 vga_control[6]; |
550 |
+ u32 vga_render_control; |
551 |
+ u32 vga_hdp_control; |
552 |
+- u32 crtc_control[6]; |
553 |
+ }; |
554 |
++ |
555 |
+ void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev); |
556 |
+ int evergreen_init(struct radeon_device *rdev); |
557 |
+ void evergreen_fini(struct radeon_device *rdev); |
558 |
+diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |
559 |
+index 210317c..9760e5a 100644 |
560 |
+--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |
561 |
++++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |
562 |
+@@ -1025,9 +1025,11 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc, |
563 |
+ |
564 |
+ static void radeon_crtc_prepare(struct drm_crtc *crtc) |
565 |
+ { |
566 |
++ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
567 |
+ struct drm_device *dev = crtc->dev; |
568 |
+ struct drm_crtc *crtci; |
569 |
+ |
570 |
++ radeon_crtc->in_mode_set = true; |
571 |
+ /* |
572 |
+ * The hardware wedges sometimes if you reconfigure one CRTC |
573 |
+ * whilst another is running (see fdo bug #24611). |
574 |
+@@ -1038,6 +1040,7 @@ static void radeon_crtc_prepare(struct drm_crtc *crtc) |
575 |
+ |
576 |
+ static void radeon_crtc_commit(struct drm_crtc *crtc) |
577 |
+ { |
578 |
++ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
579 |
+ struct drm_device *dev = crtc->dev; |
580 |
+ struct drm_crtc *crtci; |
581 |
+ |
582 |
+@@ -1048,6 +1051,7 @@ static void radeon_crtc_commit(struct drm_crtc *crtc) |
583 |
+ if (crtci->enabled) |
584 |
+ radeon_crtc_dpms(crtci, DRM_MODE_DPMS_ON); |
585 |
+ } |
586 |
++ radeon_crtc->in_mode_set = false; |
587 |
+ } |
588 |
+ |
589 |
+ static const struct drm_crtc_helper_funcs legacy_helper_funcs = { |
590 |
+diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h |
591 |
+index f7eb5d8..778c1f0 100644 |
592 |
+--- a/drivers/gpu/drm/radeon/radeon_mode.h |
593 |
++++ b/drivers/gpu/drm/radeon/radeon_mode.h |
594 |
+@@ -266,6 +266,7 @@ struct radeon_crtc { |
595 |
+ u16 lut_r[256], lut_g[256], lut_b[256]; |
596 |
+ bool enabled; |
597 |
+ bool can_tile; |
598 |
++ bool in_mode_set; |
599 |
+ uint32_t crtc_offset; |
600 |
+ struct drm_gem_object *cursor_bo; |
601 |
+ uint64_t cursor_addr; |
602 |
+diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c |
603 |
+index d8d78fe..43af363 100644 |
604 |
+--- a/drivers/gpu/drm/radeon/rv515.c |
605 |
++++ b/drivers/gpu/drm/radeon/rv515.c |
606 |
+@@ -281,12 +281,8 @@ int rv515_debugfs_ga_info_init(struct radeon_device *rdev) |
607 |
+ |
608 |
+ void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save) |
609 |
+ { |
610 |
+- save->d1vga_control = RREG32(R_000330_D1VGA_CONTROL); |
611 |
+- save->d2vga_control = RREG32(R_000338_D2VGA_CONTROL); |
612 |
+ save->vga_render_control = RREG32(R_000300_VGA_RENDER_CONTROL); |
613 |
+ save->vga_hdp_control = RREG32(R_000328_VGA_HDP_CONTROL); |
614 |
+- save->d1crtc_control = RREG32(R_006080_D1CRTC_CONTROL); |
615 |
+- save->d2crtc_control = RREG32(R_006880_D2CRTC_CONTROL); |
616 |
+ |
617 |
+ /* Stop all video */ |
618 |
+ WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 0); |
619 |
+@@ -311,15 +307,6 @@ void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save) |
620 |
+ /* Unlock host access */ |
621 |
+ WREG32(R_000328_VGA_HDP_CONTROL, save->vga_hdp_control); |
622 |
+ mdelay(1); |
623 |
+- /* Restore video state */ |
624 |
+- WREG32(R_000330_D1VGA_CONTROL, save->d1vga_control); |
625 |
+- WREG32(R_000338_D2VGA_CONTROL, save->d2vga_control); |
626 |
+- WREG32(R_0060E8_D1CRTC_UPDATE_LOCK, 1); |
627 |
+- WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 1); |
628 |
+- WREG32(R_006080_D1CRTC_CONTROL, save->d1crtc_control); |
629 |
+- WREG32(R_006880_D2CRTC_CONTROL, save->d2crtc_control); |
630 |
+- WREG32(R_0060E8_D1CRTC_UPDATE_LOCK, 0); |
631 |
+- WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 0); |
632 |
+ WREG32(R_000300_VGA_RENDER_CONTROL, save->vga_render_control); |
633 |
+ } |
634 |
+ |
635 |
+diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c |
636 |
+index bcbf22e..1b5b0c7 100644 |
637 |
+--- a/drivers/infiniband/ulp/srp/ib_srp.c |
638 |
++++ b/drivers/infiniband/ulp/srp/ib_srp.c |
639 |
+@@ -586,24 +586,62 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd, |
640 |
+ scmnd->sc_data_direction); |
641 |
+ } |
642 |
+ |
643 |
+-static void srp_remove_req(struct srp_target_port *target, |
644 |
+- struct srp_request *req, s32 req_lim_delta) |
645 |
++/** |
646 |
++ * srp_claim_req - Take ownership of the scmnd associated with a request. |
647 |
++ * @target: SRP target port. |
648 |
++ * @req: SRP request. |
649 |
++ * @scmnd: If NULL, take ownership of @req->scmnd. If not NULL, only take |
650 |
++ * ownership of @req->scmnd if it equals @scmnd. |
651 |
++ * |
652 |
++ * Return value: |
653 |
++ * Either NULL or a pointer to the SCSI command the caller became owner of. |
654 |
++ */ |
655 |
++static struct scsi_cmnd *srp_claim_req(struct srp_target_port *target, |
656 |
++ struct srp_request *req, |
657 |
++ struct scsi_cmnd *scmnd) |
658 |
++{ |
659 |
++ unsigned long flags; |
660 |
++ |
661 |
++ spin_lock_irqsave(&target->lock, flags); |
662 |
++ if (!scmnd) { |
663 |
++ scmnd = req->scmnd; |
664 |
++ req->scmnd = NULL; |
665 |
++ } else if (req->scmnd == scmnd) { |
666 |
++ req->scmnd = NULL; |
667 |
++ } else { |
668 |
++ scmnd = NULL; |
669 |
++ } |
670 |
++ spin_unlock_irqrestore(&target->lock, flags); |
671 |
++ |
672 |
++ return scmnd; |
673 |
++} |
674 |
++ |
675 |
++/** |
676 |
++ * srp_free_req() - Unmap data and add request to the free request list. |
677 |
++ */ |
678 |
++static void srp_free_req(struct srp_target_port *target, |
679 |
++ struct srp_request *req, struct scsi_cmnd *scmnd, |
680 |
++ s32 req_lim_delta) |
681 |
+ { |
682 |
+ unsigned long flags; |
683 |
+ |
684 |
+- srp_unmap_data(req->scmnd, target, req); |
685 |
++ srp_unmap_data(scmnd, target, req); |
686 |
++ |
687 |
+ spin_lock_irqsave(&target->lock, flags); |
688 |
+ target->req_lim += req_lim_delta; |
689 |
+- req->scmnd = NULL; |
690 |
+ list_add_tail(&req->list, &target->free_reqs); |
691 |
+ spin_unlock_irqrestore(&target->lock, flags); |
692 |
+ } |
693 |
+ |
694 |
+ static void srp_reset_req(struct srp_target_port *target, struct srp_request *req) |
695 |
+ { |
696 |
+- req->scmnd->result = DID_RESET << 16; |
697 |
+- req->scmnd->scsi_done(req->scmnd); |
698 |
+- srp_remove_req(target, req, 0); |
699 |
++ struct scsi_cmnd *scmnd = srp_claim_req(target, req, NULL); |
700 |
++ |
701 |
++ if (scmnd) { |
702 |
++ scmnd->result = DID_RESET << 16; |
703 |
++ scmnd->scsi_done(scmnd); |
704 |
++ srp_free_req(target, req, scmnd, 0); |
705 |
++ } |
706 |
+ } |
707 |
+ |
708 |
+ static int srp_reconnect_target(struct srp_target_port *target) |
709 |
+@@ -1073,11 +1111,18 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) |
710 |
+ complete(&target->tsk_mgmt_done); |
711 |
+ } else { |
712 |
+ req = &target->req_ring[rsp->tag]; |
713 |
+- scmnd = req->scmnd; |
714 |
+- if (!scmnd) |
715 |
++ scmnd = srp_claim_req(target, req, NULL); |
716 |
++ if (!scmnd) { |
717 |
+ shost_printk(KERN_ERR, target->scsi_host, |
718 |
+ "Null scmnd for RSP w/tag %016llx\n", |
719 |
+ (unsigned long long) rsp->tag); |
720 |
++ |
721 |
++ spin_lock_irqsave(&target->lock, flags); |
722 |
++ target->req_lim += be32_to_cpu(rsp->req_lim_delta); |
723 |
++ spin_unlock_irqrestore(&target->lock, flags); |
724 |
++ |
725 |
++ return; |
726 |
++ } |
727 |
+ scmnd->result = rsp->status; |
728 |
+ |
729 |
+ if (rsp->flags & SRP_RSP_FLAG_SNSVALID) { |
730 |
+@@ -1092,7 +1137,9 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) |
731 |
+ else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | SRP_RSP_FLAG_DIUNDER)) |
732 |
+ scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt)); |
733 |
+ |
734 |
+- srp_remove_req(target, req, be32_to_cpu(rsp->req_lim_delta)); |
735 |
++ srp_free_req(target, req, scmnd, |
736 |
++ be32_to_cpu(rsp->req_lim_delta)); |
737 |
++ |
738 |
+ scmnd->host_scribble = NULL; |
739 |
+ scmnd->scsi_done(scmnd); |
740 |
+ } |
741 |
+@@ -1631,25 +1678,17 @@ static int srp_abort(struct scsi_cmnd *scmnd) |
742 |
+ { |
743 |
+ struct srp_target_port *target = host_to_target(scmnd->device->host); |
744 |
+ struct srp_request *req = (struct srp_request *) scmnd->host_scribble; |
745 |
+- int ret = SUCCESS; |
746 |
+ |
747 |
+ shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n"); |
748 |
+ |
749 |
+- if (!req || target->qp_in_error) |
750 |
++ if (!req || target->qp_in_error || !srp_claim_req(target, req, scmnd)) |
751 |
+ return FAILED; |
752 |
+- if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, |
753 |
+- SRP_TSK_ABORT_TASK)) |
754 |
+- return FAILED; |
755 |
+- |
756 |
+- if (req->scmnd) { |
757 |
+- if (!target->tsk_mgmt_status) { |
758 |
+- srp_remove_req(target, req, 0); |
759 |
+- scmnd->result = DID_ABORT << 16; |
760 |
+- } else |
761 |
+- ret = FAILED; |
762 |
+- } |
763 |
++ srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, |
764 |
++ SRP_TSK_ABORT_TASK); |
765 |
++ srp_free_req(target, req, scmnd, 0); |
766 |
++ scmnd->result = DID_ABORT << 16; |
767 |
+ |
768 |
+- return ret; |
769 |
++ return SUCCESS; |
770 |
+ } |
771 |
+ |
772 |
+ static int srp_reset_device(struct scsi_cmnd *scmnd) |
773 |
+diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c |
774 |
+index f388b65..7e1a492 100644 |
775 |
+--- a/drivers/net/wireless/rt2x00/rt2800usb.c |
776 |
++++ b/drivers/net/wireless/rt2x00/rt2800usb.c |
777 |
+@@ -971,6 +971,7 @@ static struct usb_device_id rt2800usb_device_table[] = { |
778 |
+ { USB_DEVICE(0x0411, 0x015d) }, |
779 |
+ { USB_DEVICE(0x0411, 0x016f) }, |
780 |
+ { USB_DEVICE(0x0411, 0x01a2) }, |
781 |
++ { USB_DEVICE(0x0411, 0x01ee) }, |
782 |
+ /* Corega */ |
783 |
+ { USB_DEVICE(0x07aa, 0x002f) }, |
784 |
+ { USB_DEVICE(0x07aa, 0x003c) }, |
785 |
+diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c |
786 |
+index 654755a..333c8d0 100644 |
787 |
+--- a/drivers/tty/serial/pmac_zilog.c |
788 |
++++ b/drivers/tty/serial/pmac_zilog.c |
789 |
+@@ -1348,10 +1348,16 @@ static int pmz_verify_port(struct uart_port *port, struct serial_struct *ser) |
790 |
+ static int pmz_poll_get_char(struct uart_port *port) |
791 |
+ { |
792 |
+ struct uart_pmac_port *uap = (struct uart_pmac_port *)port; |
793 |
++ int tries = 2; |
794 |
+ |
795 |
+- while ((read_zsreg(uap, R0) & Rx_CH_AV) == 0) |
796 |
+- udelay(5); |
797 |
+- return read_zsdata(uap); |
798 |
++ while (tries) { |
799 |
++ if ((read_zsreg(uap, R0) & Rx_CH_AV) != 0) |
800 |
++ return read_zsdata(uap); |
801 |
++ if (tries--) |
802 |
++ udelay(5); |
803 |
++ } |
804 |
++ |
805 |
++ return NO_POLL_CHAR; |
806 |
+ } |
807 |
+ |
808 |
+ static void pmz_poll_put_char(struct uart_port *port, unsigned char c) |
809 |
+diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c |
810 |
+index 4e1f0aa..9a2a1ae 100644 |
811 |
+--- a/drivers/usb/gadget/u_ether.c |
812 |
++++ b/drivers/usb/gadget/u_ether.c |
813 |
+@@ -669,6 +669,8 @@ static int eth_stop(struct net_device *net) |
814 |
+ spin_lock_irqsave(&dev->lock, flags); |
815 |
+ if (dev->port_usb) { |
816 |
+ struct gether *link = dev->port_usb; |
817 |
++ const struct usb_endpoint_descriptor *in; |
818 |
++ const struct usb_endpoint_descriptor *out; |
819 |
+ |
820 |
+ if (link->close) |
821 |
+ link->close(link); |
822 |
+@@ -682,10 +684,14 @@ static int eth_stop(struct net_device *net) |
823 |
+ * their own pace; the network stack can handle old packets. |
824 |
+ * For the moment we leave this here, since it works. |
825 |
+ */ |
826 |
++ in = link->in_ep->desc; |
827 |
++ out = link->out_ep->desc; |
828 |
+ usb_ep_disable(link->in_ep); |
829 |
+ usb_ep_disable(link->out_ep); |
830 |
+ if (netif_carrier_ok(net)) { |
831 |
+ DBG(dev, "host still using in/out endpoints\n"); |
832 |
++ link->in_ep->desc = in; |
833 |
++ link->out_ep->desc = out; |
834 |
+ usb_ep_enable(link->in_ep); |
835 |
+ usb_ep_enable(link->out_ep); |
836 |
+ } |
837 |
+diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c |
838 |
+index df0828c..c5e9e4a 100644 |
839 |
+--- a/drivers/usb/host/pci-quirks.c |
840 |
++++ b/drivers/usb/host/pci-quirks.c |
841 |
+@@ -800,6 +800,13 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev) |
842 |
+ } |
843 |
+ EXPORT_SYMBOL_GPL(usb_enable_xhci_ports); |
844 |
+ |
845 |
++void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) |
846 |
++{ |
847 |
++ pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, 0x0); |
848 |
++ pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, 0x0); |
849 |
++} |
850 |
++EXPORT_SYMBOL_GPL(usb_disable_xhci_ports); |
851 |
++ |
852 |
+ /** |
853 |
+ * PCI Quirks for xHCI. |
854 |
+ * |
855 |
+diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h |
856 |
+index b1002a8..ef004a5 100644 |
857 |
+--- a/drivers/usb/host/pci-quirks.h |
858 |
++++ b/drivers/usb/host/pci-quirks.h |
859 |
+@@ -10,6 +10,7 @@ void usb_amd_quirk_pll_disable(void); |
860 |
+ void usb_amd_quirk_pll_enable(void); |
861 |
+ bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); |
862 |
+ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); |
863 |
++void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); |
864 |
+ #else |
865 |
+ static inline void usb_amd_quirk_pll_disable(void) {} |
866 |
+ static inline void usb_amd_quirk_pll_enable(void) {} |
867 |
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c |
868 |
+index 19e8921..f152740 100644 |
869 |
+--- a/drivers/usb/host/xhci-pci.c |
870 |
++++ b/drivers/usb/host/xhci-pci.c |
871 |
+@@ -90,11 +90,21 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) |
872 |
+ xhci->quirks |= XHCI_EP_LIMIT_QUIRK; |
873 |
+ xhci->limit_active_eps = 64; |
874 |
+ xhci->quirks |= XHCI_SW_BW_CHECKING; |
875 |
++ /* |
876 |
++ * PPT desktop boards DH77EB and DH77DF will power back on after |
877 |
++ * a few seconds of being shutdown. The fix for this is to |
878 |
++ * switch the ports from xHCI to EHCI on shutdown. We can't use |
879 |
++ * DMI information to find those particular boards (since each |
880 |
++ * vendor will change the board name), so we have to key off all |
881 |
++ * PPT chipsets. |
882 |
++ */ |
883 |
++ xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
884 |
+ } |
885 |
+ if (pdev->vendor == PCI_VENDOR_ID_ETRON && |
886 |
+ pdev->device == PCI_DEVICE_ID_ASROCK_P67) { |
887 |
+ xhci->quirks |= XHCI_RESET_ON_RESUME; |
888 |
+ xhci_dbg(xhci, "QUIRK: Resetting on resume\n"); |
889 |
++ xhci->quirks |= XHCI_TRUST_TX_LENGTH; |
890 |
+ } |
891 |
+ if (pdev->vendor == PCI_VENDOR_ID_VIA) |
892 |
+ xhci->quirks |= XHCI_RESET_ON_RESUME; |
893 |
+diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c |
894 |
+index 158175bf..203ba31 100644 |
895 |
+--- a/drivers/usb/host/xhci-ring.c |
896 |
++++ b/drivers/usb/host/xhci-ring.c |
897 |
+@@ -145,29 +145,37 @@ static void next_trb(struct xhci_hcd *xhci, |
898 |
+ */ |
899 |
+ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) |
900 |
+ { |
901 |
+- union xhci_trb *next; |
902 |
+ unsigned long long addr; |
903 |
+ |
904 |
+ ring->deq_updates++; |
905 |
+ |
906 |
+- /* If this is not event ring, there is one more usable TRB */ |
907 |
++ /* |
908 |
++ * If this is not event ring, and the dequeue pointer |
909 |
++ * is not on a link TRB, there is one more usable TRB |
910 |
++ */ |
911 |
+ if (ring->type != TYPE_EVENT && |
912 |
+ !last_trb(xhci, ring, ring->deq_seg, ring->dequeue)) |
913 |
+ ring->num_trbs_free++; |
914 |
+- next = ++(ring->dequeue); |
915 |
+ |
916 |
+- /* Update the dequeue pointer further if that was a link TRB or we're at |
917 |
+- * the end of an event ring segment (which doesn't have link TRBS) |
918 |
+- */ |
919 |
+- while (last_trb(xhci, ring, ring->deq_seg, next)) { |
920 |
+- if (ring->type == TYPE_EVENT && last_trb_on_last_seg(xhci, |
921 |
+- ring, ring->deq_seg, next)) { |
922 |
+- ring->cycle_state = (ring->cycle_state ? 0 : 1); |
923 |
++ do { |
924 |
++ /* |
925 |
++ * Update the dequeue pointer further if that was a link TRB or |
926 |
++ * we're at the end of an event ring segment (which doesn't have |
927 |
++ * link TRBS) |
928 |
++ */ |
929 |
++ if (last_trb(xhci, ring, ring->deq_seg, ring->dequeue)) { |
930 |
++ if (ring->type == TYPE_EVENT && |
931 |
++ last_trb_on_last_seg(xhci, ring, |
932 |
++ ring->deq_seg, ring->dequeue)) { |
933 |
++ ring->cycle_state = (ring->cycle_state ? 0 : 1); |
934 |
++ } |
935 |
++ ring->deq_seg = ring->deq_seg->next; |
936 |
++ ring->dequeue = ring->deq_seg->trbs; |
937 |
++ } else { |
938 |
++ ring->dequeue++; |
939 |
+ } |
940 |
+- ring->deq_seg = ring->deq_seg->next; |
941 |
+- ring->dequeue = ring->deq_seg->trbs; |
942 |
+- next = ring->dequeue; |
943 |
+- } |
944 |
++ } while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue)); |
945 |
++ |
946 |
+ addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue); |
947 |
+ } |
948 |
+ |
949 |
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
950 |
+index 9248d49..7beed53 100644 |
951 |
+--- a/drivers/usb/host/xhci.c |
952 |
++++ b/drivers/usb/host/xhci.c |
953 |
+@@ -166,7 +166,7 @@ int xhci_reset(struct xhci_hcd *xhci) |
954 |
+ xhci_writel(xhci, command, &xhci->op_regs->command); |
955 |
+ |
956 |
+ ret = handshake(xhci, &xhci->op_regs->command, |
957 |
+- CMD_RESET, 0, 250 * 1000); |
958 |
++ CMD_RESET, 0, 10 * 1000 * 1000); |
959 |
+ if (ret) |
960 |
+ return ret; |
961 |
+ |
962 |
+@@ -175,7 +175,8 @@ int xhci_reset(struct xhci_hcd *xhci) |
963 |
+ * xHCI cannot write to any doorbells or operational registers other |
964 |
+ * than status until the "Controller Not Ready" flag is cleared. |
965 |
+ */ |
966 |
+- ret = handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000); |
967 |
++ ret = handshake(xhci, &xhci->op_regs->status, |
968 |
++ STS_CNR, 0, 10 * 1000 * 1000); |
969 |
+ |
970 |
+ for (i = 0; i < 2; ++i) { |
971 |
+ xhci->bus_state[i].port_c_suspend = 0; |
972 |
+@@ -658,6 +659,9 @@ void xhci_shutdown(struct usb_hcd *hcd) |
973 |
+ { |
974 |
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
975 |
+ |
976 |
++ if (xhci->quirks && XHCI_SPURIOUS_REBOOT) |
977 |
++ usb_disable_xhci_ports(to_pci_dev(hcd->self.controller)); |
978 |
++ |
979 |
+ spin_lock_irq(&xhci->lock); |
980 |
+ xhci_halt(xhci); |
981 |
+ spin_unlock_irq(&xhci->lock); |
982 |
+diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h |
983 |
+index 59434fe..19ae30f 100644 |
984 |
+--- a/drivers/usb/host/xhci.h |
985 |
++++ b/drivers/usb/host/xhci.h |
986 |
+@@ -1486,6 +1486,7 @@ struct xhci_hcd { |
987 |
+ #define XHCI_SW_BW_CHECKING (1 << 8) |
988 |
+ #define XHCI_AMD_0x96_HOST (1 << 9) |
989 |
+ #define XHCI_TRUST_TX_LENGTH (1 << 10) |
990 |
++#define XHCI_SPURIOUS_REBOOT (1 << 13) |
991 |
+ unsigned int num_active_eps; |
992 |
+ unsigned int limit_active_eps; |
993 |
+ /* There are two roothubs to keep track of bus suspend info for */ |
994 |
+diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
995 |
+index 53e3e2c..f5819cb 100644 |
996 |
+--- a/drivers/usb/serial/ftdi_sio.c |
997 |
++++ b/drivers/usb/serial/ftdi_sio.c |
998 |
+@@ -811,6 +811,7 @@ static struct usb_device_id id_table_combined [] = { |
999 |
+ { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, |
1000 |
+ { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, |
1001 |
+ { USB_DEVICE(PI_VID, PI_E861_PID) }, |
1002 |
++ { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) }, |
1003 |
+ { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, |
1004 |
+ { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), |
1005 |
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
1006 |
+diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h |
1007 |
+index 5661c7e..5dd96ca 100644 |
1008 |
+--- a/drivers/usb/serial/ftdi_sio_ids.h |
1009 |
++++ b/drivers/usb/serial/ftdi_sio_ids.h |
1010 |
+@@ -795,6 +795,13 @@ |
1011 |
+ #define PI_E861_PID 0x1008 /* E-861 piezo controller USB connection */ |
1012 |
+ |
1013 |
+ /* |
1014 |
++ * Kondo Kagaku Co.Ltd. |
1015 |
++ * http://www.kondo-robot.com/EN |
1016 |
++ */ |
1017 |
++#define KONDO_VID 0x165c |
1018 |
++#define KONDO_USB_SERIAL_PID 0x0002 |
1019 |
++ |
1020 |
++/* |
1021 |
+ * Bayer Ascensia Contour blood glucose meter USB-converter cable. |
1022 |
+ * http://winglucofacts.com/cables/ |
1023 |
+ */ |
1024 |
+diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c |
1025 |
+index 62739ff..c1505c3 100644 |
1026 |
+--- a/drivers/usb/serial/mos7840.c |
1027 |
++++ b/drivers/usb/serial/mos7840.c |
1028 |
+@@ -1189,9 +1189,12 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty) |
1029 |
+ } |
1030 |
+ |
1031 |
+ spin_lock_irqsave(&mos7840_port->pool_lock, flags); |
1032 |
+- for (i = 0; i < NUM_URBS; ++i) |
1033 |
+- if (mos7840_port->busy[i]) |
1034 |
+- chars += URB_TRANSFER_BUFFER_SIZE; |
1035 |
++ for (i = 0; i < NUM_URBS; ++i) { |
1036 |
++ if (mos7840_port->busy[i]) { |
1037 |
++ struct urb *urb = mos7840_port->write_urb_pool[i]; |
1038 |
++ chars += urb->transfer_buffer_length; |
1039 |
++ } |
1040 |
++ } |
1041 |
+ spin_unlock_irqrestore(&mos7840_port->pool_lock, flags); |
1042 |
+ dbg("%s - returns %d", __func__, chars); |
1043 |
+ return chars; |
1044 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
1045 |
+index ae1a4b8..ee693cc 100644 |
1046 |
+--- a/drivers/usb/serial/option.c |
1047 |
++++ b/drivers/usb/serial/option.c |
1048 |
+@@ -80,85 +80,9 @@ static void option_instat_callback(struct urb *urb); |
1049 |
+ #define OPTION_PRODUCT_GTM380_MODEM 0x7201 |
1050 |
+ |
1051 |
+ #define HUAWEI_VENDOR_ID 0x12D1 |
1052 |
+-#define HUAWEI_PRODUCT_E600 0x1001 |
1053 |
+-#define HUAWEI_PRODUCT_E220 0x1003 |
1054 |
+-#define HUAWEI_PRODUCT_E220BIS 0x1004 |
1055 |
+-#define HUAWEI_PRODUCT_E1401 0x1401 |
1056 |
+-#define HUAWEI_PRODUCT_E1402 0x1402 |
1057 |
+-#define HUAWEI_PRODUCT_E1403 0x1403 |
1058 |
+-#define HUAWEI_PRODUCT_E1404 0x1404 |
1059 |
+-#define HUAWEI_PRODUCT_E1405 0x1405 |
1060 |
+-#define HUAWEI_PRODUCT_E1406 0x1406 |
1061 |
+-#define HUAWEI_PRODUCT_E1407 0x1407 |
1062 |
+-#define HUAWEI_PRODUCT_E1408 0x1408 |
1063 |
+-#define HUAWEI_PRODUCT_E1409 0x1409 |
1064 |
+-#define HUAWEI_PRODUCT_E140A 0x140A |
1065 |
+-#define HUAWEI_PRODUCT_E140B 0x140B |
1066 |
+-#define HUAWEI_PRODUCT_E140C 0x140C |
1067 |
+-#define HUAWEI_PRODUCT_E140D 0x140D |
1068 |
+-#define HUAWEI_PRODUCT_E140E 0x140E |
1069 |
+-#define HUAWEI_PRODUCT_E140F 0x140F |
1070 |
+-#define HUAWEI_PRODUCT_E1410 0x1410 |
1071 |
+-#define HUAWEI_PRODUCT_E1411 0x1411 |
1072 |
+-#define HUAWEI_PRODUCT_E1412 0x1412 |
1073 |
+-#define HUAWEI_PRODUCT_E1413 0x1413 |
1074 |
+-#define HUAWEI_PRODUCT_E1414 0x1414 |
1075 |
+-#define HUAWEI_PRODUCT_E1415 0x1415 |
1076 |
+-#define HUAWEI_PRODUCT_E1416 0x1416 |
1077 |
+-#define HUAWEI_PRODUCT_E1417 0x1417 |
1078 |
+-#define HUAWEI_PRODUCT_E1418 0x1418 |
1079 |
+-#define HUAWEI_PRODUCT_E1419 0x1419 |
1080 |
+-#define HUAWEI_PRODUCT_E141A 0x141A |
1081 |
+-#define HUAWEI_PRODUCT_E141B 0x141B |
1082 |
+-#define HUAWEI_PRODUCT_E141C 0x141C |
1083 |
+-#define HUAWEI_PRODUCT_E141D 0x141D |
1084 |
+-#define HUAWEI_PRODUCT_E141E 0x141E |
1085 |
+-#define HUAWEI_PRODUCT_E141F 0x141F |
1086 |
+-#define HUAWEI_PRODUCT_E1420 0x1420 |
1087 |
+-#define HUAWEI_PRODUCT_E1421 0x1421 |
1088 |
+-#define HUAWEI_PRODUCT_E1422 0x1422 |
1089 |
+-#define HUAWEI_PRODUCT_E1423 0x1423 |
1090 |
+-#define HUAWEI_PRODUCT_E1424 0x1424 |
1091 |
+-#define HUAWEI_PRODUCT_E1425 0x1425 |
1092 |
+-#define HUAWEI_PRODUCT_E1426 0x1426 |
1093 |
+-#define HUAWEI_PRODUCT_E1427 0x1427 |
1094 |
+-#define HUAWEI_PRODUCT_E1428 0x1428 |
1095 |
+-#define HUAWEI_PRODUCT_E1429 0x1429 |
1096 |
+-#define HUAWEI_PRODUCT_E142A 0x142A |
1097 |
+-#define HUAWEI_PRODUCT_E142B 0x142B |
1098 |
+-#define HUAWEI_PRODUCT_E142C 0x142C |
1099 |
+-#define HUAWEI_PRODUCT_E142D 0x142D |
1100 |
+-#define HUAWEI_PRODUCT_E142E 0x142E |
1101 |
+-#define HUAWEI_PRODUCT_E142F 0x142F |
1102 |
+-#define HUAWEI_PRODUCT_E1430 0x1430 |
1103 |
+-#define HUAWEI_PRODUCT_E1431 0x1431 |
1104 |
+-#define HUAWEI_PRODUCT_E1432 0x1432 |
1105 |
+-#define HUAWEI_PRODUCT_E1433 0x1433 |
1106 |
+-#define HUAWEI_PRODUCT_E1434 0x1434 |
1107 |
+-#define HUAWEI_PRODUCT_E1435 0x1435 |
1108 |
+-#define HUAWEI_PRODUCT_E1436 0x1436 |
1109 |
+-#define HUAWEI_PRODUCT_E1437 0x1437 |
1110 |
+-#define HUAWEI_PRODUCT_E1438 0x1438 |
1111 |
+-#define HUAWEI_PRODUCT_E1439 0x1439 |
1112 |
+-#define HUAWEI_PRODUCT_E143A 0x143A |
1113 |
+-#define HUAWEI_PRODUCT_E143B 0x143B |
1114 |
+-#define HUAWEI_PRODUCT_E143C 0x143C |
1115 |
+-#define HUAWEI_PRODUCT_E143D 0x143D |
1116 |
+-#define HUAWEI_PRODUCT_E143E 0x143E |
1117 |
+-#define HUAWEI_PRODUCT_E143F 0x143F |
1118 |
+ #define HUAWEI_PRODUCT_K4505 0x1464 |
1119 |
+ #define HUAWEI_PRODUCT_K3765 0x1465 |
1120 |
+-#define HUAWEI_PRODUCT_E14AC 0x14AC |
1121 |
+-#define HUAWEI_PRODUCT_K3806 0x14AE |
1122 |
+ #define HUAWEI_PRODUCT_K4605 0x14C6 |
1123 |
+-#define HUAWEI_PRODUCT_K5005 0x14C8 |
1124 |
+-#define HUAWEI_PRODUCT_K3770 0x14C9 |
1125 |
+-#define HUAWEI_PRODUCT_K3771 0x14CA |
1126 |
+-#define HUAWEI_PRODUCT_K4510 0x14CB |
1127 |
+-#define HUAWEI_PRODUCT_K4511 0x14CC |
1128 |
+-#define HUAWEI_PRODUCT_ETS1220 0x1803 |
1129 |
+-#define HUAWEI_PRODUCT_E353 0x1506 |
1130 |
+-#define HUAWEI_PRODUCT_E173S 0x1C05 |
1131 |
+ |
1132 |
+ #define QUANTA_VENDOR_ID 0x0408 |
1133 |
+ #define QUANTA_PRODUCT_Q101 0xEA02 |
1134 |
+@@ -615,104 +539,123 @@ static const struct usb_device_id option_ids[] = { |
1135 |
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) }, |
1136 |
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) }, |
1137 |
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, |
1138 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
1139 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
1140 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
1141 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) }, |
1142 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1402, 0xff, 0xff, 0xff) }, |
1143 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) }, |
1144 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1404, 0xff, 0xff, 0xff) }, |
1145 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) }, |
1146 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) }, |
1147 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1407, 0xff, 0xff, 0xff) }, |
1148 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) }, |
1149 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) }, |
1150 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140A, 0xff, 0xff, 0xff) }, |
1151 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140B, 0xff, 0xff, 0xff) }, |
1152 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140C, 0xff, 0xff, 0xff) }, |
1153 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140D, 0xff, 0xff, 0xff) }, |
1154 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140E, 0xff, 0xff, 0xff) }, |
1155 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140F, 0xff, 0xff, 0xff) }, |
1156 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) }, |
1157 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) }, |
1158 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) }, |
1159 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) }, |
1160 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) }, |
1161 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) }, |
1162 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) }, |
1163 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) }, |
1164 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) }, |
1165 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) }, |
1166 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141A, 0xff, 0xff, 0xff) }, |
1167 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141B, 0xff, 0xff, 0xff) }, |
1168 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141C, 0xff, 0xff, 0xff) }, |
1169 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141D, 0xff, 0xff, 0xff) }, |
1170 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141E, 0xff, 0xff, 0xff) }, |
1171 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141F, 0xff, 0xff, 0xff) }, |
1172 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1420, 0xff, 0xff, 0xff) }, |
1173 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1421, 0xff, 0xff, 0xff) }, |
1174 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1422, 0xff, 0xff, 0xff) }, |
1175 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1423, 0xff, 0xff, 0xff) }, |
1176 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1424, 0xff, 0xff, 0xff) }, |
1177 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1425, 0xff, 0xff, 0xff) }, |
1178 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1426, 0xff, 0xff, 0xff) }, |
1179 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1427, 0xff, 0xff, 0xff) }, |
1180 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1428, 0xff, 0xff, 0xff) }, |
1181 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1429, 0xff, 0xff, 0xff) }, |
1182 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142A, 0xff, 0xff, 0xff) }, |
1183 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142B, 0xff, 0xff, 0xff) }, |
1184 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142C, 0xff, 0xff, 0xff) }, |
1185 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142D, 0xff, 0xff, 0xff) }, |
1186 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142E, 0xff, 0xff, 0xff) }, |
1187 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142F, 0xff, 0xff, 0xff) }, |
1188 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1430, 0xff, 0xff, 0xff) }, |
1189 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1431, 0xff, 0xff, 0xff) }, |
1190 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1432, 0xff, 0xff, 0xff) }, |
1191 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1433, 0xff, 0xff, 0xff) }, |
1192 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1434, 0xff, 0xff, 0xff) }, |
1193 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1435, 0xff, 0xff, 0xff) }, |
1194 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1436, 0xff, 0xff, 0xff) }, |
1195 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1437, 0xff, 0xff, 0xff) }, |
1196 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1438, 0xff, 0xff, 0xff) }, |
1197 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1439, 0xff, 0xff, 0xff) }, |
1198 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143A, 0xff, 0xff, 0xff) }, |
1199 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143B, 0xff, 0xff, 0xff) }, |
1200 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143C, 0xff, 0xff, 0xff) }, |
1201 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, |
1202 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, |
1203 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, |
1204 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S, 0xff, 0xff, 0xff) }, |
1205 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), |
1206 |
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
1207 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), |
1208 |
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
1209 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, |
1210 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) }, |
1211 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, |
1212 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), |
1213 |
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
1214 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) }, |
1215 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) }, |
1216 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) }, |
1217 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) }, |
1218 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) }, |
1219 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, |
1220 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, |
1221 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, |
1222 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x32) }, |
1223 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x31) }, |
1224 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x32) }, |
1225 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x31) }, |
1226 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x32) }, |
1227 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x01) }, |
1228 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x02) }, |
1229 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x03) }, |
1230 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x10) }, |
1231 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x12) }, |
1232 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x13) }, |
1233 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x01) }, /* E398 3G Modem */ |
1234 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x02) }, /* E398 3G PC UI Interface */ |
1235 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x03) }, /* E398 3G Application Interface */ |
1236 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) }, |
1237 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x01) }, |
1238 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x02) }, |
1239 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x03) }, |
1240 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x04) }, |
1241 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x05) }, |
1242 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x06) }, |
1243 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0A) }, |
1244 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0B) }, |
1245 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0D) }, |
1246 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0E) }, |
1247 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0F) }, |
1248 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x10) }, |
1249 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x12) }, |
1250 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x13) }, |
1251 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x14) }, |
1252 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x15) }, |
1253 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x17) }, |
1254 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x18) }, |
1255 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x19) }, |
1256 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1A) }, |
1257 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1B) }, |
1258 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1C) }, |
1259 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x31) }, |
1260 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x32) }, |
1261 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x33) }, |
1262 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x34) }, |
1263 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x35) }, |
1264 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x36) }, |
1265 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3A) }, |
1266 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3B) }, |
1267 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3D) }, |
1268 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3E) }, |
1269 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3F) }, |
1270 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x48) }, |
1271 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x49) }, |
1272 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4A) }, |
1273 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4B) }, |
1274 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4C) }, |
1275 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x61) }, |
1276 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x62) }, |
1277 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x63) }, |
1278 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x64) }, |
1279 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x65) }, |
1280 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x66) }, |
1281 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6A) }, |
1282 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6B) }, |
1283 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6D) }, |
1284 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6E) }, |
1285 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6F) }, |
1286 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x78) }, |
1287 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x79) }, |
1288 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7A) }, |
1289 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7B) }, |
1290 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7C) }, |
1291 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x01) }, |
1292 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x02) }, |
1293 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x03) }, |
1294 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x04) }, |
1295 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x05) }, |
1296 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x06) }, |
1297 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0A) }, |
1298 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0B) }, |
1299 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0D) }, |
1300 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0E) }, |
1301 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0F) }, |
1302 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x10) }, |
1303 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x12) }, |
1304 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x13) }, |
1305 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x14) }, |
1306 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x15) }, |
1307 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x17) }, |
1308 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x18) }, |
1309 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x19) }, |
1310 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1A) }, |
1311 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1B) }, |
1312 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1C) }, |
1313 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x31) }, |
1314 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x32) }, |
1315 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x33) }, |
1316 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x34) }, |
1317 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x35) }, |
1318 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x36) }, |
1319 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3A) }, |
1320 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3B) }, |
1321 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3D) }, |
1322 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3E) }, |
1323 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3F) }, |
1324 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x48) }, |
1325 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x49) }, |
1326 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4A) }, |
1327 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4B) }, |
1328 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4C) }, |
1329 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x61) }, |
1330 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x62) }, |
1331 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x63) }, |
1332 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x64) }, |
1333 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x65) }, |
1334 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x66) }, |
1335 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6A) }, |
1336 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6B) }, |
1337 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6D) }, |
1338 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6E) }, |
1339 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6F) }, |
1340 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x78) }, |
1341 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x79) }, |
1342 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) }, |
1343 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) }, |
1344 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) }, |
1345 |
++ |
1346 |
++ |
1347 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, |
1348 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, |
1349 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, |
1350 |
+@@ -943,6 +886,8 @@ static const struct usb_device_id option_ids[] = { |
1351 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff), |
1352 |
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
1353 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, |
1354 |
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff), |
1355 |
++ .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, |
1356 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) }, |
1357 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) }, |
1358 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) }, |
1359 |
+diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c |
1360 |
+index 6b7daa4..8b384cc 100644 |
1361 |
+--- a/fs/ext4/extents.c |
1362 |
++++ b/fs/ext4/extents.c |
1363 |
+@@ -2596,6 +2596,7 @@ cont: |
1364 |
+ } |
1365 |
+ path[0].p_depth = depth; |
1366 |
+ path[0].p_hdr = ext_inode_hdr(inode); |
1367 |
++ i = 0; |
1368 |
+ |
1369 |
+ if (ext4_ext_check(inode, path[0].p_hdr, depth)) { |
1370 |
+ err = -EIO; |
1371 |
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c |
1372 |
+index 7fe3869..12a278f 100644 |
1373 |
+--- a/fs/ext4/super.c |
1374 |
++++ b/fs/ext4/super.c |
1375 |
+@@ -932,6 +932,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) |
1376 |
+ ei->i_reserved_meta_blocks = 0; |
1377 |
+ ei->i_allocated_meta_blocks = 0; |
1378 |
+ ei->i_da_metadata_calc_len = 0; |
1379 |
++ ei->i_da_metadata_calc_last_lblock = 0; |
1380 |
+ spin_lock_init(&(ei->i_block_reservation_lock)); |
1381 |
+ #ifdef CONFIG_QUOTA |
1382 |
+ ei->i_reserved_quota = 0; |
1383 |
+@@ -2968,6 +2969,10 @@ static int count_overhead(struct super_block *sb, ext4_group_t grp, |
1384 |
+ ext4_group_t i, ngroups = ext4_get_groups_count(sb); |
1385 |
+ int s, j, count = 0; |
1386 |
+ |
1387 |
++ if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) |
1388 |
++ return (ext4_bg_has_super(sb, grp) + ext4_bg_num_gdb(sb, grp) + |
1389 |
++ sbi->s_itb_per_group + 2); |
1390 |
++ |
1391 |
+ first_block = le32_to_cpu(sbi->s_es->s_first_data_block) + |
1392 |
+ (grp * EXT4_BLOCKS_PER_GROUP(sb)); |
1393 |
+ last_block = first_block + EXT4_BLOCKS_PER_GROUP(sb) - 1; |
1394 |
+@@ -4227,6 +4232,7 @@ static void ext4_clear_journal_err(struct super_block *sb, |
1395 |
+ ext4_commit_super(sb, 1); |
1396 |
+ |
1397 |
+ jbd2_journal_clear_err(journal); |
1398 |
++ jbd2_journal_update_sb_errno(journal); |
1399 |
+ } |
1400 |
+ } |
1401 |
+ |
1402 |
+diff --git a/fs/fuse/file.c b/fs/fuse/file.c |
1403 |
+index 504e61b..8e6381a 100644 |
1404 |
+--- a/fs/fuse/file.c |
1405 |
++++ b/fs/fuse/file.c |
1406 |
+@@ -1698,7 +1698,7 @@ static int fuse_verify_ioctl_iov(struct iovec *iov, size_t count) |
1407 |
+ size_t n; |
1408 |
+ u32 max = FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT; |
1409 |
+ |
1410 |
+- for (n = 0; n < count; n++) { |
1411 |
++ for (n = 0; n < count; n++, iov++) { |
1412 |
+ if (iov->iov_len > (size_t) max) |
1413 |
+ return -ENOMEM; |
1414 |
+ max -= iov->iov_len; |
1415 |
+diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c |
1416 |
+index 1afb701..9956ac6 100644 |
1417 |
+--- a/fs/jbd2/journal.c |
1418 |
++++ b/fs/jbd2/journal.c |
1419 |
+@@ -1340,7 +1340,7 @@ static void jbd2_mark_journal_empty(journal_t *journal) |
1420 |
+ * Update a journal's errno. Write updated superblock to disk waiting for IO |
1421 |
+ * to complete. |
1422 |
+ */ |
1423 |
+-static void jbd2_journal_update_sb_errno(journal_t *journal) |
1424 |
++void jbd2_journal_update_sb_errno(journal_t *journal) |
1425 |
+ { |
1426 |
+ journal_superblock_t *sb = journal->j_superblock; |
1427 |
+ |
1428 |
+@@ -1352,6 +1352,7 @@ static void jbd2_journal_update_sb_errno(journal_t *journal) |
1429 |
+ |
1430 |
+ jbd2_write_superblock(journal, WRITE_SYNC); |
1431 |
+ } |
1432 |
++EXPORT_SYMBOL(jbd2_journal_update_sb_errno); |
1433 |
+ |
1434 |
+ /* |
1435 |
+ * Read the superblock for a given journal, performing initial |
1436 |
+diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h |
1437 |
+index 81368ab..53392e8 100644 |
1438 |
+--- a/include/drm/drm_pciids.h |
1439 |
++++ b/include/drm/drm_pciids.h |
1440 |
+@@ -217,9 +217,12 @@ |
1441 |
+ {0x1002, 0x6800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1442 |
+ {0x1002, 0x6801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1443 |
+ {0x1002, 0x6802, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1444 |
++ {0x1002, 0x6806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1445 |
+ {0x1002, 0x6808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1446 |
+ {0x1002, 0x6809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1447 |
+ {0x1002, 0x6810, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1448 |
++ {0x1002, 0x6816, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1449 |
++ {0x1002, 0x6817, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1450 |
+ {0x1002, 0x6818, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1451 |
+ {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1452 |
+ {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1453 |
+diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h |
1454 |
+index 912c30a..2ed66ef 100644 |
1455 |
+--- a/include/linux/jbd2.h |
1456 |
++++ b/include/linux/jbd2.h |
1457 |
+@@ -1091,6 +1091,7 @@ extern int jbd2_journal_destroy (journal_t *); |
1458 |
+ extern int jbd2_journal_recover (journal_t *journal); |
1459 |
+ extern int jbd2_journal_wipe (journal_t *, int); |
1460 |
+ extern int jbd2_journal_skip_recovery (journal_t *); |
1461 |
++extern void jbd2_journal_update_sb_errno(journal_t *); |
1462 |
+ extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, |
1463 |
+ unsigned long, int); |
1464 |
+ extern void __jbd2_journal_abort_hard (journal_t *); |
1465 |
+diff --git a/include/linux/usb.h b/include/linux/usb.h |
1466 |
+index 26229fd..4e8e668 100644 |
1467 |
+--- a/include/linux/usb.h |
1468 |
++++ b/include/linux/usb.h |
1469 |
+@@ -783,6 +783,27 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) |
1470 |
+ .bInterfaceSubClass = (sc), \ |
1471 |
+ .bInterfaceProtocol = (pr) |
1472 |
+ |
1473 |
++/** |
1474 |
++ * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces |
1475 |
++ * @vend: the 16 bit USB Vendor ID |
1476 |
++ * @cl: bInterfaceClass value |
1477 |
++ * @sc: bInterfaceSubClass value |
1478 |
++ * @pr: bInterfaceProtocol value |
1479 |
++ * |
1480 |
++ * This macro is used to create a struct usb_device_id that matches a |
1481 |
++ * specific vendor with a specific class of interfaces. |
1482 |
++ * |
1483 |
++ * This is especially useful when explicitly matching devices that have |
1484 |
++ * vendor specific bDeviceClass values, but standards-compliant interfaces. |
1485 |
++ */ |
1486 |
++#define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \ |
1487 |
++ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ |
1488 |
++ | USB_DEVICE_ID_MATCH_VENDOR, \ |
1489 |
++ .idVendor = (vend), \ |
1490 |
++ .bInterfaceClass = (cl), \ |
1491 |
++ .bInterfaceSubClass = (sc), \ |
1492 |
++ .bInterfaceProtocol = (pr) |
1493 |
++ |
1494 |
+ /* ----------------------------------------------------------------------- */ |
1495 |
+ |
1496 |
+ /* Stuff for dynamic usb ids */ |