Annotation of /trunk/kernel-alx/patches-3.10/0110-3.10.11-all-fixes.patch
Parent Directory | Revision Log
Revision 2288 -
(hide annotations)
(download)
Wed Sep 25 06:47:47 2013 UTC (11 years ago) by niro
File size: 39064 byte(s)
Wed Sep 25 06:47:47 2013 UTC (11 years ago) by niro
File size: 39064 byte(s)
-linux-3.10 patches
1 | niro | 2288 | diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp |
2 | index 90956b6..4dfdc8f 100644 | ||
3 | --- a/Documentation/hwmon/k10temp | ||
4 | +++ b/Documentation/hwmon/k10temp | ||
5 | @@ -12,6 +12,7 @@ Supported chips: | ||
6 | * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series) | ||
7 | * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series) | ||
8 | * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity" | ||
9 | +* AMD Family 16h processors: "Kabini" | ||
10 | |||
11 | Prefix: 'k10temp' | ||
12 | Addresses scanned: PCI space | ||
13 | diff --git a/Makefile b/Makefile | ||
14 | index b119684..595076d 100644 | ||
15 | --- a/Makefile | ||
16 | +++ b/Makefile | ||
17 | @@ -1,6 +1,6 @@ | ||
18 | VERSION = 3 | ||
19 | PATCHLEVEL = 10 | ||
20 | -SUBLEVEL = 10 | ||
21 | +SUBLEVEL = 11 | ||
22 | EXTRAVERSION = | ||
23 | NAME = TOSSUG Baby Fish | ||
24 | |||
25 | diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c | ||
26 | index 13609e0..05db95d 100644 | ||
27 | --- a/arch/arm/xen/enlighten.c | ||
28 | +++ b/arch/arm/xen/enlighten.c | ||
29 | @@ -170,6 +170,7 @@ static void __init xen_percpu_init(void *unused) | ||
30 | per_cpu(xen_vcpu, cpu) = vcpup; | ||
31 | |||
32 | enable_percpu_irq(xen_events_irq, 0); | ||
33 | + put_cpu(); | ||
34 | } | ||
35 | |||
36 | static void xen_restart(char str, const char *cmd) | ||
37 | diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig | ||
38 | index 74991fe..fe404e7 100644 | ||
39 | --- a/arch/powerpc/Kconfig | ||
40 | +++ b/arch/powerpc/Kconfig | ||
41 | @@ -986,6 +986,7 @@ config RELOCATABLE | ||
42 | must live at a different physical address than the primary | ||
43 | kernel. | ||
44 | |||
45 | +# This value must have zeroes in the bottom 60 bits otherwise lots will break | ||
46 | config PAGE_OFFSET | ||
47 | hex | ||
48 | default "0xc000000000000000" | ||
49 | diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h | ||
50 | index 988c812..b9f4262 100644 | ||
51 | --- a/arch/powerpc/include/asm/page.h | ||
52 | +++ b/arch/powerpc/include/asm/page.h | ||
53 | @@ -211,9 +211,19 @@ extern long long virt_phys_offset; | ||
54 | #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET)) | ||
55 | #define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET) | ||
56 | #else | ||
57 | +#ifdef CONFIG_PPC64 | ||
58 | +/* | ||
59 | + * gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET | ||
60 | + * with -mcmodel=medium, so we use & and | instead of - and + on 64-bit. | ||
61 | + */ | ||
62 | +#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) | PAGE_OFFSET)) | ||
63 | +#define __pa(x) ((unsigned long)(x) & 0x0fffffffffffffffUL) | ||
64 | + | ||
65 | +#else /* 32-bit, non book E */ | ||
66 | #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START)) | ||
67 | #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START) | ||
68 | #endif | ||
69 | +#endif | ||
70 | |||
71 | /* | ||
72 | * Unfortunately the PLT is in the BSS in the PPC32 ELF ABI, | ||
73 | diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c | ||
74 | index d92f387..e2a0a16 100644 | ||
75 | --- a/arch/powerpc/kernel/lparcfg.c | ||
76 | +++ b/arch/powerpc/kernel/lparcfg.c | ||
77 | @@ -35,7 +35,13 @@ | ||
78 | #include <asm/vdso_datapage.h> | ||
79 | #include <asm/vio.h> | ||
80 | #include <asm/mmu.h> | ||
81 | +#include <asm/machdep.h> | ||
82 | |||
83 | + | ||
84 | +/* | ||
85 | + * This isn't a module but we expose that to userspace | ||
86 | + * via /proc so leave the definitions here | ||
87 | + */ | ||
88 | #define MODULE_VERS "1.9" | ||
89 | #define MODULE_NAME "lparcfg" | ||
90 | |||
91 | @@ -418,7 +424,8 @@ static void parse_em_data(struct seq_file *m) | ||
92 | { | ||
93 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; | ||
94 | |||
95 | - if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) | ||
96 | + if (firmware_has_feature(FW_FEATURE_LPAR) && | ||
97 | + plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS) | ||
98 | seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]); | ||
99 | } | ||
100 | |||
101 | @@ -677,7 +684,6 @@ static int lparcfg_open(struct inode *inode, struct file *file) | ||
102 | } | ||
103 | |||
104 | static const struct file_operations lparcfg_fops = { | ||
105 | - .owner = THIS_MODULE, | ||
106 | .read = seq_read, | ||
107 | .write = lparcfg_write, | ||
108 | .open = lparcfg_open, | ||
109 | @@ -699,14 +705,4 @@ static int __init lparcfg_init(void) | ||
110 | } | ||
111 | return 0; | ||
112 | } | ||
113 | - | ||
114 | -static void __exit lparcfg_cleanup(void) | ||
115 | -{ | ||
116 | - remove_proc_subtree("powerpc/lparcfg", NULL); | ||
117 | -} | ||
118 | - | ||
119 | -module_init(lparcfg_init); | ||
120 | -module_exit(lparcfg_cleanup); | ||
121 | -MODULE_DESCRIPTION("Interface for LPAR configuration data"); | ||
122 | -MODULE_AUTHOR("Dave Engebretsen"); | ||
123 | -MODULE_LICENSE("GPL"); | ||
124 | +machine_device_initcall(pseries, lparcfg_init); | ||
125 | diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c | ||
126 | index 1f34e92..7a5bf1b 100644 | ||
127 | --- a/arch/x86/mm/init.c | ||
128 | +++ b/arch/x86/mm/init.c | ||
129 | @@ -78,8 +78,8 @@ __ref void *alloc_low_pages(unsigned int num) | ||
130 | return __va(pfn << PAGE_SHIFT); | ||
131 | } | ||
132 | |||
133 | -/* need 4 4k for initial PMD_SIZE, 4k for 0-ISA_END_ADDRESS */ | ||
134 | -#define INIT_PGT_BUF_SIZE (5 * PAGE_SIZE) | ||
135 | +/* need 3 4k for initial PMD_SIZE, 3 4k for 0-ISA_END_ADDRESS */ | ||
136 | +#define INIT_PGT_BUF_SIZE (6 * PAGE_SIZE) | ||
137 | RESERVE_BRK(early_pgt_alloc, INIT_PGT_BUF_SIZE); | ||
138 | void __init early_alloc_pgt_buf(void) | ||
139 | { | ||
140 | diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c | ||
141 | index 80403c1..45af90a 100644 | ||
142 | --- a/drivers/acpi/ec.c | ||
143 | +++ b/drivers/acpi/ec.c | ||
144 | @@ -987,6 +987,10 @@ static struct dmi_system_id __initdata ec_dmi_table[] = { | ||
145 | ec_skip_dsdt_scan, "HP Folio 13", { | ||
146 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
147 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13"),}, NULL}, | ||
148 | + { | ||
149 | + ec_validate_ecdt, "ASUS hardware", { | ||
150 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek Computer Inc."), | ||
151 | + DMI_MATCH(DMI_PRODUCT_NAME, "L4R"),}, NULL}, | ||
152 | {}, | ||
153 | }; | ||
154 | |||
155 | diff --git a/drivers/base/memory.c b/drivers/base/memory.c | ||
156 | index 14f8a69..86abbff 100644 | ||
157 | --- a/drivers/base/memory.c | ||
158 | +++ b/drivers/base/memory.c | ||
159 | @@ -152,6 +152,8 @@ static ssize_t show_mem_removable(struct device *dev, | ||
160 | container_of(dev, struct memory_block, dev); | ||
161 | |||
162 | for (i = 0; i < sections_per_block; i++) { | ||
163 | + if (!present_section_nr(mem->start_section_nr + i)) | ||
164 | + continue; | ||
165 | pfn = section_nr_to_pfn(mem->start_section_nr + i); | ||
166 | ret &= is_mem_section_removable(pfn, PAGES_PER_SECTION); | ||
167 | } | ||
168 | diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c | ||
169 | index 02f490b..bb8c3bb 100644 | ||
170 | --- a/drivers/base/regmap/regcache-rbtree.c | ||
171 | +++ b/drivers/base/regmap/regcache-rbtree.c | ||
172 | @@ -362,7 +362,7 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg, | ||
173 | rbnode = kzalloc(sizeof *rbnode, GFP_KERNEL); | ||
174 | if (!rbnode) | ||
175 | return -ENOMEM; | ||
176 | - rbnode->blklen = sizeof(*rbnode); | ||
177 | + rbnode->blklen = 1; | ||
178 | rbnode->base_reg = reg; | ||
179 | rbnode->block = kmalloc(rbnode->blklen * map->cache_word_size, | ||
180 | GFP_KERNEL); | ||
181 | diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h | ||
182 | index 01f6c2c..a365780 100644 | ||
183 | --- a/drivers/gpu/drm/i915/i915_reg.h | ||
184 | +++ b/drivers/gpu/drm/i915/i915_reg.h | ||
185 | @@ -4246,7 +4246,7 @@ | ||
186 | #define EDP_LINK_TRAIN_600MV_0DB_IVB (0x30 <<22) | ||
187 | #define EDP_LINK_TRAIN_600MV_3_5DB_IVB (0x36 <<22) | ||
188 | #define EDP_LINK_TRAIN_800MV_0DB_IVB (0x38 <<22) | ||
189 | -#define EDP_LINK_TRAIN_800MV_3_5DB_IVB (0x33 <<22) | ||
190 | +#define EDP_LINK_TRAIN_800MV_3_5DB_IVB (0x3e <<22) | ||
191 | |||
192 | /* legacy values */ | ||
193 | #define EDP_LINK_TRAIN_500MV_0DB_IVB (0x00 <<22) | ||
194 | diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/mc.h b/drivers/gpu/drm/nouveau/core/include/subdev/mc.h | ||
195 | index d550226..9d2cd20 100644 | ||
196 | --- a/drivers/gpu/drm/nouveau/core/include/subdev/mc.h | ||
197 | +++ b/drivers/gpu/drm/nouveau/core/include/subdev/mc.h | ||
198 | @@ -20,8 +20,8 @@ nouveau_mc(void *obj) | ||
199 | return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_MC]; | ||
200 | } | ||
201 | |||
202 | -#define nouveau_mc_create(p,e,o,d) \ | ||
203 | - nouveau_mc_create_((p), (e), (o), sizeof(**d), (void **)d) | ||
204 | +#define nouveau_mc_create(p,e,o,m,d) \ | ||
205 | + nouveau_mc_create_((p), (e), (o), (m), sizeof(**d), (void **)d) | ||
206 | #define nouveau_mc_destroy(p) ({ \ | ||
207 | struct nouveau_mc *pmc = (p); _nouveau_mc_dtor(nv_object(pmc)); \ | ||
208 | }) | ||
209 | @@ -33,7 +33,8 @@ nouveau_mc(void *obj) | ||
210 | }) | ||
211 | |||
212 | int nouveau_mc_create_(struct nouveau_object *, struct nouveau_object *, | ||
213 | - struct nouveau_oclass *, int, void **); | ||
214 | + struct nouveau_oclass *, const struct nouveau_mc_intr *, | ||
215 | + int, void **); | ||
216 | void _nouveau_mc_dtor(struct nouveau_object *); | ||
217 | int _nouveau_mc_init(struct nouveau_object *); | ||
218 | int _nouveau_mc_fini(struct nouveau_object *, bool); | ||
219 | diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c | ||
220 | index 1c0330b..ec9cd6f 100644 | ||
221 | --- a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c | ||
222 | +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c | ||
223 | @@ -80,7 +80,9 @@ _nouveau_mc_dtor(struct nouveau_object *object) | ||
224 | |||
225 | int | ||
226 | nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine, | ||
227 | - struct nouveau_oclass *oclass, int length, void **pobject) | ||
228 | + struct nouveau_oclass *oclass, | ||
229 | + const struct nouveau_mc_intr *intr_map, | ||
230 | + int length, void **pobject) | ||
231 | { | ||
232 | struct nouveau_device *device = nv_device(parent); | ||
233 | struct nouveau_mc *pmc; | ||
234 | @@ -92,6 +94,8 @@ nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine, | ||
235 | if (ret) | ||
236 | return ret; | ||
237 | |||
238 | + pmc->intr_map = intr_map; | ||
239 | + | ||
240 | ret = request_irq(device->pdev->irq, nouveau_mc_intr, | ||
241 | IRQF_SHARED, "nouveau", pmc); | ||
242 | if (ret < 0) | ||
243 | diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c | ||
244 | index 8c76971..64aa4ed 100644 | ||
245 | --- a/drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c | ||
246 | +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c | ||
247 | @@ -50,12 +50,11 @@ nv04_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | ||
248 | struct nv04_mc_priv *priv; | ||
249 | int ret; | ||
250 | |||
251 | - ret = nouveau_mc_create(parent, engine, oclass, &priv); | ||
252 | + ret = nouveau_mc_create(parent, engine, oclass, nv04_mc_intr, &priv); | ||
253 | *pobject = nv_object(priv); | ||
254 | if (ret) | ||
255 | return ret; | ||
256 | |||
257 | - priv->base.intr_map = nv04_mc_intr; | ||
258 | return 0; | ||
259 | } | ||
260 | |||
261 | diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c | ||
262 | index 5191937..d989178 100644 | ||
263 | --- a/drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c | ||
264 | +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c | ||
265 | @@ -36,12 +36,11 @@ nv44_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | ||
266 | struct nv44_mc_priv *priv; | ||
267 | int ret; | ||
268 | |||
269 | - ret = nouveau_mc_create(parent, engine, oclass, &priv); | ||
270 | + ret = nouveau_mc_create(parent, engine, oclass, nv04_mc_intr, &priv); | ||
271 | *pobject = nv_object(priv); | ||
272 | if (ret) | ||
273 | return ret; | ||
274 | |||
275 | - priv->base.intr_map = nv04_mc_intr; | ||
276 | return 0; | ||
277 | } | ||
278 | |||
279 | diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c | ||
280 | index d796924..732d810 100644 | ||
281 | --- a/drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c | ||
282 | +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c | ||
283 | @@ -52,12 +52,11 @@ nv50_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | ||
284 | struct nv50_mc_priv *priv; | ||
285 | int ret; | ||
286 | |||
287 | - ret = nouveau_mc_create(parent, engine, oclass, &priv); | ||
288 | + ret = nouveau_mc_create(parent, engine, oclass, nv50_mc_intr, &priv); | ||
289 | *pobject = nv_object(priv); | ||
290 | if (ret) | ||
291 | return ret; | ||
292 | |||
293 | - priv->base.intr_map = nv50_mc_intr; | ||
294 | return 0; | ||
295 | } | ||
296 | |||
297 | diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c | ||
298 | index e82fd21..0d57b4d 100644 | ||
299 | --- a/drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c | ||
300 | +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c | ||
301 | @@ -54,12 +54,11 @@ nv98_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | ||
302 | struct nv98_mc_priv *priv; | ||
303 | int ret; | ||
304 | |||
305 | - ret = nouveau_mc_create(parent, engine, oclass, &priv); | ||
306 | + ret = nouveau_mc_create(parent, engine, oclass, nv98_mc_intr, &priv); | ||
307 | *pobject = nv_object(priv); | ||
308 | if (ret) | ||
309 | return ret; | ||
310 | |||
311 | - priv->base.intr_map = nv98_mc_intr; | ||
312 | return 0; | ||
313 | } | ||
314 | |||
315 | diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c | ||
316 | index 737bd4b..4c97cd2 100644 | ||
317 | --- a/drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c | ||
318 | +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c | ||
319 | @@ -56,12 +56,11 @@ nvc0_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | ||
320 | struct nvc0_mc_priv *priv; | ||
321 | int ret; | ||
322 | |||
323 | - ret = nouveau_mc_create(parent, engine, oclass, &priv); | ||
324 | + ret = nouveau_mc_create(parent, engine, oclass, nvc0_mc_intr, &priv); | ||
325 | *pobject = nv_object(priv); | ||
326 | if (ret) | ||
327 | return ret; | ||
328 | |||
329 | - priv->base.intr_map = nvc0_mc_intr; | ||
330 | return 0; | ||
331 | } | ||
332 | |||
333 | diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | ||
334 | index 3751730..1a0bf07 100644 | ||
335 | --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | ||
336 | +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | ||
337 | @@ -29,7 +29,9 @@ | ||
338 | #include <drm/drmP.h> | ||
339 | #include <drm/ttm/ttm_bo_driver.h> | ||
340 | |||
341 | -#define VMW_PPN_SIZE sizeof(unsigned long) | ||
342 | +#define VMW_PPN_SIZE (sizeof(unsigned long)) | ||
343 | +/* A future safe maximum remap size. */ | ||
344 | +#define VMW_PPN_PER_REMAP ((31 * 1024) / VMW_PPN_SIZE) | ||
345 | |||
346 | static int vmw_gmr2_bind(struct vmw_private *dev_priv, | ||
347 | struct page *pages[], | ||
348 | @@ -38,43 +40,61 @@ static int vmw_gmr2_bind(struct vmw_private *dev_priv, | ||
349 | { | ||
350 | SVGAFifoCmdDefineGMR2 define_cmd; | ||
351 | SVGAFifoCmdRemapGMR2 remap_cmd; | ||
352 | - uint32_t define_size = sizeof(define_cmd) + 4; | ||
353 | - uint32_t remap_size = VMW_PPN_SIZE * num_pages + sizeof(remap_cmd) + 4; | ||
354 | uint32_t *cmd; | ||
355 | uint32_t *cmd_orig; | ||
356 | + uint32_t define_size = sizeof(define_cmd) + sizeof(*cmd); | ||
357 | + uint32_t remap_num = num_pages / VMW_PPN_PER_REMAP + ((num_pages % VMW_PPN_PER_REMAP) > 0); | ||
358 | + uint32_t remap_size = VMW_PPN_SIZE * num_pages + (sizeof(remap_cmd) + sizeof(*cmd)) * remap_num; | ||
359 | + uint32_t remap_pos = 0; | ||
360 | + uint32_t cmd_size = define_size + remap_size; | ||
361 | uint32_t i; | ||
362 | |||
363 | - cmd_orig = cmd = vmw_fifo_reserve(dev_priv, define_size + remap_size); | ||
364 | + cmd_orig = cmd = vmw_fifo_reserve(dev_priv, cmd_size); | ||
365 | if (unlikely(cmd == NULL)) | ||
366 | return -ENOMEM; | ||
367 | |||
368 | define_cmd.gmrId = gmr_id; | ||
369 | define_cmd.numPages = num_pages; | ||
370 | |||
371 | + *cmd++ = SVGA_CMD_DEFINE_GMR2; | ||
372 | + memcpy(cmd, &define_cmd, sizeof(define_cmd)); | ||
373 | + cmd += sizeof(define_cmd) / sizeof(*cmd); | ||
374 | + | ||
375 | + /* | ||
376 | + * Need to split the command if there are too many | ||
377 | + * pages that goes into the gmr. | ||
378 | + */ | ||
379 | + | ||
380 | remap_cmd.gmrId = gmr_id; | ||
381 | remap_cmd.flags = (VMW_PPN_SIZE > sizeof(*cmd)) ? | ||
382 | SVGA_REMAP_GMR2_PPN64 : SVGA_REMAP_GMR2_PPN32; | ||
383 | - remap_cmd.offsetPages = 0; | ||
384 | - remap_cmd.numPages = num_pages; | ||
385 | |||
386 | - *cmd++ = SVGA_CMD_DEFINE_GMR2; | ||
387 | - memcpy(cmd, &define_cmd, sizeof(define_cmd)); | ||
388 | - cmd += sizeof(define_cmd) / sizeof(uint32); | ||
389 | + while (num_pages > 0) { | ||
390 | + unsigned long nr = min(num_pages, (unsigned long)VMW_PPN_PER_REMAP); | ||
391 | + | ||
392 | + remap_cmd.offsetPages = remap_pos; | ||
393 | + remap_cmd.numPages = nr; | ||
394 | |||
395 | - *cmd++ = SVGA_CMD_REMAP_GMR2; | ||
396 | - memcpy(cmd, &remap_cmd, sizeof(remap_cmd)); | ||
397 | - cmd += sizeof(remap_cmd) / sizeof(uint32); | ||
398 | + *cmd++ = SVGA_CMD_REMAP_GMR2; | ||
399 | + memcpy(cmd, &remap_cmd, sizeof(remap_cmd)); | ||
400 | + cmd += sizeof(remap_cmd) / sizeof(*cmd); | ||
401 | |||
402 | - for (i = 0; i < num_pages; ++i) { | ||
403 | - if (VMW_PPN_SIZE <= 4) | ||
404 | - *cmd = page_to_pfn(*pages++); | ||
405 | - else | ||
406 | - *((uint64_t *)cmd) = page_to_pfn(*pages++); | ||
407 | + for (i = 0; i < nr; ++i) { | ||
408 | + if (VMW_PPN_SIZE <= 4) | ||
409 | + *cmd = page_to_pfn(*pages++); | ||
410 | + else | ||
411 | + *((uint64_t *)cmd) = page_to_pfn(*pages++); | ||
412 | |||
413 | - cmd += VMW_PPN_SIZE / sizeof(*cmd); | ||
414 | + cmd += VMW_PPN_SIZE / sizeof(*cmd); | ||
415 | + } | ||
416 | + | ||
417 | + num_pages -= nr; | ||
418 | + remap_pos += nr; | ||
419 | } | ||
420 | |||
421 | - vmw_fifo_commit(dev_priv, define_size + remap_size); | ||
422 | + BUG_ON(cmd != cmd_orig + cmd_size / sizeof(*cmd)); | ||
423 | + | ||
424 | + vmw_fifo_commit(dev_priv, cmd_size); | ||
425 | |||
426 | return 0; | ||
427 | } | ||
428 | diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig | ||
429 | index 0428e8a..df064e8 100644 | ||
430 | --- a/drivers/hwmon/Kconfig | ||
431 | +++ b/drivers/hwmon/Kconfig | ||
432 | @@ -296,8 +296,8 @@ config SENSORS_K10TEMP | ||
433 | If you say yes here you get support for the temperature | ||
434 | sensor(s) inside your CPU. Supported are later revisions of | ||
435 | the AMD Family 10h and all revisions of the AMD Family 11h, | ||
436 | - 12h (Llano), 14h (Brazos) and 15h (Bulldozer/Trinity) | ||
437 | - microarchitectures. | ||
438 | + 12h (Llano), 14h (Brazos), 15h (Bulldozer/Trinity) and | ||
439 | + 16h (Kabini) microarchitectures. | ||
440 | |||
441 | This driver can also be built as a module. If so, the module | ||
442 | will be called k10temp. | ||
443 | diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c | ||
444 | index e3b037c..e633856 100644 | ||
445 | --- a/drivers/hwmon/k10temp.c | ||
446 | +++ b/drivers/hwmon/k10temp.c | ||
447 | @@ -1,5 +1,5 @@ | ||
448 | /* | ||
449 | - * k10temp.c - AMD Family 10h/11h/12h/14h/15h processor hardware monitoring | ||
450 | + * k10temp.c - AMD Family 10h/11h/12h/14h/15h/16h processor hardware monitoring | ||
451 | * | ||
452 | * Copyright (c) 2009 Clemens Ladisch <clemens@ladisch.de> | ||
453 | * | ||
454 | @@ -211,6 +211,7 @@ static DEFINE_PCI_DEVICE_TABLE(k10temp_id_table) = { | ||
455 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, | ||
456 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) }, | ||
457 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) }, | ||
458 | + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) }, | ||
459 | {} | ||
460 | }; | ||
461 | MODULE_DEVICE_TABLE(pci, k10temp_id_table); | ||
462 | diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c | ||
463 | index 621c7a3..b83e3ca 100644 | ||
464 | --- a/drivers/misc/hpilo.c | ||
465 | +++ b/drivers/misc/hpilo.c | ||
466 | @@ -759,7 +759,7 @@ static int ilo_probe(struct pci_dev *pdev, | ||
467 | |||
468 | /* Ignore subsystem_device = 0x1979 (set by BIOS) */ | ||
469 | if (pdev->subsystem_device == 0x1979) | ||
470 | - goto out; | ||
471 | + return 0; | ||
472 | |||
473 | if (max_ccb > MAX_CCB) | ||
474 | max_ccb = MAX_CCB; | ||
475 | @@ -899,7 +899,7 @@ static void __exit ilo_exit(void) | ||
476 | class_destroy(ilo_class); | ||
477 | } | ||
478 | |||
479 | -MODULE_VERSION("1.4"); | ||
480 | +MODULE_VERSION("1.4.1"); | ||
481 | MODULE_ALIAS(ILO_NAME); | ||
482 | MODULE_DESCRIPTION(ILO_NAME); | ||
483 | MODULE_AUTHOR("David Altobelli <david.altobelli@hp.com>"); | ||
484 | diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c | ||
485 | index 700fe55..1bf3f8b 100644 | ||
486 | --- a/drivers/misc/mei/hw-me.c | ||
487 | +++ b/drivers/misc/mei/hw-me.c | ||
488 | @@ -176,16 +176,14 @@ static void mei_me_hw_reset(struct mei_device *dev, bool intr_enable) | ||
489 | struct mei_me_hw *hw = to_me_hw(dev); | ||
490 | u32 hcsr = mei_hcsr_read(hw); | ||
491 | |||
492 | - dev_dbg(&dev->pdev->dev, "before reset HCSR = 0x%08x.\n", hcsr); | ||
493 | - | ||
494 | - hcsr |= (H_RST | H_IG); | ||
495 | + hcsr |= H_RST | H_IG | H_IS; | ||
496 | |||
497 | if (intr_enable) | ||
498 | hcsr |= H_IE; | ||
499 | else | ||
500 | - hcsr |= ~H_IE; | ||
501 | + hcsr &= ~H_IE; | ||
502 | |||
503 | - mei_hcsr_set(hw, hcsr); | ||
504 | + mei_me_reg_write(hw, H_CSR, hcsr); | ||
505 | |||
506 | if (dev->dev_state == MEI_DEV_POWER_DOWN) | ||
507 | mei_me_hw_reset_release(dev); | ||
508 | diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | ||
509 | index 6bd0e92..417a089 100644 | ||
510 | --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | ||
511 | +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | ||
512 | @@ -448,6 +448,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv, | ||
513 | struct ieee80211_conf *cur_conf = &priv->hw->conf; | ||
514 | bool txok; | ||
515 | int slot; | ||
516 | + int hdrlen, padsize; | ||
517 | |||
518 | slot = strip_drv_header(priv, skb); | ||
519 | if (slot < 0) { | ||
520 | @@ -504,6 +505,15 @@ send_mac80211: | ||
521 | |||
522 | ath9k_htc_tx_clear_slot(priv, slot); | ||
523 | |||
524 | + /* Remove padding before handing frame back to mac80211 */ | ||
525 | + hdrlen = ieee80211_get_hdrlen_from_skb(skb); | ||
526 | + | ||
527 | + padsize = hdrlen & 3; | ||
528 | + if (padsize && skb->len > hdrlen + padsize) { | ||
529 | + memmove(skb->data + padsize, skb->data, hdrlen); | ||
530 | + skb_pull(skb, padsize); | ||
531 | + } | ||
532 | + | ||
533 | /* Send status to mac80211 */ | ||
534 | ieee80211_tx_status(priv->hw, skb); | ||
535 | } | ||
536 | diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c | ||
537 | index 2ba4945..bd126c2 100644 | ||
538 | --- a/drivers/net/wireless/ath/ath9k/init.c | ||
539 | +++ b/drivers/net/wireless/ath/ath9k/init.c | ||
540 | @@ -767,7 +767,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | ||
541 | IEEE80211_HW_PS_NULLFUNC_STACK | | ||
542 | IEEE80211_HW_SPECTRUM_MGMT | | ||
543 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | | ||
544 | - IEEE80211_HW_SUPPORTS_RC_TABLE; | ||
545 | + IEEE80211_HW_SUPPORTS_RC_TABLE | | ||
546 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES; | ||
547 | |||
548 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) | ||
549 | hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; | ||
550 | diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c | ||
551 | index 35ced10..e33a659 100644 | ||
552 | --- a/drivers/net/wireless/ath/ath9k/main.c | ||
553 | +++ b/drivers/net/wireless/ath/ath9k/main.c | ||
554 | @@ -173,8 +173,7 @@ static void ath_restart_work(struct ath_softc *sc) | ||
555 | { | ||
556 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | ||
557 | |||
558 | - if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9485(sc->sc_ah) || | ||
559 | - AR_SREV_9550(sc->sc_ah)) | ||
560 | + if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9330(sc->sc_ah)) | ||
561 | ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work, | ||
562 | msecs_to_jiffies(ATH_PLL_WORK_INTERVAL)); | ||
563 | |||
564 | diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c | ||
565 | index e9010a4..0686375 100644 | ||
566 | --- a/drivers/net/wireless/ath/carl9170/main.c | ||
567 | +++ b/drivers/net/wireless/ath/carl9170/main.c | ||
568 | @@ -1857,7 +1857,8 @@ void *carl9170_alloc(size_t priv_size) | ||
569 | IEEE80211_HW_SUPPORTS_PS | | ||
570 | IEEE80211_HW_PS_NULLFUNC_STACK | | ||
571 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | | ||
572 | - IEEE80211_HW_SIGNAL_DBM; | ||
573 | + IEEE80211_HW_SIGNAL_DBM | | ||
574 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES; | ||
575 | |||
576 | if (!modparam_noht) { | ||
577 | /* | ||
578 | diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c | ||
579 | index 900f5f8..a8eff95 100644 | ||
580 | --- a/drivers/net/wireless/iwlegacy/4965-mac.c | ||
581 | +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | ||
582 | @@ -4446,9 +4446,9 @@ il4965_irq_tasklet(struct il_priv *il) | ||
583 | set_bit(S_RFKILL, &il->status); | ||
584 | } else { | ||
585 | clear_bit(S_RFKILL, &il->status); | ||
586 | - wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill); | ||
587 | il_force_reset(il, true); | ||
588 | } | ||
589 | + wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill); | ||
590 | |||
591 | handled |= CSR_INT_BIT_RF_KILL; | ||
592 | } | ||
593 | diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c | ||
594 | index 705aa33..7e66a90 100644 | ||
595 | --- a/drivers/net/wireless/rt2x00/rt2800lib.c | ||
596 | +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | ||
597 | @@ -5912,7 +5912,8 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | ||
598 | IEEE80211_HW_SUPPORTS_PS | | ||
599 | IEEE80211_HW_PS_NULLFUNC_STACK | | ||
600 | IEEE80211_HW_AMPDU_AGGREGATION | | ||
601 | - IEEE80211_HW_REPORTS_TX_ACK_STATUS; | ||
602 | + IEEE80211_HW_REPORTS_TX_ACK_STATUS | | ||
603 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES; | ||
604 | |||
605 | /* | ||
606 | * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices | ||
607 | diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c | ||
608 | index 69dd49c..ce3f129d 100644 | ||
609 | --- a/drivers/scsi/pm8001/pm8001_hwi.c | ||
610 | +++ b/drivers/scsi/pm8001/pm8001_hwi.c | ||
611 | @@ -221,7 +221,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) | ||
612 | pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt = 0x01; | ||
613 | for (i = 0; i < PM8001_MAX_INB_NUM; i++) { | ||
614 | pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt = | ||
615 | - PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30); | ||
616 | + PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30); | ||
617 | pm8001_ha->inbnd_q_tbl[i].upper_base_addr = | ||
618 | pm8001_ha->memoryMap.region[IB + i].phys_addr_hi; | ||
619 | pm8001_ha->inbnd_q_tbl[i].lower_base_addr = | ||
620 | @@ -247,7 +247,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) | ||
621 | } | ||
622 | for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) { | ||
623 | pm8001_ha->outbnd_q_tbl[i].element_size_cnt = | ||
624 | - PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30); | ||
625 | + PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30); | ||
626 | pm8001_ha->outbnd_q_tbl[i].upper_base_addr = | ||
627 | pm8001_ha->memoryMap.region[OB + i].phys_addr_hi; | ||
628 | pm8001_ha->outbnd_q_tbl[i].lower_base_addr = | ||
629 | diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c | ||
630 | index 302514d..e1c4896 100644 | ||
631 | --- a/drivers/scsi/pm8001/pm80xx_hwi.c | ||
632 | +++ b/drivers/scsi/pm8001/pm80xx_hwi.c | ||
633 | @@ -275,7 +275,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) | ||
634 | |||
635 | for (i = 0; i < PM8001_MAX_SPCV_INB_NUM; i++) { | ||
636 | pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt = | ||
637 | - PM8001_MPI_QUEUE | (64 << 16) | (0x00<<30); | ||
638 | + PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30); | ||
639 | pm8001_ha->inbnd_q_tbl[i].upper_base_addr = | ||
640 | pm8001_ha->memoryMap.region[IB + i].phys_addr_hi; | ||
641 | pm8001_ha->inbnd_q_tbl[i].lower_base_addr = | ||
642 | @@ -301,7 +301,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) | ||
643 | } | ||
644 | for (i = 0; i < PM8001_MAX_SPCV_OUTB_NUM; i++) { | ||
645 | pm8001_ha->outbnd_q_tbl[i].element_size_cnt = | ||
646 | - PM8001_MPI_QUEUE | (64 << 16) | (0x01<<30); | ||
647 | + PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30); | ||
648 | pm8001_ha->outbnd_q_tbl[i].upper_base_addr = | ||
649 | pm8001_ha->memoryMap.region[OB + i].phys_addr_hi; | ||
650 | pm8001_ha->outbnd_q_tbl[i].lower_base_addr = | ||
651 | diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c | ||
652 | index 6455305..a532ca5 100644 | ||
653 | --- a/drivers/staging/imx-drm/imx-drm-core.c | ||
654 | +++ b/drivers/staging/imx-drm/imx-drm-core.c | ||
655 | @@ -681,6 +681,7 @@ found: | ||
656 | |||
657 | return i; | ||
658 | } | ||
659 | +EXPORT_SYMBOL_GPL(imx_drm_encoder_get_mux_id); | ||
660 | |||
661 | /* | ||
662 | * imx_drm_remove_encoder - remove an encoder | ||
663 | diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c | ||
664 | index 012ff8b..4c1b8db 100644 | ||
665 | --- a/drivers/target/iscsi/iscsi_target.c | ||
666 | +++ b/drivers/target/iscsi/iscsi_target.c | ||
667 | @@ -1086,7 +1086,6 @@ int iscsit_process_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd, | ||
668 | if (cmd->reject_reason) | ||
669 | return 0; | ||
670 | |||
671 | - target_put_sess_cmd(conn->sess->se_sess, &cmd->se_cmd); | ||
672 | return 1; | ||
673 | } | ||
674 | /* | ||
675 | @@ -1124,14 +1123,10 @@ after_immediate_data: | ||
676 | */ | ||
677 | cmdsn_ret = iscsit_sequence_cmd(cmd->conn, cmd, | ||
678 | (unsigned char *)hdr, hdr->cmdsn); | ||
679 | - if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) { | ||
680 | + if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) | ||
681 | return -1; | ||
682 | - } else if (cmdsn_ret == CMDSN_LOWER_THAN_EXP) { | ||
683 | - target_put_sess_cmd(conn->sess->se_sess, &cmd->se_cmd); | ||
684 | - return 0; | ||
685 | - } | ||
686 | |||
687 | - if (cmd->sense_reason) { | ||
688 | + if (cmd->sense_reason || cmdsn_ret == CMDSN_LOWER_THAN_EXP) { | ||
689 | int rc; | ||
690 | |||
691 | rc = iscsit_dump_data_payload(cmd->conn, | ||
692 | @@ -1541,6 +1536,10 @@ int iscsit_handle_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd, | ||
693 | if (hdr->itt == RESERVED_ITT && !(hdr->opcode & ISCSI_OP_IMMEDIATE)) { | ||
694 | pr_err("NOPOUT ITT is reserved, but Immediate Bit is" | ||
695 | " not set, protocol error.\n"); | ||
696 | + if (!cmd) | ||
697 | + return iscsit_add_reject(conn, ISCSI_REASON_PROTOCOL_ERROR, | ||
698 | + (unsigned char *)hdr); | ||
699 | + | ||
700 | return iscsit_reject_cmd(cmd, ISCSI_REASON_PROTOCOL_ERROR, | ||
701 | (unsigned char *)hdr); | ||
702 | } | ||
703 | @@ -1550,6 +1549,10 @@ int iscsit_handle_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd, | ||
704 | " greater than MaxXmitDataSegmentLength: %u, protocol" | ||
705 | " error.\n", payload_length, | ||
706 | conn->conn_ops->MaxXmitDataSegmentLength); | ||
707 | + if (!cmd) | ||
708 | + return iscsit_add_reject(conn, ISCSI_REASON_PROTOCOL_ERROR, | ||
709 | + (unsigned char *)hdr); | ||
710 | + | ||
711 | return iscsit_reject_cmd(cmd, ISCSI_REASON_PROTOCOL_ERROR, | ||
712 | (unsigned char *)hdr); | ||
713 | } | ||
714 | diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c | ||
715 | index 3402241..bc788c5 100644 | ||
716 | --- a/drivers/target/iscsi/iscsi_target_login.c | ||
717 | +++ b/drivers/target/iscsi/iscsi_target_login.c | ||
718 | @@ -1163,12 +1163,11 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) | ||
719 | if (np->np_thread_state == ISCSI_NP_THREAD_RESET) { | ||
720 | spin_unlock_bh(&np->np_thread_lock); | ||
721 | complete(&np->np_restart_comp); | ||
722 | - if (ret == -ENODEV) { | ||
723 | - iscsit_put_transport(conn->conn_transport); | ||
724 | - kfree(conn); | ||
725 | - conn = NULL; | ||
726 | + iscsit_put_transport(conn->conn_transport); | ||
727 | + kfree(conn); | ||
728 | + conn = NULL; | ||
729 | + if (ret == -ENODEV) | ||
730 | goto out; | ||
731 | - } | ||
732 | /* Get another socket */ | ||
733 | return 1; | ||
734 | } | ||
735 | diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c | ||
736 | index 4cb667d..9fabbf7 100644 | ||
737 | --- a/drivers/target/target_core_spc.c | ||
738 | +++ b/drivers/target/target_core_spc.c | ||
739 | @@ -97,9 +97,12 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) | ||
740 | |||
741 | buf[7] = 0x2; /* CmdQue=1 */ | ||
742 | |||
743 | - snprintf(&buf[8], 8, "LIO-ORG"); | ||
744 | - snprintf(&buf[16], 16, "%s", dev->t10_wwn.model); | ||
745 | - snprintf(&buf[32], 4, "%s", dev->t10_wwn.revision); | ||
746 | + memcpy(&buf[8], "LIO-ORG ", 8); | ||
747 | + memset(&buf[16], 0x20, 16); | ||
748 | + memcpy(&buf[16], dev->t10_wwn.model, | ||
749 | + min_t(size_t, strlen(dev->t10_wwn.model), 16)); | ||
750 | + memcpy(&buf[32], dev->t10_wwn.revision, | ||
751 | + min_t(size_t, strlen(dev->t10_wwn.revision), 4)); | ||
752 | buf[4] = 31; /* Set additional length to 31 */ | ||
753 | |||
754 | return 0; | ||
755 | diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c | ||
756 | index 3396eb9..ac27671 100644 | ||
757 | --- a/drivers/tty/hvc/hvsi_lib.c | ||
758 | +++ b/drivers/tty/hvc/hvsi_lib.c | ||
759 | @@ -341,8 +341,8 @@ void hvsilib_establish(struct hvsi_priv *pv) | ||
760 | |||
761 | pr_devel("HVSI@%x: ... waiting handshake\n", pv->termno); | ||
762 | |||
763 | - /* Try for up to 200s */ | ||
764 | - for (timeout = 0; timeout < 20; timeout++) { | ||
765 | + /* Try for up to 400ms */ | ||
766 | + for (timeout = 0; timeout < 40; timeout++) { | ||
767 | if (pv->established) | ||
768 | goto established; | ||
769 | if (!hvsi_get_packet(pv)) | ||
770 | diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c | ||
771 | index 4b7e33e..ab1065a 100644 | ||
772 | --- a/drivers/usb/gadget/f_acm.c | ||
773 | +++ b/drivers/usb/gadget/f_acm.c | ||
774 | @@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = { | ||
775 | [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)", | ||
776 | [ACM_DATA_IDX].s = "CDC ACM Data", | ||
777 | [ACM_IAD_IDX ].s = "CDC Serial", | ||
778 | + { } /* end of list */ | ||
779 | }; | ||
780 | |||
781 | static struct usb_gadget_strings acm_string_table = { | ||
782 | diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c | ||
783 | index 0ddbece..c450fdb 100644 | ||
784 | --- a/fs/jfs/jfs_dtree.c | ||
785 | +++ b/fs/jfs/jfs_dtree.c | ||
786 | @@ -3047,6 +3047,14 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
787 | |||
788 | dir_index = (u32) filp->f_pos; | ||
789 | |||
790 | + /* | ||
791 | + * NFSv4 reserves cookies 1 and 2 for . and .. so we add | ||
792 | + * the value we return to the vfs is one greater than the | ||
793 | + * one we use internally. | ||
794 | + */ | ||
795 | + if (dir_index) | ||
796 | + dir_index--; | ||
797 | + | ||
798 | if (dir_index > 1) { | ||
799 | struct dir_table_slot dirtab_slot; | ||
800 | |||
801 | @@ -3086,7 +3094,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
802 | if (p->header.flag & BT_INTERNAL) { | ||
803 | jfs_err("jfs_readdir: bad index table"); | ||
804 | DT_PUTPAGE(mp); | ||
805 | - filp->f_pos = -1; | ||
806 | + filp->f_pos = DIREND; | ||
807 | return 0; | ||
808 | } | ||
809 | } else { | ||
810 | @@ -3094,7 +3102,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
811 | /* | ||
812 | * self "." | ||
813 | */ | ||
814 | - filp->f_pos = 0; | ||
815 | + filp->f_pos = 1; | ||
816 | if (filldir(dirent, ".", 1, 0, ip->i_ino, | ||
817 | DT_DIR)) | ||
818 | return 0; | ||
819 | @@ -3102,7 +3110,7 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
820 | /* | ||
821 | * parent ".." | ||
822 | */ | ||
823 | - filp->f_pos = 1; | ||
824 | + filp->f_pos = 2; | ||
825 | if (filldir(dirent, "..", 2, 1, PARENT(ip), DT_DIR)) | ||
826 | return 0; | ||
827 | |||
828 | @@ -3123,24 +3131,25 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
829 | /* | ||
830 | * Legacy filesystem - OS/2 & Linux JFS < 0.3.6 | ||
831 | * | ||
832 | - * pn = index = 0: First entry "." | ||
833 | - * pn = 0; index = 1: Second entry ".." | ||
834 | + * pn = 0; index = 1: First entry "." | ||
835 | + * pn = 0; index = 2: Second entry ".." | ||
836 | * pn > 0: Real entries, pn=1 -> leftmost page | ||
837 | * pn = index = -1: No more entries | ||
838 | */ | ||
839 | dtpos = filp->f_pos; | ||
840 | - if (dtpos == 0) { | ||
841 | + if (dtpos < 2) { | ||
842 | /* build "." entry */ | ||
843 | |||
844 | + filp->f_pos = 1; | ||
845 | if (filldir(dirent, ".", 1, filp->f_pos, ip->i_ino, | ||
846 | DT_DIR)) | ||
847 | return 0; | ||
848 | - dtoffset->index = 1; | ||
849 | + dtoffset->index = 2; | ||
850 | filp->f_pos = dtpos; | ||
851 | } | ||
852 | |||
853 | if (dtoffset->pn == 0) { | ||
854 | - if (dtoffset->index == 1) { | ||
855 | + if (dtoffset->index == 2) { | ||
856 | /* build ".." entry */ | ||
857 | |||
858 | if (filldir(dirent, "..", 2, filp->f_pos, | ||
859 | @@ -3233,6 +3242,12 @@ int jfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
860 | } | ||
861 | jfs_dirent->position = unique_pos++; | ||
862 | } | ||
863 | + /* | ||
864 | + * We add 1 to the index because we may | ||
865 | + * use a value of 2 internally, and NFSv4 | ||
866 | + * doesn't like that. | ||
867 | + */ | ||
868 | + jfs_dirent->position++; | ||
869 | } else { | ||
870 | jfs_dirent->position = dtpos; | ||
871 | len = min(d_namleft, DTLHDRDATALEN_LEGACY); | ||
872 | diff --git a/include/linux/regmap.h b/include/linux/regmap.h | ||
873 | index f91bb41..98c470ce 100644 | ||
874 | --- a/include/linux/regmap.h | ||
875 | +++ b/include/linux/regmap.h | ||
876 | @@ -16,6 +16,7 @@ | ||
877 | #include <linux/list.h> | ||
878 | #include <linux/rbtree.h> | ||
879 | #include <linux/err.h> | ||
880 | +#include <linux/bug.h> | ||
881 | |||
882 | struct module; | ||
883 | struct device; | ||
884 | diff --git a/include/net/mac80211.h b/include/net/mac80211.h | ||
885 | index 885898a..4e50d36 100644 | ||
886 | --- a/include/net/mac80211.h | ||
887 | +++ b/include/net/mac80211.h | ||
888 | @@ -1484,6 +1484,7 @@ enum ieee80211_hw_flags { | ||
889 | IEEE80211_HW_SUPPORTS_RC_TABLE = 1<<24, | ||
890 | IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, | ||
891 | IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, | ||
892 | + IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27, | ||
893 | }; | ||
894 | |||
895 | /** | ||
896 | diff --git a/ipc/msg.c b/ipc/msg.c | ||
897 | index d0c6d96..f8fbe2c 100644 | ||
898 | --- a/ipc/msg.c | ||
899 | +++ b/ipc/msg.c | ||
900 | @@ -795,7 +795,7 @@ static inline void free_copy(struct msg_msg *copy) | ||
901 | |||
902 | static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) | ||
903 | { | ||
904 | - struct msg_msg *msg; | ||
905 | + struct msg_msg *msg, *found = NULL; | ||
906 | long count = 0; | ||
907 | |||
908 | list_for_each_entry(msg, &msq->q_messages, m_list) { | ||
909 | @@ -804,6 +804,7 @@ static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) | ||
910 | *msgtyp, mode)) { | ||
911 | if (mode == SEARCH_LESSEQUAL && msg->m_type != 1) { | ||
912 | *msgtyp = msg->m_type - 1; | ||
913 | + found = msg; | ||
914 | } else if (mode == SEARCH_NUMBER) { | ||
915 | if (*msgtyp == count) | ||
916 | return msg; | ||
917 | @@ -813,7 +814,7 @@ static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode) | ||
918 | } | ||
919 | } | ||
920 | |||
921 | - return ERR_PTR(-EAGAIN); | ||
922 | + return found ?: ERR_PTR(-EAGAIN); | ||
923 | } | ||
924 | |||
925 | |||
926 | diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c | ||
927 | index 3bdf283..61ed862 100644 | ||
928 | --- a/kernel/time/timer_list.c | ||
929 | +++ b/kernel/time/timer_list.c | ||
930 | @@ -265,10 +265,9 @@ static inline void timer_list_header(struct seq_file *m, u64 now) | ||
931 | static int timer_list_show(struct seq_file *m, void *v) | ||
932 | { | ||
933 | struct timer_list_iter *iter = v; | ||
934 | - u64 now = ktime_to_ns(ktime_get()); | ||
935 | |||
936 | if (iter->cpu == -1 && !iter->second_pass) | ||
937 | - timer_list_header(m, now); | ||
938 | + timer_list_header(m, iter->now); | ||
939 | else if (!iter->second_pass) | ||
940 | print_cpu(m, iter->cpu, iter->now); | ||
941 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
942 | @@ -298,33 +297,41 @@ void sysrq_timer_list_show(void) | ||
943 | return; | ||
944 | } | ||
945 | |||
946 | -static void *timer_list_start(struct seq_file *file, loff_t *offset) | ||
947 | +static void *move_iter(struct timer_list_iter *iter, loff_t offset) | ||
948 | { | ||
949 | - struct timer_list_iter *iter = file->private; | ||
950 | - | ||
951 | - if (!*offset) { | ||
952 | - iter->cpu = -1; | ||
953 | - iter->now = ktime_to_ns(ktime_get()); | ||
954 | - } else if (iter->cpu >= nr_cpu_ids) { | ||
955 | + for (; offset; offset--) { | ||
956 | + iter->cpu = cpumask_next(iter->cpu, cpu_online_mask); | ||
957 | + if (iter->cpu >= nr_cpu_ids) { | ||
958 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
959 | - if (!iter->second_pass) { | ||
960 | - iter->cpu = -1; | ||
961 | - iter->second_pass = true; | ||
962 | - } else | ||
963 | - return NULL; | ||
964 | + if (!iter->second_pass) { | ||
965 | + iter->cpu = -1; | ||
966 | + iter->second_pass = true; | ||
967 | + } else | ||
968 | + return NULL; | ||
969 | #else | ||
970 | - return NULL; | ||
971 | + return NULL; | ||
972 | #endif | ||
973 | + } | ||
974 | } | ||
975 | return iter; | ||
976 | } | ||
977 | |||
978 | +static void *timer_list_start(struct seq_file *file, loff_t *offset) | ||
979 | +{ | ||
980 | + struct timer_list_iter *iter = file->private; | ||
981 | + | ||
982 | + if (!*offset) | ||
983 | + iter->now = ktime_to_ns(ktime_get()); | ||
984 | + iter->cpu = -1; | ||
985 | + iter->second_pass = false; | ||
986 | + return move_iter(iter, *offset); | ||
987 | +} | ||
988 | + | ||
989 | static void *timer_list_next(struct seq_file *file, void *v, loff_t *offset) | ||
990 | { | ||
991 | struct timer_list_iter *iter = file->private; | ||
992 | - iter->cpu = cpumask_next(iter->cpu, cpu_online_mask); | ||
993 | ++*offset; | ||
994 | - return timer_list_start(file, offset); | ||
995 | + return move_iter(iter, 1); | ||
996 | } | ||
997 | |||
998 | static void timer_list_stop(struct seq_file *seq, void *v) | ||
999 | diff --git a/kernel/workqueue.c b/kernel/workqueue.c | ||
1000 | index 6f01921..e52d002 100644 | ||
1001 | --- a/kernel/workqueue.c | ||
1002 | +++ b/kernel/workqueue.c | ||
1003 | @@ -2188,6 +2188,15 @@ __acquires(&pool->lock) | ||
1004 | dump_stack(); | ||
1005 | } | ||
1006 | |||
1007 | + /* | ||
1008 | + * The following prevents a kworker from hogging CPU on !PREEMPT | ||
1009 | + * kernels, where a requeueing work item waiting for something to | ||
1010 | + * happen could deadlock with stop_machine as such work item could | ||
1011 | + * indefinitely requeue itself while all other CPUs are trapped in | ||
1012 | + * stop_machine. | ||
1013 | + */ | ||
1014 | + cond_resched(); | ||
1015 | + | ||
1016 | spin_lock_irq(&pool->lock); | ||
1017 | |||
1018 | /* clear cpu intensive status */ | ||
1019 | diff --git a/mm/slab.h b/mm/slab.h | ||
1020 | index f96b49e..4d6d836 100644 | ||
1021 | --- a/mm/slab.h | ||
1022 | +++ b/mm/slab.h | ||
1023 | @@ -162,6 +162,8 @@ static inline const char *cache_name(struct kmem_cache *s) | ||
1024 | |||
1025 | static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) | ||
1026 | { | ||
1027 | + if (!s->memcg_params) | ||
1028 | + return NULL; | ||
1029 | return s->memcg_params->memcg_caches[idx]; | ||
1030 | } | ||
1031 | |||
1032 | diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c | ||
1033 | index 170f9a7..3052672 100644 | ||
1034 | --- a/net/mac80211/ibss.c | ||
1035 | +++ b/net/mac80211/ibss.c | ||
1036 | @@ -1166,6 +1166,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | ||
1037 | clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state); | ||
1038 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED | | ||
1039 | BSS_CHANGED_IBSS); | ||
1040 | + ieee80211_vif_release_channel(sdata); | ||
1041 | synchronize_rcu(); | ||
1042 | kfree(presp); | ||
1043 | |||
1044 | diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c | ||
1045 | index f5aed96..f3bbea1 100644 | ||
1046 | --- a/net/mac80211/rc80211_minstrel_ht.c | ||
1047 | +++ b/net/mac80211/rc80211_minstrel_ht.c | ||
1048 | @@ -828,6 +828,9 @@ minstrel_ht_update_cck(struct minstrel_priv *mp, struct minstrel_ht_sta *mi, | ||
1049 | if (sband->band != IEEE80211_BAND_2GHZ) | ||
1050 | return; | ||
1051 | |||
1052 | + if (!(mp->hw->flags & IEEE80211_HW_SUPPORTS_HT_CCK_RATES)) | ||
1053 | + return; | ||
1054 | + | ||
1055 | mi->cck_supported = 0; | ||
1056 | mi->cck_supported_short = 0; | ||
1057 | for (i = 0; i < 4; i++) { | ||
1058 | diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c | ||
1059 | index 75edcfa..1504bb1 100644 | ||
1060 | --- a/net/sunrpc/xdr.c | ||
1061 | +++ b/net/sunrpc/xdr.c | ||
1062 | @@ -207,10 +207,13 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, | ||
1063 | pgfrom_base -= copy; | ||
1064 | |||
1065 | vto = kmap_atomic(*pgto); | ||
1066 | - vfrom = kmap_atomic(*pgfrom); | ||
1067 | - memmove(vto + pgto_base, vfrom + pgfrom_base, copy); | ||
1068 | + if (*pgto != *pgfrom) { | ||
1069 | + vfrom = kmap_atomic(*pgfrom); | ||
1070 | + memcpy(vto + pgto_base, vfrom + pgfrom_base, copy); | ||
1071 | + kunmap_atomic(vfrom); | ||
1072 | + } else | ||
1073 | + memmove(vto + pgto_base, vto + pgfrom_base, copy); | ||
1074 | flush_dcache_page(*pgto); | ||
1075 | - kunmap_atomic(vfrom); | ||
1076 | kunmap_atomic(vto); | ||
1077 | |||
1078 | } while ((len -= copy) != 0); | ||
1079 | diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c | ||
1080 | index b41ed86..e427dbf 100644 | ||
1081 | --- a/sound/isa/opti9xx/opti92x-ad1848.c | ||
1082 | +++ b/sound/isa/opti9xx/opti92x-ad1848.c | ||
1083 | @@ -173,11 +173,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9xx_pnpids); | ||
1084 | |||
1085 | #endif /* CONFIG_PNP */ | ||
1086 | |||
1087 | -#ifdef OPTi93X | ||
1088 | -#define DEV_NAME "opti93x" | ||
1089 | -#else | ||
1090 | -#define DEV_NAME "opti92x" | ||
1091 | -#endif | ||
1092 | +#define DEV_NAME KBUILD_MODNAME | ||
1093 | |||
1094 | static char * snd_opti9xx_names[] = { | ||
1095 | "unknown", | ||
1096 | @@ -1168,7 +1164,7 @@ static int snd_opti9xx_pnp_resume(struct pnp_card_link *pcard) | ||
1097 | |||
1098 | static struct pnp_card_driver opti9xx_pnpc_driver = { | ||
1099 | .flags = PNP_DRIVER_RES_DISABLE, | ||
1100 | - .name = "opti9xx", | ||
1101 | + .name = DEV_NAME, | ||
1102 | .id_table = snd_opti9xx_pnpids, | ||
1103 | .probe = snd_opti9xx_pnp_probe, | ||
1104 | .remove = snd_opti9xx_pnp_remove, | ||
1105 | diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c | ||
1106 | index 496d7f2..5bc4194 100644 | ||
1107 | --- a/sound/pci/hda/patch_hdmi.c | ||
1108 | +++ b/sound/pci/hda/patch_hdmi.c | ||
1109 | @@ -1715,6 +1715,9 @@ static int generic_hdmi_build_controls(struct hda_codec *codec) | ||
1110 | struct snd_pcm_chmap *chmap; | ||
1111 | struct snd_kcontrol *kctl; | ||
1112 | int i; | ||
1113 | + | ||
1114 | + if (!codec->pcm_info[pin_idx].pcm) | ||
1115 | + break; | ||
1116 | err = snd_pcm_add_chmap_ctls(codec->pcm_info[pin_idx].pcm, | ||
1117 | SNDRV_PCM_STREAM_PLAYBACK, | ||
1118 | NULL, 0, pin_idx, &chmap); | ||
1119 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c | ||
1120 | index 57f9f2a..458cf89 100644 | ||
1121 | --- a/sound/pci/hda/patch_realtek.c | ||
1122 | +++ b/sound/pci/hda/patch_realtek.c | ||
1123 | @@ -4207,6 +4207,7 @@ static const struct hda_fixup alc662_fixups[] = { | ||
1124 | |||
1125 | static const struct snd_pci_quirk alc662_fixup_tbl[] = { | ||
1126 | SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), | ||
1127 | + SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), | ||
1128 | SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), | ||
1129 | SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), | ||
1130 | SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), |