1 |
commit: 9520ccf34cc83fdca92b5e074b70bc680ab46054 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 21 17:24:59 2015 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 21 17:24:59 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9520ccf3 |
7 |
|
8 |
Linux patch 3.14.53 |
9 |
|
10 |
0000_README | 4 + |
11 |
1052_linux-3.14.53.patch | 940 +++++++++++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 944 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index 97affdb..3ba7817 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -250,6 +250,10 @@ Patch: 1051_linux-3.14.52.patch |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 3.14.52 |
21 |
|
22 |
+Patch: 1052_linux-3.14.53.patch |
23 |
+From: http://www.kernel.org |
24 |
+Desc: Linux 3.14.53 |
25 |
+ |
26 |
Patch: 1500_XATTR_USER_PREFIX.patch |
27 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
28 |
Desc: Support for namespace user.pax.* on tmpfs. |
29 |
|
30 |
diff --git a/1052_linux-3.14.53.patch b/1052_linux-3.14.53.patch |
31 |
new file mode 100644 |
32 |
index 0000000..857b37d |
33 |
--- /dev/null |
34 |
+++ b/1052_linux-3.14.53.patch |
35 |
@@ -0,0 +1,940 @@ |
36 |
+diff --git a/Documentation/ABI/testing/configfs-usb-gadget-loopback b/Documentation/ABI/testing/configfs-usb-gadget-loopback |
37 |
+index 9aae5bfb9908..06beefbcf061 100644 |
38 |
+--- a/Documentation/ABI/testing/configfs-usb-gadget-loopback |
39 |
++++ b/Documentation/ABI/testing/configfs-usb-gadget-loopback |
40 |
+@@ -5,4 +5,4 @@ Description: |
41 |
+ The attributes: |
42 |
+ |
43 |
+ qlen - depth of loopback queue |
44 |
+- bulk_buflen - buffer length |
45 |
++ buflen - buffer length |
46 |
+diff --git a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink |
47 |
+index 29477c319f61..bc7ff731aa0c 100644 |
48 |
+--- a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink |
49 |
++++ b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink |
50 |
+@@ -9,4 +9,4 @@ Description: |
51 |
+ isoc_maxpacket - 0 - 1023 (fs), 0 - 1024 (hs/ss) |
52 |
+ isoc_mult - 0..2 (hs/ss only) |
53 |
+ isoc_maxburst - 0..15 (ss only) |
54 |
+- qlen - buffer length |
55 |
++ buflen - buffer length |
56 |
+diff --git a/Makefile b/Makefile |
57 |
+index 3a5d4316c4c7..86d227774ae6 100644 |
58 |
+--- a/Makefile |
59 |
++++ b/Makefile |
60 |
+@@ -1,6 +1,6 @@ |
61 |
+ VERSION = 3 |
62 |
+ PATCHLEVEL = 14 |
63 |
+-SUBLEVEL = 52 |
64 |
++SUBLEVEL = 53 |
65 |
+ EXTRAVERSION = |
66 |
+ NAME = Remembering Coco |
67 |
+ |
68 |
+diff --git a/arch/arm/mach-omap2/clockdomains7xx_data.c b/arch/arm/mach-omap2/clockdomains7xx_data.c |
69 |
+index 57d5df0c1fbd..7581e036bda6 100644 |
70 |
+--- a/arch/arm/mach-omap2/clockdomains7xx_data.c |
71 |
++++ b/arch/arm/mach-omap2/clockdomains7xx_data.c |
72 |
+@@ -331,7 +331,7 @@ static struct clockdomain l4per2_7xx_clkdm = { |
73 |
+ .dep_bit = DRA7XX_L4PER2_STATDEP_SHIFT, |
74 |
+ .wkdep_srcs = l4per2_wkup_sleep_deps, |
75 |
+ .sleepdep_srcs = l4per2_wkup_sleep_deps, |
76 |
+- .flags = CLKDM_CAN_HWSUP_SWSUP, |
77 |
++ .flags = CLKDM_CAN_SWSUP, |
78 |
+ }; |
79 |
+ |
80 |
+ static struct clockdomain mpu0_7xx_clkdm = { |
81 |
+diff --git a/arch/x86/crypto/ghash-clmulni-intel_glue.c b/arch/x86/crypto/ghash-clmulni-intel_glue.c |
82 |
+index a8d6f69f92a3..4bcf841e4701 100644 |
83 |
+--- a/arch/x86/crypto/ghash-clmulni-intel_glue.c |
84 |
++++ b/arch/x86/crypto/ghash-clmulni-intel_glue.c |
85 |
+@@ -291,6 +291,7 @@ static struct ahash_alg ghash_async_alg = { |
86 |
+ .cra_name = "ghash", |
87 |
+ .cra_driver_name = "ghash-clmulni", |
88 |
+ .cra_priority = 400, |
89 |
++ .cra_ctxsize = sizeof(struct ghash_async_ctx), |
90 |
+ .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC, |
91 |
+ .cra_blocksize = GHASH_BLOCK_SIZE, |
92 |
+ .cra_type = &crypto_ahash_type, |
93 |
+diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c |
94 |
+index aa0779372e3d..dba56fb5e383 100644 |
95 |
+--- a/arch/x86/kvm/mmu.c |
96 |
++++ b/arch/x86/kvm/mmu.c |
97 |
+@@ -381,12 +381,6 @@ static u64 __get_spte_lockless(u64 *sptep) |
98 |
+ { |
99 |
+ return ACCESS_ONCE(*sptep); |
100 |
+ } |
101 |
+- |
102 |
+-static bool __check_direct_spte_mmio_pf(u64 spte) |
103 |
+-{ |
104 |
+- /* It is valid if the spte is zapped. */ |
105 |
+- return spte == 0ull; |
106 |
+-} |
107 |
+ #else |
108 |
+ union split_spte { |
109 |
+ struct { |
110 |
+@@ -502,23 +496,6 @@ retry: |
111 |
+ |
112 |
+ return spte.spte; |
113 |
+ } |
114 |
+- |
115 |
+-static bool __check_direct_spte_mmio_pf(u64 spte) |
116 |
+-{ |
117 |
+- union split_spte sspte = (union split_spte)spte; |
118 |
+- u32 high_mmio_mask = shadow_mmio_mask >> 32; |
119 |
+- |
120 |
+- /* It is valid if the spte is zapped. */ |
121 |
+- if (spte == 0ull) |
122 |
+- return true; |
123 |
+- |
124 |
+- /* It is valid if the spte is being zapped. */ |
125 |
+- if (sspte.spte_low == 0ull && |
126 |
+- (sspte.spte_high & high_mmio_mask) == high_mmio_mask) |
127 |
+- return true; |
128 |
+- |
129 |
+- return false; |
130 |
+-} |
131 |
+ #endif |
132 |
+ |
133 |
+ static bool spte_is_locklessly_modifiable(u64 spte) |
134 |
+@@ -3215,21 +3192,6 @@ static bool quickly_check_mmio_pf(struct kvm_vcpu *vcpu, u64 addr, bool direct) |
135 |
+ return vcpu_match_mmio_gva(vcpu, addr); |
136 |
+ } |
137 |
+ |
138 |
+- |
139 |
+-/* |
140 |
+- * On direct hosts, the last spte is only allows two states |
141 |
+- * for mmio page fault: |
142 |
+- * - It is the mmio spte |
143 |
+- * - It is zapped or it is being zapped. |
144 |
+- * |
145 |
+- * This function completely checks the spte when the last spte |
146 |
+- * is not the mmio spte. |
147 |
+- */ |
148 |
+-static bool check_direct_spte_mmio_pf(u64 spte) |
149 |
+-{ |
150 |
+- return __check_direct_spte_mmio_pf(spte); |
151 |
+-} |
152 |
+- |
153 |
+ static u64 walk_shadow_page_get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr) |
154 |
+ { |
155 |
+ struct kvm_shadow_walk_iterator iterator; |
156 |
+@@ -3272,13 +3234,6 @@ int handle_mmio_page_fault_common(struct kvm_vcpu *vcpu, u64 addr, bool direct) |
157 |
+ } |
158 |
+ |
159 |
+ /* |
160 |
+- * It's ok if the gva is remapped by other cpus on shadow guest, |
161 |
+- * it's a BUG if the gfn is not a mmio page. |
162 |
+- */ |
163 |
+- if (direct && !check_direct_spte_mmio_pf(spte)) |
164 |
+- return RET_MMIO_PF_BUG; |
165 |
+- |
166 |
+- /* |
167 |
+ * If the page table is zapped by other cpus, let CPU fault again on |
168 |
+ * the address. |
169 |
+ */ |
170 |
+diff --git a/arch/xtensa/include/asm/traps.h b/arch/xtensa/include/asm/traps.h |
171 |
+index 677bfcf4ee5d..28f33a8b7f5f 100644 |
172 |
+--- a/arch/xtensa/include/asm/traps.h |
173 |
++++ b/arch/xtensa/include/asm/traps.h |
174 |
+@@ -25,30 +25,39 @@ static inline void spill_registers(void) |
175 |
+ { |
176 |
+ #if XCHAL_NUM_AREGS > 16 |
177 |
+ __asm__ __volatile__ ( |
178 |
+- " call12 1f\n" |
179 |
++ " call8 1f\n" |
180 |
+ " _j 2f\n" |
181 |
+ " retw\n" |
182 |
+ " .align 4\n" |
183 |
+ "1:\n" |
184 |
++#if XCHAL_NUM_AREGS == 32 |
185 |
++ " _entry a1, 32\n" |
186 |
++ " addi a8, a0, 3\n" |
187 |
++ " _entry a1, 16\n" |
188 |
++ " mov a12, a12\n" |
189 |
++ " retw\n" |
190 |
++#else |
191 |
+ " _entry a1, 48\n" |
192 |
+- " addi a12, a0, 3\n" |
193 |
+-#if XCHAL_NUM_AREGS > 32 |
194 |
+- " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n" |
195 |
++ " call12 1f\n" |
196 |
++ " retw\n" |
197 |
++ " .align 4\n" |
198 |
++ "1:\n" |
199 |
++ " .rept (" __stringify(XCHAL_NUM_AREGS) " - 16) / 12\n" |
200 |
+ " _entry a1, 48\n" |
201 |
+ " mov a12, a0\n" |
202 |
+ " .endr\n" |
203 |
+-#endif |
204 |
+- " _entry a1, 48\n" |
205 |
++ " _entry a1, 16\n" |
206 |
+ #if XCHAL_NUM_AREGS % 12 == 0 |
207 |
+- " mov a8, a8\n" |
208 |
+-#elif XCHAL_NUM_AREGS % 12 == 4 |
209 |
+ " mov a12, a12\n" |
210 |
+-#elif XCHAL_NUM_AREGS % 12 == 8 |
211 |
++#elif XCHAL_NUM_AREGS % 12 == 4 |
212 |
+ " mov a4, a4\n" |
213 |
++#elif XCHAL_NUM_AREGS % 12 == 8 |
214 |
++ " mov a8, a8\n" |
215 |
+ #endif |
216 |
+ " retw\n" |
217 |
++#endif |
218 |
+ "2:\n" |
219 |
+- : : : "a12", "a13", "memory"); |
220 |
++ : : : "a8", "a9", "memory"); |
221 |
+ #else |
222 |
+ __asm__ __volatile__ ( |
223 |
+ " mov a12, a12\n" |
224 |
+diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S |
225 |
+index a06b7efaae82..cf8a354fa628 100644 |
226 |
+--- a/arch/xtensa/kernel/entry.S |
227 |
++++ b/arch/xtensa/kernel/entry.S |
228 |
+@@ -568,12 +568,13 @@ user_exception_exit: |
229 |
+ * (if we have restored WSBITS-1 frames). |
230 |
+ */ |
231 |
+ |
232 |
++2: |
233 |
+ #if XCHAL_HAVE_THREADPTR |
234 |
+ l32i a3, a1, PT_THREADPTR |
235 |
+ wur a3, threadptr |
236 |
+ #endif |
237 |
+ |
238 |
+-2: j common_exception_exit |
239 |
++ j common_exception_exit |
240 |
+ |
241 |
+ /* This is the kernel exception exit. |
242 |
+ * We avoided to do a MOVSP when we entered the exception, but we |
243 |
+@@ -1792,7 +1793,7 @@ ENDPROC(system_call) |
244 |
+ mov a12, a0 |
245 |
+ .endr |
246 |
+ #endif |
247 |
+- _entry a1, 48 |
248 |
++ _entry a1, 16 |
249 |
+ #if XCHAL_NUM_AREGS % 12 == 0 |
250 |
+ mov a8, a8 |
251 |
+ #elif XCHAL_NUM_AREGS % 12 == 4 |
252 |
+@@ -1816,7 +1817,7 @@ ENDPROC(system_call) |
253 |
+ |
254 |
+ ENTRY(_switch_to) |
255 |
+ |
256 |
+- entry a1, 16 |
257 |
++ entry a1, 48 |
258 |
+ |
259 |
+ mov a11, a3 # and 'next' (a3) |
260 |
+ |
261 |
+diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c |
262 |
+index 5b93852392b8..0d752851a1ee 100644 |
263 |
+--- a/drivers/auxdisplay/ks0108.c |
264 |
++++ b/drivers/auxdisplay/ks0108.c |
265 |
+@@ -139,6 +139,7 @@ static int __init ks0108_init(void) |
266 |
+ |
267 |
+ ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME, |
268 |
+ NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); |
269 |
++ parport_put_port(ks0108_parport); |
270 |
+ if (ks0108_pardevice == NULL) { |
271 |
+ printk(KERN_ERR KS0108_NAME ": ERROR: " |
272 |
+ "parport didn't register new device\n"); |
273 |
+diff --git a/drivers/base/devres.c b/drivers/base/devres.c |
274 |
+index 545c4de412c3..cbe0b58bab3c 100644 |
275 |
+--- a/drivers/base/devres.c |
276 |
++++ b/drivers/base/devres.c |
277 |
+@@ -297,10 +297,10 @@ void * devres_get(struct device *dev, void *new_res, |
278 |
+ if (!dr) { |
279 |
+ add_dr(dev, &new_dr->node); |
280 |
+ dr = new_dr; |
281 |
+- new_dr = NULL; |
282 |
++ new_res = NULL; |
283 |
+ } |
284 |
+ spin_unlock_irqrestore(&dev->devres_lock, flags); |
285 |
+- devres_free(new_dr); |
286 |
++ devres_free(new_res); |
287 |
+ |
288 |
+ return dr->data; |
289 |
+ } |
290 |
+diff --git a/drivers/base/platform.c b/drivers/base/platform.c |
291 |
+index 9dbf4ef2b2a3..57d8f671d1f6 100644 |
292 |
+--- a/drivers/base/platform.c |
293 |
++++ b/drivers/base/platform.c |
294 |
+@@ -354,9 +354,7 @@ int platform_device_add(struct platform_device *pdev) |
295 |
+ |
296 |
+ while (--i >= 0) { |
297 |
+ struct resource *r = &pdev->resource[i]; |
298 |
+- unsigned long type = resource_type(r); |
299 |
+- |
300 |
+- if (type == IORESOURCE_MEM || type == IORESOURCE_IO) |
301 |
++ if (r->parent) |
302 |
+ release_resource(r); |
303 |
+ } |
304 |
+ |
305 |
+@@ -387,9 +385,7 @@ void platform_device_del(struct platform_device *pdev) |
306 |
+ |
307 |
+ for (i = 0; i < pdev->num_resources; i++) { |
308 |
+ struct resource *r = &pdev->resource[i]; |
309 |
+- unsigned long type = resource_type(r); |
310 |
+- |
311 |
+- if (type == IORESOURCE_MEM || type == IORESOURCE_IO) |
312 |
++ if (r->parent) |
313 |
+ release_resource(r); |
314 |
+ } |
315 |
+ } |
316 |
+diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c |
317 |
+index c6e86a9a2aa3..5122ef25f595 100644 |
318 |
+--- a/drivers/clk/versatile/clk-sp810.c |
319 |
++++ b/drivers/clk/versatile/clk-sp810.c |
320 |
+@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec, |
321 |
+ { |
322 |
+ struct clk_sp810 *sp810 = data; |
323 |
+ |
324 |
+- if (WARN_ON(clkspec->args_count != 1 || clkspec->args[0] > |
325 |
+- ARRAY_SIZE(sp810->timerclken))) |
326 |
++ if (WARN_ON(clkspec->args_count != 1 || |
327 |
++ clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken))) |
328 |
+ return NULL; |
329 |
+ |
330 |
+ return sp810->timerclken[clkspec->args[0]].clk; |
331 |
+diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c |
332 |
+index c39c414c7751..8e3267a8bd4f 100644 |
333 |
+--- a/drivers/gpu/drm/qxl/qxl_display.c |
334 |
++++ b/drivers/gpu/drm/qxl/qxl_display.c |
335 |
+@@ -136,9 +136,35 @@ static int qxl_add_monitors_config_modes(struct drm_connector *connector, |
336 |
+ *pwidth = head->width; |
337 |
+ *pheight = head->height; |
338 |
+ drm_mode_probed_add(connector, mode); |
339 |
++ /* remember the last custom size for mode validation */ |
340 |
++ qdev->monitors_config_width = mode->hdisplay; |
341 |
++ qdev->monitors_config_height = mode->vdisplay; |
342 |
+ return 1; |
343 |
+ } |
344 |
+ |
345 |
++static struct mode_size { |
346 |
++ int w; |
347 |
++ int h; |
348 |
++} common_modes[] = { |
349 |
++ { 640, 480}, |
350 |
++ { 720, 480}, |
351 |
++ { 800, 600}, |
352 |
++ { 848, 480}, |
353 |
++ {1024, 768}, |
354 |
++ {1152, 768}, |
355 |
++ {1280, 720}, |
356 |
++ {1280, 800}, |
357 |
++ {1280, 854}, |
358 |
++ {1280, 960}, |
359 |
++ {1280, 1024}, |
360 |
++ {1440, 900}, |
361 |
++ {1400, 1050}, |
362 |
++ {1680, 1050}, |
363 |
++ {1600, 1200}, |
364 |
++ {1920, 1080}, |
365 |
++ {1920, 1200} |
366 |
++}; |
367 |
++ |
368 |
+ static int qxl_add_common_modes(struct drm_connector *connector, |
369 |
+ unsigned pwidth, |
370 |
+ unsigned pheight) |
371 |
+@@ -146,29 +172,6 @@ static int qxl_add_common_modes(struct drm_connector *connector, |
372 |
+ struct drm_device *dev = connector->dev; |
373 |
+ struct drm_display_mode *mode = NULL; |
374 |
+ int i; |
375 |
+- struct mode_size { |
376 |
+- int w; |
377 |
+- int h; |
378 |
+- } common_modes[] = { |
379 |
+- { 640, 480}, |
380 |
+- { 720, 480}, |
381 |
+- { 800, 600}, |
382 |
+- { 848, 480}, |
383 |
+- {1024, 768}, |
384 |
+- {1152, 768}, |
385 |
+- {1280, 720}, |
386 |
+- {1280, 800}, |
387 |
+- {1280, 854}, |
388 |
+- {1280, 960}, |
389 |
+- {1280, 1024}, |
390 |
+- {1440, 900}, |
391 |
+- {1400, 1050}, |
392 |
+- {1680, 1050}, |
393 |
+- {1600, 1200}, |
394 |
+- {1920, 1080}, |
395 |
+- {1920, 1200} |
396 |
+- }; |
397 |
+- |
398 |
+ for (i = 0; i < ARRAY_SIZE(common_modes); i++) { |
399 |
+ mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, |
400 |
+ 60, false, false, false); |
401 |
+@@ -753,11 +756,22 @@ static int qxl_conn_get_modes(struct drm_connector *connector) |
402 |
+ static int qxl_conn_mode_valid(struct drm_connector *connector, |
403 |
+ struct drm_display_mode *mode) |
404 |
+ { |
405 |
++ struct drm_device *ddev = connector->dev; |
406 |
++ struct qxl_device *qdev = ddev->dev_private; |
407 |
++ int i; |
408 |
++ |
409 |
+ /* TODO: is this called for user defined modes? (xrandr --add-mode) |
410 |
+ * TODO: check that the mode fits in the framebuffer */ |
411 |
+- DRM_DEBUG("%s: %dx%d status=%d\n", mode->name, mode->hdisplay, |
412 |
+- mode->vdisplay, mode->status); |
413 |
+- return MODE_OK; |
414 |
++ |
415 |
++ if(qdev->monitors_config_width == mode->hdisplay && |
416 |
++ qdev->monitors_config_height == mode->vdisplay) |
417 |
++ return MODE_OK; |
418 |
++ |
419 |
++ for (i = 0; i < ARRAY_SIZE(common_modes); i++) { |
420 |
++ if (common_modes[i].w == mode->hdisplay && common_modes[i].h == mode->vdisplay) |
421 |
++ return MODE_OK; |
422 |
++ } |
423 |
++ return MODE_BAD; |
424 |
+ } |
425 |
+ |
426 |
+ static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector) |
427 |
+diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h |
428 |
+index 36ed40ba773f..8aa077ca8244 100644 |
429 |
+--- a/drivers/gpu/drm/qxl/qxl_drv.h |
430 |
++++ b/drivers/gpu/drm/qxl/qxl_drv.h |
431 |
+@@ -325,6 +325,8 @@ struct qxl_device { |
432 |
+ struct work_struct fb_work; |
433 |
+ |
434 |
+ struct drm_property *hotplug_mode_update_property; |
435 |
++ int monitors_config_width; |
436 |
++ int monitors_config_height; |
437 |
+ }; |
438 |
+ |
439 |
+ /* forward declaration for QXL_INFO_IO */ |
440 |
+diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c |
441 |
+index 4d36b9e86275..17ae621dbdab 100644 |
442 |
+--- a/drivers/gpu/drm/radeon/radeon_connectors.c |
443 |
++++ b/drivers/gpu/drm/radeon/radeon_connectors.c |
444 |
+@@ -71,6 +71,11 @@ void radeon_connector_hotplug(struct drm_connector *connector) |
445 |
+ if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
446 |
+ drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); |
447 |
+ } else if (radeon_dp_needs_link_train(radeon_connector)) { |
448 |
++ /* Don't try to start link training before we |
449 |
++ * have the dpcd */ |
450 |
++ if (!radeon_dp_getdpcd(radeon_connector)) |
451 |
++ return; |
452 |
++ |
453 |
+ /* set it to OFF so that drm_helper_connector_dpms() |
454 |
+ * won't return immediately since the current state |
455 |
+ * is ON at this point. |
456 |
+diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c |
457 |
+index 617c47f9ebe6..deabd2c8772d 100644 |
458 |
+--- a/drivers/hid/usbhid/hid-core.c |
459 |
++++ b/drivers/hid/usbhid/hid-core.c |
460 |
+@@ -180,7 +180,7 @@ static void hid_io_error(struct hid_device *hid) |
461 |
+ if (time_after(jiffies, usbhid->stop_retry)) { |
462 |
+ |
463 |
+ /* Retries failed, so do a port reset unless we lack bandwidth*/ |
464 |
+- if (test_bit(HID_NO_BANDWIDTH, &usbhid->iofl) |
465 |
++ if (!test_bit(HID_NO_BANDWIDTH, &usbhid->iofl) |
466 |
+ && !test_and_set_bit(HID_RESET_PENDING, &usbhid->iofl)) { |
467 |
+ |
468 |
+ schedule_work(&usbhid->reset_work); |
469 |
+diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig |
470 |
+index ac2d69e34c8c..6f64c5cc5387 100644 |
471 |
+--- a/drivers/iio/gyro/Kconfig |
472 |
++++ b/drivers/iio/gyro/Kconfig |
473 |
+@@ -93,7 +93,8 @@ config IIO_ST_GYRO_SPI_3AXIS |
474 |
+ config ITG3200 |
475 |
+ tristate "InvenSense ITG3200 Digital 3-Axis Gyroscope I2C driver" |
476 |
+ depends on I2C |
477 |
+- select IIO_TRIGGERED_BUFFER if IIO_BUFFER |
478 |
++ select IIO_BUFFER |
479 |
++ select IIO_TRIGGERED_BUFFER |
480 |
+ help |
481 |
+ Say yes here to add support for the InvenSense ITG3200 digital |
482 |
+ 3-axis gyroscope sensor. |
483 |
+diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c |
484 |
+index dd4206cac62d..5e1b117d4e3b 100644 |
485 |
+--- a/drivers/iio/imu/adis16480.c |
486 |
++++ b/drivers/iio/imu/adis16480.c |
487 |
+@@ -110,6 +110,10 @@ |
488 |
+ struct adis16480_chip_info { |
489 |
+ unsigned int num_channels; |
490 |
+ const struct iio_chan_spec *channels; |
491 |
++ unsigned int gyro_max_val; |
492 |
++ unsigned int gyro_max_scale; |
493 |
++ unsigned int accel_max_val; |
494 |
++ unsigned int accel_max_scale; |
495 |
+ }; |
496 |
+ |
497 |
+ struct adis16480 { |
498 |
+@@ -533,19 +537,21 @@ static int adis16480_set_filter_freq(struct iio_dev *indio_dev, |
499 |
+ static int adis16480_read_raw(struct iio_dev *indio_dev, |
500 |
+ const struct iio_chan_spec *chan, int *val, int *val2, long info) |
501 |
+ { |
502 |
++ struct adis16480 *st = iio_priv(indio_dev); |
503 |
++ |
504 |
+ switch (info) { |
505 |
+ case IIO_CHAN_INFO_RAW: |
506 |
+ return adis_single_conversion(indio_dev, chan, 0, val); |
507 |
+ case IIO_CHAN_INFO_SCALE: |
508 |
+ switch (chan->type) { |
509 |
+ case IIO_ANGL_VEL: |
510 |
+- *val = 0; |
511 |
+- *val2 = IIO_DEGREE_TO_RAD(20000); /* 0.02 degree/sec */ |
512 |
+- return IIO_VAL_INT_PLUS_MICRO; |
513 |
++ *val = st->chip_info->gyro_max_scale; |
514 |
++ *val2 = st->chip_info->gyro_max_val; |
515 |
++ return IIO_VAL_FRACTIONAL; |
516 |
+ case IIO_ACCEL: |
517 |
+- *val = 0; |
518 |
+- *val2 = IIO_G_TO_M_S_2(800); /* 0.8 mg */ |
519 |
+- return IIO_VAL_INT_PLUS_MICRO; |
520 |
++ *val = st->chip_info->accel_max_scale; |
521 |
++ *val2 = st->chip_info->accel_max_val; |
522 |
++ return IIO_VAL_FRACTIONAL; |
523 |
+ case IIO_MAGN: |
524 |
+ *val = 0; |
525 |
+ *val2 = 100; /* 0.0001 gauss */ |
526 |
+@@ -702,18 +708,39 @@ static const struct adis16480_chip_info adis16480_chip_info[] = { |
527 |
+ [ADIS16375] = { |
528 |
+ .channels = adis16485_channels, |
529 |
+ .num_channels = ARRAY_SIZE(adis16485_channels), |
530 |
++ /* |
531 |
++ * storing the value in rad/degree and the scale in degree |
532 |
++ * gives us the result in rad and better precession than |
533 |
++ * storing the scale directly in rad. |
534 |
++ */ |
535 |
++ .gyro_max_val = IIO_RAD_TO_DEGREE(22887), |
536 |
++ .gyro_max_scale = 300, |
537 |
++ .accel_max_val = IIO_M_S_2_TO_G(21973), |
538 |
++ .accel_max_scale = 18, |
539 |
+ }, |
540 |
+ [ADIS16480] = { |
541 |
+ .channels = adis16480_channels, |
542 |
+ .num_channels = ARRAY_SIZE(adis16480_channels), |
543 |
++ .gyro_max_val = IIO_RAD_TO_DEGREE(22500), |
544 |
++ .gyro_max_scale = 450, |
545 |
++ .accel_max_val = IIO_M_S_2_TO_G(12500), |
546 |
++ .accel_max_scale = 5, |
547 |
+ }, |
548 |
+ [ADIS16485] = { |
549 |
+ .channels = adis16485_channels, |
550 |
+ .num_channels = ARRAY_SIZE(adis16485_channels), |
551 |
++ .gyro_max_val = IIO_RAD_TO_DEGREE(22500), |
552 |
++ .gyro_max_scale = 450, |
553 |
++ .accel_max_val = IIO_M_S_2_TO_G(20000), |
554 |
++ .accel_max_scale = 5, |
555 |
+ }, |
556 |
+ [ADIS16488] = { |
557 |
+ .channels = adis16480_channels, |
558 |
+ .num_channels = ARRAY_SIZE(adis16480_channels), |
559 |
++ .gyro_max_val = IIO_RAD_TO_DEGREE(22500), |
560 |
++ .gyro_max_scale = 450, |
561 |
++ .accel_max_val = IIO_M_S_2_TO_G(22500), |
562 |
++ .accel_max_scale = 18, |
563 |
+ }, |
564 |
+ }; |
565 |
+ |
566 |
+diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c |
567 |
+index 0f1d9b2ccdfa..37b52bd44f86 100644 |
568 |
+--- a/drivers/iio/industrialio-buffer.c |
569 |
++++ b/drivers/iio/industrialio-buffer.c |
570 |
+@@ -96,7 +96,7 @@ unsigned int iio_buffer_poll(struct file *filp, |
571 |
+ struct iio_buffer *rb = indio_dev->buffer; |
572 |
+ |
573 |
+ if (!indio_dev->info) |
574 |
+- return -ENODEV; |
575 |
++ return 0; |
576 |
+ |
577 |
+ poll_wait(filp, &rb->pollq, wait); |
578 |
+ if (iio_buffer_data_available(rb)) |
579 |
+diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c |
580 |
+index f9360f497ed4..05b59941c400 100644 |
581 |
+--- a/drivers/iio/industrialio-event.c |
582 |
++++ b/drivers/iio/industrialio-event.c |
583 |
+@@ -83,7 +83,7 @@ static unsigned int iio_event_poll(struct file *filep, |
584 |
+ unsigned int events = 0; |
585 |
+ |
586 |
+ if (!indio_dev->info) |
587 |
+- return -ENODEV; |
588 |
++ return events; |
589 |
+ |
590 |
+ poll_wait(filep, &ev_int->wait, wait); |
591 |
+ |
592 |
+diff --git a/drivers/of/address.c b/drivers/of/address.c |
593 |
+index 005c65715846..9eae613c2a52 100644 |
594 |
+--- a/drivers/of/address.c |
595 |
++++ b/drivers/of/address.c |
596 |
+@@ -704,10 +704,10 @@ struct device_node *of_find_matching_node_by_address(struct device_node *from, |
597 |
+ struct resource res; |
598 |
+ |
599 |
+ while (dn) { |
600 |
+- if (of_address_to_resource(dn, 0, &res)) |
601 |
+- continue; |
602 |
+- if (res.start == base_address) |
603 |
++ if (!of_address_to_resource(dn, 0, &res) && |
604 |
++ res.start == base_address) |
605 |
+ return dn; |
606 |
++ |
607 |
+ dn = of_find_matching_node(dn, matches); |
608 |
+ } |
609 |
+ |
610 |
+diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c |
611 |
+index 27abeb40dfab..2afa4803280f 100644 |
612 |
+--- a/drivers/pci/quirks.c |
613 |
++++ b/drivers/pci/quirks.c |
614 |
+@@ -2790,12 +2790,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors); |
615 |
+ |
616 |
+ static void fixup_ti816x_class(struct pci_dev *dev) |
617 |
+ { |
618 |
++ u32 class = dev->class; |
619 |
++ |
620 |
+ /* TI 816x devices do not have class code set when in PCIe boot mode */ |
621 |
+- dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n"); |
622 |
+- dev->class = PCI_CLASS_MULTIMEDIA_VIDEO; |
623 |
++ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8; |
624 |
++ dev_info(&dev->dev, "PCI class overridden (%#08x -> %#08x)\n", |
625 |
++ class, dev->class); |
626 |
+ } |
627 |
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800, |
628 |
+- PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class); |
629 |
++ PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class); |
630 |
+ |
631 |
+ /* Some PCIe devices do not work reliably with the claimed maximum |
632 |
+ * payload size supported. |
633 |
+diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c |
634 |
+index 82f2c389b4d1..b334f68ebe46 100644 |
635 |
+--- a/drivers/s390/char/sclp_early.c |
636 |
++++ b/drivers/s390/char/sclp_early.c |
637 |
+@@ -7,6 +7,7 @@ |
638 |
+ #define KMSG_COMPONENT "sclp_early" |
639 |
+ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
640 |
+ |
641 |
++#include <linux/errno.h> |
642 |
+ #include <asm/ctl_reg.h> |
643 |
+ #include <asm/sclp.h> |
644 |
+ #include <asm/ipl.h> |
645 |
+diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c |
646 |
+index 6f622b4de698..927edd130ce9 100644 |
647 |
+--- a/drivers/staging/comedi/drivers/adl_pci7x3x.c |
648 |
++++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c |
649 |
+@@ -113,8 +113,20 @@ static int adl_pci7x3x_do_insn_bits(struct comedi_device *dev, |
650 |
+ { |
651 |
+ unsigned long reg = (unsigned long)s->private; |
652 |
+ |
653 |
+- if (comedi_dio_update_state(s, data)) |
654 |
+- outl(s->state, dev->iobase + reg); |
655 |
++ if (comedi_dio_update_state(s, data)) { |
656 |
++ unsigned int val = s->state; |
657 |
++ |
658 |
++ if (s->n_chan == 16) { |
659 |
++ /* |
660 |
++ * It seems the PCI-7230 needs the 16-bit DO state |
661 |
++ * to be shifted left by 16 bits before being written |
662 |
++ * to the 32-bit register. Set the value in both |
663 |
++ * halves of the register to be sure. |
664 |
++ */ |
665 |
++ val |= val << 16; |
666 |
++ } |
667 |
++ outl(val, dev->iobase + reg); |
668 |
++ } |
669 |
+ |
670 |
+ data[1] = s->state; |
671 |
+ |
672 |
+diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c |
673 |
+index 682a2fbe5c06..2b22cc1e57a2 100644 |
674 |
+--- a/drivers/tty/serial/8250/8250_pnp.c |
675 |
++++ b/drivers/tty/serial/8250/8250_pnp.c |
676 |
+@@ -364,6 +364,11 @@ static const struct pnp_device_id pnp_dev_table[] = { |
677 |
+ /* Winbond CIR port, should not be probed. We should keep track |
678 |
+ of it to prevent the legacy serial driver from probing it */ |
679 |
+ { "WEC1022", CIR_PORT }, |
680 |
++ /* |
681 |
++ * SMSC IrCC SIR/FIR port, should not be probed by serial driver |
682 |
++ * as well so its own driver can bind to it. |
683 |
++ */ |
684 |
++ { "SMCF010", CIR_PORT }, |
685 |
+ { "", 0 } |
686 |
+ }; |
687 |
+ |
688 |
+diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c |
689 |
+index 2978ca596a7f..0e75d2a76511 100644 |
690 |
+--- a/drivers/tty/vt/consolemap.c |
691 |
++++ b/drivers/tty/vt/consolemap.c |
692 |
+@@ -540,6 +540,12 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) |
693 |
+ |
694 |
+ /* Save original vc_unipagdir_loc in case we allocate a new one */ |
695 |
+ p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; |
696 |
++ |
697 |
++ if (!p) { |
698 |
++ err = -EINVAL; |
699 |
++ |
700 |
++ goto out_unlock; |
701 |
++ } |
702 |
+ if (p->readonly) { |
703 |
+ console_unlock(); |
704 |
+ return -EIO; |
705 |
+@@ -633,6 +639,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) |
706 |
+ set_inverse_transl(vc, p, i); /* Update inverse translations */ |
707 |
+ set_inverse_trans_unicode(vc, p); |
708 |
+ |
709 |
++out_unlock: |
710 |
+ console_unlock(); |
711 |
+ return err; |
712 |
+ } |
713 |
+diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c |
714 |
+index a05fc58d9b60..965c9ac85d6f 100644 |
715 |
+--- a/drivers/usb/dwc3/ep0.c |
716 |
++++ b/drivers/usb/dwc3/ep0.c |
717 |
+@@ -793,6 +793,11 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, |
718 |
+ unsigned maxp = ep0->endpoint.maxpacket; |
719 |
+ |
720 |
+ transfer_size += (maxp - (transfer_size % maxp)); |
721 |
++ |
722 |
++ /* Maximum of DWC3_EP0_BOUNCE_SIZE can only be received */ |
723 |
++ if (transfer_size > DWC3_EP0_BOUNCE_SIZE) |
724 |
++ transfer_size = DWC3_EP0_BOUNCE_SIZE; |
725 |
++ |
726 |
+ transferred = min_t(u32, ur->length, |
727 |
+ transfer_size - length); |
728 |
+ memcpy(ur->buf, dwc->ep0_bounce, transferred); |
729 |
+@@ -905,11 +910,14 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, |
730 |
+ return; |
731 |
+ } |
732 |
+ |
733 |
+- WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE); |
734 |
+- |
735 |
+ maxpacket = dep->endpoint.maxpacket; |
736 |
+ transfer_size = roundup(req->request.length, maxpacket); |
737 |
+ |
738 |
++ if (transfer_size > DWC3_EP0_BOUNCE_SIZE) { |
739 |
++ dev_WARN(dwc->dev, "bounce buf can't handle req len\n"); |
740 |
++ transfer_size = DWC3_EP0_BOUNCE_SIZE; |
741 |
++ } |
742 |
++ |
743 |
+ dwc->ep0_bounced = true; |
744 |
+ |
745 |
+ /* |
746 |
+diff --git a/drivers/usb/host/ehci-sysfs.c b/drivers/usb/host/ehci-sysfs.c |
747 |
+index f6459dfb6f54..94054dad7710 100644 |
748 |
+--- a/drivers/usb/host/ehci-sysfs.c |
749 |
++++ b/drivers/usb/host/ehci-sysfs.c |
750 |
+@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev, |
751 |
+ int count = PAGE_SIZE; |
752 |
+ char *ptr = buf; |
753 |
+ |
754 |
+- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); |
755 |
++ ehci = hcd_to_ehci(dev_get_drvdata(dev)); |
756 |
+ nports = HCS_N_PORTS(ehci->hcs_params); |
757 |
+ |
758 |
+ for (index = 0; index < nports; ++index) { |
759 |
+@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev, |
760 |
+ struct ehci_hcd *ehci; |
761 |
+ int portnum, new_owner; |
762 |
+ |
763 |
+- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); |
764 |
++ ehci = hcd_to_ehci(dev_get_drvdata(dev)); |
765 |
+ new_owner = PORT_OWNER; /* Owned by companion */ |
766 |
+ if (sscanf(buf, "%d", &portnum) != 1) |
767 |
+ return -EINVAL; |
768 |
+@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev, |
769 |
+ struct ehci_hcd *ehci; |
770 |
+ int n; |
771 |
+ |
772 |
+- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); |
773 |
++ ehci = hcd_to_ehci(dev_get_drvdata(dev)); |
774 |
+ n = scnprintf(buf, PAGE_SIZE, "%d\n", ehci->uframe_periodic_max); |
775 |
+ return n; |
776 |
+ } |
777 |
+@@ -101,7 +101,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev, |
778 |
+ unsigned long flags; |
779 |
+ ssize_t ret; |
780 |
+ |
781 |
+- ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); |
782 |
++ ehci = hcd_to_ehci(dev_get_drvdata(dev)); |
783 |
+ if (kstrtouint(buf, 0, &uframe_periodic_max) < 0) |
784 |
+ return -EINVAL; |
785 |
+ |
786 |
+diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
787 |
+index bc77ea7cde48..7fb81dbbdc8d 100644 |
788 |
+--- a/drivers/usb/serial/ftdi_sio.c |
789 |
++++ b/drivers/usb/serial/ftdi_sio.c |
790 |
+@@ -618,6 +618,10 @@ static const struct usb_device_id id_table_combined[] = { |
791 |
+ { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID), |
792 |
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
793 |
+ { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) }, |
794 |
++ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) }, |
795 |
++ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) }, |
796 |
++ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) }, |
797 |
++ { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) }, |
798 |
+ /* |
799 |
+ * ELV devices: |
800 |
+ */ |
801 |
+diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h |
802 |
+index 792e054126de..2943b97b2a83 100644 |
803 |
+--- a/drivers/usb/serial/ftdi_sio_ids.h |
804 |
++++ b/drivers/usb/serial/ftdi_sio_ids.h |
805 |
+@@ -568,6 +568,14 @@ |
806 |
+ */ |
807 |
+ #define FTDI_SYNAPSE_SS200_PID 0x9090 /* SS200 - SNAP Stick 200 */ |
808 |
+ |
809 |
++/* |
810 |
++ * CustomWare / ShipModul NMEA multiplexers product ids (FTDI_VID) |
811 |
++ */ |
812 |
++#define FTDI_CUSTOMWARE_MINIPLEX_PID 0xfd48 /* MiniPlex first generation NMEA Multiplexer */ |
813 |
++#define FTDI_CUSTOMWARE_MINIPLEX2_PID 0xfd49 /* MiniPlex-USB and MiniPlex-2 series */ |
814 |
++#define FTDI_CUSTOMWARE_MINIPLEX2WI_PID 0xfd4a /* MiniPlex-2Wi */ |
815 |
++#define FTDI_CUSTOMWARE_MINIPLEX3_PID 0xfd4b /* MiniPlex-3 series */ |
816 |
++ |
817 |
+ |
818 |
+ /********************************/ |
819 |
+ /** third-party VID/PID combos **/ |
820 |
+diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c |
821 |
+index 9fa7dd413e83..5e5e88209eeb 100644 |
822 |
+--- a/drivers/usb/serial/symbolserial.c |
823 |
++++ b/drivers/usb/serial/symbolserial.c |
824 |
+@@ -96,7 +96,7 @@ exit: |
825 |
+ |
826 |
+ static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port) |
827 |
+ { |
828 |
+- struct symbol_private *priv = usb_get_serial_data(port->serial); |
829 |
++ struct symbol_private *priv = usb_get_serial_port_data(port); |
830 |
+ unsigned long flags; |
831 |
+ int result = 0; |
832 |
+ |
833 |
+@@ -122,7 +122,7 @@ static void symbol_close(struct usb_serial_port *port) |
834 |
+ static void symbol_throttle(struct tty_struct *tty) |
835 |
+ { |
836 |
+ struct usb_serial_port *port = tty->driver_data; |
837 |
+- struct symbol_private *priv = usb_get_serial_data(port->serial); |
838 |
++ struct symbol_private *priv = usb_get_serial_port_data(port); |
839 |
+ |
840 |
+ spin_lock_irq(&priv->lock); |
841 |
+ priv->throttled = true; |
842 |
+@@ -132,7 +132,7 @@ static void symbol_throttle(struct tty_struct *tty) |
843 |
+ static void symbol_unthrottle(struct tty_struct *tty) |
844 |
+ { |
845 |
+ struct usb_serial_port *port = tty->driver_data; |
846 |
+- struct symbol_private *priv = usb_get_serial_data(port->serial); |
847 |
++ struct symbol_private *priv = usb_get_serial_port_data(port); |
848 |
+ int result; |
849 |
+ bool was_throttled; |
850 |
+ |
851 |
+diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c |
852 |
+index 1b39afdd86fd..5f60bb21905c 100644 |
853 |
+--- a/fs/hpfs/namei.c |
854 |
++++ b/fs/hpfs/namei.c |
855 |
+@@ -8,6 +8,17 @@ |
856 |
+ #include <linux/sched.h> |
857 |
+ #include "hpfs_fn.h" |
858 |
+ |
859 |
++static void hpfs_update_directory_times(struct inode *dir) |
860 |
++{ |
861 |
++ time_t t = get_seconds(); |
862 |
++ if (t == dir->i_mtime.tv_sec && |
863 |
++ t == dir->i_ctime.tv_sec) |
864 |
++ return; |
865 |
++ dir->i_mtime.tv_sec = dir->i_ctime.tv_sec = t; |
866 |
++ dir->i_mtime.tv_nsec = dir->i_ctime.tv_nsec = 0; |
867 |
++ hpfs_write_inode_nolock(dir); |
868 |
++} |
869 |
++ |
870 |
+ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) |
871 |
+ { |
872 |
+ const unsigned char *name = dentry->d_name.name; |
873 |
+@@ -99,6 +110,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) |
874 |
+ result->i_mode = mode | S_IFDIR; |
875 |
+ hpfs_write_inode_nolock(result); |
876 |
+ } |
877 |
++ hpfs_update_directory_times(dir); |
878 |
+ d_instantiate(dentry, result); |
879 |
+ hpfs_unlock(dir->i_sb); |
880 |
+ return 0; |
881 |
+@@ -187,6 +199,7 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, b |
882 |
+ result->i_mode = mode | S_IFREG; |
883 |
+ hpfs_write_inode_nolock(result); |
884 |
+ } |
885 |
++ hpfs_update_directory_times(dir); |
886 |
+ d_instantiate(dentry, result); |
887 |
+ hpfs_unlock(dir->i_sb); |
888 |
+ return 0; |
889 |
+@@ -262,6 +275,7 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de |
890 |
+ insert_inode_hash(result); |
891 |
+ |
892 |
+ hpfs_write_inode_nolock(result); |
893 |
++ hpfs_update_directory_times(dir); |
894 |
+ d_instantiate(dentry, result); |
895 |
+ brelse(bh); |
896 |
+ hpfs_unlock(dir->i_sb); |
897 |
+@@ -340,6 +354,7 @@ static int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *sy |
898 |
+ insert_inode_hash(result); |
899 |
+ |
900 |
+ hpfs_write_inode_nolock(result); |
901 |
++ hpfs_update_directory_times(dir); |
902 |
+ d_instantiate(dentry, result); |
903 |
+ hpfs_unlock(dir->i_sb); |
904 |
+ return 0; |
905 |
+@@ -423,6 +438,8 @@ again: |
906 |
+ out1: |
907 |
+ hpfs_brelse4(&qbh); |
908 |
+ out: |
909 |
++ if (!err) |
910 |
++ hpfs_update_directory_times(dir); |
911 |
+ hpfs_unlock(dir->i_sb); |
912 |
+ return err; |
913 |
+ } |
914 |
+@@ -477,6 +494,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry) |
915 |
+ out1: |
916 |
+ hpfs_brelse4(&qbh); |
917 |
+ out: |
918 |
++ if (!err) |
919 |
++ hpfs_update_directory_times(dir); |
920 |
+ hpfs_unlock(dir->i_sb); |
921 |
+ return err; |
922 |
+ } |
923 |
+@@ -595,7 +614,7 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, |
924 |
+ goto end1; |
925 |
+ } |
926 |
+ |
927 |
+- end: |
928 |
++end: |
929 |
+ hpfs_i(i)->i_parent_dir = new_dir->i_ino; |
930 |
+ if (S_ISDIR(i->i_mode)) { |
931 |
+ inc_nlink(new_dir); |
932 |
+@@ -610,6 +629,10 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, |
933 |
+ brelse(bh); |
934 |
+ } |
935 |
+ end1: |
936 |
++ if (!err) { |
937 |
++ hpfs_update_directory_times(old_dir); |
938 |
++ hpfs_update_directory_times(new_dir); |
939 |
++ } |
940 |
+ hpfs_unlock(i->i_sb); |
941 |
+ return err; |
942 |
+ } |
943 |
+diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h |
944 |
+index 75a8a20c8179..c2fb6f3ff44b 100644 |
945 |
+--- a/include/linux/iio/iio.h |
946 |
++++ b/include/linux/iio/iio.h |
947 |
+@@ -593,6 +593,15 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer, |
948 |
+ #define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL) |
949 |
+ |
950 |
+ /** |
951 |
++ * IIO_RAD_TO_DEGREE() - Convert rad to degree |
952 |
++ * @rad: A value in rad |
953 |
++ * |
954 |
++ * Returns the given value converted from rad to degree |
955 |
++ */ |
956 |
++#define IIO_RAD_TO_DEGREE(rad) \ |
957 |
++ (((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL) |
958 |
++ |
959 |
++/** |
960 |
+ * IIO_G_TO_M_S_2() - Convert g to meter / second**2 |
961 |
+ * @g: A value in g |
962 |
+ * |
963 |
+@@ -600,4 +609,12 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer, |
964 |
+ */ |
965 |
+ #define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL) |
966 |
+ |
967 |
++/** |
968 |
++ * IIO_M_S_2_TO_G() - Convert meter / second**2 to g |
969 |
++ * @ms2: A value in meter / second**2 |
970 |
++ * |
971 |
++ * Returns the given value converted from meter / second**2 to g |
972 |
++ */ |
973 |
++#define IIO_M_S_2_TO_G(ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL) |
974 |
++ |
975 |
+ #endif /* _INDUSTRIAL_IO_H_ */ |