Annotation of /trunk/kernel-lts/patches-3.4/0136-3.4.37-all-fixes.patch
Parent Directory | Revision Log
Revision 2143 -
(hide annotations)
(download)
Sun Mar 31 12:45:29 2013 UTC (11 years, 5 months ago) by niro
File size: 51396 byte(s)
Sun Mar 31 12:45:29 2013 UTC (11 years, 5 months ago) by niro
File size: 51396 byte(s)
linux-3.4.37
1 | niro | 2143 | diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c |
2 | index 455faa3..31a3dd0 100644 | ||
3 | --- a/arch/powerpc/kernel/cputable.c | ||
4 | +++ b/arch/powerpc/kernel/cputable.c | ||
5 | @@ -269,7 +269,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | ||
6 | .cpu_features = CPU_FTRS_PPC970, | ||
7 | .cpu_user_features = COMMON_USER_POWER4 | | ||
8 | PPC_FEATURE_HAS_ALTIVEC_COMP, | ||
9 | - .mmu_features = MMU_FTR_HPTE_TABLE, | ||
10 | + .mmu_features = MMU_FTRS_PPC970, | ||
11 | .icache_bsize = 128, | ||
12 | .dcache_bsize = 128, | ||
13 | .num_pmcs = 8, | ||
14 | diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c | ||
15 | index 377e5cb..15972e2 100644 | ||
16 | --- a/arch/powerpc/mm/hash_utils_64.c | ||
17 | +++ b/arch/powerpc/mm/hash_utils_64.c | ||
18 | @@ -759,6 +759,8 @@ void __init early_init_mmu(void) | ||
19 | /* Initialize stab / SLB management */ | ||
20 | if (mmu_has_feature(MMU_FTR_SLB)) | ||
21 | slb_initialize(); | ||
22 | + else | ||
23 | + stab_initialize(get_paca()->stab_real); | ||
24 | } | ||
25 | |||
26 | #ifdef CONFIG_SMP | ||
27 | diff --git a/arch/s390/include/asm/tlbflush.h b/arch/s390/include/asm/tlbflush.h | ||
28 | index 1d8648c..8743029 100644 | ||
29 | --- a/arch/s390/include/asm/tlbflush.h | ||
30 | +++ b/arch/s390/include/asm/tlbflush.h | ||
31 | @@ -74,8 +74,6 @@ static inline void __tlb_flush_idte(unsigned long asce) | ||
32 | |||
33 | static inline void __tlb_flush_mm(struct mm_struct * mm) | ||
34 | { | ||
35 | - if (unlikely(cpumask_empty(mm_cpumask(mm)))) | ||
36 | - return; | ||
37 | /* | ||
38 | * If the machine has IDTE we prefer to do a per mm flush | ||
39 | * on all cpus instead of doing a local flush if the mm | ||
40 | diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S | ||
41 | index 74ee563..009518c 100644 | ||
42 | --- a/arch/s390/kernel/entry.S | ||
43 | +++ b/arch/s390/kernel/entry.S | ||
44 | @@ -669,7 +669,8 @@ ENTRY(mcck_int_handler) | ||
45 | UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER | ||
46 | mcck_skip: | ||
47 | SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT | ||
48 | - mvc __PT_R0(64,%r11),__LC_GPREGS_SAVE_AREA | ||
49 | + stm %r0,%r7,__PT_R0(%r11) | ||
50 | + mvc __PT_R8(32,%r11),__LC_GPREGS_SAVE_AREA+32 | ||
51 | stm %r8,%r9,__PT_PSW(%r11) | ||
52 | xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) | ||
53 | l %r1,BASED(.Ldo_machine_check) | ||
54 | diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S | ||
55 | index 4e1c292..b6f3e7c 100644 | ||
56 | --- a/arch/s390/kernel/entry64.S | ||
57 | +++ b/arch/s390/kernel/entry64.S | ||
58 | @@ -689,8 +689,9 @@ ENTRY(mcck_int_handler) | ||
59 | UPDATE_VTIME %r14,__LC_MCCK_ENTER_TIMER | ||
60 | LAST_BREAK %r14 | ||
61 | mcck_skip: | ||
62 | - lghi %r14,__LC_GPREGS_SAVE_AREA | ||
63 | - mvc __PT_R0(128,%r11),0(%r14) | ||
64 | + lghi %r14,__LC_GPREGS_SAVE_AREA+64 | ||
65 | + stmg %r0,%r7,__PT_R0(%r11) | ||
66 | + mvc __PT_R8(64,%r11),0(%r14) | ||
67 | stmg %r8,%r9,__PT_PSW(%r11) | ||
68 | xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) | ||
69 | lgr %r2,%r11 # pass pointer to pt_regs | ||
70 | diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c | ||
71 | index 7f64df1..fca48c4 100644 | ||
72 | --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c | ||
73 | +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c | ||
74 | @@ -723,3 +723,13 @@ void intel_ds_init(void) | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | + | ||
79 | +void perf_restore_debug_store(void) | ||
80 | +{ | ||
81 | + struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds); | ||
82 | + | ||
83 | + if (!x86_pmu.bts && !x86_pmu.pebs) | ||
84 | + return; | ||
85 | + | ||
86 | + wrmsrl(MSR_IA32_DS_AREA, (unsigned long)ds); | ||
87 | +} | ||
88 | diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c | ||
89 | index 218cdb1..fcbaac60 100644 | ||
90 | --- a/arch/x86/power/cpu.c | ||
91 | +++ b/arch/x86/power/cpu.c | ||
92 | @@ -11,6 +11,7 @@ | ||
93 | #include <linux/suspend.h> | ||
94 | #include <linux/export.h> | ||
95 | #include <linux/smp.h> | ||
96 | +#include <linux/perf_event.h> | ||
97 | |||
98 | #include <asm/pgtable.h> | ||
99 | #include <asm/proto.h> | ||
100 | @@ -227,6 +228,7 @@ static void __restore_processor_state(struct saved_context *ctxt) | ||
101 | do_fpu_end(); | ||
102 | x86_platform.restore_sched_clock_state(); | ||
103 | mtrr_bp_restore(); | ||
104 | + perf_restore_debug_store(); | ||
105 | } | ||
106 | |||
107 | /* Needed by apm.c */ | ||
108 | diff --git a/drivers/block/loop.c b/drivers/block/loop.c | ||
109 | index bbca966..5e3be05 100644 | ||
110 | --- a/drivers/block/loop.c | ||
111 | +++ b/drivers/block/loop.c | ||
112 | @@ -1263,11 +1263,9 @@ static int loop_set_capacity(struct loop_device *lo, struct block_device *bdev) | ||
113 | /* the width of sector_t may be narrow for bit-shift */ | ||
114 | sz = sec; | ||
115 | sz <<= 9; | ||
116 | - mutex_lock(&bdev->bd_mutex); | ||
117 | bd_set_size(bdev, sz); | ||
118 | /* let user-space know about the new size */ | ||
119 | kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE); | ||
120 | - mutex_unlock(&bdev->bd_mutex); | ||
121 | |||
122 | out: | ||
123 | return err; | ||
124 | @@ -1837,11 +1835,15 @@ static int __init loop_init(void) | ||
125 | max_part = (1UL << part_shift) - 1; | ||
126 | } | ||
127 | |||
128 | - if ((1UL << part_shift) > DISK_MAX_PARTS) | ||
129 | - return -EINVAL; | ||
130 | + if ((1UL << part_shift) > DISK_MAX_PARTS) { | ||
131 | + err = -EINVAL; | ||
132 | + goto misc_out; | ||
133 | + } | ||
134 | |||
135 | - if (max_loop > 1UL << (MINORBITS - part_shift)) | ||
136 | - return -EINVAL; | ||
137 | + if (max_loop > 1UL << (MINORBITS - part_shift)) { | ||
138 | + err = -EINVAL; | ||
139 | + goto misc_out; | ||
140 | + } | ||
141 | |||
142 | /* | ||
143 | * If max_loop is specified, create that many devices upfront. | ||
144 | @@ -1859,8 +1861,10 @@ static int __init loop_init(void) | ||
145 | range = 1UL << MINORBITS; | ||
146 | } | ||
147 | |||
148 | - if (register_blkdev(LOOP_MAJOR, "loop")) | ||
149 | - return -EIO; | ||
150 | + if (register_blkdev(LOOP_MAJOR, "loop")) { | ||
151 | + err = -EIO; | ||
152 | + goto misc_out; | ||
153 | + } | ||
154 | |||
155 | blk_register_region(MKDEV(LOOP_MAJOR, 0), range, | ||
156 | THIS_MODULE, loop_probe, NULL, NULL); | ||
157 | @@ -1873,6 +1877,10 @@ static int __init loop_init(void) | ||
158 | |||
159 | printk(KERN_INFO "loop: module loaded\n"); | ||
160 | return 0; | ||
161 | + | ||
162 | +misc_out: | ||
163 | + misc_deregister(&loop_misc); | ||
164 | + return err; | ||
165 | } | ||
166 | |||
167 | static int loop_exit_cb(int id, void *ptr, void *data) | ||
168 | diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c | ||
169 | index 723725b..171380b 100644 | ||
170 | --- a/drivers/char/hw_random/virtio-rng.c | ||
171 | +++ b/drivers/char/hw_random/virtio-rng.c | ||
172 | @@ -89,14 +89,22 @@ static int virtrng_probe(struct virtio_device *vdev) | ||
173 | { | ||
174 | int err; | ||
175 | |||
176 | + if (vq) { | ||
177 | + /* We only support one device for now */ | ||
178 | + return -EBUSY; | ||
179 | + } | ||
180 | /* We expect a single virtqueue. */ | ||
181 | vq = virtio_find_single_vq(vdev, random_recv_done, "input"); | ||
182 | - if (IS_ERR(vq)) | ||
183 | - return PTR_ERR(vq); | ||
184 | + if (IS_ERR(vq)) { | ||
185 | + err = PTR_ERR(vq); | ||
186 | + vq = NULL; | ||
187 | + return err; | ||
188 | + } | ||
189 | |||
190 | err = hwrng_register(&virtio_hwrng); | ||
191 | if (err) { | ||
192 | vdev->config->del_vqs(vdev); | ||
193 | + vq = NULL; | ||
194 | return err; | ||
195 | } | ||
196 | |||
197 | @@ -108,6 +116,7 @@ static void __devexit virtrng_remove(struct virtio_device *vdev) | ||
198 | vdev->config->reset(vdev); | ||
199 | hwrng_unregister(&virtio_hwrng); | ||
200 | vdev->config->del_vqs(vdev); | ||
201 | + vq = NULL; | ||
202 | } | ||
203 | |||
204 | static struct virtio_device_id id_table[] = { | ||
205 | diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c | ||
206 | index a230a93..eb33945 100644 | ||
207 | --- a/drivers/gpu/drm/i915/i915_gem.c | ||
208 | +++ b/drivers/gpu/drm/i915/i915_gem.c | ||
209 | @@ -1186,6 +1186,11 @@ out: | ||
210 | case 0: | ||
211 | case -ERESTARTSYS: | ||
212 | case -EINTR: | ||
213 | + case -EBUSY: | ||
214 | + /* | ||
215 | + * EBUSY is ok: this just means that another thread | ||
216 | + * already did the job. | ||
217 | + */ | ||
218 | return VM_FAULT_NOPAGE; | ||
219 | case -ENOMEM: | ||
220 | return VM_FAULT_OOM; | ||
221 | diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c | ||
222 | index 67f6db5..7ccf896 100644 | ||
223 | --- a/drivers/gpu/drm/i915/intel_display.c | ||
224 | +++ b/drivers/gpu/drm/i915/intel_display.c | ||
225 | @@ -8364,7 +8364,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) | ||
226 | I915_WRITE(GEN6_RC_SLEEP, 0); | ||
227 | I915_WRITE(GEN6_RC1e_THRESHOLD, 1000); | ||
228 | I915_WRITE(GEN6_RC6_THRESHOLD, 50000); | ||
229 | - I915_WRITE(GEN6_RC6p_THRESHOLD, 100000); | ||
230 | + I915_WRITE(GEN6_RC6p_THRESHOLD, 150000); | ||
231 | I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */ | ||
232 | |||
233 | rc6_mode = intel_enable_rc6(dev_priv->dev); | ||
234 | diff --git a/drivers/hwmon/lineage-pem.c b/drivers/hwmon/lineage-pem.c | ||
235 | index d264937..22249f4 100644 | ||
236 | --- a/drivers/hwmon/lineage-pem.c | ||
237 | +++ b/drivers/hwmon/lineage-pem.c | ||
238 | @@ -421,6 +421,7 @@ static struct attribute *pem_input_attributes[] = { | ||
239 | &sensor_dev_attr_in2_input.dev_attr.attr, | ||
240 | &sensor_dev_attr_curr1_input.dev_attr.attr, | ||
241 | &sensor_dev_attr_power1_input.dev_attr.attr, | ||
242 | + NULL | ||
243 | }; | ||
244 | |||
245 | static const struct attribute_group pem_input_group = { | ||
246 | @@ -431,6 +432,7 @@ static struct attribute *pem_fan_attributes[] = { | ||
247 | &sensor_dev_attr_fan1_input.dev_attr.attr, | ||
248 | &sensor_dev_attr_fan2_input.dev_attr.attr, | ||
249 | &sensor_dev_attr_fan3_input.dev_attr.attr, | ||
250 | + NULL | ||
251 | }; | ||
252 | |||
253 | static const struct attribute_group pem_fan_group = { | ||
254 | diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c | ||
255 | index a58de38..6d61307 100644 | ||
256 | --- a/drivers/hwmon/pmbus/ltc2978.c | ||
257 | +++ b/drivers/hwmon/pmbus/ltc2978.c | ||
258 | @@ -59,7 +59,7 @@ enum chips { ltc2978, ltc3880 }; | ||
259 | struct ltc2978_data { | ||
260 | enum chips id; | ||
261 | int vin_min, vin_max; | ||
262 | - int temp_min, temp_max; | ||
263 | + int temp_min, temp_max[2]; | ||
264 | int vout_min[8], vout_max[8]; | ||
265 | int iout_max[2]; | ||
266 | int temp2_max; | ||
267 | @@ -113,9 +113,10 @@ static int ltc2978_read_word_data_common(struct i2c_client *client, int page, | ||
268 | ret = pmbus_read_word_data(client, page, | ||
269 | LTC2978_MFR_TEMPERATURE_PEAK); | ||
270 | if (ret >= 0) { | ||
271 | - if (lin11_to_val(ret) > lin11_to_val(data->temp_max)) | ||
272 | - data->temp_max = ret; | ||
273 | - ret = data->temp_max; | ||
274 | + if (lin11_to_val(ret) | ||
275 | + > lin11_to_val(data->temp_max[page])) | ||
276 | + data->temp_max[page] = ret; | ||
277 | + ret = data->temp_max[page]; | ||
278 | } | ||
279 | break; | ||
280 | case PMBUS_VIRT_RESET_VOUT_HISTORY: | ||
281 | @@ -266,7 +267,7 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page, | ||
282 | break; | ||
283 | case PMBUS_VIRT_RESET_TEMP_HISTORY: | ||
284 | data->temp_min = 0x7bff; | ||
285 | - data->temp_max = 0x7c00; | ||
286 | + data->temp_max[page] = 0x7c00; | ||
287 | ret = ltc2978_clear_peaks(client, page, data->id); | ||
288 | break; | ||
289 | default: | ||
290 | @@ -323,7 +324,8 @@ static int ltc2978_probe(struct i2c_client *client, | ||
291 | data->vin_min = 0x7bff; | ||
292 | data->vin_max = 0x7c00; | ||
293 | data->temp_min = 0x7bff; | ||
294 | - data->temp_max = 0x7c00; | ||
295 | + for (i = 0; i < ARRAY_SIZE(data->temp_max); i++) | ||
296 | + data->temp_max[i] = 0x7c00; | ||
297 | data->temp2_max = 0x7c00; | ||
298 | |||
299 | switch (data->id) { | ||
300 | diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c | ||
301 | index eb01802..c689630 100644 | ||
302 | --- a/drivers/hwmon/sht15.c | ||
303 | +++ b/drivers/hwmon/sht15.c | ||
304 | @@ -930,7 +930,7 @@ static int __devinit sht15_probe(struct platform_device *pdev) | ||
305 | if (ret != 0) { | ||
306 | dev_err(&pdev->dev, | ||
307 | "failed to enable regulator: %d\n", ret); | ||
308 | - return ret; | ||
309 | + goto err_free_data; | ||
310 | } | ||
311 | |||
312 | /* | ||
313 | diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c | ||
314 | index 025367a..956a5ed 100644 | ||
315 | --- a/drivers/net/macvlan.c | ||
316 | +++ b/drivers/net/macvlan.c | ||
317 | @@ -584,6 +584,7 @@ void macvlan_common_setup(struct net_device *dev) | ||
318 | ether_setup(dev); | ||
319 | |||
320 | dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING); | ||
321 | + dev->priv_flags |= IFF_UNICAST_FLT; | ||
322 | dev->netdev_ops = &macvlan_netdev_ops; | ||
323 | dev->destructor = free_netdev; | ||
324 | dev->header_ops = &macvlan_hard_header_ops, | ||
325 | diff --git a/drivers/net/tun.c b/drivers/net/tun.c | ||
326 | index 147b628..c896b8f 100644 | ||
327 | --- a/drivers/net/tun.c | ||
328 | +++ b/drivers/net/tun.c | ||
329 | @@ -417,6 +417,8 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) | ||
330 | * for indefinite time. */ | ||
331 | skb_orphan(skb); | ||
332 | |||
333 | + nf_reset(skb); | ||
334 | + | ||
335 | /* Enqueue packet */ | ||
336 | skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb); | ||
337 | |||
338 | diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c | ||
339 | index 8739454..628545d 100644 | ||
340 | --- a/drivers/staging/vt6656/main_usb.c | ||
341 | +++ b/drivers/staging/vt6656/main_usb.c | ||
342 | @@ -718,8 +718,6 @@ static int vt6656_suspend(struct usb_interface *intf, pm_message_t message) | ||
343 | if (device->flags & DEVICE_FLAGS_OPENED) | ||
344 | device_close(device->dev); | ||
345 | |||
346 | - usb_put_dev(interface_to_usbdev(intf)); | ||
347 | - | ||
348 | return 0; | ||
349 | } | ||
350 | |||
351 | @@ -730,8 +728,6 @@ static int vt6656_resume(struct usb_interface *intf) | ||
352 | if (!device || !device->dev) | ||
353 | return -ENODEV; | ||
354 | |||
355 | - usb_get_dev(interface_to_usbdev(intf)); | ||
356 | - | ||
357 | if (!(device->flags & DEVICE_FLAGS_OPENED)) | ||
358 | device_open(device->dev); | ||
359 | |||
360 | diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c | ||
361 | index eeae7fa..636c539 100644 | ||
362 | --- a/drivers/tty/pty.c | ||
363 | +++ b/drivers/tty/pty.c | ||
364 | @@ -47,7 +47,6 @@ static void pty_close(struct tty_struct *tty, struct file *filp) | ||
365 | tty->packet = 0; | ||
366 | if (!tty->link) | ||
367 | return; | ||
368 | - tty->link->packet = 0; | ||
369 | set_bit(TTY_OTHER_CLOSED, &tty->link->flags); | ||
370 | wake_up_interruptible(&tty->link->read_wait); | ||
371 | wake_up_interruptible(&tty->link->write_wait); | ||
372 | diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c | ||
373 | index 40747fe..ffba1ef 100644 | ||
374 | --- a/drivers/tty/serial/8250/8250_pci.c | ||
375 | +++ b/drivers/tty/serial/8250/8250_pci.c | ||
376 | @@ -4086,6 +4086,10 @@ static struct pci_device_id serial_pci_tbl[] = { | ||
377 | PCI_VENDOR_ID_IBM, 0x0299, | ||
378 | 0, 0, pbn_b0_bt_2_115200 }, | ||
379 | |||
380 | + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, | ||
381 | + 0x1000, 0x0012, | ||
382 | + 0, 0, pbn_b0_bt_2_115200 }, | ||
383 | + | ||
384 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901, | ||
385 | 0xA000, 0x1000, | ||
386 | 0, 0, pbn_b0_1_115200 }, | ||
387 | diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig | ||
388 | index 070b442..3b2eaad 100644 | ||
389 | --- a/drivers/tty/serial/Kconfig | ||
390 | +++ b/drivers/tty/serial/Kconfig | ||
391 | @@ -197,7 +197,7 @@ config SERIAL_SAMSUNG_UARTS_4 | ||
392 | config SERIAL_SAMSUNG_UARTS | ||
393 | int | ||
394 | depends on ARM && PLAT_SAMSUNG | ||
395 | - default 6 if ARCH_S5P6450 | ||
396 | + default 6 if CPU_S5P6450 | ||
397 | default 4 if SERIAL_SAMSUNG_UARTS_4 || CPU_S3C2416 | ||
398 | default 3 | ||
399 | help | ||
400 | diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c | ||
401 | index 524fe24..9dd51f7 100644 | ||
402 | --- a/drivers/usb/class/cdc-wdm.c | ||
403 | +++ b/drivers/usb/class/cdc-wdm.c | ||
404 | @@ -81,6 +81,7 @@ MODULE_DEVICE_TABLE (usb, wdm_ids); | ||
405 | #define WDM_RESPONDING 7 | ||
406 | #define WDM_SUSPENDING 8 | ||
407 | #define WDM_RESETTING 9 | ||
408 | +#define WDM_OVERFLOW 10 | ||
409 | |||
410 | #define WDM_MAX 16 | ||
411 | |||
412 | @@ -180,6 +181,7 @@ static void wdm_in_callback(struct urb *urb) | ||
413 | { | ||
414 | struct wdm_device *desc = urb->context; | ||
415 | int status = urb->status; | ||
416 | + int length = urb->actual_length; | ||
417 | |||
418 | spin_lock(&desc->iuspin); | ||
419 | clear_bit(WDM_RESPONDING, &desc->flags); | ||
420 | @@ -210,9 +212,17 @@ static void wdm_in_callback(struct urb *urb) | ||
421 | } | ||
422 | |||
423 | desc->rerr = status; | ||
424 | - desc->reslength = urb->actual_length; | ||
425 | - memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength); | ||
426 | - desc->length += desc->reslength; | ||
427 | + if (length + desc->length > desc->wMaxCommand) { | ||
428 | + /* The buffer would overflow */ | ||
429 | + set_bit(WDM_OVERFLOW, &desc->flags); | ||
430 | + } else { | ||
431 | + /* we may already be in overflow */ | ||
432 | + if (!test_bit(WDM_OVERFLOW, &desc->flags)) { | ||
433 | + memmove(desc->ubuf + desc->length, desc->inbuf, length); | ||
434 | + desc->length += length; | ||
435 | + desc->reslength = length; | ||
436 | + } | ||
437 | + } | ||
438 | skip_error: | ||
439 | wake_up(&desc->wait); | ||
440 | |||
441 | @@ -457,6 +467,11 @@ retry: | ||
442 | rv = -ENODEV; | ||
443 | goto err; | ||
444 | } | ||
445 | + if (test_bit(WDM_OVERFLOW, &desc->flags)) { | ||
446 | + clear_bit(WDM_OVERFLOW, &desc->flags); | ||
447 | + rv = -ENOBUFS; | ||
448 | + goto err; | ||
449 | + } | ||
450 | i++; | ||
451 | if (file->f_flags & O_NONBLOCK) { | ||
452 | if (!test_bit(WDM_READ, &desc->flags)) { | ||
453 | @@ -500,6 +515,7 @@ retry: | ||
454 | spin_unlock_irq(&desc->iuspin); | ||
455 | goto retry; | ||
456 | } | ||
457 | + | ||
458 | if (!desc->reslength) { /* zero length read */ | ||
459 | dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); | ||
460 | clear_bit(WDM_READ, &desc->flags); | ||
461 | @@ -1023,6 +1039,7 @@ static int wdm_post_reset(struct usb_interface *intf) | ||
462 | struct wdm_device *desc = wdm_find_device(intf); | ||
463 | int rv; | ||
464 | |||
465 | + clear_bit(WDM_OVERFLOW, &desc->flags); | ||
466 | clear_bit(WDM_RESETTING, &desc->flags); | ||
467 | rv = recover_from_urb_loss(desc); | ||
468 | mutex_unlock(&desc->wlock); | ||
469 | diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c | ||
470 | index 7261e8f..e305689 100644 | ||
471 | --- a/drivers/usb/host/ehci-q.c | ||
472 | +++ b/drivers/usb/host/ehci-q.c | ||
473 | @@ -135,7 +135,7 @@ qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh) | ||
474 | * qtd is updated in qh_completions(). Update the QH | ||
475 | * overlay here. | ||
476 | */ | ||
477 | - if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) { | ||
478 | + if (qh->hw->hw_token & ACTIVE_BIT(ehci)) { | ||
479 | qh->hw->hw_qtd_next = qtd->hw_next; | ||
480 | qtd = NULL; | ||
481 | } | ||
482 | @@ -459,11 +459,19 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) | ||
483 | else if (last_status == -EINPROGRESS && !urb->unlinked) | ||
484 | continue; | ||
485 | |||
486 | - /* qh unlinked; token in overlay may be most current */ | ||
487 | - if (state == QH_STATE_IDLE | ||
488 | - && cpu_to_hc32(ehci, qtd->qtd_dma) | ||
489 | - == hw->hw_current) { | ||
490 | + /* | ||
491 | + * If this was the active qtd when the qh was unlinked | ||
492 | + * and the overlay's token is active, then the overlay | ||
493 | + * hasn't been written back to the qtd yet so use its | ||
494 | + * token instead of the qtd's. After the qtd is | ||
495 | + * processed and removed, the overlay won't be valid | ||
496 | + * any more. | ||
497 | + */ | ||
498 | + if (state == QH_STATE_IDLE && | ||
499 | + qh->qtd_list.next == &qtd->qtd_list && | ||
500 | + (hw->hw_token & ACTIVE_BIT(ehci))) { | ||
501 | token = hc32_to_cpu(ehci, hw->hw_token); | ||
502 | + hw->hw_token &= ~ACTIVE_BIT(ehci); | ||
503 | |||
504 | /* An unlink may leave an incomplete | ||
505 | * async transaction in the TT buffer. | ||
506 | diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c | ||
507 | index f38a278..d9811e4 100644 | ||
508 | --- a/drivers/usb/serial/cp210x.c | ||
509 | +++ b/drivers/usb/serial/cp210x.c | ||
510 | @@ -91,6 +91,7 @@ static const struct usb_device_id id_table[] = { | ||
511 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ | ||
512 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ | ||
513 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ | ||
514 | + { USB_DEVICE(0x2405, 0x0003) }, /* West Mountain Radio RIGblaster Advantage */ | ||
515 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ | ||
516 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ | ||
517 | { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */ | ||
518 | @@ -156,6 +157,25 @@ static const struct usb_device_id id_table[] = { | ||
519 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ | ||
520 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ | ||
521 | { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ | ||
522 | + { USB_DEVICE(0x1FB9, 0x0100) }, /* Lake Shore Model 121 Current Source */ | ||
523 | + { USB_DEVICE(0x1FB9, 0x0200) }, /* Lake Shore Model 218A Temperature Monitor */ | ||
524 | + { USB_DEVICE(0x1FB9, 0x0201) }, /* Lake Shore Model 219 Temperature Monitor */ | ||
525 | + { USB_DEVICE(0x1FB9, 0x0202) }, /* Lake Shore Model 233 Temperature Transmitter */ | ||
526 | + { USB_DEVICE(0x1FB9, 0x0203) }, /* Lake Shore Model 235 Temperature Transmitter */ | ||
527 | + { USB_DEVICE(0x1FB9, 0x0300) }, /* Lake Shore Model 335 Temperature Controller */ | ||
528 | + { USB_DEVICE(0x1FB9, 0x0301) }, /* Lake Shore Model 336 Temperature Controller */ | ||
529 | + { USB_DEVICE(0x1FB9, 0x0302) }, /* Lake Shore Model 350 Temperature Controller */ | ||
530 | + { USB_DEVICE(0x1FB9, 0x0303) }, /* Lake Shore Model 371 AC Bridge */ | ||
531 | + { USB_DEVICE(0x1FB9, 0x0400) }, /* Lake Shore Model 411 Handheld Gaussmeter */ | ||
532 | + { USB_DEVICE(0x1FB9, 0x0401) }, /* Lake Shore Model 425 Gaussmeter */ | ||
533 | + { USB_DEVICE(0x1FB9, 0x0402) }, /* Lake Shore Model 455A Gaussmeter */ | ||
534 | + { USB_DEVICE(0x1FB9, 0x0403) }, /* Lake Shore Model 475A Gaussmeter */ | ||
535 | + { USB_DEVICE(0x1FB9, 0x0404) }, /* Lake Shore Model 465 Three Axis Gaussmeter */ | ||
536 | + { USB_DEVICE(0x1FB9, 0x0600) }, /* Lake Shore Model 625A Superconducting MPS */ | ||
537 | + { USB_DEVICE(0x1FB9, 0x0601) }, /* Lake Shore Model 642A Magnet Power Supply */ | ||
538 | + { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ | ||
539 | + { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ | ||
540 | + { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ | ||
541 | { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ | ||
542 | { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ | ||
543 | { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */ | ||
544 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c | ||
545 | index 539247b..78c4774 100644 | ||
546 | --- a/drivers/usb/serial/option.c | ||
547 | +++ b/drivers/usb/serial/option.c | ||
548 | @@ -341,6 +341,8 @@ static void option_instat_callback(struct urb *urb); | ||
549 | #define CINTERION_PRODUCT_EU3_E 0x0051 | ||
550 | #define CINTERION_PRODUCT_EU3_P 0x0052 | ||
551 | #define CINTERION_PRODUCT_PH8 0x0053 | ||
552 | +#define CINTERION_PRODUCT_AH6 0x0055 | ||
553 | +#define CINTERION_PRODUCT_PLS8 0x0060 | ||
554 | |||
555 | /* Olivetti products */ | ||
556 | #define OLIVETTI_VENDOR_ID 0x0b3c | ||
557 | @@ -579,6 +581,7 @@ static const struct usb_device_id option_ids[] = { | ||
558 | { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), | ||
559 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | ||
560 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) }, | ||
561 | + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c1f, USB_CLASS_COMM, 0x02, 0xff) }, | ||
562 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, | ||
563 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), | ||
564 | .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, | ||
565 | @@ -1260,6 +1263,8 @@ static const struct usb_device_id option_ids[] = { | ||
566 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) }, | ||
567 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, | ||
568 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) }, | ||
569 | + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AH6) }, | ||
570 | + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLS8) }, | ||
571 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, | ||
572 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, | ||
573 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) }, | ||
574 | diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c | ||
575 | index b223381..018f103 100644 | ||
576 | --- a/drivers/usb/serial/qcaux.c | ||
577 | +++ b/drivers/usb/serial/qcaux.c | ||
578 | @@ -69,6 +69,7 @@ static struct usb_device_id id_table[] = { | ||
579 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfd, 0xff) }, /* NMEA */ | ||
580 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe, 0xff) }, /* WMC */ | ||
581 | { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff, 0xff) }, /* DIAG */ | ||
582 | + { USB_DEVICE_AND_INTERFACE_INFO(0x1fac, 0x0151, 0xff, 0xff, 0xff) }, | ||
583 | { }, | ||
584 | }; | ||
585 | MODULE_DEVICE_TABLE(usb, id_table); | ||
586 | diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c | ||
587 | index 7ab9046..105d900 100644 | ||
588 | --- a/drivers/usb/storage/initializers.c | ||
589 | +++ b/drivers/usb/storage/initializers.c | ||
590 | @@ -92,8 +92,8 @@ int usb_stor_ucr61s2b_init(struct us_data *us) | ||
591 | return 0; | ||
592 | } | ||
593 | |||
594 | -/* This places the HUAWEI usb dongles in multi-port mode */ | ||
595 | -static int usb_stor_huawei_feature_init(struct us_data *us) | ||
596 | +/* This places the HUAWEI E220 devices in multi-port mode */ | ||
597 | +int usb_stor_huawei_e220_init(struct us_data *us) | ||
598 | { | ||
599 | int result; | ||
600 | |||
601 | @@ -104,75 +104,3 @@ static int usb_stor_huawei_feature_init(struct us_data *us) | ||
602 | US_DEBUGP("Huawei mode set result is %d\n", result); | ||
603 | return 0; | ||
604 | } | ||
605 | - | ||
606 | -/* | ||
607 | - * It will send a scsi switch command called rewind' to huawei dongle. | ||
608 | - * When the dongle receives this command at the first time, | ||
609 | - * it will reboot immediately. After rebooted, it will ignore this command. | ||
610 | - * So it is unnecessary to read its response. | ||
611 | - */ | ||
612 | -static int usb_stor_huawei_scsi_init(struct us_data *us) | ||
613 | -{ | ||
614 | - int result = 0; | ||
615 | - int act_len = 0; | ||
616 | - struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf; | ||
617 | - char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00, | ||
618 | - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | ||
619 | - | ||
620 | - bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN); | ||
621 | - bcbw->Tag = 0; | ||
622 | - bcbw->DataTransferLength = 0; | ||
623 | - bcbw->Flags = bcbw->Lun = 0; | ||
624 | - bcbw->Length = sizeof(rewind_cmd); | ||
625 | - memset(bcbw->CDB, 0, sizeof(bcbw->CDB)); | ||
626 | - memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd)); | ||
627 | - | ||
628 | - result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw, | ||
629 | - US_BULK_CB_WRAP_LEN, &act_len); | ||
630 | - US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result); | ||
631 | - return result; | ||
632 | -} | ||
633 | - | ||
634 | -/* | ||
635 | - * It tries to find the supported Huawei USB dongles. | ||
636 | - * In Huawei, they assign the following product IDs | ||
637 | - * for all of their mobile broadband dongles, | ||
638 | - * including the new dongles in the future. | ||
639 | - * So if the product ID is not included in this list, | ||
640 | - * it means it is not Huawei's mobile broadband dongles. | ||
641 | - */ | ||
642 | -static int usb_stor_huawei_dongles_pid(struct us_data *us) | ||
643 | -{ | ||
644 | - struct usb_interface_descriptor *idesc; | ||
645 | - int idProduct; | ||
646 | - | ||
647 | - idesc = &us->pusb_intf->cur_altsetting->desc; | ||
648 | - idProduct = le16_to_cpu(us->pusb_dev->descriptor.idProduct); | ||
649 | - /* The first port is CDROM, | ||
650 | - * means the dongle in the single port mode, | ||
651 | - * and a switch command is required to be sent. */ | ||
652 | - if (idesc && idesc->bInterfaceNumber == 0) { | ||
653 | - if ((idProduct == 0x1001) | ||
654 | - || (idProduct == 0x1003) | ||
655 | - || (idProduct == 0x1004) | ||
656 | - || (idProduct >= 0x1401 && idProduct <= 0x1500) | ||
657 | - || (idProduct >= 0x1505 && idProduct <= 0x1600) | ||
658 | - || (idProduct >= 0x1c02 && idProduct <= 0x2202)) { | ||
659 | - return 1; | ||
660 | - } | ||
661 | - } | ||
662 | - return 0; | ||
663 | -} | ||
664 | - | ||
665 | -int usb_stor_huawei_init(struct us_data *us) | ||
666 | -{ | ||
667 | - int result = 0; | ||
668 | - | ||
669 | - if (usb_stor_huawei_dongles_pid(us)) { | ||
670 | - if (le16_to_cpu(us->pusb_dev->descriptor.idProduct) >= 0x1446) | ||
671 | - result = usb_stor_huawei_scsi_init(us); | ||
672 | - else | ||
673 | - result = usb_stor_huawei_feature_init(us); | ||
674 | - } | ||
675 | - return result; | ||
676 | -} | ||
677 | diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h | ||
678 | index 5376d4f..529327f 100644 | ||
679 | --- a/drivers/usb/storage/initializers.h | ||
680 | +++ b/drivers/usb/storage/initializers.h | ||
681 | @@ -46,5 +46,5 @@ int usb_stor_euscsi_init(struct us_data *us); | ||
682 | * flash reader */ | ||
683 | int usb_stor_ucr61s2b_init(struct us_data *us); | ||
684 | |||
685 | -/* This places the HUAWEI usb dongles in multi-port mode */ | ||
686 | -int usb_stor_huawei_init(struct us_data *us); | ||
687 | +/* This places the HUAWEI E220 devices in multi-port mode */ | ||
688 | +int usb_stor_huawei_e220_init(struct us_data *us); | ||
689 | diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h | ||
690 | index 27858f9..5ffa116 100644 | ||
691 | --- a/drivers/usb/storage/unusual_devs.h | ||
692 | +++ b/drivers/usb/storage/unusual_devs.h | ||
693 | @@ -1515,10 +1515,335 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, | ||
694 | /* Reported by fangxiaozhi <huananhu@huawei.com> | ||
695 | * This brings the HUAWEI data card devices into multi-port mode | ||
696 | */ | ||
697 | -UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50, | ||
698 | +UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, | ||
699 | "HUAWEI MOBILE", | ||
700 | "Mass Storage", | ||
701 | - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init, | ||
702 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
703 | + 0), | ||
704 | +UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, | ||
705 | + "HUAWEI MOBILE", | ||
706 | + "Mass Storage", | ||
707 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
708 | + 0), | ||
709 | +UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, | ||
710 | + "HUAWEI MOBILE", | ||
711 | + "Mass Storage", | ||
712 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
713 | + 0), | ||
714 | +UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, | ||
715 | + "HUAWEI MOBILE", | ||
716 | + "Mass Storage", | ||
717 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
718 | + 0), | ||
719 | +UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000, | ||
720 | + "HUAWEI MOBILE", | ||
721 | + "Mass Storage", | ||
722 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
723 | + 0), | ||
724 | +UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, | ||
725 | + "HUAWEI MOBILE", | ||
726 | + "Mass Storage", | ||
727 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
728 | + 0), | ||
729 | +UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000, | ||
730 | + "HUAWEI MOBILE", | ||
731 | + "Mass Storage", | ||
732 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
733 | + 0), | ||
734 | +UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, | ||
735 | + "HUAWEI MOBILE", | ||
736 | + "Mass Storage", | ||
737 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
738 | + 0), | ||
739 | +UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, | ||
740 | + "HUAWEI MOBILE", | ||
741 | + "Mass Storage", | ||
742 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
743 | + 0), | ||
744 | +UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000, | ||
745 | + "HUAWEI MOBILE", | ||
746 | + "Mass Storage", | ||
747 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
748 | + 0), | ||
749 | +UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, | ||
750 | + "HUAWEI MOBILE", | ||
751 | + "Mass Storage", | ||
752 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
753 | + 0), | ||
754 | +UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, | ||
755 | + "HUAWEI MOBILE", | ||
756 | + "Mass Storage", | ||
757 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
758 | + 0), | ||
759 | +UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000, | ||
760 | + "HUAWEI MOBILE", | ||
761 | + "Mass Storage", | ||
762 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
763 | + 0), | ||
764 | +UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000, | ||
765 | + "HUAWEI MOBILE", | ||
766 | + "Mass Storage", | ||
767 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
768 | + 0), | ||
769 | +UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000, | ||
770 | + "HUAWEI MOBILE", | ||
771 | + "Mass Storage", | ||
772 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
773 | + 0), | ||
774 | +UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000, | ||
775 | + "HUAWEI MOBILE", | ||
776 | + "Mass Storage", | ||
777 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
778 | + 0), | ||
779 | +UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000, | ||
780 | + "HUAWEI MOBILE", | ||
781 | + "Mass Storage", | ||
782 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
783 | + 0), | ||
784 | +UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000, | ||
785 | + "HUAWEI MOBILE", | ||
786 | + "Mass Storage", | ||
787 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
788 | + 0), | ||
789 | +UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, | ||
790 | + "HUAWEI MOBILE", | ||
791 | + "Mass Storage", | ||
792 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
793 | + 0), | ||
794 | +UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, | ||
795 | + "HUAWEI MOBILE", | ||
796 | + "Mass Storage", | ||
797 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
798 | + 0), | ||
799 | +UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, | ||
800 | + "HUAWEI MOBILE", | ||
801 | + "Mass Storage", | ||
802 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
803 | + 0), | ||
804 | +UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, | ||
805 | + "HUAWEI MOBILE", | ||
806 | + "Mass Storage", | ||
807 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
808 | + 0), | ||
809 | +UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, | ||
810 | + "HUAWEI MOBILE", | ||
811 | + "Mass Storage", | ||
812 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
813 | + 0), | ||
814 | +UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, | ||
815 | + "HUAWEI MOBILE", | ||
816 | + "Mass Storage", | ||
817 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
818 | + 0), | ||
819 | +UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, | ||
820 | + "HUAWEI MOBILE", | ||
821 | + "Mass Storage", | ||
822 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
823 | + 0), | ||
824 | +UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, | ||
825 | + "HUAWEI MOBILE", | ||
826 | + "Mass Storage", | ||
827 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
828 | + 0), | ||
829 | +UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, | ||
830 | + "HUAWEI MOBILE", | ||
831 | + "Mass Storage", | ||
832 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
833 | + 0), | ||
834 | +UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, | ||
835 | + "HUAWEI MOBILE", | ||
836 | + "Mass Storage", | ||
837 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
838 | + 0), | ||
839 | +UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000, | ||
840 | + "HUAWEI MOBILE", | ||
841 | + "Mass Storage", | ||
842 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
843 | + 0), | ||
844 | +UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000, | ||
845 | + "HUAWEI MOBILE", | ||
846 | + "Mass Storage", | ||
847 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
848 | + 0), | ||
849 | +UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000, | ||
850 | + "HUAWEI MOBILE", | ||
851 | + "Mass Storage", | ||
852 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
853 | + 0), | ||
854 | +UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000, | ||
855 | + "HUAWEI MOBILE", | ||
856 | + "Mass Storage", | ||
857 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
858 | + 0), | ||
859 | +UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000, | ||
860 | + "HUAWEI MOBILE", | ||
861 | + "Mass Storage", | ||
862 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
863 | + 0), | ||
864 | +UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000, | ||
865 | + "HUAWEI MOBILE", | ||
866 | + "Mass Storage", | ||
867 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
868 | + 0), | ||
869 | +UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000, | ||
870 | + "HUAWEI MOBILE", | ||
871 | + "Mass Storage", | ||
872 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
873 | + 0), | ||
874 | +UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000, | ||
875 | + "HUAWEI MOBILE", | ||
876 | + "Mass Storage", | ||
877 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
878 | + 0), | ||
879 | +UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000, | ||
880 | + "HUAWEI MOBILE", | ||
881 | + "Mass Storage", | ||
882 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
883 | + 0), | ||
884 | +UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000, | ||
885 | + "HUAWEI MOBILE", | ||
886 | + "Mass Storage", | ||
887 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
888 | + 0), | ||
889 | +UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000, | ||
890 | + "HUAWEI MOBILE", | ||
891 | + "Mass Storage", | ||
892 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
893 | + 0), | ||
894 | +UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000, | ||
895 | + "HUAWEI MOBILE", | ||
896 | + "Mass Storage", | ||
897 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
898 | + 0), | ||
899 | +UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000, | ||
900 | + "HUAWEI MOBILE", | ||
901 | + "Mass Storage", | ||
902 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
903 | + 0), | ||
904 | +UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000, | ||
905 | + "HUAWEI MOBILE", | ||
906 | + "Mass Storage", | ||
907 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
908 | + 0), | ||
909 | +UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000, | ||
910 | + "HUAWEI MOBILE", | ||
911 | + "Mass Storage", | ||
912 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
913 | + 0), | ||
914 | +UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000, | ||
915 | + "HUAWEI MOBILE", | ||
916 | + "Mass Storage", | ||
917 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
918 | + 0), | ||
919 | +UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000, | ||
920 | + "HUAWEI MOBILE", | ||
921 | + "Mass Storage", | ||
922 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
923 | + 0), | ||
924 | +UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000, | ||
925 | + "HUAWEI MOBILE", | ||
926 | + "Mass Storage", | ||
927 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
928 | + 0), | ||
929 | +UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000, | ||
930 | + "HUAWEI MOBILE", | ||
931 | + "Mass Storage", | ||
932 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
933 | + 0), | ||
934 | +UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000, | ||
935 | + "HUAWEI MOBILE", | ||
936 | + "Mass Storage", | ||
937 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
938 | + 0), | ||
939 | +UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000, | ||
940 | + "HUAWEI MOBILE", | ||
941 | + "Mass Storage", | ||
942 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
943 | + 0), | ||
944 | +UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000, | ||
945 | + "HUAWEI MOBILE", | ||
946 | + "Mass Storage", | ||
947 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
948 | + 0), | ||
949 | +UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000, | ||
950 | + "HUAWEI MOBILE", | ||
951 | + "Mass Storage", | ||
952 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
953 | + 0), | ||
954 | +UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000, | ||
955 | + "HUAWEI MOBILE", | ||
956 | + "Mass Storage", | ||
957 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
958 | + 0), | ||
959 | +UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000, | ||
960 | + "HUAWEI MOBILE", | ||
961 | + "Mass Storage", | ||
962 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
963 | + 0), | ||
964 | +UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000, | ||
965 | + "HUAWEI MOBILE", | ||
966 | + "Mass Storage", | ||
967 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
968 | + 0), | ||
969 | +UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000, | ||
970 | + "HUAWEI MOBILE", | ||
971 | + "Mass Storage", | ||
972 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
973 | + 0), | ||
974 | +UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000, | ||
975 | + "HUAWEI MOBILE", | ||
976 | + "Mass Storage", | ||
977 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
978 | + 0), | ||
979 | +UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000, | ||
980 | + "HUAWEI MOBILE", | ||
981 | + "Mass Storage", | ||
982 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
983 | + 0), | ||
984 | +UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000, | ||
985 | + "HUAWEI MOBILE", | ||
986 | + "Mass Storage", | ||
987 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
988 | + 0), | ||
989 | +UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000, | ||
990 | + "HUAWEI MOBILE", | ||
991 | + "Mass Storage", | ||
992 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
993 | + 0), | ||
994 | +UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000, | ||
995 | + "HUAWEI MOBILE", | ||
996 | + "Mass Storage", | ||
997 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
998 | + 0), | ||
999 | +UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000, | ||
1000 | + "HUAWEI MOBILE", | ||
1001 | + "Mass Storage", | ||
1002 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1003 | + 0), | ||
1004 | +UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000, | ||
1005 | + "HUAWEI MOBILE", | ||
1006 | + "Mass Storage", | ||
1007 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1008 | + 0), | ||
1009 | +UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000, | ||
1010 | + "HUAWEI MOBILE", | ||
1011 | + "Mass Storage", | ||
1012 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1013 | + 0), | ||
1014 | +UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000, | ||
1015 | + "HUAWEI MOBILE", | ||
1016 | + "Mass Storage", | ||
1017 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1018 | + 0), | ||
1019 | +UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000, | ||
1020 | + "HUAWEI MOBILE", | ||
1021 | + "Mass Storage", | ||
1022 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1023 | + 0), | ||
1024 | +UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000, | ||
1025 | + "HUAWEI MOBILE", | ||
1026 | + "Mass Storage", | ||
1027 | + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, | ||
1028 | 0), | ||
1029 | |||
1030 | /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */ | ||
1031 | diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c | ||
1032 | index d99505b..78506eb 100644 | ||
1033 | --- a/drivers/video/atmel_lcdfb.c | ||
1034 | +++ b/drivers/video/atmel_lcdfb.c | ||
1035 | @@ -422,17 +422,22 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, | ||
1036 | = var->bits_per_pixel; | ||
1037 | break; | ||
1038 | case 16: | ||
1039 | + /* Older SOCs use IBGR:555 rather than BGR:565. */ | ||
1040 | + if (sinfo->have_intensity_bit) | ||
1041 | + var->green.length = 5; | ||
1042 | + else | ||
1043 | + var->green.length = 6; | ||
1044 | + | ||
1045 | if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) { | ||
1046 | - /* RGB:565 mode */ | ||
1047 | - var->red.offset = 11; | ||
1048 | + /* RGB:5X5 mode */ | ||
1049 | + var->red.offset = var->green.length + 5; | ||
1050 | var->blue.offset = 0; | ||
1051 | } else { | ||
1052 | - /* BGR:565 mode */ | ||
1053 | + /* BGR:5X5 mode */ | ||
1054 | var->red.offset = 0; | ||
1055 | - var->blue.offset = 11; | ||
1056 | + var->blue.offset = var->green.length + 5; | ||
1057 | } | ||
1058 | var->green.offset = 5; | ||
1059 | - var->green.length = 6; | ||
1060 | var->red.length = var->blue.length = 5; | ||
1061 | break; | ||
1062 | case 32: | ||
1063 | @@ -679,8 +684,7 @@ static int atmel_lcdfb_setcolreg(unsigned int regno, unsigned int red, | ||
1064 | |||
1065 | case FB_VISUAL_PSEUDOCOLOR: | ||
1066 | if (regno < 256) { | ||
1067 | - if (cpu_is_at91sam9261() || cpu_is_at91sam9263() | ||
1068 | - || cpu_is_at91sam9rl()) { | ||
1069 | + if (sinfo->have_intensity_bit) { | ||
1070 | /* old style I+BGR:555 */ | ||
1071 | val = ((red >> 11) & 0x001f); | ||
1072 | val |= ((green >> 6) & 0x03e0); | ||
1073 | @@ -870,6 +874,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | ||
1074 | } | ||
1075 | sinfo->info = info; | ||
1076 | sinfo->pdev = pdev; | ||
1077 | + if (cpu_is_at91sam9261() || cpu_is_at91sam9263() || | ||
1078 | + cpu_is_at91sam9rl()) { | ||
1079 | + sinfo->have_intensity_bit = true; | ||
1080 | + } | ||
1081 | |||
1082 | strcpy(info->fix.id, sinfo->pdev->name); | ||
1083 | info->flags = ATMEL_LCDFB_FBINFO_DEFAULT; | ||
1084 | diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c | ||
1085 | index 9761950..c9bc19f 100644 | ||
1086 | --- a/drivers/w1/w1.c | ||
1087 | +++ b/drivers/w1/w1.c | ||
1088 | @@ -928,7 +928,8 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb | ||
1089 | tmp64 = (triplet_ret >> 2); | ||
1090 | rn |= (tmp64 << i); | ||
1091 | |||
1092 | - if (kthread_should_stop()) { | ||
1093 | + /* ensure we're called from kthread and not by netlink callback */ | ||
1094 | + if (!dev->priv && kthread_should_stop()) { | ||
1095 | dev_dbg(&dev->dev, "Abort w1_search\n"); | ||
1096 | return; | ||
1097 | } | ||
1098 | diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c | ||
1099 | index 97f5d26..b6df20a 100644 | ||
1100 | --- a/drivers/xen/xen-pciback/pciback_ops.c | ||
1101 | +++ b/drivers/xen/xen-pciback/pciback_ops.c | ||
1102 | @@ -113,7 +113,8 @@ void xen_pcibk_reset_device(struct pci_dev *dev) | ||
1103 | if (dev->msi_enabled) | ||
1104 | pci_disable_msi(dev); | ||
1105 | #endif | ||
1106 | - pci_disable_device(dev); | ||
1107 | + if (pci_is_enabled(dev)) | ||
1108 | + pci_disable_device(dev); | ||
1109 | |||
1110 | pci_write_config_word(dev, PCI_COMMAND, 0); | ||
1111 | |||
1112 | diff --git a/fs/block_dev.c b/fs/block_dev.c | ||
1113 | index b3be92c..a6e1e06 100644 | ||
1114 | --- a/fs/block_dev.c | ||
1115 | +++ b/fs/block_dev.c | ||
1116 | @@ -1086,7 +1086,9 @@ void bd_set_size(struct block_device *bdev, loff_t size) | ||
1117 | { | ||
1118 | unsigned bsize = bdev_logical_block_size(bdev); | ||
1119 | |||
1120 | - bdev->bd_inode->i_size = size; | ||
1121 | + mutex_lock(&bdev->bd_inode->i_mutex); | ||
1122 | + i_size_write(bdev->bd_inode, size); | ||
1123 | + mutex_unlock(&bdev->bd_inode->i_mutex); | ||
1124 | while (bsize < PAGE_CACHE_SIZE) { | ||
1125 | if (size & bsize) | ||
1126 | break; | ||
1127 | diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c | ||
1128 | index 3ad7ee9..06744f1 100644 | ||
1129 | --- a/fs/btrfs/volumes.c | ||
1130 | +++ b/fs/btrfs/volumes.c | ||
1131 | @@ -591,6 +591,12 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices) | ||
1132 | __btrfs_close_devices(fs_devices); | ||
1133 | free_fs_devices(fs_devices); | ||
1134 | } | ||
1135 | + /* | ||
1136 | + * Wait for rcu kworkers under __btrfs_close_devices | ||
1137 | + * to finish all blkdev_puts so device is really | ||
1138 | + * free when umount is done. | ||
1139 | + */ | ||
1140 | + rcu_barrier(); | ||
1141 | return ret; | ||
1142 | } | ||
1143 | |||
1144 | diff --git a/fs/ext3/super.c b/fs/ext3/super.c | ||
1145 | index cf0b592..ef4c812 100644 | ||
1146 | --- a/fs/ext3/super.c | ||
1147 | +++ b/fs/ext3/super.c | ||
1148 | @@ -364,7 +364,7 @@ static struct block_device *ext3_blkdev_get(dev_t dev, struct super_block *sb) | ||
1149 | return bdev; | ||
1150 | |||
1151 | fail: | ||
1152 | - ext3_msg(sb, "error: failed to open journal device %s: %ld", | ||
1153 | + ext3_msg(sb, KERN_ERR, "error: failed to open journal device %s: %ld", | ||
1154 | __bdevname(dev, b), PTR_ERR(bdev)); | ||
1155 | |||
1156 | return NULL; | ||
1157 | @@ -891,7 +891,7 @@ static ext3_fsblk_t get_sb_block(void **data, struct super_block *sb) | ||
1158 | /*todo: use simple_strtoll with >32bit ext3 */ | ||
1159 | sb_block = simple_strtoul(options, &options, 0); | ||
1160 | if (*options && *options != ',') { | ||
1161 | - ext3_msg(sb, "error: invalid sb specification: %s", | ||
1162 | + ext3_msg(sb, KERN_ERR, "error: invalid sb specification: %s", | ||
1163 | (char *) *data); | ||
1164 | return 1; | ||
1165 | } | ||
1166 | diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h | ||
1167 | index f18d537..8e9a069 100644 | ||
1168 | --- a/include/linux/perf_event.h | ||
1169 | +++ b/include/linux/perf_event.h | ||
1170 | @@ -1330,6 +1330,12 @@ static inline void perf_event_disable(struct perf_event *event) { } | ||
1171 | static inline void perf_event_task_tick(void) { } | ||
1172 | #endif | ||
1173 | |||
1174 | +#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) | ||
1175 | +extern void perf_restore_debug_store(void); | ||
1176 | +#else | ||
1177 | +static inline void perf_restore_debug_store(void) { } | ||
1178 | +#endif | ||
1179 | + | ||
1180 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) | ||
1181 | |||
1182 | /* | ||
1183 | diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h | ||
1184 | index 28447f1..5f0e234 100644 | ||
1185 | --- a/include/video/atmel_lcdc.h | ||
1186 | +++ b/include/video/atmel_lcdc.h | ||
1187 | @@ -62,6 +62,7 @@ struct atmel_lcdfb_info { | ||
1188 | void (*atmel_lcdfb_power_control)(int on); | ||
1189 | struct fb_monspecs *default_monspecs; | ||
1190 | u32 pseudo_palette[16]; | ||
1191 | + bool have_intensity_bit; | ||
1192 | }; | ||
1193 | |||
1194 | #define ATMEL_LCDC_DMABADDR1 0x00 | ||
1195 | diff --git a/kernel/signal.c b/kernel/signal.c | ||
1196 | index a4363a9..9f70f45 100644 | ||
1197 | --- a/kernel/signal.c | ||
1198 | +++ b/kernel/signal.c | ||
1199 | @@ -482,6 +482,9 @@ flush_signal_handlers(struct task_struct *t, int force_default) | ||
1200 | if (force_default || ka->sa.sa_handler != SIG_IGN) | ||
1201 | ka->sa.sa_handler = SIG_DFL; | ||
1202 | ka->sa.sa_flags = 0; | ||
1203 | +#ifdef SA_RESTORER | ||
1204 | + ka->sa.sa_restorer = NULL; | ||
1205 | +#endif | ||
1206 | sigemptyset(&ka->sa.sa_mask); | ||
1207 | ka++; | ||
1208 | } | ||
1209 | diff --git a/net/core/dev.c b/net/core/dev.c | ||
1210 | index eb858dc..dfa2f49 100644 | ||
1211 | --- a/net/core/dev.c | ||
1212 | +++ b/net/core/dev.c | ||
1213 | @@ -3230,6 +3230,7 @@ ncls: | ||
1214 | } | ||
1215 | switch (rx_handler(&skb)) { | ||
1216 | case RX_HANDLER_CONSUMED: | ||
1217 | + ret = NET_RX_SUCCESS; | ||
1218 | goto out; | ||
1219 | case RX_HANDLER_ANOTHER: | ||
1220 | goto another_round; | ||
1221 | diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c | ||
1222 | index 900fc61..da7b3a5 100644 | ||
1223 | --- a/net/core/rtnetlink.c | ||
1224 | +++ b/net/core/rtnetlink.c | ||
1225 | @@ -975,6 +975,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | ||
1226 | * report anything. | ||
1227 | */ | ||
1228 | ivi.spoofchk = -1; | ||
1229 | + memset(ivi.mac, 0, sizeof(ivi.mac)); | ||
1230 | if (dev->netdev_ops->ndo_get_vf_config(dev, i, &ivi)) | ||
1231 | break; | ||
1232 | vf_mac.vf = | ||
1233 | diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c | ||
1234 | index d860530..2f9517d 100644 | ||
1235 | --- a/net/dcb/dcbnl.c | ||
1236 | +++ b/net/dcb/dcbnl.c | ||
1237 | @@ -336,6 +336,7 @@ static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlattr **tb, | ||
1238 | dcb->dcb_family = AF_UNSPEC; | ||
1239 | dcb->cmd = DCB_CMD_GPERM_HWADDR; | ||
1240 | |||
1241 | + memset(perm_addr, 0, sizeof(perm_addr)); | ||
1242 | netdev->dcbnl_ops->getpermhwaddr(netdev, perm_addr); | ||
1243 | |||
1244 | ret = nla_put(dcbnl_skb, DCB_ATTR_PERM_HWADDR, sizeof(perm_addr), | ||
1245 | @@ -1238,6 +1239,7 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev) | ||
1246 | |||
1247 | if (ops->ieee_getets) { | ||
1248 | struct ieee_ets ets; | ||
1249 | + memset(&ets, 0, sizeof(ets)); | ||
1250 | err = ops->ieee_getets(netdev, &ets); | ||
1251 | if (!err) | ||
1252 | NLA_PUT(skb, DCB_ATTR_IEEE_ETS, sizeof(ets), &ets); | ||
1253 | @@ -1245,6 +1247,7 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev) | ||
1254 | |||
1255 | if (ops->ieee_getpfc) { | ||
1256 | struct ieee_pfc pfc; | ||
1257 | + memset(&pfc, 0, sizeof(pfc)); | ||
1258 | err = ops->ieee_getpfc(netdev, &pfc); | ||
1259 | if (!err) | ||
1260 | NLA_PUT(skb, DCB_ATTR_IEEE_PFC, sizeof(pfc), &pfc); | ||
1261 | @@ -1277,6 +1280,7 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev) | ||
1262 | /* get peer info if available */ | ||
1263 | if (ops->ieee_peer_getets) { | ||
1264 | struct ieee_ets ets; | ||
1265 | + memset(&ets, 0, sizeof(ets)); | ||
1266 | err = ops->ieee_peer_getets(netdev, &ets); | ||
1267 | if (!err) | ||
1268 | NLA_PUT(skb, DCB_ATTR_IEEE_PEER_ETS, sizeof(ets), &ets); | ||
1269 | @@ -1284,6 +1288,7 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev) | ||
1270 | |||
1271 | if (ops->ieee_peer_getpfc) { | ||
1272 | struct ieee_pfc pfc; | ||
1273 | + memset(&pfc, 0, sizeof(pfc)); | ||
1274 | err = ops->ieee_peer_getpfc(netdev, &pfc); | ||
1275 | if (!err) | ||
1276 | NLA_PUT(skb, DCB_ATTR_IEEE_PEER_PFC, sizeof(pfc), &pfc); | ||
1277 | @@ -1463,6 +1468,7 @@ static int dcbnl_cee_fill(struct sk_buff *skb, struct net_device *netdev) | ||
1278 | /* peer info if available */ | ||
1279 | if (ops->cee_peer_getpg) { | ||
1280 | struct cee_pg pg; | ||
1281 | + memset(&pg, 0, sizeof(pg)); | ||
1282 | err = ops->cee_peer_getpg(netdev, &pg); | ||
1283 | if (!err) | ||
1284 | NLA_PUT(skb, DCB_ATTR_CEE_PEER_PG, sizeof(pg), &pg); | ||
1285 | @@ -1470,6 +1476,7 @@ static int dcbnl_cee_fill(struct sk_buff *skb, struct net_device *netdev) | ||
1286 | |||
1287 | if (ops->cee_peer_getpfc) { | ||
1288 | struct cee_pfc pfc; | ||
1289 | + memset(&pfc, 0, sizeof(pfc)); | ||
1290 | err = ops->cee_peer_getpfc(netdev, &pfc); | ||
1291 | if (!err) | ||
1292 | NLA_PUT(skb, DCB_ATTR_CEE_PEER_PFC, sizeof(pfc), &pfc); | ||
1293 | diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h | ||
1294 | index aeff3f3..60b5ef5 100644 | ||
1295 | --- a/net/ieee802154/6lowpan.h | ||
1296 | +++ b/net/ieee802154/6lowpan.h | ||
1297 | @@ -87,7 +87,7 @@ | ||
1298 | (memcmp(addr1, addr2, length >> 3) == 0) | ||
1299 | |||
1300 | /* local link, i.e. FE80::/10 */ | ||
1301 | -#define is_addr_link_local(a) (((a)->s6_addr16[0]) == 0x80FE) | ||
1302 | +#define is_addr_link_local(a) (((a)->s6_addr16[0]) == htons(0xFE80)) | ||
1303 | |||
1304 | /* | ||
1305 | * check whether we can compress the IID to 16 bits, | ||
1306 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
1307 | index 57b20b9..fc2fc72 100644 | ||
1308 | --- a/net/ipv4/tcp_input.c | ||
1309 | +++ b/net/ipv4/tcp_input.c | ||
1310 | @@ -5519,6 +5519,9 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, | ||
1311 | if (tcp_checksum_complete_user(sk, skb)) | ||
1312 | goto csum_error; | ||
1313 | |||
1314 | + if ((int)skb->truesize > sk->sk_forward_alloc) | ||
1315 | + goto step5; | ||
1316 | + | ||
1317 | /* Predicted packet is in window by definition. | ||
1318 | * seq == rcv_nxt and rcv_wup <= rcv_nxt. | ||
1319 | * Hence, check seq<=rcv_wup reduces to: | ||
1320 | @@ -5530,9 +5533,6 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, | ||
1321 | |||
1322 | tcp_rcv_rtt_measure_ts(sk, skb); | ||
1323 | |||
1324 | - if ((int)skb->truesize > sk->sk_forward_alloc) | ||
1325 | - goto step5; | ||
1326 | - | ||
1327 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPHPHITS); | ||
1328 | |||
1329 | /* Bulk data transfer: receiver */ | ||
1330 | diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c | ||
1331 | index 1ca5d45..d813575 100644 | ||
1332 | --- a/net/ipv6/ip6_input.c | ||
1333 | +++ b/net/ipv6/ip6_input.c | ||
1334 | @@ -265,7 +265,8 @@ int ip6_mc_input(struct sk_buff *skb) | ||
1335 | * IPv6 multicast router mode is now supported ;) | ||
1336 | */ | ||
1337 | if (dev_net(skb->dev)->ipv6.devconf_all->mc_forwarding && | ||
1338 | - !(ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL) && | ||
1339 | + !(ipv6_addr_type(&hdr->daddr) & | ||
1340 | + (IPV6_ADDR_LOOPBACK|IPV6_ADDR_LINKLOCAL)) && | ||
1341 | likely(!(IP6CB(skb)->flags & IP6SKB_FORWARDED))) { | ||
1342 | /* | ||
1343 | * Okay, we try to forward - split and duplicate | ||
1344 | diff --git a/net/ipv6/route.c b/net/ipv6/route.c | ||
1345 | index 493490f..5a272c6 100644 | ||
1346 | --- a/net/ipv6/route.c | ||
1347 | +++ b/net/ipv6/route.c | ||
1348 | @@ -1973,7 +1973,8 @@ void rt6_purge_dflt_routers(struct net *net) | ||
1349 | restart: | ||
1350 | read_lock_bh(&table->tb6_lock); | ||
1351 | for (rt = table->tb6_root.leaf; rt; rt = rt->dst.rt6_next) { | ||
1352 | - if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) { | ||
1353 | + if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF) && | ||
1354 | + (!rt->rt6i_idev || rt->rt6i_idev->cnf.accept_ra != 2)) { | ||
1355 | dst_hold(&rt->dst); | ||
1356 | read_unlock_bh(&table->tb6_lock); | ||
1357 | ip6_del_rt(rt); | ||
1358 | diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c | ||
1359 | index 1addd9f..9728a75 100644 | ||
1360 | --- a/net/l2tp/l2tp_ppp.c | ||
1361 | +++ b/net/l2tp/l2tp_ppp.c | ||
1362 | @@ -360,6 +360,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh | ||
1363 | l2tp_xmit_skb(session, skb, session->hdr_len); | ||
1364 | |||
1365 | sock_put(ps->tunnel_sock); | ||
1366 | + sock_put(sk); | ||
1367 | |||
1368 | return error; | ||
1369 | |||
1370 | diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c | ||
1371 | index e7ff694..7fe20d0 100644 | ||
1372 | --- a/net/netlabel/netlabel_unlabeled.c | ||
1373 | +++ b/net/netlabel/netlabel_unlabeled.c | ||
1374 | @@ -1189,8 +1189,6 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | ||
1375 | struct netlbl_unlhsh_walk_arg cb_arg; | ||
1376 | u32 skip_bkt = cb->args[0]; | ||
1377 | u32 skip_chain = cb->args[1]; | ||
1378 | - u32 skip_addr4 = cb->args[2]; | ||
1379 | - u32 skip_addr6 = cb->args[3]; | ||
1380 | u32 iter_bkt; | ||
1381 | u32 iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0; | ||
1382 | struct netlbl_unlhsh_iface *iface; | ||
1383 | @@ -1215,7 +1213,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | ||
1384 | continue; | ||
1385 | netlbl_af4list_foreach_rcu(addr4, | ||
1386 | &iface->addr4_list) { | ||
1387 | - if (iter_addr4++ < skip_addr4) | ||
1388 | + if (iter_addr4++ < cb->args[2]) | ||
1389 | continue; | ||
1390 | if (netlbl_unlabel_staticlist_gen( | ||
1391 | NLBL_UNLABEL_C_STATICLIST, | ||
1392 | @@ -1231,7 +1229,7 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | ||
1393 | #if IS_ENABLED(CONFIG_IPV6) | ||
1394 | netlbl_af6list_foreach_rcu(addr6, | ||
1395 | &iface->addr6_list) { | ||
1396 | - if (iter_addr6++ < skip_addr6) | ||
1397 | + if (iter_addr6++ < cb->args[3]) | ||
1398 | continue; | ||
1399 | if (netlbl_unlabel_staticlist_gen( | ||
1400 | NLBL_UNLABEL_C_STATICLIST, | ||
1401 | @@ -1250,10 +1248,10 @@ static int netlbl_unlabel_staticlist(struct sk_buff *skb, | ||
1402 | |||
1403 | unlabel_staticlist_return: | ||
1404 | rcu_read_unlock(); | ||
1405 | - cb->args[0] = skip_bkt; | ||
1406 | - cb->args[1] = skip_chain; | ||
1407 | - cb->args[2] = skip_addr4; | ||
1408 | - cb->args[3] = skip_addr6; | ||
1409 | + cb->args[0] = iter_bkt; | ||
1410 | + cb->args[1] = iter_chain; | ||
1411 | + cb->args[2] = iter_addr4; | ||
1412 | + cb->args[3] = iter_addr6; | ||
1413 | return skb->len; | ||
1414 | } | ||
1415 | |||
1416 | @@ -1273,12 +1271,9 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb, | ||
1417 | { | ||
1418 | struct netlbl_unlhsh_walk_arg cb_arg; | ||
1419 | struct netlbl_unlhsh_iface *iface; | ||
1420 | - u32 skip_addr4 = cb->args[0]; | ||
1421 | - u32 skip_addr6 = cb->args[1]; | ||
1422 | - u32 iter_addr4 = 0; | ||
1423 | + u32 iter_addr4 = 0, iter_addr6 = 0; | ||
1424 | struct netlbl_af4list *addr4; | ||
1425 | #if IS_ENABLED(CONFIG_IPV6) | ||
1426 | - u32 iter_addr6 = 0; | ||
1427 | struct netlbl_af6list *addr6; | ||
1428 | #endif | ||
1429 | |||
1430 | @@ -1292,7 +1287,7 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb, | ||
1431 | goto unlabel_staticlistdef_return; | ||
1432 | |||
1433 | netlbl_af4list_foreach_rcu(addr4, &iface->addr4_list) { | ||
1434 | - if (iter_addr4++ < skip_addr4) | ||
1435 | + if (iter_addr4++ < cb->args[0]) | ||
1436 | continue; | ||
1437 | if (netlbl_unlabel_staticlist_gen(NLBL_UNLABEL_C_STATICLISTDEF, | ||
1438 | iface, | ||
1439 | @@ -1305,7 +1300,7 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb, | ||
1440 | } | ||
1441 | #if IS_ENABLED(CONFIG_IPV6) | ||
1442 | netlbl_af6list_foreach_rcu(addr6, &iface->addr6_list) { | ||
1443 | - if (iter_addr6++ < skip_addr6) | ||
1444 | + if (iter_addr6++ < cb->args[1]) | ||
1445 | continue; | ||
1446 | if (netlbl_unlabel_staticlist_gen(NLBL_UNLABEL_C_STATICLISTDEF, | ||
1447 | iface, | ||
1448 | @@ -1320,8 +1315,8 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb, | ||
1449 | |||
1450 | unlabel_staticlistdef_return: | ||
1451 | rcu_read_unlock(); | ||
1452 | - cb->args[0] = skip_addr4; | ||
1453 | - cb->args[1] = skip_addr6; | ||
1454 | + cb->args[0] = iter_addr4; | ||
1455 | + cb->args[1] = iter_addr6; | ||
1456 | return skb->len; | ||
1457 | } | ||
1458 | |||
1459 | diff --git a/net/rds/message.c b/net/rds/message.c | ||
1460 | index f0a4658..aff589c 100644 | ||
1461 | --- a/net/rds/message.c | ||
1462 | +++ b/net/rds/message.c | ||
1463 | @@ -197,6 +197,9 @@ struct rds_message *rds_message_alloc(unsigned int extra_len, gfp_t gfp) | ||
1464 | { | ||
1465 | struct rds_message *rm; | ||
1466 | |||
1467 | + if (extra_len > KMALLOC_MAX_SIZE - sizeof(struct rds_message)) | ||
1468 | + return NULL; | ||
1469 | + | ||
1470 | rm = kzalloc(sizeof(struct rds_message) + extra_len, gfp); | ||
1471 | if (!rm) | ||
1472 | goto out; | ||
1473 | diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c | ||
1474 | index 48665ec..8ab2951 100644 | ||
1475 | --- a/security/selinux/xfrm.c | ||
1476 | +++ b/security/selinux/xfrm.c | ||
1477 | @@ -310,7 +310,7 @@ int selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, | ||
1478 | |||
1479 | if (old_ctx) { | ||
1480 | new_ctx = kmalloc(sizeof(*old_ctx) + old_ctx->ctx_len, | ||
1481 | - GFP_KERNEL); | ||
1482 | + GFP_ATOMIC); | ||
1483 | if (!new_ctx) | ||
1484 | return -ENOMEM; | ||
1485 | |||
1486 | diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c | ||
1487 | index 160b1bd..24d44b2 100644 | ||
1488 | --- a/sound/core/seq/seq_timer.c | ||
1489 | +++ b/sound/core/seq/seq_timer.c | ||
1490 | @@ -290,10 +290,10 @@ int snd_seq_timer_open(struct snd_seq_queue *q) | ||
1491 | tid.device = SNDRV_TIMER_GLOBAL_SYSTEM; | ||
1492 | err = snd_timer_open(&t, str, &tid, q->queue); | ||
1493 | } | ||
1494 | - if (err < 0) { | ||
1495 | - snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err); | ||
1496 | - return err; | ||
1497 | - } | ||
1498 | + } | ||
1499 | + if (err < 0) { | ||
1500 | + snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err); | ||
1501 | + return err; | ||
1502 | } | ||
1503 | t->callback = snd_seq_timer_interrupt; | ||
1504 | t->callback_data = q; |