Magellan Linux

Annotation of /trunk/kernel-lts/patches-3.4/0140-3.4.41-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2200 - (hide annotations) (download)
Thu Jun 13 10:35:01 2013 UTC (11 years ago) by niro
File size: 18220 byte(s)
-linux-3.4.41
1 niro 2200 diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
2     index aa0f913..25e9734 100644
3     --- a/arch/x86/include/asm/paravirt.h
4     +++ b/arch/x86/include/asm/paravirt.h
5     @@ -741,7 +741,10 @@ static inline void arch_leave_lazy_mmu_mode(void)
6     PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave);
7     }
8    
9     -void arch_flush_lazy_mmu_mode(void);
10     +static inline void arch_flush_lazy_mmu_mode(void)
11     +{
12     + PVOP_VCALL0(pv_mmu_ops.lazy_mode.flush);
13     +}
14    
15     static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
16     phys_addr_t phys, pgprot_t flags)
17     diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
18     index 8e8b9a4..faf2c04 100644
19     --- a/arch/x86/include/asm/paravirt_types.h
20     +++ b/arch/x86/include/asm/paravirt_types.h
21     @@ -91,6 +91,7 @@ struct pv_lazy_ops {
22     /* Set deferred update mode, used for batching operations. */
23     void (*enter)(void);
24     void (*leave)(void);
25     + void (*flush)(void);
26     };
27    
28     struct pv_time_ops {
29     @@ -680,6 +681,7 @@ void paravirt_end_context_switch(struct task_struct *next);
30    
31     void paravirt_enter_lazy_mmu(void);
32     void paravirt_leave_lazy_mmu(void);
33     +void paravirt_flush_lazy_mmu(void);
34    
35     void _paravirt_nop(void);
36     u32 _paravirt_ident_32(u32);
37     diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
38     index ab13760..128323e 100644
39     --- a/arch/x86/kernel/paravirt.c
40     +++ b/arch/x86/kernel/paravirt.c
41     @@ -263,6 +263,18 @@ void paravirt_leave_lazy_mmu(void)
42     leave_lazy(PARAVIRT_LAZY_MMU);
43     }
44    
45     +void paravirt_flush_lazy_mmu(void)
46     +{
47     + preempt_disable();
48     +
49     + if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) {
50     + arch_leave_lazy_mmu_mode();
51     + arch_enter_lazy_mmu_mode();
52     + }
53     +
54     + preempt_enable();
55     +}
56     +
57     void paravirt_start_context_switch(struct task_struct *prev)
58     {
59     BUG_ON(preemptible());
60     @@ -292,18 +304,6 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
61     return percpu_read(paravirt_lazy_mode);
62     }
63    
64     -void arch_flush_lazy_mmu_mode(void)
65     -{
66     - preempt_disable();
67     -
68     - if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) {
69     - arch_leave_lazy_mmu_mode();
70     - arch_enter_lazy_mmu_mode();
71     - }
72     -
73     - preempt_enable();
74     -}
75     -
76     struct pv_info pv_info = {
77     .name = "bare hardware",
78     .paravirt_enabled = 0,
79     @@ -477,6 +477,7 @@ struct pv_mmu_ops pv_mmu_ops = {
80     .lazy_mode = {
81     .enter = paravirt_nop,
82     .leave = paravirt_nop,
83     + .flush = paravirt_nop,
84     },
85    
86     .set_fixmap = native_set_fixmap,
87     diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
88     index 642d880..53272bd 100644
89     --- a/arch/x86/lguest/boot.c
90     +++ b/arch/x86/lguest/boot.c
91     @@ -1333,6 +1333,7 @@ __init void lguest_init(void)
92     pv_mmu_ops.read_cr3 = lguest_read_cr3;
93     pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu;
94     pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mmu_mode;
95     + pv_mmu_ops.lazy_mode.flush = paravirt_flush_lazy_mmu;
96     pv_mmu_ops.pte_update = lguest_pte_update;
97     pv_mmu_ops.pte_update_defer = lguest_pte_update;
98    
99     diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
100     index e922e01..4a0a2e8 100644
101     --- a/arch/x86/mm/fault.c
102     +++ b/arch/x86/mm/fault.c
103     @@ -377,10 +377,12 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
104     if (pgd_none(*pgd_ref))
105     return -1;
106    
107     - if (pgd_none(*pgd))
108     + if (pgd_none(*pgd)) {
109     set_pgd(pgd, *pgd_ref);
110     - else
111     + arch_flush_lazy_mmu_mode();
112     + } else {
113     BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
114     + }
115    
116     /*
117     * Below here mismatches are bugs because these lower tables
118     diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
119     index 5cb8e27..cf7fe36 100644
120     --- a/arch/x86/xen/mmu.c
121     +++ b/arch/x86/xen/mmu.c
122     @@ -2076,6 +2076,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
123     .lazy_mode = {
124     .enter = paravirt_enter_lazy_mmu,
125     .leave = xen_leave_lazy_mmu,
126     + .flush = paravirt_flush_lazy_mmu,
127     },
128    
129     .set_fixmap = xen_set_fixmap,
130     diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
131     index a135c61..99a7855 100644
132     --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
133     +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
134     @@ -72,7 +72,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
135     /* ppgtt PDEs reside in the global gtt pagetable, which has 512*1024
136     * entries. For aliasing ppgtt support we just steal them at the end for
137     * now. */
138     - first_pd_entry_in_global_pt = 512*1024 - I915_PPGTT_PD_ENTRIES;
139     + first_pd_entry_in_global_pt = dev_priv->mm.gtt->gtt_total_entries - I915_PPGTT_PD_ENTRIES;
140    
141     ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL);
142     if (!ppgtt)
143     diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
144     index 3234224..b8e6463 100644
145     --- a/drivers/gpu/drm/udl/udl_connector.c
146     +++ b/drivers/gpu/drm/udl/udl_connector.c
147     @@ -61,6 +61,10 @@ static int udl_get_modes(struct drm_connector *connector)
148     int ret;
149    
150     edid = (struct edid *)udl_get_edid(udl);
151     + if (!edid) {
152     + drm_mode_connector_update_edid_property(connector, NULL);
153     + return 0;
154     + }
155    
156     connector->display_info.raw_edid = (char *)edid;
157    
158     diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
159     index f2f482b..76afcb4 100644
160     --- a/drivers/mtd/mtdchar.c
161     +++ b/drivers/mtd/mtdchar.c
162     @@ -1123,6 +1123,33 @@ static unsigned long mtdchar_get_unmapped_area(struct file *file,
163     }
164     #endif
165    
166     +static inline unsigned long get_vm_size(struct vm_area_struct *vma)
167     +{
168     + return vma->vm_end - vma->vm_start;
169     +}
170     +
171     +static inline resource_size_t get_vm_offset(struct vm_area_struct *vma)
172     +{
173     + return (resource_size_t) vma->vm_pgoff << PAGE_SHIFT;
174     +}
175     +
176     +/*
177     + * Set a new vm offset.
178     + *
179     + * Verify that the incoming offset really works as a page offset,
180     + * and that the offset and size fit in a resource_size_t.
181     + */
182     +static inline int set_vm_offset(struct vm_area_struct *vma, resource_size_t off)
183     +{
184     + pgoff_t pgoff = off >> PAGE_SHIFT;
185     + if (off != (resource_size_t) pgoff << PAGE_SHIFT)
186     + return -EINVAL;
187     + if (off + get_vm_size(vma) - 1 < off)
188     + return -EINVAL;
189     + vma->vm_pgoff = pgoff;
190     + return 0;
191     +}
192     +
193     /*
194     * set up a mapping for shared memory segments
195     */
196     @@ -1132,20 +1159,33 @@ static int mtdchar_mmap(struct file *file, struct vm_area_struct *vma)
197     struct mtd_file_info *mfi = file->private_data;
198     struct mtd_info *mtd = mfi->mtd;
199     struct map_info *map = mtd->priv;
200     - unsigned long start;
201     - unsigned long off;
202     - u32 len;
203     -
204     - if (mtd->type == MTD_RAM || mtd->type == MTD_ROM) {
205     - off = vma->vm_pgoff << PAGE_SHIFT;
206     + resource_size_t start, off;
207     + unsigned long len, vma_len;
208     +
209     + /* This is broken because it assumes the MTD device is map-based
210     + and that mtd->priv is a valid struct map_info. It should be
211     + replaced with something that uses the mtd_get_unmapped_area()
212     + operation properly. */
213     + if (0 /*mtd->type == MTD_RAM || mtd->type == MTD_ROM*/) {
214     + off = get_vm_offset(vma);
215     start = map->phys;
216     len = PAGE_ALIGN((start & ~PAGE_MASK) + map->size);
217     start &= PAGE_MASK;
218     - if ((vma->vm_end - vma->vm_start + off) > len)
219     + vma_len = get_vm_size(vma);
220     +
221     + /* Overflow in off+len? */
222     + if (vma_len + off < off)
223     + return -EINVAL;
224     + /* Does it fit in the mapping? */
225     + if (vma_len + off > len)
226     return -EINVAL;
227    
228     off += start;
229     - vma->vm_pgoff = off >> PAGE_SHIFT;
230     + /* Did that overflow? */
231     + if (off < start)
232     + return -EINVAL;
233     + if (set_vm_offset(vma, off) < 0)
234     + return -EINVAL;
235     vma->vm_flags |= VM_IO | VM_RESERVED;
236    
237     #ifdef pgprot_noncached
238     diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
239     index df49ce2..978af21 100644
240     --- a/drivers/net/ethernet/realtek/r8169.c
241     +++ b/drivers/net/ethernet/realtek/r8169.c
242     @@ -3483,6 +3483,30 @@ static void __devinit rtl_init_mdio_ops(struct rtl8169_private *tp)
243     }
244     }
245    
246     +static void rtl_speed_down(struct rtl8169_private *tp)
247     +{
248     + u32 adv;
249     + int lpa;
250     +
251     + rtl_writephy(tp, 0x1f, 0x0000);
252     + lpa = rtl_readphy(tp, MII_LPA);
253     +
254     + if (lpa & (LPA_10HALF | LPA_10FULL))
255     + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full;
256     + else if (lpa & (LPA_100HALF | LPA_100FULL))
257     + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
258     + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full;
259     + else
260     + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full |
261     + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full |
262     + (tp->mii.supports_gmii ?
263     + ADVERTISED_1000baseT_Half |
264     + ADVERTISED_1000baseT_Full : 0);
265     +
266     + rtl8169_set_speed(tp->dev, AUTONEG_ENABLE, SPEED_1000, DUPLEX_FULL,
267     + adv);
268     +}
269     +
270     static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)
271     {
272     void __iomem *ioaddr = tp->mmio_addr;
273     @@ -3508,9 +3532,7 @@ static bool rtl_wol_pll_power_down(struct rtl8169_private *tp)
274     if (!(__rtl8169_get_wol(tp) & WAKE_ANY))
275     return false;
276    
277     - rtl_writephy(tp, 0x1f, 0x0000);
278     - rtl_writephy(tp, MII_BMCR, 0x0000);
279     -
280     + rtl_speed_down(tp);
281     rtl_wol_suspend_quirk(tp);
282    
283     return true;
284     diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
285     index 101b28e..58e6183 100644
286     --- a/drivers/scsi/libsas/sas_expander.c
287     +++ b/drivers/scsi/libsas/sas_expander.c
288     @@ -235,6 +235,17 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp)
289     linkrate = phy->linkrate;
290     memcpy(sas_addr, phy->attached_sas_addr, SAS_ADDR_SIZE);
291    
292     + /* Handle vacant phy - rest of dr data is not valid so skip it */
293     + if (phy->phy_state == PHY_VACANT) {
294     + memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
295     + phy->attached_dev_type = NO_DEVICE;
296     + if (!test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state)) {
297     + phy->phy_id = phy_id;
298     + goto skip;
299     + } else
300     + goto out;
301     + }
302     +
303     phy->attached_dev_type = to_dev_type(dr);
304     if (test_bit(SAS_HA_ATA_EH_ACTIVE, &ha->state))
305     goto out;
306     @@ -272,6 +283,7 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp)
307     phy->phy->maximum_linkrate = dr->pmax_linkrate;
308     phy->phy->negotiated_linkrate = phy->linkrate;
309    
310     + skip:
311     if (new_phy)
312     if (sas_phy_add(phy->phy)) {
313     sas_phy_free(phy->phy);
314     diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
315     index f30e124..aa3c106 100644
316     --- a/drivers/target/target_core_alua.c
317     +++ b/drivers/target/target_core_alua.c
318     @@ -392,6 +392,7 @@ static inline int core_alua_state_standby(
319     case REPORT_LUNS:
320     case RECEIVE_DIAGNOSTIC:
321     case SEND_DIAGNOSTIC:
322     + return 0;
323     case MAINTENANCE_IN:
324     switch (cdb[1]) {
325     case MI_REPORT_TARGET_PGS:
326     @@ -434,6 +435,7 @@ static inline int core_alua_state_unavailable(
327     switch (cdb[0]) {
328     case INQUIRY:
329     case REPORT_LUNS:
330     + return 0;
331     case MAINTENANCE_IN:
332     switch (cdb[1]) {
333     case MI_REPORT_TARGET_PGS:
334     @@ -474,6 +476,7 @@ static inline int core_alua_state_transition(
335     switch (cdb[0]) {
336     case INQUIRY:
337     case REPORT_LUNS:
338     + return 0;
339     case MAINTENANCE_IN:
340     switch (cdb[1]) {
341     case MI_REPORT_TARGET_PGS:
342     diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
343     index f771e9f..9cc574c 100644
344     --- a/fs/cifs/connect.c
345     +++ b/fs/cifs/connect.c
346     @@ -1576,14 +1576,24 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
347     }
348     break;
349     case Opt_blank_pass:
350     - vol->password = NULL;
351     - break;
352     - case Opt_pass:
353     /* passwords have to be handled differently
354     * to allow the character used for deliminator
355     * to be passed within them
356     */
357    
358     + /*
359     + * Check if this is a case where the password
360     + * starts with a delimiter
361     + */
362     + tmp_end = strchr(data, '=');
363     + tmp_end++;
364     + if (!(tmp_end < end && tmp_end[1] == delim)) {
365     + /* No it is not. Set the password to NULL */
366     + vol->password = NULL;
367     + break;
368     + }
369     + /* Yes it is. Drop down to Opt_pass below.*/
370     + case Opt_pass:
371     /* Obtain the value string */
372     value = strchr(data, '=');
373     value++;
374     diff --git a/fs/inode.c b/fs/inode.c
375     index 9f4f5fe..8de457e 100644
376     --- a/fs/inode.c
377     +++ b/fs/inode.c
378     @@ -705,7 +705,7 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)
379     * inode to the back of the list so we don't spin on it.
380     */
381     if (!spin_trylock(&inode->i_lock)) {
382     - list_move_tail(&inode->i_lru, &sb->s_inode_lru);
383     + list_move(&inode->i_lru, &sb->s_inode_lru);
384     continue;
385     }
386    
387     diff --git a/include/linux/kref.h b/include/linux/kref.h
388     index 9c07dce..fd2a616 100644
389     --- a/include/linux/kref.h
390     +++ b/include/linux/kref.h
391     @@ -93,4 +93,25 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref)
392     {
393     return kref_sub(kref, 1, release);
394     }
395     +
396     +/**
397     + * kref_get_unless_zero - Increment refcount for object unless it is zero.
398     + * @kref: object.
399     + *
400     + * Return non-zero if the increment succeeded. Otherwise return 0.
401     + *
402     + * This function is intended to simplify locking around refcounting for
403     + * objects that can be looked up from a lookup structure, and which are
404     + * removed from that lookup structure in the object destructor.
405     + * Operations on such objects require at least a read lock around
406     + * lookup + kref_get, and a write lock around kref_put + remove from lookup
407     + * structure. Furthermore, RCU implementations become extremely tricky.
408     + * With a lookup followed by a kref_get_unless_zero *with return value check*
409     + * locking in the kref_put path can be deferred to the actual removal from
410     + * the lookup structure and RCU lookups become trivial.
411     + */
412     +static inline int __must_check kref_get_unless_zero(struct kref *kref)
413     +{
414     + return atomic_add_unless(&kref->refcount, 1, 0);
415     +}
416     #endif /* _KREF_H_ */
417     diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
418     index c685e31..c3ae144 100644
419     --- a/kernel/sched/clock.c
420     +++ b/kernel/sched/clock.c
421     @@ -176,10 +176,36 @@ static u64 sched_clock_remote(struct sched_clock_data *scd)
422     u64 this_clock, remote_clock;
423     u64 *ptr, old_val, val;
424    
425     +#if BITS_PER_LONG != 64
426     +again:
427     + /*
428     + * Careful here: The local and the remote clock values need to
429     + * be read out atomic as we need to compare the values and
430     + * then update either the local or the remote side. So the
431     + * cmpxchg64 below only protects one readout.
432     + *
433     + * We must reread via sched_clock_local() in the retry case on
434     + * 32bit as an NMI could use sched_clock_local() via the
435     + * tracer and hit between the readout of
436     + * the low32bit and the high 32bit portion.
437     + */
438     + this_clock = sched_clock_local(my_scd);
439     + /*
440     + * We must enforce atomic readout on 32bit, otherwise the
441     + * update on the remote cpu can hit inbetween the readout of
442     + * the low32bit and the high 32bit portion.
443     + */
444     + remote_clock = cmpxchg64(&scd->clock, 0, 0);
445     +#else
446     + /*
447     + * On 64bit the read of [my]scd->clock is atomic versus the
448     + * update, so we can avoid the above 32bit dance.
449     + */
450     sched_clock_local(my_scd);
451     again:
452     this_clock = my_scd->clock;
453     remote_clock = scd->clock;
454     +#endif
455    
456     /*
457     * Use the opportunity that we have both locks
458     diff --git a/kernel/sys.c b/kernel/sys.c
459     index b0003db..6a74b83 100644
460     --- a/kernel/sys.c
461     +++ b/kernel/sys.c
462     @@ -320,7 +320,6 @@ void kernel_restart_prepare(char *cmd)
463     system_state = SYSTEM_RESTART;
464     usermodehelper_disable();
465     device_shutdown();
466     - syscore_shutdown();
467     }
468    
469     /**
470     @@ -366,6 +365,7 @@ void kernel_restart(char *cmd)
471     {
472     kernel_restart_prepare(cmd);
473     disable_nonboot_cpus();
474     + syscore_shutdown();
475     if (!cmd)
476     printk(KERN_EMERG "Restarting system.\n");
477     else
478     @@ -391,6 +391,7 @@ static void kernel_shutdown_prepare(enum system_states state)
479     void kernel_halt(void)
480     {
481     kernel_shutdown_prepare(SYSTEM_HALT);
482     + disable_nonboot_cpus();
483     syscore_shutdown();
484     printk(KERN_EMERG "System halted.\n");
485     kmsg_dump(KMSG_DUMP_HALT);
486     diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
487     index e539dfa..a3c1dd9 100644
488     --- a/kernel/trace/ftrace.c
489     +++ b/kernel/trace/ftrace.c
490     @@ -642,7 +642,6 @@ int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
491     free_page(tmp);
492     }
493    
494     - free_page((unsigned long)stat->pages);
495     stat->pages = NULL;
496     stat->start = NULL;
497    
498     diff --git a/lib/kobject.c b/lib/kobject.c
499     index aeefa8b..d90c692 100644
500     --- a/lib/kobject.c
501     +++ b/lib/kobject.c
502     @@ -531,6 +531,13 @@ struct kobject *kobject_get(struct kobject *kobj)
503     return kobj;
504     }
505    
506     +static struct kobject *kobject_get_unless_zero(struct kobject *kobj)
507     +{
508     + if (!kref_get_unless_zero(&kobj->kref))
509     + kobj = NULL;
510     + return kobj;
511     +}
512     +
513     /*
514     * kobject_cleanup - free kobject resources.
515     * @kobj: object to cleanup
516     @@ -753,7 +760,7 @@ struct kobject *kset_find_obj(struct kset *kset, const char *name)
517    
518     list_for_each_entry(k, &kset->list, entry) {
519     if (kobject_name(k) && !strcmp(kobject_name(k), name)) {
520     - ret = kobject_get(k);
521     + ret = kobject_get_unless_zero(k);
522     break;
523     }
524     }
525     diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
526     index c91fb2f..77758542 100644
527     --- a/sound/soc/codecs/wm8903.c
528     +++ b/sound/soc/codecs/wm8903.c
529     @@ -1082,6 +1082,8 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = {
530     { "ROP", NULL, "Right Speaker PGA" },
531     { "RON", NULL, "Right Speaker PGA" },
532    
533     + { "Charge Pump", NULL, "CLK_DSP" },
534     +
535     { "Left Headphone Output PGA", NULL, "Charge Pump" },
536     { "Right Headphone Output PGA", NULL, "Charge Pump" },
537     { "Left Line Output PGA", NULL, "Charge Pump" },
538     diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
539     index 38a607a..fb95069 100644
540     --- a/sound/usb/mixer_quirks.c
541     +++ b/sound/usb/mixer_quirks.c
542     @@ -396,7 +396,7 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol,
543     else
544     ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest,
545     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
546     - 0, cpu_to_le16(wIndex),
547     + 0, wIndex,
548     &tmp, sizeof(tmp), 1000);
549     up_read(&mixer->chip->shutdown_rwsem);
550    
551     @@ -427,7 +427,7 @@ static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
552     else
553     ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest,
554     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
555     - cpu_to_le16(wValue), cpu_to_le16(wIndex),
556     + wValue, wIndex,
557     NULL, 0, 1000);
558     up_read(&mixer->chip->shutdown_rwsem);
559    
560     diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
561     index c46171a..b7fa802 100644
562     --- a/sound/usb/quirks.c
563     +++ b/sound/usb/quirks.c
564     @@ -486,7 +486,7 @@ static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev)
565     {
566     int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
567     0xaf, USB_TYPE_VENDOR | USB_RECIP_DEVICE,
568     - cpu_to_le16(1), 0, NULL, 0, 1000);
569     + 1, 0, NULL, 0, 1000);
570    
571     if (ret < 0)
572     return ret;