Magellan Linux

Annotation of /trunk/kernel-lts/patches-3.4/0148-3.4.49-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2224 - (hide annotations) (download)
Mon Jul 1 09:52:06 2013 UTC (10 years, 10 months ago) by niro
File size: 39167 byte(s)
-fixed patch name
1 niro 2224 diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
2     index 8752f79..8a811d9 100644
3     --- a/arch/powerpc/platforms/pseries/eeh_pseries.c
4     +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
5     @@ -83,7 +83,11 @@ static int pseries_eeh_init(void)
6     ibm_configure_pe = rtas_token("ibm,configure-pe");
7     ibm_configure_bridge = rtas_token ("ibm,configure-bridge");
8    
9     - /* necessary sanity check */
10     + /*
11     + * Necessary sanity check. We needn't check "get-config-addr-info"
12     + * and its variant since the old firmware probably support address
13     + * of domain/bus/slot/function for EEH RTAS operations.
14     + */
15     if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) {
16     pr_warning("%s: RTAS service <ibm,set-eeh-option> invalid\n",
17     __func__);
18     @@ -102,12 +106,6 @@ static int pseries_eeh_init(void)
19     pr_warning("%s: RTAS service <ibm,slot-error-detail> invalid\n",
20     __func__);
21     return -EINVAL;
22     - } else if (ibm_get_config_addr_info2 == RTAS_UNKNOWN_SERVICE &&
23     - ibm_get_config_addr_info == RTAS_UNKNOWN_SERVICE) {
24     - pr_warning("%s: RTAS service <ibm,get-config-addr-info2> and "
25     - "<ibm,get-config-addr-info> invalid\n",
26     - __func__);
27     - return -EINVAL;
28     } else if (ibm_configure_pe == RTAS_UNKNOWN_SERVICE &&
29     ibm_configure_bridge == RTAS_UNKNOWN_SERVICE) {
30     pr_warning("%s: RTAS service <ibm,configure-pe> and "
31     diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
32     index 91357e1..6d2c49b 100644
33     --- a/drivers/acpi/video.c
34     +++ b/drivers/acpi/video.c
35     @@ -447,6 +447,22 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
36     DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
37     },
38     },
39     + {
40     + .callback = video_ignore_initial_backlight,
41     + .ident = "HP Pavilion g6 Notebook PC",
42     + .matches = {
43     + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
44     + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
45     + },
46     + },
47     + {
48     + .callback = video_ignore_initial_backlight,
49     + .ident = "HP Pavilion m4",
50     + .matches = {
51     + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
52     + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"),
53     + },
54     + },
55     {}
56     };
57    
58     diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
59     index c869436..dc33ba5 100644
60     --- a/drivers/gpu/drm/drm_irq.c
61     +++ b/drivers/gpu/drm/drm_irq.c
62     @@ -981,7 +981,7 @@ EXPORT_SYMBOL(drm_vblank_off);
63     */
64     void drm_vblank_pre_modeset(struct drm_device *dev, int crtc)
65     {
66     - /* vblank is not initialized (IRQ not installed ?) */
67     + /* vblank is not initialized (IRQ not installed ?), or has been freed */
68     if (!dev->num_crtcs)
69     return;
70     /*
71     @@ -1003,6 +1003,10 @@ void drm_vblank_post_modeset(struct drm_device *dev, int crtc)
72     {
73     unsigned long irqflags;
74    
75     + /* vblank is not initialized (IRQ not installed ?), or has been freed */
76     + if (!dev->num_crtcs)
77     + return;
78     +
79     if (dev->vblank_inmodeset[crtc]) {
80     spin_lock_irqsave(&dev->vbl_lock, irqflags);
81     dev->vblank_disable_allowed = 1;
82     diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
83     index 8ea202f..fa74a86 100644
84     --- a/drivers/gpu/drm/gma500/framebuffer.c
85     +++ b/drivers/gpu/drm/gma500/framebuffer.c
86     @@ -782,8 +782,8 @@ void psb_modeset_init(struct drm_device *dev)
87     for (i = 0; i < dev_priv->num_pipe; i++)
88     psb_intel_crtc_init(dev, i, mode_dev);
89    
90     - dev->mode_config.max_width = 2048;
91     - dev->mode_config.max_height = 2048;
92     + dev->mode_config.max_width = 4096;
93     + dev->mode_config.max_height = 4096;
94    
95     psb_setup_outputs(dev);
96     }
97     diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
98     index 1ad5906..207180d 100644
99     --- a/drivers/gpu/drm/i915/intel_lvds.c
100     +++ b/drivers/gpu/drm/i915/intel_lvds.c
101     @@ -747,10 +747,10 @@ static const struct dmi_system_id intel_no_lvds[] = {
102     },
103     {
104     .callback = intel_no_lvds_dmi_callback,
105     - .ident = "Hewlett-Packard HP t5740e Thin Client",
106     + .ident = "Hewlett-Packard HP t5740",
107     .matches = {
108     DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
109     - DMI_MATCH(DMI_PRODUCT_NAME, "HP t5740e Thin Client"),
110     + DMI_MATCH(DMI_PRODUCT_NAME, " t5740"),
111     },
112     },
113     {
114     diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
115     index 1b6b157..aeb9d6e 100644
116     --- a/drivers/gpu/drm/i915/intel_sdvo.c
117     +++ b/drivers/gpu/drm/i915/intel_sdvo.c
118     @@ -1581,7 +1581,7 @@ static void intel_sdvo_get_lvds_modes(struct drm_connector *connector)
119     * Assume that the preferred modes are
120     * arranged in priority order.
121     */
122     - intel_ddc_get_modes(connector, intel_sdvo->i2c);
123     + intel_ddc_get_modes(connector, &intel_sdvo->ddc);
124     if (list_empty(&connector->probed_modes) == false)
125     goto end;
126    
127     diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
128     index 23e3ea6..ced9370 100644
129     --- a/drivers/gpu/drm/radeon/atombios_encoders.c
130     +++ b/drivers/gpu/drm/radeon/atombios_encoders.c
131     @@ -396,6 +396,8 @@ atombios_digital_setup(struct drm_encoder *encoder, int action)
132     int
133     atombios_get_encoder_mode(struct drm_encoder *encoder)
134     {
135     + struct drm_device *dev = encoder->dev;
136     + struct radeon_device *rdev = dev->dev_private;
137     struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
138     struct drm_connector *connector;
139     struct radeon_connector *radeon_connector;
140     @@ -421,7 +423,8 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
141     case DRM_MODE_CONNECTOR_DVII:
142     case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */
143     if (drm_detect_hdmi_monitor(radeon_connector->edid) &&
144     - radeon_audio)
145     + radeon_audio &&
146     + !ASIC_IS_DCE6(rdev)) /* remove once we support DCE6 */
147     return ATOM_ENCODER_MODE_HDMI;
148     else if (radeon_connector->use_digital)
149     return ATOM_ENCODER_MODE_DVI;
150     @@ -432,7 +435,8 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
151     case DRM_MODE_CONNECTOR_HDMIA:
152     default:
153     if (drm_detect_hdmi_monitor(radeon_connector->edid) &&
154     - radeon_audio)
155     + radeon_audio &&
156     + !ASIC_IS_DCE6(rdev)) /* remove once we support DCE6 */
157     return ATOM_ENCODER_MODE_HDMI;
158     else
159     return ATOM_ENCODER_MODE_DVI;
160     @@ -446,7 +450,8 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
161     (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
162     return ATOM_ENCODER_MODE_DP;
163     else if (drm_detect_hdmi_monitor(radeon_connector->edid) &&
164     - radeon_audio)
165     + radeon_audio &&
166     + !ASIC_IS_DCE6(rdev)) /* remove once we support DCE6 */
167     return ATOM_ENCODER_MODE_HDMI;
168     else
169     return ATOM_ENCODER_MODE_DVI;
170     diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
171     index 6a8776e..300099d 100644
172     --- a/drivers/gpu/drm/radeon/evergreen.c
173     +++ b/drivers/gpu/drm/radeon/evergreen.c
174     @@ -3258,6 +3258,12 @@ static int evergreen_startup(struct radeon_device *rdev)
175     }
176    
177     /* Enable IRQ */
178     + if (!rdev->irq.installed) {
179     + r = radeon_irq_kms_init(rdev);
180     + if (r)
181     + return r;
182     + }
183     +
184     r = r600_irq_init(rdev);
185     if (r) {
186     DRM_ERROR("radeon: IH init failed (%d).\n", r);
187     @@ -3409,10 +3415,6 @@ int evergreen_init(struct radeon_device *rdev)
188     if (r)
189     return r;
190    
191     - r = radeon_irq_kms_init(rdev);
192     - if (r)
193     - return r;
194     -
195     rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
196     r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 1024);
197    
198     diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
199     index d706da8..f5387b3 100644
200     --- a/drivers/gpu/drm/radeon/ni.c
201     +++ b/drivers/gpu/drm/radeon/ni.c
202     @@ -1614,6 +1614,12 @@ static int cayman_startup(struct radeon_device *rdev)
203     }
204    
205     /* Enable IRQ */
206     + if (!rdev->irq.installed) {
207     + r = radeon_irq_kms_init(rdev);
208     + if (r)
209     + return r;
210     + }
211     +
212     r = r600_irq_init(rdev);
213     if (r) {
214     DRM_ERROR("radeon: IH init failed (%d).\n", r);
215     @@ -1744,10 +1750,6 @@ int cayman_init(struct radeon_device *rdev)
216     if (r)
217     return r;
218    
219     - r = radeon_irq_kms_init(rdev);
220     - if (r)
221     - return r;
222     -
223     ring->ring_obj = NULL;
224     r600_ring_init(rdev, ring, 1024 * 1024);
225    
226     diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
227     index fe33d35..40ed0e5 100644
228     --- a/drivers/gpu/drm/radeon/r100.c
229     +++ b/drivers/gpu/drm/radeon/r100.c
230     @@ -3952,6 +3952,12 @@ static int r100_startup(struct radeon_device *rdev)
231     }
232    
233     /* Enable IRQ */
234     + if (!rdev->irq.installed) {
235     + r = radeon_irq_kms_init(rdev);
236     + if (r)
237     + return r;
238     + }
239     +
240     r100_irq_set(rdev);
241     rdev->config.r100.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
242     /* 1M ring buffer */
243     @@ -4113,9 +4119,6 @@ int r100_init(struct radeon_device *rdev)
244     r = radeon_fence_driver_init(rdev);
245     if (r)
246     return r;
247     - r = radeon_irq_kms_init(rdev);
248     - if (r)
249     - return r;
250     /* Memory manager */
251     r = radeon_bo_init(rdev);
252     if (r)
253     diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
254     index fa14383..63b53aa 100644
255     --- a/drivers/gpu/drm/radeon/r300.c
256     +++ b/drivers/gpu/drm/radeon/r300.c
257     @@ -1405,6 +1405,12 @@ static int r300_startup(struct radeon_device *rdev)
258     }
259    
260     /* Enable IRQ */
261     + if (!rdev->irq.installed) {
262     + r = radeon_irq_kms_init(rdev);
263     + if (r)
264     + return r;
265     + }
266     +
267     r100_irq_set(rdev);
268     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
269     /* 1M ring buffer */
270     @@ -1545,9 +1551,6 @@ int r300_init(struct radeon_device *rdev)
271     r = radeon_fence_driver_init(rdev);
272     if (r)
273     return r;
274     - r = radeon_irq_kms_init(rdev);
275     - if (r)
276     - return r;
277     /* Memory manager */
278     r = radeon_bo_init(rdev);
279     if (r)
280     diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c
281     index f3fcaac..1a9347f 100644
282     --- a/drivers/gpu/drm/radeon/r420.c
283     +++ b/drivers/gpu/drm/radeon/r420.c
284     @@ -265,6 +265,12 @@ static int r420_startup(struct radeon_device *rdev)
285     }
286    
287     /* Enable IRQ */
288     + if (!rdev->irq.installed) {
289     + r = radeon_irq_kms_init(rdev);
290     + if (r)
291     + return r;
292     + }
293     +
294     r100_irq_set(rdev);
295     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
296     /* 1M ring buffer */
297     @@ -417,10 +423,6 @@ int r420_init(struct radeon_device *rdev)
298     if (r) {
299     return r;
300     }
301     - r = radeon_irq_kms_init(rdev);
302     - if (r) {
303     - return r;
304     - }
305     /* Memory manager */
306     r = radeon_bo_init(rdev);
307     if (r) {
308     diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c
309     index ebcc15b..57be784 100644
310     --- a/drivers/gpu/drm/radeon/r520.c
311     +++ b/drivers/gpu/drm/radeon/r520.c
312     @@ -194,6 +194,12 @@ static int r520_startup(struct radeon_device *rdev)
313     }
314    
315     /* Enable IRQ */
316     + if (!rdev->irq.installed) {
317     + r = radeon_irq_kms_init(rdev);
318     + if (r)
319     + return r;
320     + }
321     +
322     rs600_irq_set(rdev);
323     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
324     /* 1M ring buffer */
325     @@ -301,9 +307,6 @@ int r520_init(struct radeon_device *rdev)
326     r = radeon_fence_driver_init(rdev);
327     if (r)
328     return r;
329     - r = radeon_irq_kms_init(rdev);
330     - if (r)
331     - return r;
332     /* Memory manager */
333     r = radeon_bo_init(rdev);
334     if (r)
335     diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
336     index b1ff9cc..8c403d9 100644
337     --- a/drivers/gpu/drm/radeon/r600.c
338     +++ b/drivers/gpu/drm/radeon/r600.c
339     @@ -2470,6 +2470,12 @@ int r600_startup(struct radeon_device *rdev)
340     }
341    
342     /* Enable IRQ */
343     + if (!rdev->irq.installed) {
344     + r = radeon_irq_kms_init(rdev);
345     + if (r)
346     + return r;
347     + }
348     +
349     r = r600_irq_init(rdev);
350     if (r) {
351     DRM_ERROR("radeon: IH init failed (%d).\n", r);
352     @@ -2624,10 +2630,6 @@ int r600_init(struct radeon_device *rdev)
353     if (r)
354     return r;
355    
356     - r = radeon_irq_kms_init(rdev);
357     - if (r)
358     - return r;
359     -
360     rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
361     r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 1024);
362    
363     diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c
364     index 4cf381b..5099bd3 100644
365     --- a/drivers/gpu/drm/radeon/rs400.c
366     +++ b/drivers/gpu/drm/radeon/rs400.c
367     @@ -417,6 +417,12 @@ static int rs400_startup(struct radeon_device *rdev)
368     }
369    
370     /* Enable IRQ */
371     + if (!rdev->irq.installed) {
372     + r = radeon_irq_kms_init(rdev);
373     + if (r)
374     + return r;
375     + }
376     +
377     r100_irq_set(rdev);
378     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
379     /* 1M ring buffer */
380     @@ -541,9 +547,6 @@ int rs400_init(struct radeon_device *rdev)
381     r = radeon_fence_driver_init(rdev);
382     if (r)
383     return r;
384     - r = radeon_irq_kms_init(rdev);
385     - if (r)
386     - return r;
387     /* Memory manager */
388     r = radeon_bo_init(rdev);
389     if (r)
390     diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
391     index d25cf86..5248001 100644
392     --- a/drivers/gpu/drm/radeon/rs600.c
393     +++ b/drivers/gpu/drm/radeon/rs600.c
394     @@ -864,6 +864,12 @@ static int rs600_startup(struct radeon_device *rdev)
395     }
396    
397     /* Enable IRQ */
398     + if (!rdev->irq.installed) {
399     + r = radeon_irq_kms_init(rdev);
400     + if (r)
401     + return r;
402     + }
403     +
404     rs600_irq_set(rdev);
405     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
406     /* 1M ring buffer */
407     @@ -994,9 +1000,6 @@ int rs600_init(struct radeon_device *rdev)
408     r = radeon_fence_driver_init(rdev);
409     if (r)
410     return r;
411     - r = radeon_irq_kms_init(rdev);
412     - if (r)
413     - return r;
414     /* Memory manager */
415     r = radeon_bo_init(rdev);
416     if (r)
417     diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
418     index f2c3b9d..c46900c 100644
419     --- a/drivers/gpu/drm/radeon/rs690.c
420     +++ b/drivers/gpu/drm/radeon/rs690.c
421     @@ -628,6 +628,12 @@ static int rs690_startup(struct radeon_device *rdev)
422     }
423    
424     /* Enable IRQ */
425     + if (!rdev->irq.installed) {
426     + r = radeon_irq_kms_init(rdev);
427     + if (r)
428     + return r;
429     + }
430     +
431     rs600_irq_set(rdev);
432     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
433     /* 1M ring buffer */
434     @@ -759,9 +765,6 @@ int rs690_init(struct radeon_device *rdev)
435     r = radeon_fence_driver_init(rdev);
436     if (r)
437     return r;
438     - r = radeon_irq_kms_init(rdev);
439     - if (r)
440     - return r;
441     /* Memory manager */
442     r = radeon_bo_init(rdev);
443     if (r)
444     diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
445     index 43af363..0532bbe 100644
446     --- a/drivers/gpu/drm/radeon/rv515.c
447     +++ b/drivers/gpu/drm/radeon/rv515.c
448     @@ -386,6 +386,12 @@ static int rv515_startup(struct radeon_device *rdev)
449     }
450    
451     /* Enable IRQ */
452     + if (!rdev->irq.installed) {
453     + r = radeon_irq_kms_init(rdev);
454     + if (r)
455     + return r;
456     + }
457     +
458     rs600_irq_set(rdev);
459     rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
460     /* 1M ring buffer */
461     @@ -520,9 +526,6 @@ int rv515_init(struct radeon_device *rdev)
462     r = radeon_fence_driver_init(rdev);
463     if (r)
464     return r;
465     - r = radeon_irq_kms_init(rdev);
466     - if (r)
467     - return r;
468     /* Memory manager */
469     r = radeon_bo_init(rdev);
470     if (r)
471     diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
472     index 591040b..4a3937f 100644
473     --- a/drivers/gpu/drm/radeon/rv770.c
474     +++ b/drivers/gpu/drm/radeon/rv770.c
475     @@ -1099,6 +1099,12 @@ static int rv770_startup(struct radeon_device *rdev)
476     }
477    
478     /* Enable IRQ */
479     + if (!rdev->irq.installed) {
480     + r = radeon_irq_kms_init(rdev);
481     + if (r)
482     + return r;
483     + }
484     +
485     r = r600_irq_init(rdev);
486     if (r) {
487     DRM_ERROR("radeon: IH init failed (%d).\n", r);
488     @@ -1237,10 +1243,6 @@ int rv770_init(struct radeon_device *rdev)
489     if (r)
490     return r;
491    
492     - r = radeon_irq_kms_init(rdev);
493     - if (r)
494     - return r;
495     -
496     rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
497     r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 1024);
498    
499     diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
500     index 2dbd585..e22b460 100644
501     --- a/drivers/gpu/drm/radeon/si.c
502     +++ b/drivers/gpu/drm/radeon/si.c
503     @@ -3876,6 +3876,12 @@ static int si_startup(struct radeon_device *rdev)
504     }
505    
506     /* Enable IRQ */
507     + if (!rdev->irq.installed) {
508     + r = radeon_irq_kms_init(rdev);
509     + if (r)
510     + return r;
511     + }
512     +
513     r = si_irq_init(rdev);
514     if (r) {
515     DRM_ERROR("radeon: IH init failed (%d).\n", r);
516     @@ -4044,10 +4050,6 @@ int si_init(struct radeon_device *rdev)
517     if (r)
518     return r;
519    
520     - r = radeon_irq_kms_init(rdev);
521     - if (r)
522     - return r;
523     -
524     ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
525     ring->ring_obj = NULL;
526     r600_ring_init(rdev, ring, 1024 * 1024);
527     diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
528     index 4394e7e..5653461 100644
529     --- a/drivers/hwmon/adm1021.c
530     +++ b/drivers/hwmon/adm1021.c
531     @@ -332,26 +332,68 @@ static int adm1021_detect(struct i2c_client *client,
532     man_id = i2c_smbus_read_byte_data(client, ADM1021_REG_MAN_ID);
533     dev_id = i2c_smbus_read_byte_data(client, ADM1021_REG_DEV_ID);
534    
535     + if (man_id < 0 || dev_id < 0)
536     + return -ENODEV;
537     +
538     if (man_id == 0x4d && dev_id == 0x01)
539     type_name = "max1617a";
540     else if (man_id == 0x41) {
541     if ((dev_id & 0xF0) == 0x30)
542     type_name = "adm1023";
543     - else
544     + else if ((dev_id & 0xF0) == 0x00)
545     type_name = "adm1021";
546     + else
547     + return -ENODEV;
548     } else if (man_id == 0x49)
549     type_name = "thmc10";
550     else if (man_id == 0x23)
551     type_name = "gl523sm";
552     else if (man_id == 0x54)
553     type_name = "mc1066";
554     - /* LM84 Mfr ID in a different place, and it has more unused bits */
555     - else if (conv_rate == 0x00
556     - && (config & 0x7F) == 0x00
557     - && (status & 0xAB) == 0x00)
558     - type_name = "lm84";
559     - else
560     - type_name = "max1617";
561     + else {
562     + int lte, rte, lhi, rhi, llo, rlo;
563     +
564     + /* extra checks for LM84 and MAX1617 to avoid misdetections */
565     +
566     + llo = i2c_smbus_read_byte_data(client, ADM1021_REG_THYST_R(0));
567     + rlo = i2c_smbus_read_byte_data(client, ADM1021_REG_THYST_R(1));
568     +
569     + /* fail if any of the additional register reads failed */
570     + if (llo < 0 || rlo < 0)
571     + return -ENODEV;
572     +
573     + lte = i2c_smbus_read_byte_data(client, ADM1021_REG_TEMP(0));
574     + rte = i2c_smbus_read_byte_data(client, ADM1021_REG_TEMP(1));
575     + lhi = i2c_smbus_read_byte_data(client, ADM1021_REG_TOS_R(0));
576     + rhi = i2c_smbus_read_byte_data(client, ADM1021_REG_TOS_R(1));
577     +
578     + /*
579     + * Fail for negative temperatures and negative high limits.
580     + * This check also catches read errors on the tested registers.
581     + */
582     + if ((s8)lte < 0 || (s8)rte < 0 || (s8)lhi < 0 || (s8)rhi < 0)
583     + return -ENODEV;
584     +
585     + /* fail if all registers hold the same value */
586     + if (lte == rte && lte == lhi && lte == rhi && lte == llo
587     + && lte == rlo)
588     + return -ENODEV;
589     +
590     + /*
591     + * LM84 Mfr ID is in a different place,
592     + * and it has more unused bits.
593     + */
594     + if (conv_rate == 0x00
595     + && (config & 0x7F) == 0x00
596     + && (status & 0xAB) == 0x00) {
597     + type_name = "lm84";
598     + } else {
599     + /* fail if low limits are larger than high limits */
600     + if ((s8)llo > lhi || (s8)rlo > rhi)
601     + return -ENODEV;
602     + type_name = "max1617";
603     + }
604     + }
605    
606     pr_debug("adm1021: Detected chip %s at adapter %d, address 0x%02x.\n",
607     type_name, i2c_adapter_id(adapter), client->addr);
608     diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
609     index 14d2d71..a60679c 100644
610     --- a/drivers/usb/host/ehci-sched.c
611     +++ b/drivers/usb/host/ehci-sched.c
612     @@ -236,7 +236,7 @@ static inline unsigned char tt_start_uframe(struct ehci_hcd *ehci, __hc32 mask)
613     }
614    
615     static const unsigned char
616     -max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 125, 25 };
617     +max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 };
618    
619     /* carryover low/fullspeed bandwidth that crosses uframe boundries */
620     static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8])
621     diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
622     index f059222..5080b1d 100644
623     --- a/drivers/usb/host/xhci-mem.c
624     +++ b/drivers/usb/host/xhci-mem.c
625     @@ -1845,6 +1845,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
626     }
627     spin_unlock_irqrestore(&xhci->lock, flags);
628    
629     + if (!xhci->rh_bw)
630     + goto no_bw;
631     +
632     num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
633     for (i = 0; i < num_ports; i++) {
634     struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
635     @@ -1863,6 +1866,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
636     }
637     }
638    
639     +no_bw:
640     xhci->num_usb2_ports = 0;
641     xhci->num_usb3_ports = 0;
642     xhci->num_active_eps = 0;
643     @@ -2274,6 +2278,9 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
644     u32 page_size, temp;
645     int i;
646    
647     + INIT_LIST_HEAD(&xhci->lpm_failed_devs);
648     + INIT_LIST_HEAD(&xhci->cancel_cmd_list);
649     +
650     page_size = xhci_readl(xhci, &xhci->op_regs->page_size);
651     xhci_dbg(xhci, "Supported page size register = 0x%x\n", page_size);
652     for (i = 0; i < 16; i++) {
653     @@ -2352,7 +2359,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
654     xhci->cmd_ring = xhci_ring_alloc(xhci, 1, 1, TYPE_COMMAND, flags);
655     if (!xhci->cmd_ring)
656     goto fail;
657     - INIT_LIST_HEAD(&xhci->cancel_cmd_list);
658     xhci_dbg(xhci, "Allocated command ring at %p\n", xhci->cmd_ring);
659     xhci_dbg(xhci, "First segment DMA is 0x%llx\n",
660     (unsigned long long)xhci->cmd_ring->first_seg->dma);
661     @@ -2453,8 +2459,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
662     if (xhci_setup_port_arrays(xhci, flags))
663     goto fail;
664    
665     - INIT_LIST_HEAD(&xhci->lpm_failed_devs);
666     -
667     /* Enable USB 3.0 device notifications for function remote wake, which
668     * is necessary for allowing USB 3.0 devices to do remote wakeup from
669     * U3 (device suspend).
670     diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
671     index ec2c89f..0f928b3 100644
672     --- a/drivers/usb/host/xhci.c
673     +++ b/drivers/usb/host/xhci.c
674     @@ -947,6 +947,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
675     struct usb_hcd *hcd = xhci_to_hcd(xhci);
676     struct usb_hcd *secondary_hcd;
677     int retval = 0;
678     + bool comp_timer_running = false;
679    
680     /* Wait a bit if either of the roothubs need to settle from the
681     * transition into bus suspend.
682     @@ -984,6 +985,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
683    
684     /* If restore operation fails, re-initialize the HC during resume */
685     if ((temp & STS_SRE) || hibernated) {
686     +
687     + if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
688     + !(xhci_all_ports_seen_u0(xhci))) {
689     + del_timer_sync(&xhci->comp_mode_recovery_timer);
690     + xhci_dbg(xhci, "Compliance Mode Recovery Timer deleted!\n");
691     + }
692     +
693     /* Let the USB core know _both_ roothubs lost power. */
694     usb_root_hub_lost_power(xhci->main_hcd->self.root_hub);
695     usb_root_hub_lost_power(xhci->shared_hcd->self.root_hub);
696     @@ -1026,6 +1034,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
697     retval = xhci_init(hcd->primary_hcd);
698     if (retval)
699     return retval;
700     + comp_timer_running = true;
701     +
702     xhci_dbg(xhci, "Start the primary HCD\n");
703     retval = xhci_run(hcd->primary_hcd);
704     if (!retval) {
705     @@ -1067,7 +1077,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
706     * to suffer the Compliance Mode issue again. It doesn't matter if
707     * ports have entered previously to U0 before system's suspension.
708     */
709     - if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
710     + if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running)
711     compliance_mode_recovery_timer_init(xhci);
712    
713     /* Re-enable port polling. */
714     diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
715     index f99f471..31bfe60 100644
716     --- a/drivers/usb/serial/ark3116.c
717     +++ b/drivers/usb/serial/ark3116.c
718     @@ -49,7 +49,7 @@ static bool debug;
719     #define DRIVER_NAME "ark3116"
720    
721     /* usb timeout of 1 second */
722     -#define ARK_TIMEOUT (1*HZ)
723     +#define ARK_TIMEOUT 1000
724    
725     static const struct usb_device_id id_table[] = {
726     { USB_DEVICE(0x6547, 0x0232) },
727     diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
728     index afc886c..270bda8 100644
729     --- a/drivers/usb/serial/cypress_m8.c
730     +++ b/drivers/usb/serial/cypress_m8.c
731     @@ -70,6 +70,7 @@ static const struct usb_device_id id_table_earthmate[] = {
732     static const struct usb_device_id id_table_cyphidcomrs232[] = {
733     { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
734     { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
735     + { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) },
736     { } /* Terminating entry */
737     };
738    
739     @@ -83,6 +84,7 @@ static const struct usb_device_id id_table_combined[] = {
740     { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) },
741     { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
742     { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
743     + { USB_DEVICE(VENDOR_ID_FRWD, PRODUCT_ID_CYPHIDCOM_FRWD) },
744     { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) },
745     { } /* Terminating entry */
746     };
747     @@ -243,6 +245,12 @@ static struct usb_serial_driver * const serial_drivers[] = {
748     * Cypress serial helper functions
749     *****************************************************************************/
750    
751     +/* FRWD Dongle hidcom needs to skip reset and speed checks */
752     +static inline bool is_frwd(struct usb_device *dev)
753     +{
754     + return ((le16_to_cpu(dev->descriptor.idVendor) == VENDOR_ID_FRWD) &&
755     + (le16_to_cpu(dev->descriptor.idProduct) == PRODUCT_ID_CYPHIDCOM_FRWD));
756     +}
757    
758     static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate)
759     {
760     @@ -252,6 +260,10 @@ static int analyze_baud_rate(struct usb_serial_port *port, speed_t new_rate)
761     if (unstable_bauds)
762     return new_rate;
763    
764     + /* FRWD Dongle uses 115200 bps */
765     + if (is_frwd(port->serial->dev))
766     + return new_rate;
767     +
768     /*
769     * The general purpose firmware for the Cypress M8 allows for
770     * a maximum speed of 57600bps (I have no idea whether DeLorme
771     @@ -465,7 +477,11 @@ static int generic_startup(struct usb_serial *serial)
772     }
773     init_waitqueue_head(&priv->delta_msr_wait);
774    
775     - usb_reset_configuration(serial->dev);
776     + /* Skip reset for FRWD device. It is a workaound:
777     + device hangs if it receives SET_CONFIGURE in Configured
778     + state. */
779     + if (!is_frwd(serial->dev))
780     + usb_reset_configuration(serial->dev);
781    
782     priv->cmd_ctrl = 0;
783     priv->line_control = 0;
784     diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h
785     index 67cf608..b461311 100644
786     --- a/drivers/usb/serial/cypress_m8.h
787     +++ b/drivers/usb/serial/cypress_m8.h
788     @@ -24,6 +24,10 @@
789     #define VENDOR_ID_CYPRESS 0x04b4
790     #define PRODUCT_ID_CYPHIDCOM 0x5500
791    
792     +/* FRWD Dongle - a GPS sports watch */
793     +#define VENDOR_ID_FRWD 0x6737
794     +#define PRODUCT_ID_CYPHIDCOM_FRWD 0x0001
795     +
796     /* Powercom UPS, chip CY7C63723 */
797     #define VENDOR_ID_POWERCOM 0x0d9f
798     #define PRODUCT_ID_UPS 0x0002
799     diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
800     index c6f8e62..f8a9cd7 100644
801     --- a/drivers/usb/serial/ftdi_sio.c
802     +++ b/drivers/usb/serial/ftdi_sio.c
803     @@ -2173,7 +2173,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
804    
805     cflag = termios->c_cflag;
806    
807     - if (old_termios == 0)
808     + if (!old_termios)
809     goto no_skip;
810    
811     if (old_termios->c_cflag == termios->c_cflag
812     diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
813     index f2192d5..53c639c 100644
814     --- a/drivers/usb/serial/iuu_phoenix.c
815     +++ b/drivers/usb/serial/iuu_phoenix.c
816     @@ -326,7 +326,7 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
817     usb_bulk_msg(serial->dev,
818     usb_sndbulkpipe(serial->dev,
819     port->bulk_out_endpointAddress), buf,
820     - count, &actual, HZ * 1);
821     + count, &actual, 1000);
822    
823     if (status != IUU_OPERATION_OK)
824     dbg("%s - error = %2x", __func__, status);
825     @@ -349,7 +349,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
826     usb_bulk_msg(serial->dev,
827     usb_rcvbulkpipe(serial->dev,
828     port->bulk_in_endpointAddress), buf,
829     - count, &actual, HZ * 1);
830     + count, &actual, 1000);
831    
832     if (status != IUU_OPERATION_OK)
833     dbg("%s - error = %2x", __func__, status);
834     diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
835     index a39ddd1..253bff6 100644
836     --- a/drivers/usb/serial/keyspan.c
837     +++ b/drivers/usb/serial/keyspan.c
838     @@ -1705,7 +1705,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
839     d_details = s_priv->device_details;
840     device_port = port->number - port->serial->minor;
841    
842     - outcont_urb = d_details->outcont_endpoints[port->number];
843     + outcont_urb = d_details->outcont_endpoints[device_port];
844     this_urb = p_priv->outcont_urb;
845    
846     dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));
847     diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
848     index bdce820..77d974d 100644
849     --- a/drivers/usb/serial/mos7720.c
850     +++ b/drivers/usb/serial/mos7720.c
851     @@ -44,7 +44,7 @@
852     #define DRIVER_DESC "Moschip USB Serial Driver"
853    
854     /* default urb timeout */
855     -#define MOS_WDR_TIMEOUT (HZ * 5)
856     +#define MOS_WDR_TIMEOUT 5000
857    
858     #define MOS_MAX_PORT 0x02
859     #define MOS_WRITE 0x0E
860     @@ -234,11 +234,22 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum,
861     __u8 requesttype = (__u8)0xc0;
862     __u16 index = get_reg_index(reg);
863     __u16 value = get_reg_value(reg, serial_portnum);
864     - int status = usb_control_msg(usbdev, pipe, request, requesttype, value,
865     - index, data, 1, MOS_WDR_TIMEOUT);
866     - if (status < 0)
867     + u8 *buf;
868     + int status;
869     +
870     + buf = kmalloc(1, GFP_KERNEL);
871     + if (!buf)
872     + return -ENOMEM;
873     +
874     + status = usb_control_msg(usbdev, pipe, request, requesttype, value,
875     + index, buf, 1, MOS_WDR_TIMEOUT);
876     + if (status == 1)
877     + *data = *buf;
878     + else if (status < 0)
879     dev_err(&usbdev->dev,
880     "mos7720: usb_control_msg() failed: %d", status);
881     + kfree(buf);
882     +
883     return status;
884     }
885    
886     @@ -1690,7 +1701,7 @@ static void change_port_settings(struct tty_struct *tty,
887     mos7720_port->shadowMCR |= (UART_MCR_XONANY);
888     /* To set hardware flow control to the specified *
889     * serial port, in SP1/2_CONTROL_REG */
890     - if (port->number)
891     + if (port_number)
892     write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01);
893     else
894     write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02);
895     @@ -2094,7 +2105,7 @@ static int mos7720_startup(struct usb_serial *serial)
896    
897     /* setting configuration feature to one */
898     usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
899     - (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5*HZ);
900     + (__u8)0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5000);
901    
902     /* start the interrupt urb */
903     ret_val = usb_submit_urb(serial->port[0]->interrupt_in_urb, GFP_KERNEL);
904     @@ -2139,7 +2150,7 @@ static void mos7720_release(struct usb_serial *serial)
905     /* wait for synchronous usb calls to return */
906     if (mos_parport->msg_pending)
907     wait_for_completion_timeout(&mos_parport->syncmsg_compl,
908     - MOS_WDR_TIMEOUT);
909     + msecs_to_jiffies(MOS_WDR_TIMEOUT));
910    
911     parport_remove_port(mos_parport->pp);
912     usb_set_serial_data(serial, NULL);
913     diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
914     index 386b3ab..5b24260 100644
915     --- a/drivers/usb/serial/option.c
916     +++ b/drivers/usb/serial/option.c
917     @@ -593,6 +593,8 @@ static const struct usb_device_id option_ids[] = {
918     .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
919     { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
920     .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
921     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x14ac, 0xff, 0xff, 0xff), /* Huawei E1820 */
922     + .driver_info = (kernel_ulong_t) &net_intf1_blacklist },
923     { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
924     .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
925     { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
926     diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
927     index 71d6964..b3afd19 100644
928     --- a/drivers/usb/serial/visor.c
929     +++ b/drivers/usb/serial/visor.c
930     @@ -596,10 +596,19 @@ static int treo_attach(struct usb_serial *serial)
931     */
932     #define COPY_PORT(dest, src) \
933     do { \
934     + int i; \
935     + \
936     + for (i = 0; i < ARRAY_SIZE(src->read_urbs); ++i) { \
937     + dest->read_urbs[i] = src->read_urbs[i]; \
938     + dest->read_urbs[i]->context = dest; \
939     + dest->bulk_in_buffers[i] = src->bulk_in_buffers[i]; \
940     + } \
941     dest->read_urb = src->read_urb; \
942     dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress;\
943     dest->bulk_in_buffer = src->bulk_in_buffer; \
944     + dest->bulk_in_size = src->bulk_in_size; \
945     dest->interrupt_in_urb = src->interrupt_in_urb; \
946     + dest->interrupt_in_urb->context = dest; \
947     dest->interrupt_in_endpointAddress = \
948     src->interrupt_in_endpointAddress;\
949     dest->interrupt_in_buffer = src->interrupt_in_buffer; \
950     diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
951     index 171226a..0d06d7c 100644
952     --- a/drivers/usb/serial/whiteheat.c
953     +++ b/drivers/usb/serial/whiteheat.c
954     @@ -1154,7 +1154,7 @@ static void firm_setup_port(struct tty_struct *tty)
955     struct whiteheat_port_settings port_settings;
956     unsigned int cflag = tty->termios->c_cflag;
957    
958     - port_settings.port = port->number + 1;
959     + port_settings.port = port->number - port->serial->minor + 1;
960    
961     /* get the byte size */
962     switch (cflag & CSIZE) {
963     diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c
964     index b6df20a..d52703c 100644
965     --- a/drivers/xen/xen-pciback/pciback_ops.c
966     +++ b/drivers/xen/xen-pciback/pciback_ops.c
967     @@ -9,6 +9,8 @@
968     #include <xen/events.h>
969     #include <linux/sched.h>
970     #include "pciback.h"
971     +#include <linux/ratelimit.h>
972     +#include <linux/printk.h>
973    
974     int verbose_request;
975     module_param(verbose_request, int, 0644);
976     @@ -136,7 +138,6 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev,
977     struct pci_dev *dev, struct xen_pci_op *op)
978     {
979     struct xen_pcibk_dev_data *dev_data;
980     - int otherend = pdev->xdev->otherend_id;
981     int status;
982    
983     if (unlikely(verbose_request))
984     @@ -145,8 +146,9 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev,
985     status = pci_enable_msi(dev);
986    
987     if (status) {
988     - printk(KERN_ERR "error enable msi for guest %x status %x\n",
989     - otherend, status);
990     + pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n",
991     + pci_name(dev), pdev->xdev->otherend_id,
992     + status);
993     op->value = 0;
994     return XEN_PCI_ERR_op_failed;
995     }
996     @@ -224,10 +226,10 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
997     pci_name(dev), i,
998     op->msix_entries[i].vector);
999     }
1000     - } else {
1001     - printk(KERN_WARNING DRV_NAME ": %s: failed to enable MSI-X: err %d!\n",
1002     - pci_name(dev), result);
1003     - }
1004     + } else
1005     + pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n",
1006     + pci_name(dev), pdev->xdev->otherend_id,
1007     + result);
1008     kfree(entries);
1009    
1010     op->value = result;
1011     diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
1012     index 72a6cab..f80ca4a 100644
1013     --- a/include/linux/ftrace.h
1014     +++ b/include/linux/ftrace.h
1015     @@ -299,7 +299,6 @@ ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf,
1016     size_t cnt, loff_t *ppos);
1017     ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf,
1018     size_t cnt, loff_t *ppos);
1019     -loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int origin);
1020     int ftrace_regex_release(struct inode *inode, struct file *file);
1021    
1022     void __init
1023     @@ -420,6 +419,8 @@ static inline int
1024     ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; }
1025     #endif /* CONFIG_DYNAMIC_FTRACE */
1026    
1027     +loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int whence);
1028     +
1029     /* totally disable ftrace - can not re-enable after this */
1030     void ftrace_kill(void);
1031    
1032     diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
1033     index c962d31..e101cf9 100644
1034     --- a/kernel/trace/ftrace.c
1035     +++ b/kernel/trace/ftrace.c
1036     @@ -999,6 +999,19 @@ static __init void ftrace_profile_debugfs(struct dentry *d_tracer)
1037    
1038     static struct pid * const ftrace_swapper_pid = &init_struct_pid;
1039    
1040     +loff_t
1041     +ftrace_filter_lseek(struct file *file, loff_t offset, int whence)
1042     +{
1043     + loff_t ret;
1044     +
1045     + if (file->f_mode & FMODE_READ)
1046     + ret = seq_lseek(file, offset, whence);
1047     + else
1048     + file->f_pos = ret = 1;
1049     +
1050     + return ret;
1051     +}
1052     +
1053     #ifdef CONFIG_DYNAMIC_FTRACE
1054    
1055     #ifndef CONFIG_FTRACE_MCOUNT_RECORD
1056     @@ -2541,7 +2554,7 @@ static void ftrace_filter_reset(struct ftrace_hash *hash)
1057     * routine, you can use ftrace_filter_write() for the write
1058     * routine if @flag has FTRACE_ITER_FILTER set, or
1059     * ftrace_notrace_write() if @flag has FTRACE_ITER_NOTRACE set.
1060     - * ftrace_regex_lseek() should be used as the lseek routine, and
1061     + * ftrace_filter_lseek() should be used as the lseek routine, and
1062     * release must call ftrace_regex_release().
1063     */
1064     int
1065     @@ -2625,19 +2638,6 @@ ftrace_notrace_open(struct inode *inode, struct file *file)
1066     inode, file);
1067     }
1068    
1069     -loff_t
1070     -ftrace_regex_lseek(struct file *file, loff_t offset, int origin)
1071     -{
1072     - loff_t ret;
1073     -
1074     - if (file->f_mode & FMODE_READ)
1075     - ret = seq_lseek(file, offset, origin);
1076     - else
1077     - file->f_pos = ret = 1;
1078     -
1079     - return ret;
1080     -}
1081     -
1082     static int ftrace_match(char *str, char *regex, int len, int type)
1083     {
1084     int matched = 0;
1085     @@ -3445,7 +3445,7 @@ static const struct file_operations ftrace_filter_fops = {
1086     .open = ftrace_filter_open,
1087     .read = seq_read,
1088     .write = ftrace_filter_write,
1089     - .llseek = ftrace_regex_lseek,
1090     + .llseek = ftrace_filter_lseek,
1091     .release = ftrace_regex_release,
1092     };
1093    
1094     @@ -3453,7 +3453,7 @@ static const struct file_operations ftrace_notrace_fops = {
1095     .open = ftrace_notrace_open,
1096     .read = seq_read,
1097     .write = ftrace_notrace_write,
1098     - .llseek = ftrace_regex_lseek,
1099     + .llseek = ftrace_filter_lseek,
1100     .release = ftrace_regex_release,
1101     };
1102    
1103     @@ -3659,8 +3659,8 @@ static const struct file_operations ftrace_graph_fops = {
1104     .open = ftrace_graph_open,
1105     .read = seq_read,
1106     .write = ftrace_graph_write,
1107     + .llseek = ftrace_filter_lseek,
1108     .release = ftrace_graph_release,
1109     - .llseek = seq_lseek,
1110     };
1111     #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
1112    
1113     @@ -4261,7 +4261,7 @@ static const struct file_operations ftrace_pid_fops = {
1114     .open = ftrace_pid_open,
1115     .write = ftrace_pid_write,
1116     .read = seq_read,
1117     - .llseek = seq_lseek,
1118     + .llseek = ftrace_filter_lseek,
1119     .release = ftrace_pid_release,
1120     };
1121    
1122     diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
1123     index c70f6bf..8298997 100644
1124     --- a/kernel/trace/trace_stack.c
1125     +++ b/kernel/trace/trace_stack.c
1126     @@ -384,7 +384,7 @@ static const struct file_operations stack_trace_filter_fops = {
1127     .open = stack_trace_filter_open,
1128     .read = seq_read,
1129     .write = ftrace_filter_write,
1130     - .llseek = ftrace_regex_lseek,
1131     + .llseek = ftrace_filter_lseek,
1132     .release = ftrace_regex_release,
1133     };
1134    
1135     diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
1136     index f008fc7..e075a67 100644
1137     --- a/sound/usb/mixer.c
1138     +++ b/sound/usb/mixer.c
1139     @@ -822,6 +822,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
1140     case USB_ID(0x046d, 0x0808):
1141     case USB_ID(0x046d, 0x0809):
1142     case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
1143     + case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
1144     case USB_ID(0x046d, 0x0991):
1145     /* Most audio usb devices lie about volume resolution.
1146     * Most Logitech webcams have res = 384.
1147     diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
1148     index fa4c2f7..915bc2c 100644
1149     --- a/sound/usb/quirks-table.h
1150     +++ b/sound/usb/quirks-table.h
1151     @@ -157,7 +157,13 @@
1152     .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
1153     },
1154     {
1155     - USB_DEVICE(0x046d, 0x0990),
1156     + .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
1157     + USB_DEVICE_ID_MATCH_INT_CLASS |
1158     + USB_DEVICE_ID_MATCH_INT_SUBCLASS,
1159     + .idVendor = 0x046d,
1160     + .idProduct = 0x0990,
1161     + .bInterfaceClass = USB_CLASS_AUDIO,
1162     + .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
1163     .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1164     .vendor_name = "Logitech, Inc.",
1165     .product_name = "QuickCam Pro 9000",
1166     @@ -1622,7 +1628,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1167     USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
1168     .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1169     .ifnum = 0,
1170     - .type = QUIRK_MIDI_STANDARD_INTERFACE
1171     + .type = QUIRK_MIDI_FIXED_ENDPOINT,
1172     + .data = & (const struct snd_usb_midi_endpoint_info) {
1173     + .out_cables = 0x0007,
1174     + .in_cables = 0x0007
1175     + }
1176     }
1177     },
1178     {