1 |
Author: mpagano |
2 |
Date: 2012-08-26 17:02:54 +0000 (Sun, 26 Aug 2012) |
3 |
New Revision: 2197 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/3.5/1002_linux-3.5.3.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/3.5/0000_README |
9 |
Log: |
10 |
Linux patch 3.5.3 |
11 |
|
12 |
Modified: genpatches-2.6/trunk/3.5/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/3.5/0000_README 2012-08-23 17:25:05 UTC (rev 2196) |
15 |
+++ genpatches-2.6/trunk/3.5/0000_README 2012-08-26 17:02:54 UTC (rev 2197) |
16 |
@@ -48,6 +48,10 @@ |
17 |
From: http://www.kernel.org |
18 |
Desc: Linux 3.5.2 |
19 |
|
20 |
+Patch: 1002_linux-3.5.3.patch |
21 |
+From: http://www.kernel.org |
22 |
+Desc: Linux 3.5.3 |
23 |
+ |
24 |
Patch: 2400_kcopy-patch-for-infiniband-driver.patch |
25 |
From: Alexey Shvetsov <alexxy@g.o> |
26 |
Desc: Zero copy for infiniband psm userspace driver |
27 |
|
28 |
Added: genpatches-2.6/trunk/3.5/1002_linux-3.5.3.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/3.5/1002_linux-3.5.3.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/3.5/1002_linux-3.5.3.patch 2012-08-26 17:02:54 UTC (rev 2197) |
32 |
@@ -0,0 +1,1983 @@ |
33 |
+diff --git a/Makefile b/Makefile |
34 |
+index 5caa2fa..c901aae 100644 |
35 |
+--- a/Makefile |
36 |
++++ b/Makefile |
37 |
+@@ -1,6 +1,6 @@ |
38 |
+ VERSION = 3 |
39 |
+ PATCHLEVEL = 5 |
40 |
+-SUBLEVEL = 2 |
41 |
++SUBLEVEL = 3 |
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 6542652..a1a5aca 100644 |
47 |
+--- a/arch/s390/kernel/compat_linux.c |
48 |
++++ b/arch/s390/kernel/compat_linux.c |
49 |
+@@ -622,7 +622,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 |
+@@ -633,7 +632,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/kvm/emulate.c b/arch/x86/kvm/emulate.c |
85 |
+index f95d242..4837375 100644 |
86 |
+--- a/arch/x86/kvm/emulate.c |
87 |
++++ b/arch/x86/kvm/emulate.c |
88 |
+@@ -4426,12 +4426,12 @@ twobyte_insn: |
89 |
+ break; |
90 |
+ case 0xb6 ... 0xb7: /* movzx */ |
91 |
+ ctxt->dst.bytes = ctxt->op_bytes; |
92 |
+- ctxt->dst.val = (ctxt->d & ByteOp) ? (u8) ctxt->src.val |
93 |
++ ctxt->dst.val = (ctxt->src.bytes == 1) ? (u8) ctxt->src.val |
94 |
+ : (u16) ctxt->src.val; |
95 |
+ break; |
96 |
+ case 0xbe ... 0xbf: /* movsx */ |
97 |
+ ctxt->dst.bytes = ctxt->op_bytes; |
98 |
+- ctxt->dst.val = (ctxt->d & ByteOp) ? (s8) ctxt->src.val : |
99 |
++ ctxt->dst.val = (ctxt->src.bytes == 1) ? (s8) ctxt->src.val : |
100 |
+ (s16) ctxt->src.val; |
101 |
+ break; |
102 |
+ case 0xc0 ... 0xc1: /* xadd */ |
103 |
+diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c |
104 |
+index 81cf4fa..0147d16 100644 |
105 |
+--- a/arch/x86/kvm/i8259.c |
106 |
++++ b/arch/x86/kvm/i8259.c |
107 |
+@@ -305,6 +305,11 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) |
108 |
+ addr &= 1; |
109 |
+ if (addr == 0) { |
110 |
+ if (val & 0x10) { |
111 |
++ u8 edge_irr = s->irr & ~s->elcr; |
112 |
++ int i; |
113 |
++ bool found; |
114 |
++ struct kvm_vcpu *vcpu; |
115 |
++ |
116 |
+ s->init4 = val & 1; |
117 |
+ s->last_irr = 0; |
118 |
+ s->irr &= s->elcr; |
119 |
+@@ -322,6 +327,18 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) |
120 |
+ if (val & 0x08) |
121 |
+ pr_pic_unimpl( |
122 |
+ "level sensitive irq not supported"); |
123 |
++ |
124 |
++ kvm_for_each_vcpu(i, vcpu, s->pics_state->kvm) |
125 |
++ if (kvm_apic_accept_pic_intr(vcpu)) { |
126 |
++ found = true; |
127 |
++ break; |
128 |
++ } |
129 |
++ |
130 |
++ |
131 |
++ if (found) |
132 |
++ for (irq = 0; irq < PIC_NUM_PINS/2; irq++) |
133 |
++ if (edge_irr & (1 << irq)) |
134 |
++ pic_clear_isr(s, irq); |
135 |
+ } else if (val & 0x08) { |
136 |
+ if (val & 0x04) |
137 |
+ s->poll = 1; |
138 |
+diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c |
139 |
+index 32eb588..86c8704 100644 |
140 |
+--- a/arch/x86/kvm/vmx.c |
141 |
++++ b/arch/x86/kvm/vmx.c |
142 |
+@@ -615,6 +615,10 @@ static void kvm_cpu_vmxon(u64 addr); |
143 |
+ static void kvm_cpu_vmxoff(void); |
144 |
+ static void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3); |
145 |
+ static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr); |
146 |
++static void vmx_set_segment(struct kvm_vcpu *vcpu, |
147 |
++ struct kvm_segment *var, int seg); |
148 |
++static void vmx_get_segment(struct kvm_vcpu *vcpu, |
149 |
++ struct kvm_segment *var, int seg); |
150 |
+ |
151 |
+ static DEFINE_PER_CPU(struct vmcs *, vmxarea); |
152 |
+ static DEFINE_PER_CPU(struct vmcs *, current_vmcs); |
153 |
+@@ -1470,13 +1474,6 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx) |
154 |
+ loadsegment(ds, vmx->host_state.ds_sel); |
155 |
+ loadsegment(es, vmx->host_state.es_sel); |
156 |
+ } |
157 |
+-#else |
158 |
+- /* |
159 |
+- * The sysexit path does not restore ds/es, so we must set them to |
160 |
+- * a reasonable value ourselves. |
161 |
+- */ |
162 |
+- loadsegment(ds, __USER_DS); |
163 |
+- loadsegment(es, __USER_DS); |
164 |
+ #endif |
165 |
+ reload_tss(); |
166 |
+ #ifdef CONFIG_X86_64 |
167 |
+@@ -2770,6 +2767,7 @@ static void enter_rmode(struct kvm_vcpu *vcpu) |
168 |
+ { |
169 |
+ unsigned long flags; |
170 |
+ struct vcpu_vmx *vmx = to_vmx(vcpu); |
171 |
++ struct kvm_segment var; |
172 |
+ |
173 |
+ if (enable_unrestricted_guest) |
174 |
+ return; |
175 |
+@@ -2813,20 +2811,23 @@ static void enter_rmode(struct kvm_vcpu *vcpu) |
176 |
+ if (emulate_invalid_guest_state) |
177 |
+ goto continue_rmode; |
178 |
+ |
179 |
+- vmcs_write16(GUEST_SS_SELECTOR, vmcs_readl(GUEST_SS_BASE) >> 4); |
180 |
+- vmcs_write32(GUEST_SS_LIMIT, 0xffff); |
181 |
+- vmcs_write32(GUEST_SS_AR_BYTES, 0xf3); |
182 |
++ vmx_get_segment(vcpu, &var, VCPU_SREG_SS); |
183 |
++ vmx_set_segment(vcpu, &var, VCPU_SREG_SS); |
184 |
++ |
185 |
++ vmx_get_segment(vcpu, &var, VCPU_SREG_CS); |
186 |
++ vmx_set_segment(vcpu, &var, VCPU_SREG_CS); |
187 |
++ |
188 |
++ vmx_get_segment(vcpu, &var, VCPU_SREG_ES); |
189 |
++ vmx_set_segment(vcpu, &var, VCPU_SREG_ES); |
190 |
+ |
191 |
+- vmcs_write32(GUEST_CS_AR_BYTES, 0xf3); |
192 |
+- vmcs_write32(GUEST_CS_LIMIT, 0xffff); |
193 |
+- if (vmcs_readl(GUEST_CS_BASE) == 0xffff0000) |
194 |
+- vmcs_writel(GUEST_CS_BASE, 0xf0000); |
195 |
+- vmcs_write16(GUEST_CS_SELECTOR, vmcs_readl(GUEST_CS_BASE) >> 4); |
196 |
++ vmx_get_segment(vcpu, &var, VCPU_SREG_DS); |
197 |
++ vmx_set_segment(vcpu, &var, VCPU_SREG_DS); |
198 |
+ |
199 |
+- fix_rmode_seg(VCPU_SREG_ES, &vmx->rmode.es); |
200 |
+- fix_rmode_seg(VCPU_SREG_DS, &vmx->rmode.ds); |
201 |
+- fix_rmode_seg(VCPU_SREG_GS, &vmx->rmode.gs); |
202 |
+- fix_rmode_seg(VCPU_SREG_FS, &vmx->rmode.fs); |
203 |
++ vmx_get_segment(vcpu, &var, VCPU_SREG_GS); |
204 |
++ vmx_set_segment(vcpu, &var, VCPU_SREG_GS); |
205 |
++ |
206 |
++ vmx_get_segment(vcpu, &var, VCPU_SREG_FS); |
207 |
++ vmx_set_segment(vcpu, &var, VCPU_SREG_FS); |
208 |
+ |
209 |
+ continue_rmode: |
210 |
+ kvm_mmu_reset_context(vcpu); |
211 |
+@@ -3229,6 +3230,44 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu, |
212 |
+ |
213 |
+ vmcs_write32(sf->ar_bytes, ar); |
214 |
+ __clear_bit(VCPU_EXREG_CPL, (ulong *)&vcpu->arch.regs_avail); |
215 |
++ |
216 |
++ /* |
217 |
++ * Fix segments for real mode guest in hosts that don't have |
218 |
++ * "unrestricted_mode" or it was disabled. |
219 |
++ * This is done to allow migration of the guests from hosts with |
220 |
++ * unrestricted guest like Westmere to older host that don't have |
221 |
++ * unrestricted guest like Nehelem. |
222 |
++ */ |
223 |
++ if (!enable_unrestricted_guest && vmx->rmode.vm86_active) { |
224 |
++ switch (seg) { |
225 |
++ case VCPU_SREG_CS: |
226 |
++ vmcs_write32(GUEST_CS_AR_BYTES, 0xf3); |
227 |
++ vmcs_write32(GUEST_CS_LIMIT, 0xffff); |
228 |
++ if (vmcs_readl(GUEST_CS_BASE) == 0xffff0000) |
229 |
++ vmcs_writel(GUEST_CS_BASE, 0xf0000); |
230 |
++ vmcs_write16(GUEST_CS_SELECTOR, |
231 |
++ vmcs_readl(GUEST_CS_BASE) >> 4); |
232 |
++ break; |
233 |
++ case VCPU_SREG_ES: |
234 |
++ fix_rmode_seg(VCPU_SREG_ES, &vmx->rmode.es); |
235 |
++ break; |
236 |
++ case VCPU_SREG_DS: |
237 |
++ fix_rmode_seg(VCPU_SREG_DS, &vmx->rmode.ds); |
238 |
++ break; |
239 |
++ case VCPU_SREG_GS: |
240 |
++ fix_rmode_seg(VCPU_SREG_GS, &vmx->rmode.gs); |
241 |
++ break; |
242 |
++ case VCPU_SREG_FS: |
243 |
++ fix_rmode_seg(VCPU_SREG_FS, &vmx->rmode.fs); |
244 |
++ break; |
245 |
++ case VCPU_SREG_SS: |
246 |
++ vmcs_write16(GUEST_SS_SELECTOR, |
247 |
++ vmcs_readl(GUEST_SS_BASE) >> 4); |
248 |
++ vmcs_write32(GUEST_SS_LIMIT, 0xffff); |
249 |
++ vmcs_write32(GUEST_SS_AR_BYTES, 0xf3); |
250 |
++ break; |
251 |
++ } |
252 |
++ } |
253 |
+ } |
254 |
+ |
255 |
+ static void vmx_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l) |
256 |
+@@ -6273,6 +6312,19 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) |
257 |
+ #endif |
258 |
+ ); |
259 |
+ |
260 |
++#ifndef CONFIG_X86_64 |
261 |
++ /* |
262 |
++ * The sysexit path does not restore ds/es, so we must set them to |
263 |
++ * a reasonable value ourselves. |
264 |
++ * |
265 |
++ * We can't defer this to vmx_load_host_state() since that function |
266 |
++ * may be executed in interrupt context, which saves and restore segments |
267 |
++ * around it, nullifying its effect. |
268 |
++ */ |
269 |
++ loadsegment(ds, __USER_DS); |
270 |
++ loadsegment(es, __USER_DS); |
271 |
++#endif |
272 |
++ |
273 |
+ vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP) |
274 |
+ | (1 << VCPU_EXREG_RFLAGS) |
275 |
+ | (1 << VCPU_EXREG_CPL) |
276 |
+diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c |
277 |
+index be6d549..14c290d 100644 |
278 |
+--- a/arch/x86/kvm/x86.c |
279 |
++++ b/arch/x86/kvm/x86.c |
280 |
+@@ -907,6 +907,10 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock) |
281 |
+ */ |
282 |
+ getboottime(&boot); |
283 |
+ |
284 |
++ if (kvm->arch.kvmclock_offset) { |
285 |
++ struct timespec ts = ns_to_timespec(kvm->arch.kvmclock_offset); |
286 |
++ boot = timespec_sub(boot, ts); |
287 |
++ } |
288 |
+ wc.sec = boot.tv_sec; |
289 |
+ wc.nsec = boot.tv_nsec; |
290 |
+ wc.version = version; |
291 |
+diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c |
292 |
+index 64effdc..b2e91d4 100644 |
293 |
+--- a/arch/x86/xen/p2m.c |
294 |
++++ b/arch/x86/xen/p2m.c |
295 |
+@@ -194,6 +194,11 @@ RESERVE_BRK(p2m_mid_mfn, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID |
296 |
+ * boundary violation will require three middle nodes. */ |
297 |
+ RESERVE_BRK(p2m_mid_identity, PAGE_SIZE * 2 * 3); |
298 |
+ |
299 |
++/* When we populate back during bootup, the amount of pages can vary. The |
300 |
++ * max we have is seen is 395979, but that does not mean it can't be more. |
301 |
++ * But some machines can have 3GB I/O holes even. So lets reserve enough |
302 |
++ * for 4GB of I/O and E820 holes. */ |
303 |
++RESERVE_BRK(p2m_populated, PMD_SIZE * 4); |
304 |
+ static inline unsigned p2m_top_index(unsigned long pfn) |
305 |
+ { |
306 |
+ BUG_ON(pfn >= MAX_P2M_PFN); |
307 |
+diff --git a/drivers/base/core.c b/drivers/base/core.c |
308 |
+index 346be8b..b18138a 100644 |
309 |
+--- a/drivers/base/core.c |
310 |
++++ b/drivers/base/core.c |
311 |
+@@ -1848,6 +1848,7 @@ int __dev_printk(const char *level, const struct device *dev, |
312 |
+ struct va_format *vaf) |
313 |
+ { |
314 |
+ char dict[128]; |
315 |
++ const char *level_extra = ""; |
316 |
+ size_t dictlen = 0; |
317 |
+ const char *subsys; |
318 |
+ |
319 |
+@@ -1894,10 +1895,14 @@ int __dev_printk(const char *level, const struct device *dev, |
320 |
+ "DEVICE=+%s:%s", subsys, dev_name(dev)); |
321 |
+ } |
322 |
+ skip: |
323 |
++ if (level[3]) |
324 |
++ level_extra = &level[3]; /* skip past "<L>" */ |
325 |
++ |
326 |
+ return printk_emit(0, level[1] - '0', |
327 |
+ dictlen ? dict : NULL, dictlen, |
328 |
+- "%s %s: %pV", |
329 |
+- dev_driver_string(dev), dev_name(dev), vaf); |
330 |
++ "%s %s: %s%pV", |
331 |
++ dev_driver_string(dev), dev_name(dev), |
332 |
++ level_extra, vaf); |
333 |
+ } |
334 |
+ EXPORT_SYMBOL(__dev_printk); |
335 |
+ |
336 |
+diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c |
337 |
+index fcfeb3c..5084975 100644 |
338 |
+--- a/drivers/dma/imx-dma.c |
339 |
++++ b/drivers/dma/imx-dma.c |
340 |
+@@ -172,7 +172,8 @@ struct imxdma_engine { |
341 |
+ struct device_dma_parameters dma_parms; |
342 |
+ struct dma_device dma_device; |
343 |
+ void __iomem *base; |
344 |
+- struct clk *dma_clk; |
345 |
++ struct clk *dma_ahb; |
346 |
++ struct clk *dma_ipg; |
347 |
+ spinlock_t lock; |
348 |
+ struct imx_dma_2d_config slots_2d[IMX_DMA_2D_SLOTS]; |
349 |
+ struct imxdma_channel channel[IMX_DMA_CHANNELS]; |
350 |
+@@ -976,10 +977,20 @@ static int __init imxdma_probe(struct platform_device *pdev) |
351 |
+ return 0; |
352 |
+ } |
353 |
+ |
354 |
+- imxdma->dma_clk = clk_get(NULL, "dma"); |
355 |
+- if (IS_ERR(imxdma->dma_clk)) |
356 |
+- return PTR_ERR(imxdma->dma_clk); |
357 |
+- clk_enable(imxdma->dma_clk); |
358 |
++ imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg"); |
359 |
++ if (IS_ERR(imxdma->dma_ipg)) { |
360 |
++ ret = PTR_ERR(imxdma->dma_ipg); |
361 |
++ goto err_clk; |
362 |
++ } |
363 |
++ |
364 |
++ imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb"); |
365 |
++ if (IS_ERR(imxdma->dma_ahb)) { |
366 |
++ ret = PTR_ERR(imxdma->dma_ahb); |
367 |
++ goto err_clk; |
368 |
++ } |
369 |
++ |
370 |
++ clk_prepare_enable(imxdma->dma_ipg); |
371 |
++ clk_prepare_enable(imxdma->dma_ahb); |
372 |
+ |
373 |
+ /* reset DMA module */ |
374 |
+ imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR); |
375 |
+@@ -988,16 +999,14 @@ static int __init imxdma_probe(struct platform_device *pdev) |
376 |
+ ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", imxdma); |
377 |
+ if (ret) { |
378 |
+ dev_warn(imxdma->dev, "Can't register IRQ for DMA\n"); |
379 |
+- kfree(imxdma); |
380 |
+- return ret; |
381 |
++ goto err_enable; |
382 |
+ } |
383 |
+ |
384 |
+ ret = request_irq(MX1_DMA_ERR, imxdma_err_handler, 0, "DMA", imxdma); |
385 |
+ if (ret) { |
386 |
+ dev_warn(imxdma->dev, "Can't register ERRIRQ for DMA\n"); |
387 |
+ free_irq(MX1_DMA_INT, NULL); |
388 |
+- kfree(imxdma); |
389 |
+- return ret; |
390 |
++ goto err_enable; |
391 |
+ } |
392 |
+ } |
393 |
+ |
394 |
+@@ -1094,7 +1103,10 @@ err_init: |
395 |
+ free_irq(MX1_DMA_INT, NULL); |
396 |
+ free_irq(MX1_DMA_ERR, NULL); |
397 |
+ } |
398 |
+- |
399 |
++err_enable: |
400 |
++ clk_disable_unprepare(imxdma->dma_ipg); |
401 |
++ clk_disable_unprepare(imxdma->dma_ahb); |
402 |
++err_clk: |
403 |
+ kfree(imxdma); |
404 |
+ return ret; |
405 |
+ } |
406 |
+@@ -1114,7 +1126,9 @@ static int __exit imxdma_remove(struct platform_device *pdev) |
407 |
+ free_irq(MX1_DMA_ERR, NULL); |
408 |
+ } |
409 |
+ |
410 |
+- kfree(imxdma); |
411 |
++ clk_disable_unprepare(imxdma->dma_ipg); |
412 |
++ clk_disable_unprepare(imxdma->dma_ahb); |
413 |
++ kfree(imxdma); |
414 |
+ |
415 |
+ return 0; |
416 |
+ } |
417 |
+diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c |
418 |
+index 79f8344..6d4b001 100644 |
419 |
+--- a/drivers/gpu/drm/i915/i915_sysfs.c |
420 |
++++ b/drivers/gpu/drm/i915/i915_sysfs.c |
421 |
+@@ -31,6 +31,7 @@ |
422 |
+ #include <linux/sysfs.h> |
423 |
+ #include "i915_drv.h" |
424 |
+ |
425 |
++#ifdef CONFIG_PM |
426 |
+ static u32 calc_residency(struct drm_device *dev, const u32 reg) |
427 |
+ { |
428 |
+ struct drm_i915_private *dev_priv = dev->dev_private; |
429 |
+@@ -109,3 +110,14 @@ void i915_teardown_sysfs(struct drm_device *dev) |
430 |
+ { |
431 |
+ sysfs_unmerge_group(&dev->primary->kdev.kobj, &rc6_attr_group); |
432 |
+ } |
433 |
++#else |
434 |
++void i915_setup_sysfs(struct drm_device *dev) |
435 |
++{ |
436 |
++ return; |
437 |
++} |
438 |
++ |
439 |
++void i915_teardown_sysfs(struct drm_device *dev) |
440 |
++{ |
441 |
++ return; |
442 |
++} |
443 |
++#endif /* CONFIG_PM */ |
444 |
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c |
445 |
+index a8538ac..8a11131 100644 |
446 |
+--- a/drivers/gpu/drm/i915/intel_display.c |
447 |
++++ b/drivers/gpu/drm/i915/intel_display.c |
448 |
+@@ -3581,17 +3581,6 @@ static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc, |
449 |
+ continue; |
450 |
+ } |
451 |
+ |
452 |
+- if (intel_encoder->type == INTEL_OUTPUT_EDP) { |
453 |
+- /* Use VBT settings if we have an eDP panel */ |
454 |
+- unsigned int edp_bpc = dev_priv->edp.bpp / 3; |
455 |
+- |
456 |
+- if (edp_bpc < display_bpc) { |
457 |
+- DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); |
458 |
+- display_bpc = edp_bpc; |
459 |
+- } |
460 |
+- continue; |
461 |
+- } |
462 |
+- |
463 |
+ /* Not one of the known troublemakers, check the EDID */ |
464 |
+ list_for_each_entry(connector, &dev->mode_config.connector_list, |
465 |
+ head) { |
466 |
+diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c |
467 |
+index c044932..0abe7ec 100644 |
468 |
+--- a/drivers/gpu/drm/i915/intel_dp.c |
469 |
++++ b/drivers/gpu/drm/i915/intel_dp.c |
470 |
+@@ -726,8 +726,8 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, |
471 |
+ bpp = adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24; |
472 |
+ mode_rate = intel_dp_link_required(mode->clock, bpp); |
473 |
+ |
474 |
+- for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) { |
475 |
+- for (clock = 0; clock <= max_clock; clock++) { |
476 |
++ for (clock = 0; clock <= max_clock; clock++) { |
477 |
++ for (lane_count = 1; lane_count <= max_lane_count; lane_count <<= 1) { |
478 |
+ int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count); |
479 |
+ |
480 |
+ if (mode_rate <= link_avail) { |
481 |
+@@ -1171,10 +1171,14 @@ static void ironlake_edp_panel_off(struct intel_dp *intel_dp) |
482 |
+ WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n"); |
483 |
+ |
484 |
+ pp = ironlake_get_pp_control(dev_priv); |
485 |
+- pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE); |
486 |
++ /* We need to switch off panel power _and_ force vdd, for otherwise some |
487 |
++ * panels get very unhappy and cease to work. */ |
488 |
++ pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE); |
489 |
+ I915_WRITE(PCH_PP_CONTROL, pp); |
490 |
+ POSTING_READ(PCH_PP_CONTROL); |
491 |
+ |
492 |
++ intel_dp->want_panel_vdd = false; |
493 |
++ |
494 |
+ ironlake_wait_panel_off(intel_dp); |
495 |
+ } |
496 |
+ |
497 |
+@@ -1284,11 +1288,9 @@ static void intel_dp_prepare(struct drm_encoder *encoder) |
498 |
+ * ensure that we have vdd while we switch off the panel. */ |
499 |
+ ironlake_edp_panel_vdd_on(intel_dp); |
500 |
+ ironlake_edp_backlight_off(intel_dp); |
501 |
+- ironlake_edp_panel_off(intel_dp); |
502 |
+- |
503 |
+ intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); |
504 |
++ ironlake_edp_panel_off(intel_dp); |
505 |
+ intel_dp_link_down(intel_dp); |
506 |
+- ironlake_edp_panel_vdd_off(intel_dp, false); |
507 |
+ } |
508 |
+ |
509 |
+ static void intel_dp_commit(struct drm_encoder *encoder) |
510 |
+@@ -1323,11 +1325,9 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode) |
511 |
+ /* Switching the panel off requires vdd. */ |
512 |
+ ironlake_edp_panel_vdd_on(intel_dp); |
513 |
+ ironlake_edp_backlight_off(intel_dp); |
514 |
+- ironlake_edp_panel_off(intel_dp); |
515 |
+- |
516 |
+ intel_dp_sink_dpms(intel_dp, mode); |
517 |
++ ironlake_edp_panel_off(intel_dp); |
518 |
+ intel_dp_link_down(intel_dp); |
519 |
+- ironlake_edp_panel_vdd_off(intel_dp, false); |
520 |
+ |
521 |
+ if (is_cpu_edp(intel_dp)) |
522 |
+ ironlake_edp_pll_off(encoder); |
523 |
+diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c |
524 |
+index e5b84ff..b5e7bd9 100644 |
525 |
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c |
526 |
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c |
527 |
+@@ -280,8 +280,6 @@ static int init_ring_common(struct intel_ring_buffer *ring) |
528 |
+ I915_WRITE_HEAD(ring, 0); |
529 |
+ ring->write_tail(ring, 0); |
530 |
+ |
531 |
+- /* Initialize the ring. */ |
532 |
+- I915_WRITE_START(ring, obj->gtt_offset); |
533 |
+ head = I915_READ_HEAD(ring) & HEAD_ADDR; |
534 |
+ |
535 |
+ /* G45 ring initialization fails to reset head to zero */ |
536 |
+@@ -307,6 +305,11 @@ static int init_ring_common(struct intel_ring_buffer *ring) |
537 |
+ } |
538 |
+ } |
539 |
+ |
540 |
++ /* Initialize the ring. This must happen _after_ we've cleared the ring |
541 |
++ * registers with the above sequence (the readback of the HEAD registers |
542 |
++ * also enforces ordering), otherwise the hw might lose the new ring |
543 |
++ * register values. */ |
544 |
++ I915_WRITE_START(ring, obj->gtt_offset); |
545 |
+ I915_WRITE_CTL(ring, |
546 |
+ ((ring->size - PAGE_SIZE) & RING_NR_PAGES) |
547 |
+ | RING_VALID); |
548 |
+diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c |
549 |
+index d303061..0201d1d 100644 |
550 |
+--- a/drivers/gpu/drm/mgag200/mgag200_mode.c |
551 |
++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c |
552 |
+@@ -468,10 +468,11 @@ static int mga_g200er_set_plls(struct mga_device *mdev, long clock) |
553 |
+ { |
554 |
+ unsigned int vcomax, vcomin, pllreffreq; |
555 |
+ unsigned int delta, tmpdelta; |
556 |
+- unsigned int testr, testn, testm, testo; |
557 |
++ int testr, testn, testm, testo; |
558 |
+ unsigned int p, m, n; |
559 |
+- unsigned int computed; |
560 |
++ unsigned int computed, vco; |
561 |
+ int tmp; |
562 |
++ const unsigned int m_div_val[] = { 1, 2, 4, 8 }; |
563 |
+ |
564 |
+ m = n = p = 0; |
565 |
+ vcomax = 1488000; |
566 |
+@@ -490,12 +491,13 @@ static int mga_g200er_set_plls(struct mga_device *mdev, long clock) |
567 |
+ if (delta == 0) |
568 |
+ break; |
569 |
+ for (testo = 5; testo < 33; testo++) { |
570 |
+- computed = pllreffreq * (testn + 1) / |
571 |
++ vco = pllreffreq * (testn + 1) / |
572 |
+ (testr + 1); |
573 |
+- if (computed < vcomin) |
574 |
++ if (vco < vcomin) |
575 |
+ continue; |
576 |
+- if (computed > vcomax) |
577 |
++ if (vco > vcomax) |
578 |
+ continue; |
579 |
++ computed = vco / (m_div_val[testm] * (testo + 1)); |
580 |
+ if (computed > clock) |
581 |
+ tmpdelta = computed - clock; |
582 |
+ else |
583 |
+diff --git a/drivers/gpu/drm/nouveau/nvc0_pm.c b/drivers/gpu/drm/nouveau/nvc0_pm.c |
584 |
+index 7c95c44..4e712b1 100644 |
585 |
+--- a/drivers/gpu/drm/nouveau/nvc0_pm.c |
586 |
++++ b/drivers/gpu/drm/nouveau/nvc0_pm.c |
587 |
+@@ -557,7 +557,7 @@ prog_mem(struct drm_device *dev, struct nvc0_pm_state *info) |
588 |
+ nouveau_mem_exec(&exec, info->perflvl); |
589 |
+ |
590 |
+ if (dev_priv->chipset < 0xd0) |
591 |
+- nv_wr32(dev, 0x611200, 0x00003300); |
592 |
++ nv_wr32(dev, 0x611200, 0x00003330); |
593 |
+ else |
594 |
+ nv_wr32(dev, 0x62c000, 0x03030300); |
595 |
+ } |
596 |
+diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c |
597 |
+index c486d3c..c50b075 100644 |
598 |
+--- a/drivers/gpu/drm/nouveau/nvd0_display.c |
599 |
++++ b/drivers/gpu/drm/nouveau/nvd0_display.c |
600 |
+@@ -790,7 +790,7 @@ nvd0_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) |
601 |
+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); |
602 |
+ int ch = EVO_CURS(nv_crtc->index); |
603 |
+ |
604 |
+- evo_piow(crtc->dev, ch, 0x0084, (y << 16) | x); |
605 |
++ evo_piow(crtc->dev, ch, 0x0084, (y << 16) | (x & 0xffff)); |
606 |
+ evo_piow(crtc->dev, ch, 0x0080, 0x00000000); |
607 |
+ return 0; |
608 |
+ } |
609 |
+diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c |
610 |
+index 3904d79..7915944 100644 |
611 |
+--- a/drivers/gpu/drm/radeon/atombios_crtc.c |
612 |
++++ b/drivers/gpu/drm/radeon/atombios_crtc.c |
613 |
+@@ -259,7 +259,7 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode) |
614 |
+ /* adjust pm to dpms changes BEFORE enabling crtcs */ |
615 |
+ radeon_pm_compute_clocks(rdev); |
616 |
+ /* disable crtc pair power gating before programming */ |
617 |
+- if (ASIC_IS_DCE6(rdev)) |
618 |
++ if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set) |
619 |
+ atombios_powergate_crtc(crtc, ATOM_DISABLE); |
620 |
+ atombios_enable_crtc(crtc, ATOM_ENABLE); |
621 |
+ if (ASIC_IS_DCE3(rdev) && !ASIC_IS_DCE6(rdev)) |
622 |
+@@ -279,7 +279,7 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode) |
623 |
+ atombios_enable_crtc(crtc, ATOM_DISABLE); |
624 |
+ radeon_crtc->enabled = false; |
625 |
+ /* power gating is per-pair */ |
626 |
+- if (ASIC_IS_DCE6(rdev)) { |
627 |
++ if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set) { |
628 |
+ struct drm_crtc *other_crtc; |
629 |
+ struct radeon_crtc *other_radeon_crtc; |
630 |
+ list_for_each_entry(other_crtc, &rdev->ddev->mode_config.crtc_list, head) { |
631 |
+@@ -1639,18 +1639,28 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, |
632 |
+ static void atombios_crtc_prepare(struct drm_crtc *crtc) |
633 |
+ { |
634 |
+ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
635 |
++ struct drm_device *dev = crtc->dev; |
636 |
++ struct radeon_device *rdev = dev->dev_private; |
637 |
+ |
638 |
++ radeon_crtc->in_mode_set = true; |
639 |
+ /* pick pll */ |
640 |
+ radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); |
641 |
+ |
642 |
++ /* disable crtc pair power gating before programming */ |
643 |
++ if (ASIC_IS_DCE6(rdev)) |
644 |
++ atombios_powergate_crtc(crtc, ATOM_DISABLE); |
645 |
++ |
646 |
+ atombios_lock_crtc(crtc, ATOM_ENABLE); |
647 |
+ atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); |
648 |
+ } |
649 |
+ |
650 |
+ static void atombios_crtc_commit(struct drm_crtc *crtc) |
651 |
+ { |
652 |
++ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
653 |
++ |
654 |
+ atombios_crtc_dpms(crtc, DRM_MODE_DPMS_ON); |
655 |
+ atombios_lock_crtc(crtc, ATOM_DISABLE); |
656 |
++ radeon_crtc->in_mode_set = false; |
657 |
+ } |
658 |
+ |
659 |
+ static void atombios_crtc_disable(struct drm_crtc *crtc) |
660 |
+diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c |
661 |
+index 7fb3d2e..e98dc9c 100644 |
662 |
+--- a/drivers/gpu/drm/radeon/evergreen.c |
663 |
++++ b/drivers/gpu/drm/radeon/evergreen.c |
664 |
+@@ -1117,24 +1117,8 @@ void evergreen_agp_enable(struct radeon_device *rdev) |
665 |
+ |
666 |
+ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save) |
667 |
+ { |
668 |
+- save->vga_control[0] = RREG32(D1VGA_CONTROL); |
669 |
+- save->vga_control[1] = RREG32(D2VGA_CONTROL); |
670 |
+ save->vga_render_control = RREG32(VGA_RENDER_CONTROL); |
671 |
+ save->vga_hdp_control = RREG32(VGA_HDP_CONTROL); |
672 |
+- save->crtc_control[0] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET); |
673 |
+- save->crtc_control[1] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET); |
674 |
+- if (rdev->num_crtc >= 4) { |
675 |
+- save->vga_control[2] = RREG32(EVERGREEN_D3VGA_CONTROL); |
676 |
+- save->vga_control[3] = RREG32(EVERGREEN_D4VGA_CONTROL); |
677 |
+- save->crtc_control[2] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET); |
678 |
+- save->crtc_control[3] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET); |
679 |
+- } |
680 |
+- if (rdev->num_crtc >= 6) { |
681 |
+- save->vga_control[4] = RREG32(EVERGREEN_D5VGA_CONTROL); |
682 |
+- save->vga_control[5] = RREG32(EVERGREEN_D6VGA_CONTROL); |
683 |
+- save->crtc_control[4] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET); |
684 |
+- save->crtc_control[5] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET); |
685 |
+- } |
686 |
+ |
687 |
+ /* Stop all video */ |
688 |
+ WREG32(VGA_RENDER_CONTROL, 0); |
689 |
+@@ -1245,47 +1229,6 @@ void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *s |
690 |
+ /* Unlock host access */ |
691 |
+ WREG32(VGA_HDP_CONTROL, save->vga_hdp_control); |
692 |
+ mdelay(1); |
693 |
+- /* Restore video state */ |
694 |
+- WREG32(D1VGA_CONTROL, save->vga_control[0]); |
695 |
+- WREG32(D2VGA_CONTROL, save->vga_control[1]); |
696 |
+- if (rdev->num_crtc >= 4) { |
697 |
+- WREG32(EVERGREEN_D3VGA_CONTROL, save->vga_control[2]); |
698 |
+- WREG32(EVERGREEN_D4VGA_CONTROL, save->vga_control[3]); |
699 |
+- } |
700 |
+- if (rdev->num_crtc >= 6) { |
701 |
+- WREG32(EVERGREEN_D5VGA_CONTROL, save->vga_control[4]); |
702 |
+- WREG32(EVERGREEN_D6VGA_CONTROL, save->vga_control[5]); |
703 |
+- } |
704 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 1); |
705 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 1); |
706 |
+- if (rdev->num_crtc >= 4) { |
707 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 1); |
708 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 1); |
709 |
+- } |
710 |
+- if (rdev->num_crtc >= 6) { |
711 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 1); |
712 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 1); |
713 |
+- } |
714 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, save->crtc_control[0]); |
715 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, save->crtc_control[1]); |
716 |
+- if (rdev->num_crtc >= 4) { |
717 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, save->crtc_control[2]); |
718 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, save->crtc_control[3]); |
719 |
+- } |
720 |
+- if (rdev->num_crtc >= 6) { |
721 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, save->crtc_control[4]); |
722 |
+- WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, save->crtc_control[5]); |
723 |
+- } |
724 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0); |
725 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0); |
726 |
+- if (rdev->num_crtc >= 4) { |
727 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 0); |
728 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 0); |
729 |
+- } |
730 |
+- if (rdev->num_crtc >= 6) { |
731 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 0); |
732 |
+- WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 0); |
733 |
+- } |
734 |
+ WREG32(VGA_RENDER_CONTROL, save->vga_render_control); |
735 |
+ } |
736 |
+ |
737 |
+@@ -1858,10 +1801,18 @@ static void evergreen_gpu_init(struct radeon_device *rdev) |
738 |
+ if (rdev->flags & RADEON_IS_IGP) |
739 |
+ rdev->config.evergreen.tile_config |= 1 << 4; |
740 |
+ else { |
741 |
+- if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) |
742 |
+- rdev->config.evergreen.tile_config |= 1 << 4; |
743 |
+- else |
744 |
++ switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { |
745 |
++ case 0: /* four banks */ |
746 |
+ rdev->config.evergreen.tile_config |= 0 << 4; |
747 |
++ break; |
748 |
++ case 1: /* eight banks */ |
749 |
++ rdev->config.evergreen.tile_config |= 1 << 4; |
750 |
++ break; |
751 |
++ case 2: /* sixteen banks */ |
752 |
++ default: |
753 |
++ rdev->config.evergreen.tile_config |= 2 << 4; |
754 |
++ break; |
755 |
++ } |
756 |
+ } |
757 |
+ rdev->config.evergreen.tile_config |= 0 << 8; |
758 |
+ rdev->config.evergreen.tile_config |= |
759 |
+diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c |
760 |
+index c1655412..f2e5c54 100644 |
761 |
+--- a/drivers/gpu/drm/radeon/evergreen_cs.c |
762 |
++++ b/drivers/gpu/drm/radeon/evergreen_cs.c |
763 |
+@@ -961,13 +961,15 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) |
764 |
+ |
765 |
+ if (track->db_dirty) { |
766 |
+ /* Check stencil buffer */ |
767 |
+- if (G_028800_STENCIL_ENABLE(track->db_depth_control)) { |
768 |
++ if (G_028044_FORMAT(track->db_s_info) != V_028044_STENCIL_INVALID && |
769 |
++ G_028800_STENCIL_ENABLE(track->db_depth_control)) { |
770 |
+ r = evergreen_cs_track_validate_stencil(p); |
771 |
+ if (r) |
772 |
+ return r; |
773 |
+ } |
774 |
+ /* Check depth buffer */ |
775 |
+- if (G_028800_Z_ENABLE(track->db_depth_control)) { |
776 |
++ if (G_028040_FORMAT(track->db_z_info) != V_028040_Z_INVALID && |
777 |
++ G_028800_Z_ENABLE(track->db_depth_control)) { |
778 |
+ r = evergreen_cs_track_validate_depth(p); |
779 |
+ if (r) |
780 |
+ return r; |
781 |
+diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h |
782 |
+index b50b15c..4a43b46 100644 |
783 |
+--- a/drivers/gpu/drm/radeon/evergreend.h |
784 |
++++ b/drivers/gpu/drm/radeon/evergreend.h |
785 |
+@@ -1273,6 +1273,8 @@ |
786 |
+ #define S_028044_FORMAT(x) (((x) & 0x1) << 0) |
787 |
+ #define G_028044_FORMAT(x) (((x) >> 0) & 0x1) |
788 |
+ #define C_028044_FORMAT 0xFFFFFFFE |
789 |
++#define V_028044_STENCIL_INVALID 0 |
790 |
++#define V_028044_STENCIL_8 1 |
791 |
+ #define G_028044_TILE_SPLIT(x) (((x) >> 8) & 0x7) |
792 |
+ #define DB_Z_READ_BASE 0x28048 |
793 |
+ #define DB_STENCIL_READ_BASE 0x2804c |
794 |
+diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c |
795 |
+index b7bf18e..2732a70 100644 |
796 |
+--- a/drivers/gpu/drm/radeon/ni.c |
797 |
++++ b/drivers/gpu/drm/radeon/ni.c |
798 |
+@@ -574,10 +574,18 @@ static void cayman_gpu_init(struct radeon_device *rdev) |
799 |
+ if (rdev->flags & RADEON_IS_IGP) |
800 |
+ rdev->config.cayman.tile_config |= 1 << 4; |
801 |
+ else { |
802 |
+- if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) |
803 |
+- rdev->config.cayman.tile_config |= 1 << 4; |
804 |
+- else |
805 |
++ switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { |
806 |
++ case 0: /* four banks */ |
807 |
+ rdev->config.cayman.tile_config |= 0 << 4; |
808 |
++ break; |
809 |
++ case 1: /* eight banks */ |
810 |
++ rdev->config.cayman.tile_config |= 1 << 4; |
811 |
++ break; |
812 |
++ case 2: /* sixteen banks */ |
813 |
++ default: |
814 |
++ rdev->config.cayman.tile_config |= 2 << 4; |
815 |
++ break; |
816 |
++ } |
817 |
+ } |
818 |
+ rdev->config.cayman.tile_config |= |
819 |
+ ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; |
820 |
+diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c |
821 |
+index ca87f7a..1119e31 100644 |
822 |
+--- a/drivers/gpu/drm/radeon/r600_cs.c |
823 |
++++ b/drivers/gpu/drm/radeon/r600_cs.c |
824 |
+@@ -764,8 +764,10 @@ static int r600_cs_track_check(struct radeon_cs_parser *p) |
825 |
+ } |
826 |
+ |
827 |
+ /* Check depth buffer */ |
828 |
+- if (track->db_dirty && (G_028800_STENCIL_ENABLE(track->db_depth_control) || |
829 |
+- G_028800_Z_ENABLE(track->db_depth_control))) { |
830 |
++ if (track->db_dirty && |
831 |
++ G_028010_FORMAT(track->db_depth_info) != V_028010_DEPTH_INVALID && |
832 |
++ (G_028800_STENCIL_ENABLE(track->db_depth_control) || |
833 |
++ G_028800_Z_ENABLE(track->db_depth_control))) { |
834 |
+ r = r600_cs_track_validate_db(p); |
835 |
+ if (r) |
836 |
+ return r; |
837 |
+diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h |
838 |
+index e76a941..476c68d 100644 |
839 |
+--- a/drivers/gpu/drm/radeon/radeon_asic.h |
840 |
++++ b/drivers/gpu/drm/radeon/radeon_asic.h |
841 |
+@@ -256,13 +256,10 @@ extern int rs690_mc_wait_for_idle(struct radeon_device *rdev); |
842 |
+ * rv515 |
843 |
+ */ |
844 |
+ struct rv515_mc_save { |
845 |
+- u32 d1vga_control; |
846 |
+- u32 d2vga_control; |
847 |
+ u32 vga_render_control; |
848 |
+ u32 vga_hdp_control; |
849 |
+- u32 d1crtc_control; |
850 |
+- u32 d2crtc_control; |
851 |
+ }; |
852 |
++ |
853 |
+ int rv515_init(struct radeon_device *rdev); |
854 |
+ void rv515_fini(struct radeon_device *rdev); |
855 |
+ uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
856 |
+@@ -389,11 +386,10 @@ void r700_cp_fini(struct radeon_device *rdev); |
857 |
+ * evergreen |
858 |
+ */ |
859 |
+ struct evergreen_mc_save { |
860 |
+- u32 vga_control[6]; |
861 |
+ u32 vga_render_control; |
862 |
+ u32 vga_hdp_control; |
863 |
+- u32 crtc_control[6]; |
864 |
+ }; |
865 |
++ |
866 |
+ void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev); |
867 |
+ int evergreen_init(struct radeon_device *rdev); |
868 |
+ void evergreen_fini(struct radeon_device *rdev); |
869 |
+diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c |
870 |
+index 2c4d53f..ed13538 100644 |
871 |
+--- a/drivers/gpu/drm/radeon/radeon_drv.c |
872 |
++++ b/drivers/gpu/drm/radeon/radeon_drv.c |
873 |
+@@ -59,9 +59,10 @@ |
874 |
+ * 2.15.0 - add max_pipes query |
875 |
+ * 2.16.0 - fix evergreen 2D tiled surface calculation |
876 |
+ * 2.17.0 - add STRMOUT_BASE_UPDATE for r7xx |
877 |
++ * 2.18.0 - r600-eg: allow "invalid" DB formats |
878 |
+ */ |
879 |
+ #define KMS_DRIVER_MAJOR 2 |
880 |
+-#define KMS_DRIVER_MINOR 17 |
881 |
++#define KMS_DRIVER_MINOR 18 |
882 |
+ #define KMS_DRIVER_PATCHLEVEL 0 |
883 |
+ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
884 |
+ int radeon_driver_unload_kms(struct drm_device *dev); |
885 |
+diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |
886 |
+index 210317c..9760e5a 100644 |
887 |
+--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |
888 |
++++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c |
889 |
+@@ -1025,9 +1025,11 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc, |
890 |
+ |
891 |
+ static void radeon_crtc_prepare(struct drm_crtc *crtc) |
892 |
+ { |
893 |
++ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
894 |
+ struct drm_device *dev = crtc->dev; |
895 |
+ struct drm_crtc *crtci; |
896 |
+ |
897 |
++ radeon_crtc->in_mode_set = true; |
898 |
+ /* |
899 |
+ * The hardware wedges sometimes if you reconfigure one CRTC |
900 |
+ * whilst another is running (see fdo bug #24611). |
901 |
+@@ -1038,6 +1040,7 @@ static void radeon_crtc_prepare(struct drm_crtc *crtc) |
902 |
+ |
903 |
+ static void radeon_crtc_commit(struct drm_crtc *crtc) |
904 |
+ { |
905 |
++ struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
906 |
+ struct drm_device *dev = crtc->dev; |
907 |
+ struct drm_crtc *crtci; |
908 |
+ |
909 |
+@@ -1048,6 +1051,7 @@ static void radeon_crtc_commit(struct drm_crtc *crtc) |
910 |
+ if (crtci->enabled) |
911 |
+ radeon_crtc_dpms(crtci, DRM_MODE_DPMS_ON); |
912 |
+ } |
913 |
++ radeon_crtc->in_mode_set = false; |
914 |
+ } |
915 |
+ |
916 |
+ static const struct drm_crtc_helper_funcs legacy_helper_funcs = { |
917 |
+diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h |
918 |
+index 5b10ffd..ce32fa9 100644 |
919 |
+--- a/drivers/gpu/drm/radeon/radeon_mode.h |
920 |
++++ b/drivers/gpu/drm/radeon/radeon_mode.h |
921 |
+@@ -275,6 +275,7 @@ struct radeon_crtc { |
922 |
+ u16 lut_r[256], lut_g[256], lut_b[256]; |
923 |
+ bool enabled; |
924 |
+ bool can_tile; |
925 |
++ bool in_mode_set; |
926 |
+ uint32_t crtc_offset; |
927 |
+ struct drm_gem_object *cursor_bo; |
928 |
+ uint64_t cursor_addr; |
929 |
+diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c |
930 |
+index 7f08ced..5e70fcb 100644 |
931 |
+--- a/drivers/gpu/drm/radeon/rv515.c |
932 |
++++ b/drivers/gpu/drm/radeon/rv515.c |
933 |
+@@ -281,12 +281,8 @@ int rv515_debugfs_ga_info_init(struct radeon_device *rdev) |
934 |
+ |
935 |
+ void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save) |
936 |
+ { |
937 |
+- save->d1vga_control = RREG32(R_000330_D1VGA_CONTROL); |
938 |
+- save->d2vga_control = RREG32(R_000338_D2VGA_CONTROL); |
939 |
+ save->vga_render_control = RREG32(R_000300_VGA_RENDER_CONTROL); |
940 |
+ save->vga_hdp_control = RREG32(R_000328_VGA_HDP_CONTROL); |
941 |
+- save->d1crtc_control = RREG32(R_006080_D1CRTC_CONTROL); |
942 |
+- save->d2crtc_control = RREG32(R_006880_D2CRTC_CONTROL); |
943 |
+ |
944 |
+ /* Stop all video */ |
945 |
+ WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 0); |
946 |
+@@ -311,15 +307,6 @@ void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save) |
947 |
+ /* Unlock host access */ |
948 |
+ WREG32(R_000328_VGA_HDP_CONTROL, save->vga_hdp_control); |
949 |
+ mdelay(1); |
950 |
+- /* Restore video state */ |
951 |
+- WREG32(R_000330_D1VGA_CONTROL, save->d1vga_control); |
952 |
+- WREG32(R_000338_D2VGA_CONTROL, save->d2vga_control); |
953 |
+- WREG32(R_0060E8_D1CRTC_UPDATE_LOCK, 1); |
954 |
+- WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 1); |
955 |
+- WREG32(R_006080_D1CRTC_CONTROL, save->d1crtc_control); |
956 |
+- WREG32(R_006880_D2CRTC_CONTROL, save->d2crtc_control); |
957 |
+- WREG32(R_0060E8_D1CRTC_UPDATE_LOCK, 0); |
958 |
+- WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 0); |
959 |
+ WREG32(R_000300_VGA_RENDER_CONTROL, save->vga_render_control); |
960 |
+ } |
961 |
+ |
962 |
+diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c |
963 |
+index 0b02792..bb9ea23 100644 |
964 |
+--- a/drivers/gpu/drm/radeon/si.c |
965 |
++++ b/drivers/gpu/drm/radeon/si.c |
966 |
+@@ -1640,10 +1640,18 @@ static void si_gpu_init(struct radeon_device *rdev) |
967 |
+ rdev->config.si.tile_config |= (3 << 0); |
968 |
+ break; |
969 |
+ } |
970 |
+- if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) |
971 |
+- rdev->config.si.tile_config |= 1 << 4; |
972 |
+- else |
973 |
++ switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { |
974 |
++ case 0: /* four banks */ |
975 |
+ rdev->config.si.tile_config |= 0 << 4; |
976 |
++ break; |
977 |
++ case 1: /* eight banks */ |
978 |
++ rdev->config.si.tile_config |= 1 << 4; |
979 |
++ break; |
980 |
++ case 2: /* sixteen banks */ |
981 |
++ default: |
982 |
++ rdev->config.si.tile_config |= 2 << 4; |
983 |
++ break; |
984 |
++ } |
985 |
+ rdev->config.si.tile_config |= |
986 |
+ ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; |
987 |
+ rdev->config.si.tile_config |= |
988 |
+diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c |
989 |
+index bcbf22e..1b5b0c7 100644 |
990 |
+--- a/drivers/infiniband/ulp/srp/ib_srp.c |
991 |
++++ b/drivers/infiniband/ulp/srp/ib_srp.c |
992 |
+@@ -586,24 +586,62 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd, |
993 |
+ scmnd->sc_data_direction); |
994 |
+ } |
995 |
+ |
996 |
+-static void srp_remove_req(struct srp_target_port *target, |
997 |
+- struct srp_request *req, s32 req_lim_delta) |
998 |
++/** |
999 |
++ * srp_claim_req - Take ownership of the scmnd associated with a request. |
1000 |
++ * @target: SRP target port. |
1001 |
++ * @req: SRP request. |
1002 |
++ * @scmnd: If NULL, take ownership of @req->scmnd. If not NULL, only take |
1003 |
++ * ownership of @req->scmnd if it equals @scmnd. |
1004 |
++ * |
1005 |
++ * Return value: |
1006 |
++ * Either NULL or a pointer to the SCSI command the caller became owner of. |
1007 |
++ */ |
1008 |
++static struct scsi_cmnd *srp_claim_req(struct srp_target_port *target, |
1009 |
++ struct srp_request *req, |
1010 |
++ struct scsi_cmnd *scmnd) |
1011 |
++{ |
1012 |
++ unsigned long flags; |
1013 |
++ |
1014 |
++ spin_lock_irqsave(&target->lock, flags); |
1015 |
++ if (!scmnd) { |
1016 |
++ scmnd = req->scmnd; |
1017 |
++ req->scmnd = NULL; |
1018 |
++ } else if (req->scmnd == scmnd) { |
1019 |
++ req->scmnd = NULL; |
1020 |
++ } else { |
1021 |
++ scmnd = NULL; |
1022 |
++ } |
1023 |
++ spin_unlock_irqrestore(&target->lock, flags); |
1024 |
++ |
1025 |
++ return scmnd; |
1026 |
++} |
1027 |
++ |
1028 |
++/** |
1029 |
++ * srp_free_req() - Unmap data and add request to the free request list. |
1030 |
++ */ |
1031 |
++static void srp_free_req(struct srp_target_port *target, |
1032 |
++ struct srp_request *req, struct scsi_cmnd *scmnd, |
1033 |
++ s32 req_lim_delta) |
1034 |
+ { |
1035 |
+ unsigned long flags; |
1036 |
+ |
1037 |
+- srp_unmap_data(req->scmnd, target, req); |
1038 |
++ srp_unmap_data(scmnd, target, req); |
1039 |
++ |
1040 |
+ spin_lock_irqsave(&target->lock, flags); |
1041 |
+ target->req_lim += req_lim_delta; |
1042 |
+- req->scmnd = NULL; |
1043 |
+ list_add_tail(&req->list, &target->free_reqs); |
1044 |
+ spin_unlock_irqrestore(&target->lock, flags); |
1045 |
+ } |
1046 |
+ |
1047 |
+ static void srp_reset_req(struct srp_target_port *target, struct srp_request *req) |
1048 |
+ { |
1049 |
+- req->scmnd->result = DID_RESET << 16; |
1050 |
+- req->scmnd->scsi_done(req->scmnd); |
1051 |
+- srp_remove_req(target, req, 0); |
1052 |
++ struct scsi_cmnd *scmnd = srp_claim_req(target, req, NULL); |
1053 |
++ |
1054 |
++ if (scmnd) { |
1055 |
++ scmnd->result = DID_RESET << 16; |
1056 |
++ scmnd->scsi_done(scmnd); |
1057 |
++ srp_free_req(target, req, scmnd, 0); |
1058 |
++ } |
1059 |
+ } |
1060 |
+ |
1061 |
+ static int srp_reconnect_target(struct srp_target_port *target) |
1062 |
+@@ -1073,11 +1111,18 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) |
1063 |
+ complete(&target->tsk_mgmt_done); |
1064 |
+ } else { |
1065 |
+ req = &target->req_ring[rsp->tag]; |
1066 |
+- scmnd = req->scmnd; |
1067 |
+- if (!scmnd) |
1068 |
++ scmnd = srp_claim_req(target, req, NULL); |
1069 |
++ if (!scmnd) { |
1070 |
+ shost_printk(KERN_ERR, target->scsi_host, |
1071 |
+ "Null scmnd for RSP w/tag %016llx\n", |
1072 |
+ (unsigned long long) rsp->tag); |
1073 |
++ |
1074 |
++ spin_lock_irqsave(&target->lock, flags); |
1075 |
++ target->req_lim += be32_to_cpu(rsp->req_lim_delta); |
1076 |
++ spin_unlock_irqrestore(&target->lock, flags); |
1077 |
++ |
1078 |
++ return; |
1079 |
++ } |
1080 |
+ scmnd->result = rsp->status; |
1081 |
+ |
1082 |
+ if (rsp->flags & SRP_RSP_FLAG_SNSVALID) { |
1083 |
+@@ -1092,7 +1137,9 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) |
1084 |
+ else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | SRP_RSP_FLAG_DIUNDER)) |
1085 |
+ scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt)); |
1086 |
+ |
1087 |
+- srp_remove_req(target, req, be32_to_cpu(rsp->req_lim_delta)); |
1088 |
++ srp_free_req(target, req, scmnd, |
1089 |
++ be32_to_cpu(rsp->req_lim_delta)); |
1090 |
++ |
1091 |
+ scmnd->host_scribble = NULL; |
1092 |
+ scmnd->scsi_done(scmnd); |
1093 |
+ } |
1094 |
+@@ -1631,25 +1678,17 @@ static int srp_abort(struct scsi_cmnd *scmnd) |
1095 |
+ { |
1096 |
+ struct srp_target_port *target = host_to_target(scmnd->device->host); |
1097 |
+ struct srp_request *req = (struct srp_request *) scmnd->host_scribble; |
1098 |
+- int ret = SUCCESS; |
1099 |
+ |
1100 |
+ shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n"); |
1101 |
+ |
1102 |
+- if (!req || target->qp_in_error) |
1103 |
++ if (!req || target->qp_in_error || !srp_claim_req(target, req, scmnd)) |
1104 |
+ return FAILED; |
1105 |
+- if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, |
1106 |
+- SRP_TSK_ABORT_TASK)) |
1107 |
+- return FAILED; |
1108 |
+- |
1109 |
+- if (req->scmnd) { |
1110 |
+- if (!target->tsk_mgmt_status) { |
1111 |
+- srp_remove_req(target, req, 0); |
1112 |
+- scmnd->result = DID_ABORT << 16; |
1113 |
+- } else |
1114 |
+- ret = FAILED; |
1115 |
+- } |
1116 |
++ srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, |
1117 |
++ SRP_TSK_ABORT_TASK); |
1118 |
++ srp_free_req(target, req, scmnd, 0); |
1119 |
++ scmnd->result = DID_ABORT << 16; |
1120 |
+ |
1121 |
+- return ret; |
1122 |
++ return SUCCESS; |
1123 |
+ } |
1124 |
+ |
1125 |
+ static int srp_reset_device(struct scsi_cmnd *scmnd) |
1126 |
+diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c |
1127 |
+index 20a5040..6cf3365 100644 |
1128 |
+--- a/drivers/net/wireless/rt2x00/rt2800usb.c |
1129 |
++++ b/drivers/net/wireless/rt2x00/rt2800usb.c |
1130 |
+@@ -971,6 +971,7 @@ static struct usb_device_id rt2800usb_device_table[] = { |
1131 |
+ { USB_DEVICE(0x0411, 0x015d) }, |
1132 |
+ { USB_DEVICE(0x0411, 0x016f) }, |
1133 |
+ { USB_DEVICE(0x0411, 0x01a2) }, |
1134 |
++ { USB_DEVICE(0x0411, 0x01ee) }, |
1135 |
+ /* Corega */ |
1136 |
+ { USB_DEVICE(0x07aa, 0x002f) }, |
1137 |
+ { USB_DEVICE(0x07aa, 0x003c) }, |
1138 |
+diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c |
1139 |
+index aeac1ca..327c0ce 100644 |
1140 |
+--- a/drivers/staging/comedi/drivers.c |
1141 |
++++ b/drivers/staging/comedi/drivers.c |
1142 |
+@@ -144,7 +144,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) |
1143 |
+ dev->board_ptr = comedi_recognize(driv, it->board_name); |
1144 |
+ if (dev->board_ptr) |
1145 |
+ break; |
1146 |
+- } else if (strcmp(driv->driver_name, it->board_name)) |
1147 |
++ } else if (strcmp(driv->driver_name, it->board_name) == 0) |
1148 |
+ break; |
1149 |
+ module_put(driv->module); |
1150 |
+ } |
1151 |
+diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c |
1152 |
+index 654755a..333c8d0 100644 |
1153 |
+--- a/drivers/tty/serial/pmac_zilog.c |
1154 |
++++ b/drivers/tty/serial/pmac_zilog.c |
1155 |
+@@ -1348,10 +1348,16 @@ static int pmz_verify_port(struct uart_port *port, struct serial_struct *ser) |
1156 |
+ static int pmz_poll_get_char(struct uart_port *port) |
1157 |
+ { |
1158 |
+ struct uart_pmac_port *uap = (struct uart_pmac_port *)port; |
1159 |
++ int tries = 2; |
1160 |
+ |
1161 |
+- while ((read_zsreg(uap, R0) & Rx_CH_AV) == 0) |
1162 |
+- udelay(5); |
1163 |
+- return read_zsdata(uap); |
1164 |
++ while (tries) { |
1165 |
++ if ((read_zsreg(uap, R0) & Rx_CH_AV) != 0) |
1166 |
++ return read_zsdata(uap); |
1167 |
++ if (tries--) |
1168 |
++ udelay(5); |
1169 |
++ } |
1170 |
++ |
1171 |
++ return NO_POLL_CHAR; |
1172 |
+ } |
1173 |
+ |
1174 |
+ static void pmz_poll_put_char(struct uart_port *port, unsigned char c) |
1175 |
+diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c |
1176 |
+index 5b46f02..5617467 100644 |
1177 |
+--- a/drivers/usb/gadget/u_ether.c |
1178 |
++++ b/drivers/usb/gadget/u_ether.c |
1179 |
+@@ -669,6 +669,8 @@ static int eth_stop(struct net_device *net) |
1180 |
+ spin_lock_irqsave(&dev->lock, flags); |
1181 |
+ if (dev->port_usb) { |
1182 |
+ struct gether *link = dev->port_usb; |
1183 |
++ const struct usb_endpoint_descriptor *in; |
1184 |
++ const struct usb_endpoint_descriptor *out; |
1185 |
+ |
1186 |
+ if (link->close) |
1187 |
+ link->close(link); |
1188 |
+@@ -682,10 +684,14 @@ static int eth_stop(struct net_device *net) |
1189 |
+ * their own pace; the network stack can handle old packets. |
1190 |
+ * For the moment we leave this here, since it works. |
1191 |
+ */ |
1192 |
++ in = link->in_ep->desc; |
1193 |
++ out = link->out_ep->desc; |
1194 |
+ usb_ep_disable(link->in_ep); |
1195 |
+ usb_ep_disable(link->out_ep); |
1196 |
+ if (netif_carrier_ok(net)) { |
1197 |
+ DBG(dev, "host still using in/out endpoints\n"); |
1198 |
++ link->in_ep->desc = in; |
1199 |
++ link->out_ep->desc = out; |
1200 |
+ usb_ep_enable(link->in_ep); |
1201 |
+ usb_ep_enable(link->out_ep); |
1202 |
+ } |
1203 |
+diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c |
1204 |
+index df0828c..c5e9e4a 100644 |
1205 |
+--- a/drivers/usb/host/pci-quirks.c |
1206 |
++++ b/drivers/usb/host/pci-quirks.c |
1207 |
+@@ -800,6 +800,13 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev) |
1208 |
+ } |
1209 |
+ EXPORT_SYMBOL_GPL(usb_enable_xhci_ports); |
1210 |
+ |
1211 |
++void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) |
1212 |
++{ |
1213 |
++ pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, 0x0); |
1214 |
++ pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, 0x0); |
1215 |
++} |
1216 |
++EXPORT_SYMBOL_GPL(usb_disable_xhci_ports); |
1217 |
++ |
1218 |
+ /** |
1219 |
+ * PCI Quirks for xHCI. |
1220 |
+ * |
1221 |
+diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h |
1222 |
+index b1002a8..ef004a5 100644 |
1223 |
+--- a/drivers/usb/host/pci-quirks.h |
1224 |
++++ b/drivers/usb/host/pci-quirks.h |
1225 |
+@@ -10,6 +10,7 @@ void usb_amd_quirk_pll_disable(void); |
1226 |
+ void usb_amd_quirk_pll_enable(void); |
1227 |
+ bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); |
1228 |
+ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); |
1229 |
++void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); |
1230 |
+ #else |
1231 |
+ static inline void usb_amd_quirk_pll_disable(void) {} |
1232 |
+ static inline void usb_amd_quirk_pll_enable(void) {} |
1233 |
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c |
1234 |
+index 18b231b..9bfd4ca11 100644 |
1235 |
+--- a/drivers/usb/host/xhci-pci.c |
1236 |
++++ b/drivers/usb/host/xhci-pci.c |
1237 |
+@@ -94,11 +94,21 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) |
1238 |
+ xhci->quirks |= XHCI_EP_LIMIT_QUIRK; |
1239 |
+ xhci->limit_active_eps = 64; |
1240 |
+ xhci->quirks |= XHCI_SW_BW_CHECKING; |
1241 |
++ /* |
1242 |
++ * PPT desktop boards DH77EB and DH77DF will power back on after |
1243 |
++ * a few seconds of being shutdown. The fix for this is to |
1244 |
++ * switch the ports from xHCI to EHCI on shutdown. We can't use |
1245 |
++ * DMI information to find those particular boards (since each |
1246 |
++ * vendor will change the board name), so we have to key off all |
1247 |
++ * PPT chipsets. |
1248 |
++ */ |
1249 |
++ xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
1250 |
+ } |
1251 |
+ if (pdev->vendor == PCI_VENDOR_ID_ETRON && |
1252 |
+ pdev->device == PCI_DEVICE_ID_ASROCK_P67) { |
1253 |
+ xhci->quirks |= XHCI_RESET_ON_RESUME; |
1254 |
+ xhci_dbg(xhci, "QUIRK: Resetting on resume\n"); |
1255 |
++ xhci->quirks |= XHCI_TRUST_TX_LENGTH; |
1256 |
+ } |
1257 |
+ if (pdev->vendor == PCI_VENDOR_ID_VIA) |
1258 |
+ xhci->quirks |= XHCI_RESET_ON_RESUME; |
1259 |
+diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c |
1260 |
+index 8275645..6ec3633 100644 |
1261 |
+--- a/drivers/usb/host/xhci-ring.c |
1262 |
++++ b/drivers/usb/host/xhci-ring.c |
1263 |
+@@ -145,29 +145,37 @@ static void next_trb(struct xhci_hcd *xhci, |
1264 |
+ */ |
1265 |
+ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) |
1266 |
+ { |
1267 |
+- union xhci_trb *next; |
1268 |
+ unsigned long long addr; |
1269 |
+ |
1270 |
+ ring->deq_updates++; |
1271 |
+ |
1272 |
+- /* If this is not event ring, there is one more usable TRB */ |
1273 |
++ /* |
1274 |
++ * If this is not event ring, and the dequeue pointer |
1275 |
++ * is not on a link TRB, there is one more usable TRB |
1276 |
++ */ |
1277 |
+ if (ring->type != TYPE_EVENT && |
1278 |
+ !last_trb(xhci, ring, ring->deq_seg, ring->dequeue)) |
1279 |
+ ring->num_trbs_free++; |
1280 |
+- next = ++(ring->dequeue); |
1281 |
+ |
1282 |
+- /* Update the dequeue pointer further if that was a link TRB or we're at |
1283 |
+- * the end of an event ring segment (which doesn't have link TRBS) |
1284 |
+- */ |
1285 |
+- while (last_trb(xhci, ring, ring->deq_seg, next)) { |
1286 |
+- if (ring->type == TYPE_EVENT && last_trb_on_last_seg(xhci, |
1287 |
+- ring, ring->deq_seg, next)) { |
1288 |
+- ring->cycle_state = (ring->cycle_state ? 0 : 1); |
1289 |
++ do { |
1290 |
++ /* |
1291 |
++ * Update the dequeue pointer further if that was a link TRB or |
1292 |
++ * we're at the end of an event ring segment (which doesn't have |
1293 |
++ * link TRBS) |
1294 |
++ */ |
1295 |
++ if (last_trb(xhci, ring, ring->deq_seg, ring->dequeue)) { |
1296 |
++ if (ring->type == TYPE_EVENT && |
1297 |
++ last_trb_on_last_seg(xhci, ring, |
1298 |
++ ring->deq_seg, ring->dequeue)) { |
1299 |
++ ring->cycle_state = (ring->cycle_state ? 0 : 1); |
1300 |
++ } |
1301 |
++ ring->deq_seg = ring->deq_seg->next; |
1302 |
++ ring->dequeue = ring->deq_seg->trbs; |
1303 |
++ } else { |
1304 |
++ ring->dequeue++; |
1305 |
+ } |
1306 |
+- ring->deq_seg = ring->deq_seg->next; |
1307 |
+- ring->dequeue = ring->deq_seg->trbs; |
1308 |
+- next = ring->dequeue; |
1309 |
+- } |
1310 |
++ } while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue)); |
1311 |
++ |
1312 |
+ addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue); |
1313 |
+ } |
1314 |
+ |
1315 |
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
1316 |
+index a979cd0..81aa10c 100644 |
1317 |
+--- a/drivers/usb/host/xhci.c |
1318 |
++++ b/drivers/usb/host/xhci.c |
1319 |
+@@ -166,7 +166,7 @@ int xhci_reset(struct xhci_hcd *xhci) |
1320 |
+ xhci_writel(xhci, command, &xhci->op_regs->command); |
1321 |
+ |
1322 |
+ ret = handshake(xhci, &xhci->op_regs->command, |
1323 |
+- CMD_RESET, 0, 250 * 1000); |
1324 |
++ CMD_RESET, 0, 10 * 1000 * 1000); |
1325 |
+ if (ret) |
1326 |
+ return ret; |
1327 |
+ |
1328 |
+@@ -175,7 +175,8 @@ int xhci_reset(struct xhci_hcd *xhci) |
1329 |
+ * xHCI cannot write to any doorbells or operational registers other |
1330 |
+ * than status until the "Controller Not Ready" flag is cleared. |
1331 |
+ */ |
1332 |
+- ret = handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000); |
1333 |
++ ret = handshake(xhci, &xhci->op_regs->status, |
1334 |
++ STS_CNR, 0, 10 * 1000 * 1000); |
1335 |
+ |
1336 |
+ for (i = 0; i < 2; ++i) { |
1337 |
+ xhci->bus_state[i].port_c_suspend = 0; |
1338 |
+@@ -658,6 +659,9 @@ void xhci_shutdown(struct usb_hcd *hcd) |
1339 |
+ { |
1340 |
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
1341 |
+ |
1342 |
++ if (xhci->quirks && XHCI_SPURIOUS_REBOOT) |
1343 |
++ usb_disable_xhci_ports(to_pci_dev(hcd->self.controller)); |
1344 |
++ |
1345 |
+ spin_lock_irq(&xhci->lock); |
1346 |
+ xhci_halt(xhci); |
1347 |
+ spin_unlock_irq(&xhci->lock); |
1348 |
+diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h |
1349 |
+index 55c0785..27497d3 100644 |
1350 |
+--- a/drivers/usb/host/xhci.h |
1351 |
++++ b/drivers/usb/host/xhci.h |
1352 |
+@@ -1494,6 +1494,7 @@ struct xhci_hcd { |
1353 |
+ #define XHCI_TRUST_TX_LENGTH (1 << 10) |
1354 |
+ #define XHCI_LPM_SUPPORT (1 << 11) |
1355 |
+ #define XHCI_INTEL_HOST (1 << 12) |
1356 |
++#define XHCI_SPURIOUS_REBOOT (1 << 13) |
1357 |
+ unsigned int num_active_eps; |
1358 |
+ unsigned int limit_active_eps; |
1359 |
+ /* There are two roothubs to keep track of bus suspend info for */ |
1360 |
+diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
1361 |
+index bc912e5..5620db6 100644 |
1362 |
+--- a/drivers/usb/serial/ftdi_sio.c |
1363 |
++++ b/drivers/usb/serial/ftdi_sio.c |
1364 |
+@@ -811,6 +811,7 @@ static struct usb_device_id id_table_combined [] = { |
1365 |
+ { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, |
1366 |
+ { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, |
1367 |
+ { USB_DEVICE(PI_VID, PI_E861_PID) }, |
1368 |
++ { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) }, |
1369 |
+ { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, |
1370 |
+ { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), |
1371 |
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
1372 |
+diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h |
1373 |
+index 5661c7e..5dd96ca 100644 |
1374 |
+--- a/drivers/usb/serial/ftdi_sio_ids.h |
1375 |
++++ b/drivers/usb/serial/ftdi_sio_ids.h |
1376 |
+@@ -795,6 +795,13 @@ |
1377 |
+ #define PI_E861_PID 0x1008 /* E-861 piezo controller USB connection */ |
1378 |
+ |
1379 |
+ /* |
1380 |
++ * Kondo Kagaku Co.Ltd. |
1381 |
++ * http://www.kondo-robot.com/EN |
1382 |
++ */ |
1383 |
++#define KONDO_VID 0x165c |
1384 |
++#define KONDO_USB_SERIAL_PID 0x0002 |
1385 |
++ |
1386 |
++/* |
1387 |
+ * Bayer Ascensia Contour blood glucose meter USB-converter cable. |
1388 |
+ * http://winglucofacts.com/cables/ |
1389 |
+ */ |
1390 |
+diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c |
1391 |
+index 57eca24..009c1d9 100644 |
1392 |
+--- a/drivers/usb/serial/mos7840.c |
1393 |
++++ b/drivers/usb/serial/mos7840.c |
1394 |
+@@ -1232,9 +1232,12 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty) |
1395 |
+ return 0; |
1396 |
+ |
1397 |
+ spin_lock_irqsave(&mos7840_port->pool_lock, flags); |
1398 |
+- for (i = 0; i < NUM_URBS; ++i) |
1399 |
+- if (mos7840_port->busy[i]) |
1400 |
+- chars += URB_TRANSFER_BUFFER_SIZE; |
1401 |
++ for (i = 0; i < NUM_URBS; ++i) { |
1402 |
++ if (mos7840_port->busy[i]) { |
1403 |
++ struct urb *urb = mos7840_port->write_urb_pool[i]; |
1404 |
++ chars += urb->transfer_buffer_length; |
1405 |
++ } |
1406 |
++ } |
1407 |
+ spin_unlock_irqrestore(&mos7840_port->pool_lock, flags); |
1408 |
+ dbg("%s - returns %d", __func__, chars); |
1409 |
+ return chars; |
1410 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
1411 |
+index 46cee56..d2c2698 100644 |
1412 |
+--- a/drivers/usb/serial/option.c |
1413 |
++++ b/drivers/usb/serial/option.c |
1414 |
+@@ -80,85 +80,9 @@ static void option_instat_callback(struct urb *urb); |
1415 |
+ #define OPTION_PRODUCT_GTM380_MODEM 0x7201 |
1416 |
+ |
1417 |
+ #define HUAWEI_VENDOR_ID 0x12D1 |
1418 |
+-#define HUAWEI_PRODUCT_E600 0x1001 |
1419 |
+-#define HUAWEI_PRODUCT_E220 0x1003 |
1420 |
+-#define HUAWEI_PRODUCT_E220BIS 0x1004 |
1421 |
+-#define HUAWEI_PRODUCT_E1401 0x1401 |
1422 |
+-#define HUAWEI_PRODUCT_E1402 0x1402 |
1423 |
+-#define HUAWEI_PRODUCT_E1403 0x1403 |
1424 |
+-#define HUAWEI_PRODUCT_E1404 0x1404 |
1425 |
+-#define HUAWEI_PRODUCT_E1405 0x1405 |
1426 |
+-#define HUAWEI_PRODUCT_E1406 0x1406 |
1427 |
+-#define HUAWEI_PRODUCT_E1407 0x1407 |
1428 |
+-#define HUAWEI_PRODUCT_E1408 0x1408 |
1429 |
+-#define HUAWEI_PRODUCT_E1409 0x1409 |
1430 |
+-#define HUAWEI_PRODUCT_E140A 0x140A |
1431 |
+-#define HUAWEI_PRODUCT_E140B 0x140B |
1432 |
+-#define HUAWEI_PRODUCT_E140C 0x140C |
1433 |
+-#define HUAWEI_PRODUCT_E140D 0x140D |
1434 |
+-#define HUAWEI_PRODUCT_E140E 0x140E |
1435 |
+-#define HUAWEI_PRODUCT_E140F 0x140F |
1436 |
+-#define HUAWEI_PRODUCT_E1410 0x1410 |
1437 |
+-#define HUAWEI_PRODUCT_E1411 0x1411 |
1438 |
+-#define HUAWEI_PRODUCT_E1412 0x1412 |
1439 |
+-#define HUAWEI_PRODUCT_E1413 0x1413 |
1440 |
+-#define HUAWEI_PRODUCT_E1414 0x1414 |
1441 |
+-#define HUAWEI_PRODUCT_E1415 0x1415 |
1442 |
+-#define HUAWEI_PRODUCT_E1416 0x1416 |
1443 |
+-#define HUAWEI_PRODUCT_E1417 0x1417 |
1444 |
+-#define HUAWEI_PRODUCT_E1418 0x1418 |
1445 |
+-#define HUAWEI_PRODUCT_E1419 0x1419 |
1446 |
+-#define HUAWEI_PRODUCT_E141A 0x141A |
1447 |
+-#define HUAWEI_PRODUCT_E141B 0x141B |
1448 |
+-#define HUAWEI_PRODUCT_E141C 0x141C |
1449 |
+-#define HUAWEI_PRODUCT_E141D 0x141D |
1450 |
+-#define HUAWEI_PRODUCT_E141E 0x141E |
1451 |
+-#define HUAWEI_PRODUCT_E141F 0x141F |
1452 |
+-#define HUAWEI_PRODUCT_E1420 0x1420 |
1453 |
+-#define HUAWEI_PRODUCT_E1421 0x1421 |
1454 |
+-#define HUAWEI_PRODUCT_E1422 0x1422 |
1455 |
+-#define HUAWEI_PRODUCT_E1423 0x1423 |
1456 |
+-#define HUAWEI_PRODUCT_E1424 0x1424 |
1457 |
+-#define HUAWEI_PRODUCT_E1425 0x1425 |
1458 |
+-#define HUAWEI_PRODUCT_E1426 0x1426 |
1459 |
+-#define HUAWEI_PRODUCT_E1427 0x1427 |
1460 |
+-#define HUAWEI_PRODUCT_E1428 0x1428 |
1461 |
+-#define HUAWEI_PRODUCT_E1429 0x1429 |
1462 |
+-#define HUAWEI_PRODUCT_E142A 0x142A |
1463 |
+-#define HUAWEI_PRODUCT_E142B 0x142B |
1464 |
+-#define HUAWEI_PRODUCT_E142C 0x142C |
1465 |
+-#define HUAWEI_PRODUCT_E142D 0x142D |
1466 |
+-#define HUAWEI_PRODUCT_E142E 0x142E |
1467 |
+-#define HUAWEI_PRODUCT_E142F 0x142F |
1468 |
+-#define HUAWEI_PRODUCT_E1430 0x1430 |
1469 |
+-#define HUAWEI_PRODUCT_E1431 0x1431 |
1470 |
+-#define HUAWEI_PRODUCT_E1432 0x1432 |
1471 |
+-#define HUAWEI_PRODUCT_E1433 0x1433 |
1472 |
+-#define HUAWEI_PRODUCT_E1434 0x1434 |
1473 |
+-#define HUAWEI_PRODUCT_E1435 0x1435 |
1474 |
+-#define HUAWEI_PRODUCT_E1436 0x1436 |
1475 |
+-#define HUAWEI_PRODUCT_E1437 0x1437 |
1476 |
+-#define HUAWEI_PRODUCT_E1438 0x1438 |
1477 |
+-#define HUAWEI_PRODUCT_E1439 0x1439 |
1478 |
+-#define HUAWEI_PRODUCT_E143A 0x143A |
1479 |
+-#define HUAWEI_PRODUCT_E143B 0x143B |
1480 |
+-#define HUAWEI_PRODUCT_E143C 0x143C |
1481 |
+-#define HUAWEI_PRODUCT_E143D 0x143D |
1482 |
+-#define HUAWEI_PRODUCT_E143E 0x143E |
1483 |
+-#define HUAWEI_PRODUCT_E143F 0x143F |
1484 |
+ #define HUAWEI_PRODUCT_K4505 0x1464 |
1485 |
+ #define HUAWEI_PRODUCT_K3765 0x1465 |
1486 |
+-#define HUAWEI_PRODUCT_E14AC 0x14AC |
1487 |
+-#define HUAWEI_PRODUCT_K3806 0x14AE |
1488 |
+ #define HUAWEI_PRODUCT_K4605 0x14C6 |
1489 |
+-#define HUAWEI_PRODUCT_K5005 0x14C8 |
1490 |
+-#define HUAWEI_PRODUCT_K3770 0x14C9 |
1491 |
+-#define HUAWEI_PRODUCT_K3771 0x14CA |
1492 |
+-#define HUAWEI_PRODUCT_K4510 0x14CB |
1493 |
+-#define HUAWEI_PRODUCT_K4511 0x14CC |
1494 |
+-#define HUAWEI_PRODUCT_ETS1220 0x1803 |
1495 |
+-#define HUAWEI_PRODUCT_E353 0x1506 |
1496 |
+-#define HUAWEI_PRODUCT_E173S 0x1C05 |
1497 |
+ |
1498 |
+ #define QUANTA_VENDOR_ID 0x0408 |
1499 |
+ #define QUANTA_PRODUCT_Q101 0xEA02 |
1500 |
+@@ -615,104 +539,123 @@ static const struct usb_device_id option_ids[] = { |
1501 |
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) }, |
1502 |
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) }, |
1503 |
+ { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) }, |
1504 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
1505 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
1506 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
1507 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) }, |
1508 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1402, 0xff, 0xff, 0xff) }, |
1509 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) }, |
1510 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1404, 0xff, 0xff, 0xff) }, |
1511 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) }, |
1512 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) }, |
1513 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1407, 0xff, 0xff, 0xff) }, |
1514 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) }, |
1515 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) }, |
1516 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140A, 0xff, 0xff, 0xff) }, |
1517 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140B, 0xff, 0xff, 0xff) }, |
1518 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140C, 0xff, 0xff, 0xff) }, |
1519 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140D, 0xff, 0xff, 0xff) }, |
1520 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140E, 0xff, 0xff, 0xff) }, |
1521 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140F, 0xff, 0xff, 0xff) }, |
1522 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) }, |
1523 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) }, |
1524 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) }, |
1525 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) }, |
1526 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) }, |
1527 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) }, |
1528 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) }, |
1529 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) }, |
1530 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) }, |
1531 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) }, |
1532 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141A, 0xff, 0xff, 0xff) }, |
1533 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141B, 0xff, 0xff, 0xff) }, |
1534 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141C, 0xff, 0xff, 0xff) }, |
1535 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141D, 0xff, 0xff, 0xff) }, |
1536 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141E, 0xff, 0xff, 0xff) }, |
1537 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141F, 0xff, 0xff, 0xff) }, |
1538 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1420, 0xff, 0xff, 0xff) }, |
1539 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1421, 0xff, 0xff, 0xff) }, |
1540 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1422, 0xff, 0xff, 0xff) }, |
1541 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1423, 0xff, 0xff, 0xff) }, |
1542 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1424, 0xff, 0xff, 0xff) }, |
1543 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1425, 0xff, 0xff, 0xff) }, |
1544 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1426, 0xff, 0xff, 0xff) }, |
1545 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1427, 0xff, 0xff, 0xff) }, |
1546 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1428, 0xff, 0xff, 0xff) }, |
1547 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1429, 0xff, 0xff, 0xff) }, |
1548 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142A, 0xff, 0xff, 0xff) }, |
1549 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142B, 0xff, 0xff, 0xff) }, |
1550 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142C, 0xff, 0xff, 0xff) }, |
1551 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142D, 0xff, 0xff, 0xff) }, |
1552 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142E, 0xff, 0xff, 0xff) }, |
1553 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142F, 0xff, 0xff, 0xff) }, |
1554 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1430, 0xff, 0xff, 0xff) }, |
1555 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1431, 0xff, 0xff, 0xff) }, |
1556 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1432, 0xff, 0xff, 0xff) }, |
1557 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1433, 0xff, 0xff, 0xff) }, |
1558 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1434, 0xff, 0xff, 0xff) }, |
1559 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1435, 0xff, 0xff, 0xff) }, |
1560 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1436, 0xff, 0xff, 0xff) }, |
1561 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1437, 0xff, 0xff, 0xff) }, |
1562 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1438, 0xff, 0xff, 0xff) }, |
1563 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1439, 0xff, 0xff, 0xff) }, |
1564 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143A, 0xff, 0xff, 0xff) }, |
1565 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143B, 0xff, 0xff, 0xff) }, |
1566 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143C, 0xff, 0xff, 0xff) }, |
1567 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, |
1568 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, |
1569 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, |
1570 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S, 0xff, 0xff, 0xff) }, |
1571 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff), |
1572 |
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
1573 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff), |
1574 |
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
1575 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, |
1576 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) }, |
1577 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, |
1578 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), |
1579 |
+ .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, |
1580 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) }, |
1581 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) }, |
1582 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) }, |
1583 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) }, |
1584 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) }, |
1585 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, |
1586 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, |
1587 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, |
1588 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x32) }, |
1589 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x31) }, |
1590 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x32) }, |
1591 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x31) }, |
1592 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x32) }, |
1593 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x01) }, |
1594 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x02) }, |
1595 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x03) }, |
1596 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x10) }, |
1597 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x12) }, |
1598 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x13) }, |
1599 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x01) }, /* E398 3G Modem */ |
1600 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x02) }, /* E398 3G PC UI Interface */ |
1601 |
+- { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x03) }, /* E398 3G Application Interface */ |
1602 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) }, |
1603 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x01) }, |
1604 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x02) }, |
1605 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x03) }, |
1606 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x04) }, |
1607 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x05) }, |
1608 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x06) }, |
1609 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0A) }, |
1610 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0B) }, |
1611 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0D) }, |
1612 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0E) }, |
1613 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0F) }, |
1614 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x10) }, |
1615 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x12) }, |
1616 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x13) }, |
1617 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x14) }, |
1618 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x15) }, |
1619 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x17) }, |
1620 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x18) }, |
1621 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x19) }, |
1622 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1A) }, |
1623 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1B) }, |
1624 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1C) }, |
1625 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x31) }, |
1626 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x32) }, |
1627 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x33) }, |
1628 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x34) }, |
1629 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x35) }, |
1630 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x36) }, |
1631 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3A) }, |
1632 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3B) }, |
1633 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3D) }, |
1634 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3E) }, |
1635 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3F) }, |
1636 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x48) }, |
1637 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x49) }, |
1638 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4A) }, |
1639 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4B) }, |
1640 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4C) }, |
1641 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x61) }, |
1642 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x62) }, |
1643 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x63) }, |
1644 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x64) }, |
1645 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x65) }, |
1646 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x66) }, |
1647 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6A) }, |
1648 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6B) }, |
1649 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6D) }, |
1650 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6E) }, |
1651 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6F) }, |
1652 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x78) }, |
1653 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x79) }, |
1654 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7A) }, |
1655 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7B) }, |
1656 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7C) }, |
1657 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x01) }, |
1658 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x02) }, |
1659 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x03) }, |
1660 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x04) }, |
1661 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x05) }, |
1662 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x06) }, |
1663 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0A) }, |
1664 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0B) }, |
1665 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0D) }, |
1666 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0E) }, |
1667 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0F) }, |
1668 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x10) }, |
1669 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x12) }, |
1670 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x13) }, |
1671 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x14) }, |
1672 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x15) }, |
1673 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x17) }, |
1674 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x18) }, |
1675 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x19) }, |
1676 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1A) }, |
1677 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1B) }, |
1678 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1C) }, |
1679 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x31) }, |
1680 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x32) }, |
1681 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x33) }, |
1682 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x34) }, |
1683 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x35) }, |
1684 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x36) }, |
1685 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3A) }, |
1686 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3B) }, |
1687 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3D) }, |
1688 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3E) }, |
1689 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3F) }, |
1690 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x48) }, |
1691 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x49) }, |
1692 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4A) }, |
1693 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4B) }, |
1694 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4C) }, |
1695 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x61) }, |
1696 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x62) }, |
1697 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x63) }, |
1698 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x64) }, |
1699 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x65) }, |
1700 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x66) }, |
1701 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6A) }, |
1702 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6B) }, |
1703 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6D) }, |
1704 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6E) }, |
1705 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6F) }, |
1706 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x78) }, |
1707 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x79) }, |
1708 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) }, |
1709 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) }, |
1710 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) }, |
1711 |
++ |
1712 |
++ |
1713 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, |
1714 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, |
1715 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, |
1716 |
+@@ -943,6 +886,8 @@ static const struct usb_device_id option_ids[] = { |
1717 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff), |
1718 |
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
1719 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, |
1720 |
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff), |
1721 |
++ .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, |
1722 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) }, |
1723 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) }, |
1724 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) }, |
1725 |
+diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c |
1726 |
+index d23b31c..1b50890 100644 |
1727 |
+--- a/fs/ext4/balloc.c |
1728 |
++++ b/fs/ext4/balloc.c |
1729 |
+@@ -280,14 +280,18 @@ struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb, |
1730 |
+ return desc; |
1731 |
+ } |
1732 |
+ |
1733 |
+-static int ext4_valid_block_bitmap(struct super_block *sb, |
1734 |
+- struct ext4_group_desc *desc, |
1735 |
+- unsigned int block_group, |
1736 |
+- struct buffer_head *bh) |
1737 |
++/* |
1738 |
++ * Return the block number which was discovered to be invalid, or 0 if |
1739 |
++ * the block bitmap is valid. |
1740 |
++ */ |
1741 |
++static ext4_fsblk_t ext4_valid_block_bitmap(struct super_block *sb, |
1742 |
++ struct ext4_group_desc *desc, |
1743 |
++ unsigned int block_group, |
1744 |
++ struct buffer_head *bh) |
1745 |
+ { |
1746 |
+ ext4_grpblk_t offset; |
1747 |
+ ext4_grpblk_t next_zero_bit; |
1748 |
+- ext4_fsblk_t bitmap_blk; |
1749 |
++ ext4_fsblk_t blk; |
1750 |
+ ext4_fsblk_t group_first_block; |
1751 |
+ |
1752 |
+ if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) { |
1753 |
+@@ -297,37 +301,33 @@ static int ext4_valid_block_bitmap(struct super_block *sb, |
1754 |
+ * or it has to also read the block group where the bitmaps |
1755 |
+ * are located to verify they are set. |
1756 |
+ */ |
1757 |
+- return 1; |
1758 |
++ return 0; |
1759 |
+ } |
1760 |
+ group_first_block = ext4_group_first_block_no(sb, block_group); |
1761 |
+ |
1762 |
+ /* check whether block bitmap block number is set */ |
1763 |
+- bitmap_blk = ext4_block_bitmap(sb, desc); |
1764 |
+- offset = bitmap_blk - group_first_block; |
1765 |
++ blk = ext4_block_bitmap(sb, desc); |
1766 |
++ offset = blk - group_first_block; |
1767 |
+ if (!ext4_test_bit(offset, bh->b_data)) |
1768 |
+ /* bad block bitmap */ |
1769 |
+- goto err_out; |
1770 |
++ return blk; |
1771 |
+ |
1772 |
+ /* check whether the inode bitmap block number is set */ |
1773 |
+- bitmap_blk = ext4_inode_bitmap(sb, desc); |
1774 |
+- offset = bitmap_blk - group_first_block; |
1775 |
++ blk = ext4_inode_bitmap(sb, desc); |
1776 |
++ offset = blk - group_first_block; |
1777 |
+ if (!ext4_test_bit(offset, bh->b_data)) |
1778 |
+ /* bad block bitmap */ |
1779 |
+- goto err_out; |
1780 |
++ return blk; |
1781 |
+ |
1782 |
+ /* check whether the inode table block number is set */ |
1783 |
+- bitmap_blk = ext4_inode_table(sb, desc); |
1784 |
+- offset = bitmap_blk - group_first_block; |
1785 |
++ blk = ext4_inode_table(sb, desc); |
1786 |
++ offset = blk - group_first_block; |
1787 |
+ next_zero_bit = ext4_find_next_zero_bit(bh->b_data, |
1788 |
+ offset + EXT4_SB(sb)->s_itb_per_group, |
1789 |
+ offset); |
1790 |
+- if (next_zero_bit >= offset + EXT4_SB(sb)->s_itb_per_group) |
1791 |
+- /* good bitmap for inode tables */ |
1792 |
+- return 1; |
1793 |
+- |
1794 |
+-err_out: |
1795 |
+- ext4_error(sb, "Invalid block bitmap - block_group = %d, block = %llu", |
1796 |
+- block_group, bitmap_blk); |
1797 |
++ if (next_zero_bit < offset + EXT4_SB(sb)->s_itb_per_group) |
1798 |
++ /* bad bitmap for inode tables */ |
1799 |
++ return blk; |
1800 |
+ return 0; |
1801 |
+ } |
1802 |
+ |
1803 |
+@@ -336,14 +336,26 @@ void ext4_validate_block_bitmap(struct super_block *sb, |
1804 |
+ unsigned int block_group, |
1805 |
+ struct buffer_head *bh) |
1806 |
+ { |
1807 |
++ ext4_fsblk_t blk; |
1808 |
++ |
1809 |
+ if (buffer_verified(bh)) |
1810 |
+ return; |
1811 |
+ |
1812 |
+ ext4_lock_group(sb, block_group); |
1813 |
+- if (ext4_valid_block_bitmap(sb, desc, block_group, bh) && |
1814 |
+- ext4_block_bitmap_csum_verify(sb, block_group, desc, bh, |
1815 |
+- EXT4_BLOCKS_PER_GROUP(sb) / 8)) |
1816 |
+- set_buffer_verified(bh); |
1817 |
++ blk = ext4_valid_block_bitmap(sb, desc, block_group, bh); |
1818 |
++ if (unlikely(blk != 0)) { |
1819 |
++ ext4_unlock_group(sb, block_group); |
1820 |
++ ext4_error(sb, "bg %u: block %llu: invalid block bitmap", |
1821 |
++ block_group, blk); |
1822 |
++ return; |
1823 |
++ } |
1824 |
++ if (unlikely(!ext4_block_bitmap_csum_verify(sb, block_group, |
1825 |
++ desc, bh, EXT4_BLOCKS_PER_GROUP(sb) / 8))) { |
1826 |
++ ext4_unlock_group(sb, block_group); |
1827 |
++ ext4_error(sb, "bg %u: bad block bitmap checksum", block_group); |
1828 |
++ return; |
1829 |
++ } |
1830 |
++ set_buffer_verified(bh); |
1831 |
+ ext4_unlock_group(sb, block_group); |
1832 |
+ } |
1833 |
+ |
1834 |
+diff --git a/fs/ext4/bitmap.c b/fs/ext4/bitmap.c |
1835 |
+index a94b9c6..ad9d96e 100644 |
1836 |
+--- a/fs/ext4/bitmap.c |
1837 |
++++ b/fs/ext4/bitmap.c |
1838 |
+@@ -86,7 +86,6 @@ int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group, |
1839 |
+ if (provided == calculated) |
1840 |
+ return 1; |
1841 |
+ |
1842 |
+- ext4_error(sb, "Bad block bitmap checksum: block_group = %u", group); |
1843 |
+ return 0; |
1844 |
+ } |
1845 |
+ |
1846 |
+diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c |
1847 |
+index 58a75fe..9752106 100644 |
1848 |
+--- a/fs/ext4/extents.c |
1849 |
++++ b/fs/ext4/extents.c |
1850 |
+@@ -2663,6 +2663,7 @@ cont: |
1851 |
+ } |
1852 |
+ path[0].p_depth = depth; |
1853 |
+ path[0].p_hdr = ext_inode_hdr(inode); |
1854 |
++ i = 0; |
1855 |
+ |
1856 |
+ if (ext4_ext_check(inode, path[0].p_hdr, depth)) { |
1857 |
+ err = -EIO; |
1858 |
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c |
1859 |
+index 78b7ede..41598ee 100644 |
1860 |
+--- a/fs/ext4/super.c |
1861 |
++++ b/fs/ext4/super.c |
1862 |
+@@ -976,6 +976,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) |
1863 |
+ ei->i_reserved_meta_blocks = 0; |
1864 |
+ ei->i_allocated_meta_blocks = 0; |
1865 |
+ ei->i_da_metadata_calc_len = 0; |
1866 |
++ ei->i_da_metadata_calc_last_lblock = 0; |
1867 |
+ spin_lock_init(&(ei->i_block_reservation_lock)); |
1868 |
+ #ifdef CONFIG_QUOTA |
1869 |
+ ei->i_reserved_quota = 0; |
1870 |
+@@ -3109,6 +3110,10 @@ static int count_overhead(struct super_block *sb, ext4_group_t grp, |
1871 |
+ ext4_group_t i, ngroups = ext4_get_groups_count(sb); |
1872 |
+ int s, j, count = 0; |
1873 |
+ |
1874 |
++ if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) |
1875 |
++ return (ext4_bg_has_super(sb, grp) + ext4_bg_num_gdb(sb, grp) + |
1876 |
++ sbi->s_itb_per_group + 2); |
1877 |
++ |
1878 |
+ first_block = le32_to_cpu(sbi->s_es->s_first_data_block) + |
1879 |
+ (grp * EXT4_BLOCKS_PER_GROUP(sb)); |
1880 |
+ last_block = first_block + EXT4_BLOCKS_PER_GROUP(sb) - 1; |
1881 |
+@@ -4406,6 +4411,7 @@ static void ext4_clear_journal_err(struct super_block *sb, |
1882 |
+ ext4_commit_super(sb, 1); |
1883 |
+ |
1884 |
+ jbd2_journal_clear_err(journal); |
1885 |
++ jbd2_journal_update_sb_errno(journal); |
1886 |
+ } |
1887 |
+ } |
1888 |
+ |
1889 |
+diff --git a/fs/fuse/file.c b/fs/fuse/file.c |
1890 |
+index b321a68..514f12a 100644 |
1891 |
+--- a/fs/fuse/file.c |
1892 |
++++ b/fs/fuse/file.c |
1893 |
+@@ -1700,7 +1700,7 @@ static int fuse_verify_ioctl_iov(struct iovec *iov, size_t count) |
1894 |
+ size_t n; |
1895 |
+ u32 max = FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT; |
1896 |
+ |
1897 |
+- for (n = 0; n < count; n++) { |
1898 |
++ for (n = 0; n < count; n++, iov++) { |
1899 |
+ if (iov->iov_len > (size_t) max) |
1900 |
+ return -ENOMEM; |
1901 |
+ max -= iov->iov_len; |
1902 |
+diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c |
1903 |
+index e9a3c4c..bd23f2e 100644 |
1904 |
+--- a/fs/jbd2/journal.c |
1905 |
++++ b/fs/jbd2/journal.c |
1906 |
+@@ -1377,7 +1377,7 @@ static void jbd2_mark_journal_empty(journal_t *journal) |
1907 |
+ * Update a journal's errno. Write updated superblock to disk waiting for IO |
1908 |
+ * to complete. |
1909 |
+ */ |
1910 |
+-static void jbd2_journal_update_sb_errno(journal_t *journal) |
1911 |
++void jbd2_journal_update_sb_errno(journal_t *journal) |
1912 |
+ { |
1913 |
+ journal_superblock_t *sb = journal->j_superblock; |
1914 |
+ |
1915 |
+@@ -1390,6 +1390,7 @@ static void jbd2_journal_update_sb_errno(journal_t *journal) |
1916 |
+ |
1917 |
+ jbd2_write_superblock(journal, WRITE_SYNC); |
1918 |
+ } |
1919 |
++EXPORT_SYMBOL(jbd2_journal_update_sb_errno); |
1920 |
+ |
1921 |
+ /* |
1922 |
+ * Read the superblock for a given journal, performing initial |
1923 |
+diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h |
1924 |
+index a7aec39..bae1d11 100644 |
1925 |
+--- a/include/drm/drm_pciids.h |
1926 |
++++ b/include/drm/drm_pciids.h |
1927 |
+@@ -213,9 +213,12 @@ |
1928 |
+ {0x1002, 0x6800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1929 |
+ {0x1002, 0x6801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1930 |
+ {0x1002, 0x6802, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1931 |
++ {0x1002, 0x6806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1932 |
+ {0x1002, 0x6808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1933 |
+ {0x1002, 0x6809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1934 |
+ {0x1002, 0x6810, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1935 |
++ {0x1002, 0x6816, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1936 |
++ {0x1002, 0x6817, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1937 |
+ {0x1002, 0x6818, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1938 |
+ {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ |
1939 |
+ {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
1940 |
+diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h |
1941 |
+index f334c7f..3efc43f 100644 |
1942 |
+--- a/include/linux/jbd2.h |
1943 |
++++ b/include/linux/jbd2.h |
1944 |
+@@ -1125,6 +1125,7 @@ extern int jbd2_journal_destroy (journal_t *); |
1945 |
+ extern int jbd2_journal_recover (journal_t *journal); |
1946 |
+ extern int jbd2_journal_wipe (journal_t *, int); |
1947 |
+ extern int jbd2_journal_skip_recovery (journal_t *); |
1948 |
++extern void jbd2_journal_update_sb_errno(journal_t *); |
1949 |
+ extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, |
1950 |
+ unsigned long, int); |
1951 |
+ extern void __jbd2_journal_abort_hard (journal_t *); |
1952 |
+diff --git a/include/linux/usb.h b/include/linux/usb.h |
1953 |
+index 72a0e7d..3049707 100644 |
1954 |
+--- a/include/linux/usb.h |
1955 |
++++ b/include/linux/usb.h |
1956 |
+@@ -828,6 +828,27 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) |
1957 |
+ .bInterfaceSubClass = (sc), \ |
1958 |
+ .bInterfaceProtocol = (pr) |
1959 |
+ |
1960 |
++/** |
1961 |
++ * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces |
1962 |
++ * @vend: the 16 bit USB Vendor ID |
1963 |
++ * @cl: bInterfaceClass value |
1964 |
++ * @sc: bInterfaceSubClass value |
1965 |
++ * @pr: bInterfaceProtocol value |
1966 |
++ * |
1967 |
++ * This macro is used to create a struct usb_device_id that matches a |
1968 |
++ * specific vendor with a specific class of interfaces. |
1969 |
++ * |
1970 |
++ * This is especially useful when explicitly matching devices that have |
1971 |
++ * vendor specific bDeviceClass values, but standards-compliant interfaces. |
1972 |
++ */ |
1973 |
++#define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \ |
1974 |
++ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ |
1975 |
++ | USB_DEVICE_ID_MATCH_VENDOR, \ |
1976 |
++ .idVendor = (vend), \ |
1977 |
++ .bInterfaceClass = (cl), \ |
1978 |
++ .bInterfaceSubClass = (sc), \ |
1979 |
++ .bInterfaceProtocol = (pr) |
1980 |
++ |
1981 |
+ /* ----------------------------------------------------------------------- */ |
1982 |
+ |
1983 |
+ /* Stuff for dynamic usb ids */ |
1984 |
+diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c |
1985 |
+index d51b7c7..0cc99a3 100644 |
1986 |
+--- a/security/yama/yama_lsm.c |
1987 |
++++ b/security/yama/yama_lsm.c |
1988 |
+@@ -279,12 +279,9 @@ static int yama_ptrace_access_check(struct task_struct *child, |
1989 |
+ } |
1990 |
+ |
1991 |
+ if (rc) { |
1992 |
+- char name[sizeof(current->comm)]; |
1993 |
+ printk_ratelimited(KERN_NOTICE |
1994 |
+ "ptrace of pid %d was attempted by: %s (pid %d)\n", |
1995 |
+- child->pid, |
1996 |
+- get_task_comm(name, current), |
1997 |
+- current->pid); |
1998 |
++ child->pid, current->comm, current->pid); |
1999 |
+ } |
2000 |
+ |
2001 |
+ return rc; |
2002 |
+@@ -319,12 +316,9 @@ static int yama_ptrace_traceme(struct task_struct *parent) |
2003 |
+ } |
2004 |
+ |
2005 |
+ if (rc) { |
2006 |
+- char name[sizeof(current->comm)]; |
2007 |
+ printk_ratelimited(KERN_NOTICE |
2008 |
+ "ptraceme of pid %d was attempted by: %s (pid %d)\n", |
2009 |
+- current->pid, |
2010 |
+- get_task_comm(name, parent), |
2011 |
+- parent->pid); |
2012 |
++ current->pid, parent->comm, parent->pid); |
2013 |
+ } |
2014 |
+ |
2015 |
+ return rc; |