Annotation of /trunk/kernel-magellan/patches-3.4/0103-3.4.4-all-fixes.patch
Parent Directory | Revision Log
Revision 1827 -
(hide annotations)
(download)
Sun Jul 1 20:29:40 2012 UTC (12 years, 2 months ago) by niro
File size: 63845 byte(s)
Sun Jul 1 20:29:40 2012 UTC (12 years, 2 months ago) by niro
File size: 63845 byte(s)
3.4.4-magellan-r1
1 | niro | 1827 | diff --git a/arch/arm/mach-imx/crm-regs-imx5.h b/arch/arm/mach-imx/crm-regs-imx5.h |
2 | index 5e11ba7..5e3f1f0 100644 | ||
3 | --- a/arch/arm/mach-imx/crm-regs-imx5.h | ||
4 | +++ b/arch/arm/mach-imx/crm-regs-imx5.h | ||
5 | @@ -23,7 +23,7 @@ | ||
6 | #define MX53_DPLL1_BASE MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR) | ||
7 | #define MX53_DPLL2_BASE MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR) | ||
8 | #define MX53_DPLL3_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) | ||
9 | -#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR) | ||
10 | +#define MX53_DPLL4_BASE MX53_IO_ADDRESS(MX53_PLL4_BASE_ADDR) | ||
11 | |||
12 | /* PLL Register Offsets */ | ||
13 | #define MXC_PLL_DP_CTL 0x00 | ||
14 | diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c | ||
15 | index 89493ab..20ed2d5 100644 | ||
16 | --- a/arch/arm/mach-imx/hotplug.c | ||
17 | +++ b/arch/arm/mach-imx/hotplug.c | ||
18 | @@ -12,6 +12,7 @@ | ||
19 | |||
20 | #include <linux/errno.h> | ||
21 | #include <asm/cacheflush.h> | ||
22 | +#include <asm/cp15.h> | ||
23 | #include <mach/common.h> | ||
24 | |||
25 | int platform_cpu_kill(unsigned int cpu) | ||
26 | @@ -19,6 +20,44 @@ int platform_cpu_kill(unsigned int cpu) | ||
27 | return 1; | ||
28 | } | ||
29 | |||
30 | +static inline void cpu_enter_lowpower(void) | ||
31 | +{ | ||
32 | + unsigned int v; | ||
33 | + | ||
34 | + flush_cache_all(); | ||
35 | + asm volatile( | ||
36 | + "mcr p15, 0, %1, c7, c5, 0\n" | ||
37 | + " mcr p15, 0, %1, c7, c10, 4\n" | ||
38 | + /* | ||
39 | + * Turn off coherency | ||
40 | + */ | ||
41 | + " mrc p15, 0, %0, c1, c0, 1\n" | ||
42 | + " bic %0, %0, %3\n" | ||
43 | + " mcr p15, 0, %0, c1, c0, 1\n" | ||
44 | + " mrc p15, 0, %0, c1, c0, 0\n" | ||
45 | + " bic %0, %0, %2\n" | ||
46 | + " mcr p15, 0, %0, c1, c0, 0\n" | ||
47 | + : "=&r" (v) | ||
48 | + : "r" (0), "Ir" (CR_C), "Ir" (0x40) | ||
49 | + : "cc"); | ||
50 | +} | ||
51 | + | ||
52 | +static inline void cpu_leave_lowpower(void) | ||
53 | +{ | ||
54 | + unsigned int v; | ||
55 | + | ||
56 | + asm volatile( | ||
57 | + "mrc p15, 0, %0, c1, c0, 0\n" | ||
58 | + " orr %0, %0, %1\n" | ||
59 | + " mcr p15, 0, %0, c1, c0, 0\n" | ||
60 | + " mrc p15, 0, %0, c1, c0, 1\n" | ||
61 | + " orr %0, %0, %2\n" | ||
62 | + " mcr p15, 0, %0, c1, c0, 1\n" | ||
63 | + : "=&r" (v) | ||
64 | + : "Ir" (CR_C), "Ir" (0x40) | ||
65 | + : "cc"); | ||
66 | +} | ||
67 | + | ||
68 | /* | ||
69 | * platform-specific code to shutdown a CPU | ||
70 | * | ||
71 | @@ -26,9 +65,10 @@ int platform_cpu_kill(unsigned int cpu) | ||
72 | */ | ||
73 | void platform_cpu_die(unsigned int cpu) | ||
74 | { | ||
75 | - flush_cache_all(); | ||
76 | + cpu_enter_lowpower(); | ||
77 | imx_enable_cpu(cpu, false); | ||
78 | cpu_do_idle(); | ||
79 | + cpu_leave_lowpower(); | ||
80 | |||
81 | /* We should never return from idle */ | ||
82 | panic("cpu %d unexpectedly exit from shutdown\n", cpu); | ||
83 | diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c | ||
84 | index e432d4a..4460d25 100644 | ||
85 | --- a/arch/arm/mach-imx/mach-mx21ads.c | ||
86 | +++ b/arch/arm/mach-imx/mach-mx21ads.c | ||
87 | @@ -32,7 +32,7 @@ | ||
88 | * Memory-mapped I/O on MX21ADS base board | ||
89 | */ | ||
90 | #define MX21ADS_MMIO_BASE_ADDR 0xf5000000 | ||
91 | -#define MX21ADS_MMIO_SIZE SZ_16M | ||
92 | +#define MX21ADS_MMIO_SIZE 0xc00000 | ||
93 | |||
94 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | ||
95 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | ||
96 | diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h | ||
97 | index 51010bf..102abd6 100644 | ||
98 | --- a/arch/powerpc/include/asm/hw_irq.h | ||
99 | +++ b/arch/powerpc/include/asm/hw_irq.h | ||
100 | @@ -99,6 +99,9 @@ static inline void hard_irq_disable(void) | ||
101 | get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; | ||
102 | } | ||
103 | |||
104 | +/* include/linux/interrupt.h needs hard_irq_disable to be a macro */ | ||
105 | +#define hard_irq_disable hard_irq_disable | ||
106 | + | ||
107 | /* | ||
108 | * This is called by asynchronous interrupts to conditionally | ||
109 | * re-enable hard interrupts when soft-disabled after having | ||
110 | diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c | ||
111 | index 6c7f1e8..40edfc3 100644 | ||
112 | --- a/arch/x86/xen/enlighten.c | ||
113 | +++ b/arch/x86/xen/enlighten.c | ||
114 | @@ -207,6 +207,9 @@ static void __init xen_banner(void) | ||
115 | xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : ""); | ||
116 | } | ||
117 | |||
118 | +#define CPUID_THERM_POWER_LEAF 6 | ||
119 | +#define APERFMPERF_PRESENT 0 | ||
120 | + | ||
121 | static __read_mostly unsigned int cpuid_leaf1_edx_mask = ~0; | ||
122 | static __read_mostly unsigned int cpuid_leaf1_ecx_mask = ~0; | ||
123 | |||
124 | @@ -240,6 +243,11 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, | ||
125 | *dx = cpuid_leaf5_edx_val; | ||
126 | return; | ||
127 | |||
128 | + case CPUID_THERM_POWER_LEAF: | ||
129 | + /* Disabling APERFMPERF for kernel usage */ | ||
130 | + maskecx = ~(1 << APERFMPERF_PRESENT); | ||
131 | + break; | ||
132 | + | ||
133 | case 0xb: | ||
134 | /* Suppress extended topology stuff */ | ||
135 | maskebx = 0; | ||
136 | diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c | ||
137 | index 6289f0e..731c904 100644 | ||
138 | --- a/drivers/char/hw_random/atmel-rng.c | ||
139 | +++ b/drivers/char/hw_random/atmel-rng.c | ||
140 | @@ -34,7 +34,7 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max, | ||
141 | u32 *data = buf; | ||
142 | |||
143 | /* data ready? */ | ||
144 | - if (readl(trng->base + TRNG_ODATA) & 1) { | ||
145 | + if (readl(trng->base + TRNG_ISR) & 1) { | ||
146 | *data = readl(trng->base + TRNG_ODATA); | ||
147 | /* | ||
148 | ensure data ready is only set again AFTER the next data | ||
149 | diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c | ||
150 | index 85226cc..0fe2277 100644 | ||
151 | --- a/drivers/edac/i7core_edac.c | ||
152 | +++ b/drivers/edac/i7core_edac.c | ||
153 | @@ -1932,12 +1932,6 @@ static int i7core_mce_check_error(struct notifier_block *nb, unsigned long val, | ||
154 | if (mce->bank != 8) | ||
155 | return NOTIFY_DONE; | ||
156 | |||
157 | -#ifdef CONFIG_SMP | ||
158 | - /* Only handle if it is the right mc controller */ | ||
159 | - if (mce->socketid != pvt->i7core_dev->socket) | ||
160 | - return NOTIFY_DONE; | ||
161 | -#endif | ||
162 | - | ||
163 | smp_rmb(); | ||
164 | if ((pvt->mce_out + 1) % MCE_LOG_LEN == pvt->mce_in) { | ||
165 | smp_wmb(); | ||
166 | @@ -2234,8 +2228,6 @@ static void i7core_unregister_mci(struct i7core_dev *i7core_dev) | ||
167 | if (pvt->enable_scrub) | ||
168 | disable_sdram_scrub_setting(mci); | ||
169 | |||
170 | - mce_unregister_decode_chain(&i7_mce_dec); | ||
171 | - | ||
172 | /* Disable EDAC polling */ | ||
173 | i7core_pci_ctl_release(pvt); | ||
174 | |||
175 | @@ -2336,8 +2328,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev) | ||
176 | /* DCLK for scrub rate setting */ | ||
177 | pvt->dclk_freq = get_dclk_freq(); | ||
178 | |||
179 | - mce_register_decode_chain(&i7_mce_dec); | ||
180 | - | ||
181 | return 0; | ||
182 | |||
183 | fail0: | ||
184 | @@ -2481,8 +2471,10 @@ static int __init i7core_init(void) | ||
185 | |||
186 | pci_rc = pci_register_driver(&i7core_driver); | ||
187 | |||
188 | - if (pci_rc >= 0) | ||
189 | + if (pci_rc >= 0) { | ||
190 | + mce_register_decode_chain(&i7_mce_dec); | ||
191 | return 0; | ||
192 | + } | ||
193 | |||
194 | i7core_printk(KERN_ERR, "Failed to register device with error %d.\n", | ||
195 | pci_rc); | ||
196 | @@ -2498,6 +2490,7 @@ static void __exit i7core_exit(void) | ||
197 | { | ||
198 | debugf2("MC: " __FILE__ ": %s()\n", __func__); | ||
199 | pci_unregister_driver(&i7core_driver); | ||
200 | + mce_unregister_decode_chain(&i7_mce_dec); | ||
201 | } | ||
202 | |||
203 | module_init(i7core_init); | ||
204 | diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c | ||
205 | index a203536..0f9552d 100644 | ||
206 | --- a/drivers/edac/sb_edac.c | ||
207 | +++ b/drivers/edac/sb_edac.c | ||
208 | @@ -599,7 +599,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci) | ||
209 | pvt->is_close_pg = false; | ||
210 | } | ||
211 | |||
212 | - pci_read_config_dword(pvt->pci_ta, RANK_CFG_A, ®); | ||
213 | + pci_read_config_dword(pvt->pci_ddrio, RANK_CFG_A, ®); | ||
214 | if (IS_RDIMM_ENABLED(reg)) { | ||
215 | /* FIXME: Can also be LRDIMM */ | ||
216 | debugf0("Memory is registered\n"); | ||
217 | @@ -1669,8 +1669,6 @@ static void sbridge_unregister_mci(struct sbridge_dev *sbridge_dev) | ||
218 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", | ||
219 | __func__, mci, &sbridge_dev->pdev[0]->dev); | ||
220 | |||
221 | - mce_unregister_decode_chain(&sbridge_mce_dec); | ||
222 | - | ||
223 | /* Remove MC sysfs nodes */ | ||
224 | edac_mc_del_mc(mci->dev); | ||
225 | |||
226 | @@ -1738,7 +1736,6 @@ static int sbridge_register_mci(struct sbridge_dev *sbridge_dev) | ||
227 | goto fail0; | ||
228 | } | ||
229 | |||
230 | - mce_register_decode_chain(&sbridge_mce_dec); | ||
231 | return 0; | ||
232 | |||
233 | fail0: | ||
234 | @@ -1867,8 +1864,10 @@ static int __init sbridge_init(void) | ||
235 | |||
236 | pci_rc = pci_register_driver(&sbridge_driver); | ||
237 | |||
238 | - if (pci_rc >= 0) | ||
239 | + if (pci_rc >= 0) { | ||
240 | + mce_register_decode_chain(&sbridge_mce_dec); | ||
241 | return 0; | ||
242 | + } | ||
243 | |||
244 | sbridge_printk(KERN_ERR, "Failed to register device with error %d.\n", | ||
245 | pci_rc); | ||
246 | @@ -1884,6 +1883,7 @@ static void __exit sbridge_exit(void) | ||
247 | { | ||
248 | debugf2("MC: " __FILE__ ": %s()\n", __func__); | ||
249 | pci_unregister_driver(&sbridge_driver); | ||
250 | + mce_unregister_decode_chain(&sbridge_mce_dec); | ||
251 | } | ||
252 | |||
253 | module_init(sbridge_init); | ||
254 | diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c | ||
255 | index 1d19408..6862421 100644 | ||
256 | --- a/drivers/gpu/drm/i915/intel_dp.c | ||
257 | +++ b/drivers/gpu/drm/i915/intel_dp.c | ||
258 | @@ -368,7 +368,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, | ||
259 | int recv_bytes; | ||
260 | uint32_t status; | ||
261 | uint32_t aux_clock_divider; | ||
262 | - int try, precharge = 5; | ||
263 | + int try, precharge; | ||
264 | |||
265 | intel_dp_check_edp(intel_dp); | ||
266 | /* The clock divider is based off the hrawclk, | ||
267 | @@ -388,6 +388,11 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, | ||
268 | else | ||
269 | aux_clock_divider = intel_hrawclk(dev) / 2; | ||
270 | |||
271 | + if (IS_GEN6(dev)) | ||
272 | + precharge = 3; | ||
273 | + else | ||
274 | + precharge = 5; | ||
275 | + | ||
276 | /* Try to wait for any previous AUX channel activity */ | ||
277 | for (try = 0; try < 3; try++) { | ||
278 | status = I915_READ(ch_ctl); | ||
279 | diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c | ||
280 | index 51e8d08..e72c03f 100644 | ||
281 | --- a/drivers/gpu/drm/radeon/evergreen.c | ||
282 | +++ b/drivers/gpu/drm/radeon/evergreen.c | ||
283 | @@ -2210,6 +2210,9 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | ||
284 | smx_dc_ctl0 |= NUMBER_OF_SETS(rdev->config.evergreen.sx_num_of_sets); | ||
285 | WREG32(SMX_DC_CTL0, smx_dc_ctl0); | ||
286 | |||
287 | + if (rdev->family <= CHIP_SUMO2) | ||
288 | + WREG32(SMX_SAR_CTL0, 0x00010000); | ||
289 | + | ||
290 | WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_size / 4) - 1) | | ||
291 | POSITION_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_pos_size / 4) - 1) | | ||
292 | SMX_BUFFER_SIZE((rdev->config.evergreen.sx_max_export_smx_size / 4) - 1))); | ||
293 | diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h | ||
294 | index a5b88aa..f62ccd3 100644 | ||
295 | --- a/drivers/gpu/drm/radeon/evergreend.h | ||
296 | +++ b/drivers/gpu/drm/radeon/evergreend.h | ||
297 | @@ -273,6 +273,7 @@ | ||
298 | #define SCRATCH_UMSK 0x8540 | ||
299 | #define SCRATCH_ADDR 0x8544 | ||
300 | |||
301 | +#define SMX_SAR_CTL0 0xA008 | ||
302 | #define SMX_DC_CTL0 0xA020 | ||
303 | #define USE_HASH_FUNCTION (1 << 0) | ||
304 | #define NUMBER_OF_SETS(x) ((x) << 1) | ||
305 | diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c | ||
306 | index c8187c4..b1ff9cc 100644 | ||
307 | --- a/drivers/gpu/drm/radeon/r600.c | ||
308 | +++ b/drivers/gpu/drm/radeon/r600.c | ||
309 | @@ -1906,6 +1906,7 @@ void r600_gpu_init(struct radeon_device *rdev) | ||
310 | WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA | | ||
311 | NUM_CLIP_SEQ(3))); | ||
312 | WREG32(PA_SC_ENHANCE, FORCE_EOV_MAX_CLK_CNT(4095)); | ||
313 | + WREG32(VC_ENHANCE, 0); | ||
314 | } | ||
315 | |||
316 | |||
317 | diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h | ||
318 | index 59f9c99..12ceb82 100644 | ||
319 | --- a/drivers/gpu/drm/radeon/r600d.h | ||
320 | +++ b/drivers/gpu/drm/radeon/r600d.h | ||
321 | @@ -483,6 +483,7 @@ | ||
322 | #define TC_L2_SIZE(x) ((x)<<5) | ||
323 | #define L2_DISABLE_LATE_HIT (1<<9) | ||
324 | |||
325 | +#define VC_ENHANCE 0x9714 | ||
326 | |||
327 | #define VGT_CACHE_INVALIDATION 0x88C4 | ||
328 | #define CACHE_INVALIDATION(x) ((x)<<0) | ||
329 | diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c | ||
330 | index 80a292b..591040b 100644 | ||
331 | --- a/drivers/gpu/drm/radeon/rv770.c | ||
332 | +++ b/drivers/gpu/drm/radeon/rv770.c | ||
333 | @@ -782,6 +782,9 @@ static void rv770_gpu_init(struct radeon_device *rdev) | ||
334 | ACK_FLUSH_CTL(3) | | ||
335 | SYNC_FLUSH_CTL)); | ||
336 | |||
337 | + if (rdev->family != CHIP_RV770) | ||
338 | + WREG32(SMX_SAR_CTL0, 0x00003f3f); | ||
339 | + | ||
340 | db_debug3 = RREG32(DB_DEBUG3); | ||
341 | db_debug3 &= ~DB_CLK_OFF_DELAY(0x1f); | ||
342 | switch (rdev->family) { | ||
343 | @@ -960,7 +963,7 @@ static void rv770_gpu_init(struct radeon_device *rdev) | ||
344 | |||
345 | WREG32(PA_CL_ENHANCE, (CLIP_VTX_REORDER_ENA | | ||
346 | NUM_CLIP_SEQ(3))); | ||
347 | - | ||
348 | + WREG32(VC_ENHANCE, 0); | ||
349 | } | ||
350 | |||
351 | void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | ||
352 | diff --git a/drivers/gpu/drm/radeon/rv770d.h b/drivers/gpu/drm/radeon/rv770d.h | ||
353 | index 7538092..7095a71 100644 | ||
354 | --- a/drivers/gpu/drm/radeon/rv770d.h | ||
355 | +++ b/drivers/gpu/drm/radeon/rv770d.h | ||
356 | @@ -208,6 +208,7 @@ | ||
357 | #define SCRATCH_UMSK 0x8540 | ||
358 | #define SCRATCH_ADDR 0x8544 | ||
359 | |||
360 | +#define SMX_SAR_CTL0 0xA008 | ||
361 | #define SMX_DC_CTL0 0xA020 | ||
362 | #define USE_HASH_FUNCTION (1 << 0) | ||
363 | #define CACHE_DEPTH(x) ((x) << 1) | ||
364 | @@ -307,6 +308,8 @@ | ||
365 | #define TCP_CNTL 0x9610 | ||
366 | #define TCP_CHAN_STEER 0x9614 | ||
367 | |||
368 | +#define VC_ENHANCE 0x9714 | ||
369 | + | ||
370 | #define VGT_CACHE_INVALIDATION 0x88C4 | ||
371 | #define CACHE_INVALIDATION(x) ((x)<<0) | ||
372 | #define VC_ONLY 0 | ||
373 | diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c | ||
374 | index 30d98d1..dd14cd1 100644 | ||
375 | --- a/drivers/gpu/drm/sis/sis_drv.c | ||
376 | +++ b/drivers/gpu/drm/sis/sis_drv.c | ||
377 | @@ -47,9 +47,9 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset) | ||
378 | if (dev_priv == NULL) | ||
379 | return -ENOMEM; | ||
380 | |||
381 | + idr_init(&dev_priv->object_idr); | ||
382 | dev->dev_private = (void *)dev_priv; | ||
383 | dev_priv->chipset = chipset; | ||
384 | - idr_init(&dev->object_name_idr); | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c | ||
389 | index 5367390..08eff0d 100644 | ||
390 | --- a/drivers/gpu/drm/udl/udl_drv.c | ||
391 | +++ b/drivers/gpu/drm/udl/udl_drv.c | ||
392 | @@ -13,8 +13,21 @@ | ||
393 | |||
394 | static struct drm_driver driver; | ||
395 | |||
396 | +/* | ||
397 | + * There are many DisplayLink-based graphics products, all with unique PIDs. | ||
398 | + * So we match on DisplayLink's VID + Vendor-Defined Interface Class (0xff) | ||
399 | + * We also require a match on SubClass (0x00) and Protocol (0x00), | ||
400 | + * which is compatible with all known USB 2.0 era graphics chips and firmware, | ||
401 | + * but allows DisplayLink to increment those for any future incompatible chips | ||
402 | + */ | ||
403 | static struct usb_device_id id_table[] = { | ||
404 | - {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,}, | ||
405 | + {.idVendor = 0x17e9, .bInterfaceClass = 0xff, | ||
406 | + .bInterfaceSubClass = 0x00, | ||
407 | + .bInterfaceProtocol = 0x00, | ||
408 | + .match_flags = USB_DEVICE_ID_MATCH_VENDOR | | ||
409 | + USB_DEVICE_ID_MATCH_INT_CLASS | | ||
410 | + USB_DEVICE_ID_MATCH_INT_SUBCLASS | | ||
411 | + USB_DEVICE_ID_MATCH_INT_PROTOCOL,}, | ||
412 | {}, | ||
413 | }; | ||
414 | MODULE_DEVICE_TABLE(usb, id_table); | ||
415 | diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c | ||
416 | index 1f18225..c126182 100644 | ||
417 | --- a/drivers/gpu/drm/via/via_map.c | ||
418 | +++ b/drivers/gpu/drm/via/via_map.c | ||
419 | @@ -100,12 +100,11 @@ int via_driver_load(struct drm_device *dev, unsigned long chipset) | ||
420 | if (dev_priv == NULL) | ||
421 | return -ENOMEM; | ||
422 | |||
423 | + idr_init(&dev_priv->object_idr); | ||
424 | dev->dev_private = (void *)dev_priv; | ||
425 | |||
426 | dev_priv->chipset = chipset; | ||
427 | |||
428 | - idr_init(&dev->object_name_idr); | ||
429 | - | ||
430 | pci_set_master(dev->pdev); | ||
431 | |||
432 | ret = drm_vblank_init(dev, 1); | ||
433 | diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c | ||
434 | index b3fdc69..c6d95f2 100644 | ||
435 | --- a/drivers/net/ethernet/intel/e1000e/82571.c | ||
436 | +++ b/drivers/net/ethernet/intel/e1000e/82571.c | ||
437 | @@ -2061,8 +2061,9 @@ const struct e1000_info e1000_82574_info = { | ||
438 | | FLAG_HAS_SMART_POWER_DOWN | ||
439 | | FLAG_HAS_AMT | ||
440 | | FLAG_HAS_CTRLEXT_ON_LOAD, | ||
441 | - .flags2 = FLAG2_CHECK_PHY_HANG | ||
442 | + .flags2 = FLAG2_CHECK_PHY_HANG | ||
443 | | FLAG2_DISABLE_ASPM_L0S | ||
444 | + | FLAG2_DISABLE_ASPM_L1 | ||
445 | | FLAG2_NO_DISABLE_RX, | ||
446 | .pba = 32, | ||
447 | .max_hw_frame_size = DEFAULT_JUMBO, | ||
448 | diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
449 | index 9520a6a..00e961e 100644 | ||
450 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c | ||
451 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | ||
452 | @@ -5293,14 +5293,6 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu) | ||
453 | return -EINVAL; | ||
454 | } | ||
455 | |||
456 | - /* 82573 Errata 17 */ | ||
457 | - if (((adapter->hw.mac.type == e1000_82573) || | ||
458 | - (adapter->hw.mac.type == e1000_82574)) && | ||
459 | - (max_frame > ETH_FRAME_LEN + ETH_FCS_LEN)) { | ||
460 | - adapter->flags2 |= FLAG2_DISABLE_ASPM_L1; | ||
461 | - e1000e_disable_aspm(adapter->pdev, PCIE_LINK_STATE_L1); | ||
462 | - } | ||
463 | - | ||
464 | while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) | ||
465 | usleep_range(1000, 2000); | ||
466 | /* e1000e_down -> e1000e_reset dependent on max_frame_size & mtu */ | ||
467 | diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c | ||
468 | index 9f71b85..c0cfa4e 100644 | ||
469 | --- a/drivers/net/wireless/iwlwifi/iwl-6000.c | ||
470 | +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | ||
471 | @@ -49,17 +49,20 @@ | ||
472 | #define IWL6000_UCODE_API_MAX 6 | ||
473 | #define IWL6050_UCODE_API_MAX 5 | ||
474 | #define IWL6000G2_UCODE_API_MAX 6 | ||
475 | +#define IWL6035_UCODE_API_MAX 6 | ||
476 | |||
477 | /* Oldest version we won't warn about */ | ||
478 | #define IWL6000_UCODE_API_OK 4 | ||
479 | #define IWL6000G2_UCODE_API_OK 5 | ||
480 | #define IWL6050_UCODE_API_OK 5 | ||
481 | #define IWL6000G2B_UCODE_API_OK 6 | ||
482 | +#define IWL6035_UCODE_API_OK 6 | ||
483 | |||
484 | /* Lowest firmware API version supported */ | ||
485 | #define IWL6000_UCODE_API_MIN 4 | ||
486 | #define IWL6050_UCODE_API_MIN 4 | ||
487 | -#define IWL6000G2_UCODE_API_MIN 4 | ||
488 | +#define IWL6000G2_UCODE_API_MIN 5 | ||
489 | +#define IWL6035_UCODE_API_MIN 6 | ||
490 | |||
491 | #define IWL6000_FW_PRE "iwlwifi-6000-" | ||
492 | #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode" | ||
493 | @@ -425,9 +428,25 @@ const struct iwl_cfg iwl6030_2bg_cfg = { | ||
494 | IWL_DEVICE_6030, | ||
495 | }; | ||
496 | |||
497 | +#define IWL_DEVICE_6035 \ | ||
498 | + .fw_name_pre = IWL6030_FW_PRE, \ | ||
499 | + .ucode_api_max = IWL6035_UCODE_API_MAX, \ | ||
500 | + .ucode_api_ok = IWL6035_UCODE_API_OK, \ | ||
501 | + .ucode_api_min = IWL6035_UCODE_API_MIN, \ | ||
502 | + .max_inst_size = IWL60_RTC_INST_SIZE, \ | ||
503 | + .max_data_size = IWL60_RTC_DATA_SIZE, \ | ||
504 | + .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ | ||
505 | + .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ | ||
506 | + .lib = &iwl6030_lib, \ | ||
507 | + .base_params = &iwl6000_g2_base_params, \ | ||
508 | + .bt_params = &iwl6000_bt_params, \ | ||
509 | + .need_temp_offset_calib = true, \ | ||
510 | + .led_mode = IWL_LED_RF_STATE, \ | ||
511 | + .adv_pm = true | ||
512 | + | ||
513 | const struct iwl_cfg iwl6035_2agn_cfg = { | ||
514 | .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN", | ||
515 | - IWL_DEVICE_6030, | ||
516 | + IWL_DEVICE_6035, | ||
517 | .ht_params = &iwl6000_ht_params, | ||
518 | }; | ||
519 | |||
520 | diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | ||
521 | index 23cea42..79dddc4 100644 | ||
522 | --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c | ||
523 | +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | ||
524 | @@ -513,28 +513,28 @@ static int iwl_find_otp_image(struct iwl_trans *trans, | ||
525 | * iwl_get_max_txpower_avg - get the highest tx power from all chains. | ||
526 | * find the highest tx power from all chains for the channel | ||
527 | */ | ||
528 | -static s8 iwl_get_max_txpower_avg(const struct iwl_cfg *cfg, | ||
529 | +static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv, | ||
530 | struct iwl_eeprom_enhanced_txpwr *enhanced_txpower, | ||
531 | int element, s8 *max_txpower_in_half_dbm) | ||
532 | { | ||
533 | s8 max_txpower_avg = 0; /* (dBm) */ | ||
534 | |||
535 | /* Take the highest tx power from any valid chains */ | ||
536 | - if ((cfg->valid_tx_ant & ANT_A) && | ||
537 | + if ((hw_params(priv).valid_tx_ant & ANT_A) && | ||
538 | (enhanced_txpower[element].chain_a_max > max_txpower_avg)) | ||
539 | max_txpower_avg = enhanced_txpower[element].chain_a_max; | ||
540 | - if ((cfg->valid_tx_ant & ANT_B) && | ||
541 | + if ((hw_params(priv).valid_tx_ant & ANT_B) && | ||
542 | (enhanced_txpower[element].chain_b_max > max_txpower_avg)) | ||
543 | max_txpower_avg = enhanced_txpower[element].chain_b_max; | ||
544 | - if ((cfg->valid_tx_ant & ANT_C) && | ||
545 | + if ((hw_params(priv).valid_tx_ant & ANT_C) && | ||
546 | (enhanced_txpower[element].chain_c_max > max_txpower_avg)) | ||
547 | max_txpower_avg = enhanced_txpower[element].chain_c_max; | ||
548 | - if (((cfg->valid_tx_ant == ANT_AB) | | ||
549 | - (cfg->valid_tx_ant == ANT_BC) | | ||
550 | - (cfg->valid_tx_ant == ANT_AC)) && | ||
551 | + if (((hw_params(priv).valid_tx_ant == ANT_AB) | | ||
552 | + (hw_params(priv).valid_tx_ant == ANT_BC) | | ||
553 | + (hw_params(priv).valid_tx_ant == ANT_AC)) && | ||
554 | (enhanced_txpower[element].mimo2_max > max_txpower_avg)) | ||
555 | max_txpower_avg = enhanced_txpower[element].mimo2_max; | ||
556 | - if ((cfg->valid_tx_ant == ANT_ABC) && | ||
557 | + if ((hw_params(priv).valid_tx_ant == ANT_ABC) && | ||
558 | (enhanced_txpower[element].mimo3_max > max_txpower_avg)) | ||
559 | max_txpower_avg = enhanced_txpower[element].mimo3_max; | ||
560 | |||
561 | @@ -637,7 +637,7 @@ static void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv) | ||
562 | ((txp->delta_20_in_40 & 0xf0) >> 4), | ||
563 | (txp->delta_20_in_40 & 0x0f)); | ||
564 | |||
565 | - max_txp_avg = iwl_get_max_txpower_avg(cfg(priv), txp_array, idx, | ||
566 | + max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx, | ||
567 | &max_txp_avg_halfdbm); | ||
568 | |||
569 | /* | ||
570 | diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | ||
571 | index 1c2fe87..3b844b7 100644 | ||
572 | --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | ||
573 | +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | ||
574 | @@ -342,7 +342,7 @@ void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans, | ||
575 | enum iwl_rxon_context_id ctx, | ||
576 | int sta_id, int tid, int frame_limit, u16 ssn); | ||
577 | void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, | ||
578 | - int index, enum dma_data_direction dma_dir); | ||
579 | + enum dma_data_direction dma_dir); | ||
580 | int iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index, | ||
581 | struct sk_buff_head *skbs); | ||
582 | int iwl_queue_space(const struct iwl_queue *q); | ||
583 | diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | ||
584 | index e92972f..d7964b1 100644 | ||
585 | --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | ||
586 | +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | ||
587 | @@ -237,32 +237,38 @@ static void iwlagn_unmap_tfd(struct iwl_trans *trans, struct iwl_cmd_meta *meta, | ||
588 | for (i = 1; i < num_tbs; i++) | ||
589 | dma_unmap_single(trans->dev, iwl_tfd_tb_get_addr(tfd, i), | ||
590 | iwl_tfd_tb_get_len(tfd, i), dma_dir); | ||
591 | + | ||
592 | + tfd->num_tbs = 0; | ||
593 | } | ||
594 | |||
595 | /** | ||
596 | * iwlagn_txq_free_tfd - Free all chunks referenced by TFD [txq->q.read_ptr] | ||
597 | * @trans - transport private data | ||
598 | * @txq - tx queue | ||
599 | - * @index - the index of the TFD to be freed | ||
600 | - *@dma_dir - the direction of the DMA mapping | ||
601 | + * @dma_dir - the direction of the DMA mapping | ||
602 | * | ||
603 | * Does NOT advance any TFD circular buffer read/write indexes | ||
604 | * Does NOT free the TFD itself (which is within circular buffer) | ||
605 | */ | ||
606 | void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, | ||
607 | - int index, enum dma_data_direction dma_dir) | ||
608 | + enum dma_data_direction dma_dir) | ||
609 | { | ||
610 | struct iwl_tfd *tfd_tmp = txq->tfds; | ||
611 | |||
612 | + /* rd_ptr is bounded by n_bd and idx is bounded by n_window */ | ||
613 | + int rd_ptr = txq->q.read_ptr; | ||
614 | + int idx = get_cmd_index(&txq->q, rd_ptr); | ||
615 | + | ||
616 | lockdep_assert_held(&txq->lock); | ||
617 | |||
618 | - iwlagn_unmap_tfd(trans, &txq->meta[index], &tfd_tmp[index], dma_dir); | ||
619 | + /* We have only q->n_window txq->entries, but we use q->n_bd tfds */ | ||
620 | + iwlagn_unmap_tfd(trans, &txq->meta[idx], &tfd_tmp[rd_ptr], dma_dir); | ||
621 | |||
622 | /* free SKB */ | ||
623 | if (txq->skbs) { | ||
624 | struct sk_buff *skb; | ||
625 | |||
626 | - skb = txq->skbs[index]; | ||
627 | + skb = txq->skbs[idx]; | ||
628 | |||
629 | /* Can be called from irqs-disabled context | ||
630 | * If skb is not NULL, it means that the whole queue is being | ||
631 | @@ -270,7 +276,7 @@ void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, | ||
632 | */ | ||
633 | if (skb) { | ||
634 | iwl_op_mode_free_skb(trans->op_mode, skb); | ||
635 | - txq->skbs[index] = NULL; | ||
636 | + txq->skbs[idx] = NULL; | ||
637 | } | ||
638 | } | ||
639 | } | ||
640 | @@ -1100,7 +1106,7 @@ int iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index, | ||
641 | |||
642 | iwlagn_txq_inval_byte_cnt_tbl(trans, txq); | ||
643 | |||
644 | - iwlagn_txq_free_tfd(trans, txq, txq->q.read_ptr, DMA_TO_DEVICE); | ||
645 | + iwlagn_txq_free_tfd(trans, txq, DMA_TO_DEVICE); | ||
646 | freed++; | ||
647 | } | ||
648 | return freed; | ||
649 | diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | ||
650 | index 66df016..6eac984 100644 | ||
651 | --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | ||
652 | +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | ||
653 | @@ -430,9 +430,7 @@ static void iwl_tx_queue_unmap(struct iwl_trans *trans, int txq_id) | ||
654 | |||
655 | spin_lock_bh(&txq->lock); | ||
656 | while (q->write_ptr != q->read_ptr) { | ||
657 | - /* The read_ptr needs to bound by q->n_window */ | ||
658 | - iwlagn_txq_free_tfd(trans, txq, get_cmd_index(q, q->read_ptr), | ||
659 | - dma_dir); | ||
660 | + iwlagn_txq_free_tfd(trans, txq, dma_dir); | ||
661 | q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd); | ||
662 | } | ||
663 | spin_unlock_bh(&txq->lock); | ||
664 | diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c | ||
665 | index 111569c..f597a1a 100644 | ||
666 | --- a/drivers/pci/pci.c | ||
667 | +++ b/drivers/pci/pci.c | ||
668 | @@ -1743,6 +1743,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev) | ||
669 | if (target_state == PCI_POWER_ERROR) | ||
670 | return -EIO; | ||
671 | |||
672 | + /* Some devices mustn't be in D3 during system sleep */ | ||
673 | + if (target_state == PCI_D3hot && | ||
674 | + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) | ||
675 | + return 0; | ||
676 | + | ||
677 | pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); | ||
678 | |||
679 | error = pci_set_power_state(dev, target_state); | ||
680 | diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c | ||
681 | index 4bf7102..bf33f0b 100644 | ||
682 | --- a/drivers/pci/quirks.c | ||
683 | +++ b/drivers/pci/quirks.c | ||
684 | @@ -2917,6 +2917,32 @@ static void __devinit disable_igfx_irq(struct pci_dev *dev) | ||
685 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); | ||
686 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); | ||
687 | |||
688 | +/* | ||
689 | + * The Intel 6 Series/C200 Series chipset's EHCI controllers on many | ||
690 | + * ASUS motherboards will cause memory corruption or a system crash | ||
691 | + * if they are in D3 while the system is put into S3 sleep. | ||
692 | + */ | ||
693 | +static void __devinit asus_ehci_no_d3(struct pci_dev *dev) | ||
694 | +{ | ||
695 | + const char *sys_info; | ||
696 | + static const char good_Asus_board[] = "P8Z68-V"; | ||
697 | + | ||
698 | + if (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP) | ||
699 | + return; | ||
700 | + if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK) | ||
701 | + return; | ||
702 | + sys_info = dmi_get_system_info(DMI_BOARD_NAME); | ||
703 | + if (sys_info && memcmp(sys_info, good_Asus_board, | ||
704 | + sizeof(good_Asus_board) - 1) == 0) | ||
705 | + return; | ||
706 | + | ||
707 | + dev_info(&dev->dev, "broken D3 during system sleep on ASUS\n"); | ||
708 | + dev->dev_flags |= PCI_DEV_FLAGS_NO_D3_DURING_SLEEP; | ||
709 | + device_set_wakeup_capable(&dev->dev, false); | ||
710 | +} | ||
711 | +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c26, asus_ehci_no_d3); | ||
712 | +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c2d, asus_ehci_no_d3); | ||
713 | + | ||
714 | static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, | ||
715 | struct pci_fixup *end) | ||
716 | { | ||
717 | diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c | ||
718 | index 69425c4..de138e3 100644 | ||
719 | --- a/drivers/remoteproc/omap_remoteproc.c | ||
720 | +++ b/drivers/remoteproc/omap_remoteproc.c | ||
721 | @@ -182,7 +182,7 @@ static int __devinit omap_rproc_probe(struct platform_device *pdev) | ||
722 | |||
723 | ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); | ||
724 | if (ret) { | ||
725 | - dev_err(pdev->dev.parent, "dma_set_coherent_mask: %d\n", ret); | ||
726 | + dev_err(&pdev->dev, "dma_set_coherent_mask: %d\n", ret); | ||
727 | return ret; | ||
728 | } | ||
729 | |||
730 | diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c | ||
731 | index e756a0d..7591b97 100644 | ||
732 | --- a/drivers/remoteproc/remoteproc_core.c | ||
733 | +++ b/drivers/remoteproc/remoteproc_core.c | ||
734 | @@ -247,7 +247,7 @@ rproc_load_segments(struct rproc *rproc, const u8 *elf_data, size_t len) | ||
735 | } | ||
736 | |||
737 | if (offset + filesz > len) { | ||
738 | - dev_err(dev, "truncated fw: need 0x%x avail 0x%x\n", | ||
739 | + dev_err(dev, "truncated fw: need 0x%x avail 0x%zx\n", | ||
740 | offset + filesz, len); | ||
741 | ret = -EINVAL; | ||
742 | break; | ||
743 | @@ -934,7 +934,7 @@ static void rproc_resource_cleanup(struct rproc *rproc) | ||
744 | unmapped = iommu_unmap(rproc->domain, entry->da, entry->len); | ||
745 | if (unmapped != entry->len) { | ||
746 | /* nothing much to do besides complaining */ | ||
747 | - dev_err(dev, "failed to unmap %u/%u\n", entry->len, | ||
748 | + dev_err(dev, "failed to unmap %u/%zu\n", entry->len, | ||
749 | unmapped); | ||
750 | } | ||
751 | |||
752 | @@ -1020,7 +1020,7 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) | ||
753 | |||
754 | ehdr = (struct elf32_hdr *)fw->data; | ||
755 | |||
756 | - dev_info(dev, "Booting fw image %s, size %d\n", name, fw->size); | ||
757 | + dev_info(dev, "Booting fw image %s, size %zd\n", name, fw->size); | ||
758 | |||
759 | /* | ||
760 | * if enabling an IOMMU isn't relevant for this rproc, this is | ||
761 | @@ -1041,8 +1041,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) | ||
762 | |||
763 | /* look for the resource table */ | ||
764 | table = rproc_find_rsc_table(rproc, fw->data, fw->size, &tablesz); | ||
765 | - if (!table) | ||
766 | + if (!table) { | ||
767 | + ret = -EINVAL; | ||
768 | goto clean_up; | ||
769 | + } | ||
770 | |||
771 | /* handle fw resources which are required to boot rproc */ | ||
772 | ret = rproc_handle_boot_rsc(rproc, table, tablesz); | ||
773 | diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c | ||
774 | index 1808478..3f03342 100644 | ||
775 | --- a/drivers/scsi/mpt2sas/mpt2sas_base.c | ||
776 | +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | ||
777 | @@ -1785,7 +1785,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr, | ||
778 | static inline u8 | ||
779 | _base_get_msix_index(struct MPT2SAS_ADAPTER *ioc) | ||
780 | { | ||
781 | - return ioc->cpu_msix_table[smp_processor_id()]; | ||
782 | + return ioc->cpu_msix_table[raw_smp_processor_id()]; | ||
783 | } | ||
784 | |||
785 | /** | ||
786 | diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c | ||
787 | index c7746a3..f30e124 100644 | ||
788 | --- a/drivers/target/target_core_alua.c | ||
789 | +++ b/drivers/target/target_core_alua.c | ||
790 | @@ -351,9 +351,11 @@ int target_emulate_set_target_port_groups(struct se_task *task) | ||
791 | |||
792 | out: | ||
793 | transport_kunmap_data_sg(cmd); | ||
794 | - task->task_scsi_status = GOOD; | ||
795 | - transport_complete_task(task, 1); | ||
796 | - return 0; | ||
797 | + if (!rc) { | ||
798 | + task->task_scsi_status = GOOD; | ||
799 | + transport_complete_task(task, 1); | ||
800 | + } | ||
801 | + return rc; | ||
802 | } | ||
803 | |||
804 | static inline int core_alua_state_nonoptimized( | ||
805 | diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c | ||
806 | index d3d91da..944eaeb 100644 | ||
807 | --- a/drivers/tty/hvc/hvc_xen.c | ||
808 | +++ b/drivers/tty/hvc/hvc_xen.c | ||
809 | @@ -214,24 +214,24 @@ static int xen_hvm_console_init(void) | ||
810 | /* already configured */ | ||
811 | if (info->intf != NULL) | ||
812 | return 0; | ||
813 | - | ||
814 | + /* | ||
815 | + * If the toolstack (or the hypervisor) hasn't set these values, the | ||
816 | + * default value is 0. Even though mfn = 0 and evtchn = 0 are | ||
817 | + * theoretically correct values, in practice they never are and they | ||
818 | + * mean that a legacy toolstack hasn't initialized the pv console correctly. | ||
819 | + */ | ||
820 | r = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v); | ||
821 | - if (r < 0) { | ||
822 | - kfree(info); | ||
823 | - return -ENODEV; | ||
824 | - } | ||
825 | + if (r < 0 || v == 0) | ||
826 | + goto err; | ||
827 | info->evtchn = v; | ||
828 | - hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v); | ||
829 | - if (r < 0) { | ||
830 | - kfree(info); | ||
831 | - return -ENODEV; | ||
832 | - } | ||
833 | + v = 0; | ||
834 | + r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v); | ||
835 | + if (r < 0 || v == 0) | ||
836 | + goto err; | ||
837 | mfn = v; | ||
838 | info->intf = ioremap(mfn << PAGE_SHIFT, PAGE_SIZE); | ||
839 | - if (info->intf == NULL) { | ||
840 | - kfree(info); | ||
841 | - return -ENODEV; | ||
842 | - } | ||
843 | + if (info->intf == NULL) | ||
844 | + goto err; | ||
845 | info->vtermno = HVC_COOKIE; | ||
846 | |||
847 | spin_lock(&xencons_lock); | ||
848 | @@ -239,6 +239,9 @@ static int xen_hvm_console_init(void) | ||
849 | spin_unlock(&xencons_lock); | ||
850 | |||
851 | return 0; | ||
852 | +err: | ||
853 | + kfree(info); | ||
854 | + return -ENODEV; | ||
855 | } | ||
856 | |||
857 | static int xen_pv_console_init(void) | ||
858 | diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c | ||
859 | index b32ccb4..640cf79 100644 | ||
860 | --- a/drivers/usb/class/cdc-acm.c | ||
861 | +++ b/drivers/usb/class/cdc-acm.c | ||
862 | @@ -567,6 +567,14 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty) | ||
863 | |||
864 | usb_autopm_put_interface(acm->control); | ||
865 | |||
866 | + /* | ||
867 | + * Unthrottle device in case the TTY was closed while throttled. | ||
868 | + */ | ||
869 | + spin_lock_irq(&acm->read_lock); | ||
870 | + acm->throttled = 0; | ||
871 | + acm->throttle_req = 0; | ||
872 | + spin_unlock_irq(&acm->read_lock); | ||
873 | + | ||
874 | if (acm_submit_read_urbs(acm, GFP_KERNEL)) | ||
875 | goto error_submit_read_urbs; | ||
876 | |||
877 | diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c | ||
878 | index 4c8321e..83d14bf 100644 | ||
879 | --- a/drivers/usb/class/cdc-wdm.c | ||
880 | +++ b/drivers/usb/class/cdc-wdm.c | ||
881 | @@ -55,6 +55,15 @@ static const struct usb_device_id wdm_ids[] = { | ||
882 | .bInterfaceSubClass = 1, | ||
883 | .bInterfaceProtocol = 9, /* NOTE: CDC ECM control interface! */ | ||
884 | }, | ||
885 | + { | ||
886 | + /* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */ | ||
887 | + .match_flags = USB_DEVICE_ID_MATCH_VENDOR | | ||
888 | + USB_DEVICE_ID_MATCH_INT_INFO, | ||
889 | + .idVendor = HUAWEI_VENDOR_ID, | ||
890 | + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, | ||
891 | + .bInterfaceSubClass = 1, | ||
892 | + .bInterfaceProtocol = 57, /* NOTE: CDC ECM control interface! */ | ||
893 | + }, | ||
894 | { } | ||
895 | }; | ||
896 | |||
897 | diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c | ||
898 | index 57ed9e4..622b4a4 100644 | ||
899 | --- a/drivers/usb/core/hcd-pci.c | ||
900 | +++ b/drivers/usb/core/hcd-pci.c | ||
901 | @@ -493,15 +493,6 @@ static int hcd_pci_suspend_noirq(struct device *dev) | ||
902 | |||
903 | pci_save_state(pci_dev); | ||
904 | |||
905 | - /* | ||
906 | - * Some systems crash if an EHCI controller is in D3 during | ||
907 | - * a sleep transition. We have to leave such controllers in D0. | ||
908 | - */ | ||
909 | - if (hcd->broken_pci_sleep) { | ||
910 | - dev_dbg(dev, "Staying in PCI D0\n"); | ||
911 | - return retval; | ||
912 | - } | ||
913 | - | ||
914 | /* If the root hub is dead rather than suspended, disallow remote | ||
915 | * wakeup. usb_hc_died() should ensure that both hosts are marked as | ||
916 | * dying, so we only need to check the primary roothub. | ||
917 | diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c | ||
918 | index ca717da..ef116a5 100644 | ||
919 | --- a/drivers/usb/core/message.c | ||
920 | +++ b/drivers/usb/core/message.c | ||
921 | @@ -1803,7 +1803,6 @@ free_interfaces: | ||
922 | intfc = cp->intf_cache[i]; | ||
923 | intf->altsetting = intfc->altsetting; | ||
924 | intf->num_altsetting = intfc->num_altsetting; | ||
925 | - intf->intf_assoc = find_iad(dev, cp, i); | ||
926 | kref_get(&intfc->ref); | ||
927 | |||
928 | alt = usb_altnum_to_altsetting(intf, 0); | ||
929 | @@ -1816,6 +1815,8 @@ free_interfaces: | ||
930 | if (!alt) | ||
931 | alt = &intf->altsetting[0]; | ||
932 | |||
933 | + intf->intf_assoc = | ||
934 | + find_iad(dev, cp, alt->desc.bInterfaceNumber); | ||
935 | intf->cur_altsetting = alt; | ||
936 | usb_enable_interface(dev, intf, true); | ||
937 | intf->dev.parent = &dev->dev; | ||
938 | diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c | ||
939 | index 4a3bc5b..bb73df6 100644 | ||
940 | --- a/drivers/usb/host/ehci-hcd.c | ||
941 | +++ b/drivers/usb/host/ehci-hcd.c | ||
942 | @@ -671,7 +671,9 @@ static int ehci_init(struct usb_hcd *hcd) | ||
943 | hw = ehci->async->hw; | ||
944 | hw->hw_next = QH_NEXT(ehci, ehci->async->qh_dma); | ||
945 | hw->hw_info1 = cpu_to_hc32(ehci, QH_HEAD); | ||
946 | +#if defined(CONFIG_PPC_PS3) | ||
947 | hw->hw_info1 |= cpu_to_hc32(ehci, (1 << 7)); /* I = 1 */ | ||
948 | +#endif | ||
949 | hw->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); | ||
950 | hw->hw_qtd_next = EHCI_LIST_END(ehci); | ||
951 | ehci->async->qh_state = QH_STATE_LINKED; | ||
952 | diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c | ||
953 | index bc94d7b..1234817 100644 | ||
954 | --- a/drivers/usb/host/ehci-pci.c | ||
955 | +++ b/drivers/usb/host/ehci-pci.c | ||
956 | @@ -144,14 +144,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | ||
957 | hcd->has_tt = 1; | ||
958 | tdi_reset(ehci); | ||
959 | } | ||
960 | - if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) { | ||
961 | - /* EHCI #1 or #2 on 6 Series/C200 Series chipset */ | ||
962 | - if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) { | ||
963 | - ehci_info(ehci, "broken D3 during system sleep on ASUS\n"); | ||
964 | - hcd->broken_pci_sleep = 1; | ||
965 | - device_set_wakeup_capable(&pdev->dev, false); | ||
966 | - } | ||
967 | - } | ||
968 | break; | ||
969 | case PCI_VENDOR_ID_TDI: | ||
970 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | ||
971 | diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c | ||
972 | index 497ed77..6b90824 100644 | ||
973 | --- a/drivers/usb/host/xhci-mem.c | ||
974 | +++ b/drivers/usb/host/xhci-mem.c | ||
975 | @@ -793,10 +793,9 @@ static void xhci_free_tt_info(struct xhci_hcd *xhci, | ||
976 | struct xhci_virt_device *virt_dev, | ||
977 | int slot_id) | ||
978 | { | ||
979 | - struct list_head *tt; | ||
980 | struct list_head *tt_list_head; | ||
981 | - struct list_head *tt_next; | ||
982 | - struct xhci_tt_bw_info *tt_info; | ||
983 | + struct xhci_tt_bw_info *tt_info, *next; | ||
984 | + bool slot_found = false; | ||
985 | |||
986 | /* If the device never made it past the Set Address stage, | ||
987 | * it may not have the real_port set correctly. | ||
988 | @@ -808,34 +807,16 @@ static void xhci_free_tt_info(struct xhci_hcd *xhci, | ||
989 | } | ||
990 | |||
991 | tt_list_head = &(xhci->rh_bw[virt_dev->real_port - 1].tts); | ||
992 | - if (list_empty(tt_list_head)) | ||
993 | - return; | ||
994 | - | ||
995 | - list_for_each(tt, tt_list_head) { | ||
996 | - tt_info = list_entry(tt, struct xhci_tt_bw_info, tt_list); | ||
997 | - if (tt_info->slot_id == slot_id) | ||
998 | + list_for_each_entry_safe(tt_info, next, tt_list_head, tt_list) { | ||
999 | + /* Multi-TT hubs will have more than one entry */ | ||
1000 | + if (tt_info->slot_id == slot_id) { | ||
1001 | + slot_found = true; | ||
1002 | + list_del(&tt_info->tt_list); | ||
1003 | + kfree(tt_info); | ||
1004 | + } else if (slot_found) { | ||
1005 | break; | ||
1006 | + } | ||
1007 | } | ||
1008 | - /* Cautionary measure in case the hub was disconnected before we | ||
1009 | - * stored the TT information. | ||
1010 | - */ | ||
1011 | - if (tt_info->slot_id != slot_id) | ||
1012 | - return; | ||
1013 | - | ||
1014 | - tt_next = tt->next; | ||
1015 | - tt_info = list_entry(tt, struct xhci_tt_bw_info, | ||
1016 | - tt_list); | ||
1017 | - /* Multi-TT hubs will have more than one entry */ | ||
1018 | - do { | ||
1019 | - list_del(tt); | ||
1020 | - kfree(tt_info); | ||
1021 | - tt = tt_next; | ||
1022 | - if (list_empty(tt_list_head)) | ||
1023 | - break; | ||
1024 | - tt_next = tt->next; | ||
1025 | - tt_info = list_entry(tt, struct xhci_tt_bw_info, | ||
1026 | - tt_list); | ||
1027 | - } while (tt_info->slot_id == slot_id); | ||
1028 | } | ||
1029 | |||
1030 | int xhci_alloc_tt_info(struct xhci_hcd *xhci, | ||
1031 | @@ -1791,17 +1772,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | ||
1032 | { | ||
1033 | struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); | ||
1034 | struct dev_info *dev_info, *next; | ||
1035 | - struct list_head *tt_list_head; | ||
1036 | - struct list_head *tt; | ||
1037 | - struct list_head *endpoints; | ||
1038 | - struct list_head *ep, *q; | ||
1039 | - struct xhci_tt_bw_info *tt_info; | ||
1040 | - struct xhci_interval_bw_table *bwt; | ||
1041 | - struct xhci_virt_ep *virt_ep; | ||
1042 | - | ||
1043 | unsigned long flags; | ||
1044 | int size; | ||
1045 | - int i; | ||
1046 | + int i, j, num_ports; | ||
1047 | |||
1048 | /* Free the Event Ring Segment Table and the actual Event Ring */ | ||
1049 | size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); | ||
1050 | @@ -1858,21 +1831,22 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | ||
1051 | } | ||
1052 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
1053 | |||
1054 | - bwt = &xhci->rh_bw->bw_table; | ||
1055 | - for (i = 0; i < XHCI_MAX_INTERVAL; i++) { | ||
1056 | - endpoints = &bwt->interval_bw[i].endpoints; | ||
1057 | - list_for_each_safe(ep, q, endpoints) { | ||
1058 | - virt_ep = list_entry(ep, struct xhci_virt_ep, bw_endpoint_list); | ||
1059 | - list_del(&virt_ep->bw_endpoint_list); | ||
1060 | - kfree(virt_ep); | ||
1061 | + num_ports = HCS_MAX_PORTS(xhci->hcs_params1); | ||
1062 | + for (i = 0; i < num_ports; i++) { | ||
1063 | + struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; | ||
1064 | + for (j = 0; j < XHCI_MAX_INTERVAL; j++) { | ||
1065 | + struct list_head *ep = &bwt->interval_bw[j].endpoints; | ||
1066 | + while (!list_empty(ep)) | ||
1067 | + list_del_init(ep->next); | ||
1068 | } | ||
1069 | } | ||
1070 | |||
1071 | - tt_list_head = &xhci->rh_bw->tts; | ||
1072 | - list_for_each_safe(tt, q, tt_list_head) { | ||
1073 | - tt_info = list_entry(tt, struct xhci_tt_bw_info, tt_list); | ||
1074 | - list_del(tt); | ||
1075 | - kfree(tt_info); | ||
1076 | + for (i = 0; i < num_ports; i++) { | ||
1077 | + struct xhci_tt_bw_info *tt, *n; | ||
1078 | + list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) { | ||
1079 | + list_del(&tt->tt_list); | ||
1080 | + kfree(tt); | ||
1081 | + } | ||
1082 | } | ||
1083 | |||
1084 | xhci->num_usb2_ports = 0; | ||
1085 | diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c | ||
1086 | index 5910048..9248d49 100644 | ||
1087 | --- a/drivers/usb/host/xhci.c | ||
1088 | +++ b/drivers/usb/host/xhci.c | ||
1089 | @@ -795,8 +795,8 @@ int xhci_suspend(struct xhci_hcd *xhci) | ||
1090 | command = xhci_readl(xhci, &xhci->op_regs->command); | ||
1091 | command |= CMD_CSS; | ||
1092 | xhci_writel(xhci, command, &xhci->op_regs->command); | ||
1093 | - if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10*100)) { | ||
1094 | - xhci_warn(xhci, "WARN: xHC CMD_CSS timeout\n"); | ||
1095 | + if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10 * 1000)) { | ||
1096 | + xhci_warn(xhci, "WARN: xHC save state timeout\n"); | ||
1097 | spin_unlock_irq(&xhci->lock); | ||
1098 | return -ETIMEDOUT; | ||
1099 | } | ||
1100 | @@ -848,8 +848,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | ||
1101 | command |= CMD_CRS; | ||
1102 | xhci_writel(xhci, command, &xhci->op_regs->command); | ||
1103 | if (handshake(xhci, &xhci->op_regs->status, | ||
1104 | - STS_RESTORE, 0, 10*100)) { | ||
1105 | - xhci_dbg(xhci, "WARN: xHC CMD_CSS timeout\n"); | ||
1106 | + STS_RESTORE, 0, 10 * 1000)) { | ||
1107 | + xhci_warn(xhci, "WARN: xHC restore state timeout\n"); | ||
1108 | spin_unlock_irq(&xhci->lock); | ||
1109 | return -ETIMEDOUT; | ||
1110 | } | ||
1111 | diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c | ||
1112 | index 768b4b5..9d63ba4 100644 | ||
1113 | --- a/drivers/usb/musb/davinci.c | ||
1114 | +++ b/drivers/usb/musb/davinci.c | ||
1115 | @@ -34,6 +34,7 @@ | ||
1116 | #include <linux/dma-mapping.h> | ||
1117 | |||
1118 | #include <mach/cputype.h> | ||
1119 | +#include <mach/hardware.h> | ||
1120 | |||
1121 | #include <asm/mach-types.h> | ||
1122 | |||
1123 | diff --git a/drivers/usb/musb/davinci.h b/drivers/usb/musb/davinci.h | ||
1124 | index 046c844..371baa0 100644 | ||
1125 | --- a/drivers/usb/musb/davinci.h | ||
1126 | +++ b/drivers/usb/musb/davinci.h | ||
1127 | @@ -15,7 +15,7 @@ | ||
1128 | */ | ||
1129 | |||
1130 | /* Integrated highspeed/otg PHY */ | ||
1131 | -#define USBPHY_CTL_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x34) | ||
1132 | +#define USBPHY_CTL_PADDR 0x01c40034 | ||
1133 | #define USBPHY_DATAPOL BIT(11) /* (dm355) switch D+/D- */ | ||
1134 | #define USBPHY_PHYCLKGD BIT(8) | ||
1135 | #define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */ | ||
1136 | @@ -27,7 +27,7 @@ | ||
1137 | #define USBPHY_OTGPDWN BIT(1) | ||
1138 | #define USBPHY_PHYPDWN BIT(0) | ||
1139 | |||
1140 | -#define DM355_DEEPSLEEP_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x48) | ||
1141 | +#define DM355_DEEPSLEEP_PADDR 0x01c40048 | ||
1142 | #define DRVVBUS_FORCE BIT(2) | ||
1143 | #define DRVVBUS_OVERRIDE BIT(1) | ||
1144 | |||
1145 | diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c | ||
1146 | index f42c29b..95918da 100644 | ||
1147 | --- a/drivers/usb/musb/musb_gadget.c | ||
1148 | +++ b/drivers/usb/musb/musb_gadget.c | ||
1149 | @@ -1232,6 +1232,7 @@ static int musb_gadget_disable(struct usb_ep *ep) | ||
1150 | } | ||
1151 | |||
1152 | musb_ep->desc = NULL; | ||
1153 | + musb_ep->end_point.desc = NULL; | ||
1154 | |||
1155 | /* abort all pending DMA and requests */ | ||
1156 | nuke(musb_ep, -ESHUTDOWN); | ||
1157 | diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c | ||
1158 | index ec30f95..95de9c0 100644 | ||
1159 | --- a/drivers/usb/serial/cp210x.c | ||
1160 | +++ b/drivers/usb/serial/cp210x.c | ||
1161 | @@ -82,6 +82,7 @@ static const struct usb_device_id id_table[] = { | ||
1162 | { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ | ||
1163 | { USB_DEVICE(0x10C4, 0x806F) }, /* IMS USB to RS422 Converter Cable */ | ||
1164 | { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ | ||
1165 | + { USB_DEVICE(0x10C4, 0x80C4) }, /* Cygnal Integrated Products, Inc., Optris infrared thermometer */ | ||
1166 | { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ | ||
1167 | { USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */ | ||
1168 | { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ | ||
1169 | diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c | ||
1170 | index 95bba99..53e3e2c 100644 | ||
1171 | --- a/drivers/usb/serial/ftdi_sio.c | ||
1172 | +++ b/drivers/usb/serial/ftdi_sio.c | ||
1173 | @@ -737,6 +737,7 @@ static struct usb_device_id id_table_combined [] = { | ||
1174 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, | ||
1175 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, | ||
1176 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, | ||
1177 | + { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_RTS01_PID) }, | ||
1178 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, | ||
1179 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, | ||
1180 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, | ||
1181 | diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h | ||
1182 | index f3c7c78..5661c7e 100644 | ||
1183 | --- a/drivers/usb/serial/ftdi_sio_ids.h | ||
1184 | +++ b/drivers/usb/serial/ftdi_sio_ids.h | ||
1185 | @@ -784,6 +784,7 @@ | ||
1186 | #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ | ||
1187 | #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ | ||
1188 | #define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */ | ||
1189 | +#define RTSYSTEMS_RTS01_PID 0x9e57 /* USB-RTS01 Radio Cable */ | ||
1190 | |||
1191 | |||
1192 | /* | ||
1193 | diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c | ||
1194 | index 6edd261..ef4d7ad 100644 | ||
1195 | --- a/drivers/usb/serial/mct_u232.c | ||
1196 | +++ b/drivers/usb/serial/mct_u232.c | ||
1197 | @@ -317,13 +317,16 @@ static int mct_u232_set_modem_ctrl(struct usb_serial *serial, | ||
1198 | MCT_U232_SET_REQUEST_TYPE, | ||
1199 | 0, 0, buf, MCT_U232_SET_MODEM_CTRL_SIZE, | ||
1200 | WDR_TIMEOUT); | ||
1201 | - if (rc < 0) | ||
1202 | - dev_err(&serial->dev->dev, | ||
1203 | - "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); | ||
1204 | + kfree(buf); | ||
1205 | + | ||
1206 | dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); | ||
1207 | |||
1208 | - kfree(buf); | ||
1209 | - return rc; | ||
1210 | + if (rc < 0) { | ||
1211 | + dev_err(&serial->dev->dev, | ||
1212 | + "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); | ||
1213 | + return rc; | ||
1214 | + } | ||
1215 | + return 0; | ||
1216 | } /* mct_u232_set_modem_ctrl */ | ||
1217 | |||
1218 | static int mct_u232_get_modem_stat(struct usb_serial *serial, | ||
1219 | diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c | ||
1220 | index c526550..62739ff 100644 | ||
1221 | --- a/drivers/usb/serial/mos7840.c | ||
1222 | +++ b/drivers/usb/serial/mos7840.c | ||
1223 | @@ -206,7 +206,7 @@ static const struct usb_device_id moschip_port_id_table[] = { | ||
1224 | {} /* terminating entry */ | ||
1225 | }; | ||
1226 | |||
1227 | -static const struct usb_device_id moschip_id_table_combined[] __devinitconst = { | ||
1228 | +static const struct usb_device_id moschip_id_table_combined[] = { | ||
1229 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, | ||
1230 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, | ||
1231 | {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)}, | ||
1232 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c | ||
1233 | index f4465cc..2706d8a 100644 | ||
1234 | --- a/drivers/usb/serial/option.c | ||
1235 | +++ b/drivers/usb/serial/option.c | ||
1236 | @@ -47,6 +47,7 @@ | ||
1237 | /* Function prototypes */ | ||
1238 | static int option_probe(struct usb_serial *serial, | ||
1239 | const struct usb_device_id *id); | ||
1240 | +static void option_release(struct usb_serial *serial); | ||
1241 | static int option_send_setup(struct usb_serial_port *port); | ||
1242 | static void option_instat_callback(struct urb *urb); | ||
1243 | |||
1244 | @@ -150,6 +151,7 @@ static void option_instat_callback(struct urb *urb); | ||
1245 | #define HUAWEI_PRODUCT_E14AC 0x14AC | ||
1246 | #define HUAWEI_PRODUCT_K3806 0x14AE | ||
1247 | #define HUAWEI_PRODUCT_K4605 0x14C6 | ||
1248 | +#define HUAWEI_PRODUCT_K5005 0x14C8 | ||
1249 | #define HUAWEI_PRODUCT_K3770 0x14C9 | ||
1250 | #define HUAWEI_PRODUCT_K3771 0x14CA | ||
1251 | #define HUAWEI_PRODUCT_K4510 0x14CB | ||
1252 | @@ -425,7 +427,7 @@ static void option_instat_callback(struct urb *urb); | ||
1253 | #define SAMSUNG_VENDOR_ID 0x04e8 | ||
1254 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 | ||
1255 | |||
1256 | -/* YUGA products www.yuga-info.com*/ | ||
1257 | +/* YUGA products www.yuga-info.com gavin.kx@qq.com */ | ||
1258 | #define YUGA_VENDOR_ID 0x257A | ||
1259 | #define YUGA_PRODUCT_CEM600 0x1601 | ||
1260 | #define YUGA_PRODUCT_CEM610 0x1602 | ||
1261 | @@ -442,6 +444,8 @@ static void option_instat_callback(struct urb *urb); | ||
1262 | #define YUGA_PRODUCT_CEU516 0x160C | ||
1263 | #define YUGA_PRODUCT_CEU528 0x160D | ||
1264 | #define YUGA_PRODUCT_CEU526 0x160F | ||
1265 | +#define YUGA_PRODUCT_CEU881 0x161F | ||
1266 | +#define YUGA_PRODUCT_CEU882 0x162F | ||
1267 | |||
1268 | #define YUGA_PRODUCT_CWM600 0x2601 | ||
1269 | #define YUGA_PRODUCT_CWM610 0x2602 | ||
1270 | @@ -457,23 +461,26 @@ static void option_instat_callback(struct urb *urb); | ||
1271 | #define YUGA_PRODUCT_CWU518 0x260B | ||
1272 | #define YUGA_PRODUCT_CWU516 0x260C | ||
1273 | #define YUGA_PRODUCT_CWU528 0x260D | ||
1274 | +#define YUGA_PRODUCT_CWU581 0x260E | ||
1275 | #define YUGA_PRODUCT_CWU526 0x260F | ||
1276 | - | ||
1277 | -#define YUGA_PRODUCT_CLM600 0x2601 | ||
1278 | -#define YUGA_PRODUCT_CLM610 0x2602 | ||
1279 | -#define YUGA_PRODUCT_CLM500 0x2603 | ||
1280 | -#define YUGA_PRODUCT_CLM510 0x2604 | ||
1281 | -#define YUGA_PRODUCT_CLM800 0x2605 | ||
1282 | -#define YUGA_PRODUCT_CLM900 0x2606 | ||
1283 | - | ||
1284 | -#define YUGA_PRODUCT_CLU718 0x2607 | ||
1285 | -#define YUGA_PRODUCT_CLU716 0x2608 | ||
1286 | -#define YUGA_PRODUCT_CLU728 0x2609 | ||
1287 | -#define YUGA_PRODUCT_CLU726 0x260A | ||
1288 | -#define YUGA_PRODUCT_CLU518 0x260B | ||
1289 | -#define YUGA_PRODUCT_CLU516 0x260C | ||
1290 | -#define YUGA_PRODUCT_CLU528 0x260D | ||
1291 | -#define YUGA_PRODUCT_CLU526 0x260F | ||
1292 | +#define YUGA_PRODUCT_CWU582 0x261F | ||
1293 | +#define YUGA_PRODUCT_CWU583 0x262F | ||
1294 | + | ||
1295 | +#define YUGA_PRODUCT_CLM600 0x3601 | ||
1296 | +#define YUGA_PRODUCT_CLM610 0x3602 | ||
1297 | +#define YUGA_PRODUCT_CLM500 0x3603 | ||
1298 | +#define YUGA_PRODUCT_CLM510 0x3604 | ||
1299 | +#define YUGA_PRODUCT_CLM800 0x3605 | ||
1300 | +#define YUGA_PRODUCT_CLM900 0x3606 | ||
1301 | + | ||
1302 | +#define YUGA_PRODUCT_CLU718 0x3607 | ||
1303 | +#define YUGA_PRODUCT_CLU716 0x3608 | ||
1304 | +#define YUGA_PRODUCT_CLU728 0x3609 | ||
1305 | +#define YUGA_PRODUCT_CLU726 0x360A | ||
1306 | +#define YUGA_PRODUCT_CLU518 0x360B | ||
1307 | +#define YUGA_PRODUCT_CLU516 0x360C | ||
1308 | +#define YUGA_PRODUCT_CLU528 0x360D | ||
1309 | +#define YUGA_PRODUCT_CLU526 0x360F | ||
1310 | |||
1311 | /* Viettel products */ | ||
1312 | #define VIETTEL_VENDOR_ID 0x2262 | ||
1313 | @@ -666,6 +673,11 @@ static const struct usb_device_id option_ids[] = { | ||
1314 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, | ||
1315 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), | ||
1316 | .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, | ||
1317 | + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) }, | ||
1318 | + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) }, | ||
1319 | + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) }, | ||
1320 | + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) }, | ||
1321 | + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) }, | ||
1322 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, | ||
1323 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, | ||
1324 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, | ||
1325 | @@ -1209,6 +1221,11 @@ static const struct usb_device_id option_ids[] = { | ||
1326 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) }, | ||
1327 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) }, | ||
1328 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) }, | ||
1329 | + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU881) }, | ||
1330 | + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU882) }, | ||
1331 | + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU581) }, | ||
1332 | + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU582) }, | ||
1333 | + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU583) }, | ||
1334 | { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) }, | ||
1335 | { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) }, | ||
1336 | { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */ | ||
1337 | @@ -1257,7 +1274,7 @@ static struct usb_serial_driver option_1port_device = { | ||
1338 | .ioctl = usb_wwan_ioctl, | ||
1339 | .attach = usb_wwan_startup, | ||
1340 | .disconnect = usb_wwan_disconnect, | ||
1341 | - .release = usb_wwan_release, | ||
1342 | + .release = option_release, | ||
1343 | .read_int_callback = option_instat_callback, | ||
1344 | #ifdef CONFIG_PM | ||
1345 | .suspend = usb_wwan_suspend, | ||
1346 | @@ -1271,35 +1288,6 @@ static struct usb_serial_driver * const serial_drivers[] = { | ||
1347 | |||
1348 | static bool debug; | ||
1349 | |||
1350 | -/* per port private data */ | ||
1351 | - | ||
1352 | -#define N_IN_URB 4 | ||
1353 | -#define N_OUT_URB 4 | ||
1354 | -#define IN_BUFLEN 4096 | ||
1355 | -#define OUT_BUFLEN 4096 | ||
1356 | - | ||
1357 | -struct option_port_private { | ||
1358 | - /* Input endpoints and buffer for this port */ | ||
1359 | - struct urb *in_urbs[N_IN_URB]; | ||
1360 | - u8 *in_buffer[N_IN_URB]; | ||
1361 | - /* Output endpoints and buffer for this port */ | ||
1362 | - struct urb *out_urbs[N_OUT_URB]; | ||
1363 | - u8 *out_buffer[N_OUT_URB]; | ||
1364 | - unsigned long out_busy; /* Bit vector of URBs in use */ | ||
1365 | - int opened; | ||
1366 | - struct usb_anchor delayed; | ||
1367 | - | ||
1368 | - /* Settings for the port */ | ||
1369 | - int rts_state; /* Handshaking pins (outputs) */ | ||
1370 | - int dtr_state; | ||
1371 | - int cts_state; /* Handshaking pins (inputs) */ | ||
1372 | - int dsr_state; | ||
1373 | - int dcd_state; | ||
1374 | - int ri_state; | ||
1375 | - | ||
1376 | - unsigned long tx_start_time[N_OUT_URB]; | ||
1377 | -}; | ||
1378 | - | ||
1379 | module_usb_serial_driver(option_driver, serial_drivers); | ||
1380 | |||
1381 | static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason, | ||
1382 | @@ -1368,12 +1356,22 @@ static int option_probe(struct usb_serial *serial, | ||
1383 | return 0; | ||
1384 | } | ||
1385 | |||
1386 | +static void option_release(struct usb_serial *serial) | ||
1387 | +{ | ||
1388 | + struct usb_wwan_intf_private *priv = usb_get_serial_data(serial); | ||
1389 | + | ||
1390 | + usb_wwan_release(serial); | ||
1391 | + | ||
1392 | + kfree(priv); | ||
1393 | +} | ||
1394 | + | ||
1395 | static void option_instat_callback(struct urb *urb) | ||
1396 | { | ||
1397 | int err; | ||
1398 | int status = urb->status; | ||
1399 | struct usb_serial_port *port = urb->context; | ||
1400 | - struct option_port_private *portdata = usb_get_serial_port_data(port); | ||
1401 | + struct usb_wwan_port_private *portdata = | ||
1402 | + usb_get_serial_port_data(port); | ||
1403 | |||
1404 | dbg("%s", __func__); | ||
1405 | dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); | ||
1406 | @@ -1434,7 +1432,7 @@ static int option_send_setup(struct usb_serial_port *port) | ||
1407 | struct usb_serial *serial = port->serial; | ||
1408 | struct usb_wwan_intf_private *intfdata = | ||
1409 | (struct usb_wwan_intf_private *) serial->private; | ||
1410 | - struct option_port_private *portdata; | ||
1411 | + struct usb_wwan_port_private *portdata; | ||
1412 | int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; | ||
1413 | int val = 0; | ||
1414 | dbg("%s", __func__); | ||
1415 | diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c | ||
1416 | index 0206b10..50b5371 100644 | ||
1417 | --- a/drivers/usb/serial/qcserial.c | ||
1418 | +++ b/drivers/usb/serial/qcserial.c | ||
1419 | @@ -105,7 +105,13 @@ static const struct usb_device_id id_table[] = { | ||
1420 | {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ | ||
1421 | {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ | ||
1422 | {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ | ||
1423 | + {USB_DEVICE(0x1199, 0x9010)}, /* Sierra Wireless Gobi 3000 QDL */ | ||
1424 | + {USB_DEVICE(0x1199, 0x9012)}, /* Sierra Wireless Gobi 3000 QDL */ | ||
1425 | {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ | ||
1426 | + {USB_DEVICE(0x1199, 0x9014)}, /* Sierra Wireless Gobi 3000 QDL */ | ||
1427 | + {USB_DEVICE(0x1199, 0x9015)}, /* Sierra Wireless Gobi 3000 Modem device */ | ||
1428 | + {USB_DEVICE(0x1199, 0x9018)}, /* Sierra Wireless Gobi 3000 QDL */ | ||
1429 | + {USB_DEVICE(0x1199, 0x9019)}, /* Sierra Wireless Gobi 3000 Modem device */ | ||
1430 | {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ | ||
1431 | {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ | ||
1432 | { } /* Terminating entry */ | ||
1433 | diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c | ||
1434 | index 8c8bf80..449bf6d 100644 | ||
1435 | --- a/drivers/usb/serial/sierra.c | ||
1436 | +++ b/drivers/usb/serial/sierra.c | ||
1437 | @@ -304,6 +304,10 @@ static const struct usb_device_id id_table[] = { | ||
1438 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ | ||
1439 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | ||
1440 | }, | ||
1441 | + /* AT&T Direct IP LTE modems */ | ||
1442 | + { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF), | ||
1443 | + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | ||
1444 | + }, | ||
1445 | { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ | ||
1446 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | ||
1447 | }, | ||
1448 | diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c | ||
1449 | index 6933355..bcf2617 100644 | ||
1450 | --- a/drivers/usb/serial/usb-serial.c | ||
1451 | +++ b/drivers/usb/serial/usb-serial.c | ||
1452 | @@ -670,12 +670,14 @@ exit: | ||
1453 | static struct usb_serial_driver *search_serial_device( | ||
1454 | struct usb_interface *iface) | ||
1455 | { | ||
1456 | - const struct usb_device_id *id; | ||
1457 | + const struct usb_device_id *id = NULL; | ||
1458 | struct usb_serial_driver *drv; | ||
1459 | + struct usb_driver *driver = to_usb_driver(iface->dev.driver); | ||
1460 | |||
1461 | /* Check if the usb id matches a known device */ | ||
1462 | list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { | ||
1463 | - id = get_iface_id(drv, iface); | ||
1464 | + if (drv->usb_driver == driver) | ||
1465 | + id = get_iface_id(drv, iface); | ||
1466 | if (id) | ||
1467 | return drv; | ||
1468 | } | ||
1469 | diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h | ||
1470 | index 8f3cbb8..f4d3e1a 100644 | ||
1471 | --- a/drivers/usb/storage/unusual_devs.h | ||
1472 | +++ b/drivers/usb/storage/unusual_devs.h | ||
1473 | @@ -1107,6 +1107,13 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999, | ||
1474 | USB_SC_RBC, USB_PR_BULK, NULL, | ||
1475 | 0 ), | ||
1476 | |||
1477 | +/* Feiya QDI U2 DISK, reported by Hans de Goede <hdegoede@redhat.com> */ | ||
1478 | +UNUSUAL_DEV( 0x090c, 0x1000, 0x0000, 0xffff, | ||
1479 | + "Feiya", | ||
1480 | + "QDI U2 DISK", | ||
1481 | + USB_SC_DEVICE, USB_PR_DEVICE, NULL, | ||
1482 | + US_FL_NO_READ_CAPACITY_16 ), | ||
1483 | + | ||
1484 | /* aeb */ | ||
1485 | UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, | ||
1486 | "Feiya", | ||
1487 | diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c | ||
1488 | index c640ba5..09addc8 100644 | ||
1489 | --- a/fs/hfsplus/ioctl.c | ||
1490 | +++ b/fs/hfsplus/ioctl.c | ||
1491 | @@ -31,6 +31,7 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) | ||
1492 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); | ||
1493 | struct hfsplus_vh *vh = sbi->s_vhdr; | ||
1494 | struct hfsplus_vh *bvh = sbi->s_backup_vhdr; | ||
1495 | + u32 cnid = (unsigned long)dentry->d_fsdata; | ||
1496 | |||
1497 | if (!capable(CAP_SYS_ADMIN)) | ||
1498 | return -EPERM; | ||
1499 | @@ -41,8 +42,12 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) | ||
1500 | vh->finder_info[0] = bvh->finder_info[0] = | ||
1501 | cpu_to_be32(parent_ino(dentry)); | ||
1502 | |||
1503 | - /* Bootloader */ | ||
1504 | - vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(inode->i_ino); | ||
1505 | + /* | ||
1506 | + * Bootloader. Just using the inode here breaks in the case of | ||
1507 | + * hard links - the firmware wants the ID of the hard link file, | ||
1508 | + * but the inode points at the indirect inode | ||
1509 | + */ | ||
1510 | + vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(cnid); | ||
1511 | |||
1512 | /* Per spec, the OS X system folder - same as finder_info[0] here */ | ||
1513 | vh->finder_info[5] = bvh->finder_info[5] = | ||
1514 | diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c | ||
1515 | index 7daf4b8..90effcc 100644 | ||
1516 | --- a/fs/hfsplus/wrapper.c | ||
1517 | +++ b/fs/hfsplus/wrapper.c | ||
1518 | @@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector, | ||
1519 | DECLARE_COMPLETION_ONSTACK(wait); | ||
1520 | struct bio *bio; | ||
1521 | int ret = 0; | ||
1522 | - unsigned int io_size; | ||
1523 | + u64 io_size; | ||
1524 | loff_t start; | ||
1525 | int offset; | ||
1526 | |||
1527 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c | ||
1528 | index e9b1eb7..d60c2d8 100644 | ||
1529 | --- a/fs/nfs/nfs4proc.c | ||
1530 | +++ b/fs/nfs/nfs4proc.c | ||
1531 | @@ -1861,6 +1861,7 @@ static struct nfs4_state *nfs4_do_open(struct inode *dir, struct dentry *dentry, | ||
1532 | struct nfs4_state *res; | ||
1533 | int status; | ||
1534 | |||
1535 | + fmode &= FMODE_READ|FMODE_WRITE; | ||
1536 | do { | ||
1537 | status = _nfs4_do_open(dir, dentry, fmode, flags, sattr, cred, &res); | ||
1538 | if (status == 0) | ||
1539 | diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c | ||
1540 | index 7f71c69..e79c24e 100644 | ||
1541 | --- a/fs/nfsd/nfs4state.c | ||
1542 | +++ b/fs/nfsd/nfs4state.c | ||
1543 | @@ -862,7 +862,7 @@ static void free_session(struct kref *kref) | ||
1544 | struct nfsd4_session *ses; | ||
1545 | int mem; | ||
1546 | |||
1547 | - BUG_ON(!spin_is_locked(&client_lock)); | ||
1548 | + lockdep_assert_held(&client_lock); | ||
1549 | ses = container_of(kref, struct nfsd4_session, se_ref); | ||
1550 | nfsd4_del_conns(ses); | ||
1551 | spin_lock(&nfsd_drc_lock); | ||
1552 | @@ -1041,7 +1041,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) | ||
1553 | static inline void | ||
1554 | free_client(struct nfs4_client *clp) | ||
1555 | { | ||
1556 | - BUG_ON(!spin_is_locked(&client_lock)); | ||
1557 | + lockdep_assert_held(&client_lock); | ||
1558 | while (!list_empty(&clp->cl_sessions)) { | ||
1559 | struct nfsd4_session *ses; | ||
1560 | ses = list_entry(clp->cl_sessions.next, struct nfsd4_session, | ||
1561 | diff --git a/include/linux/pci.h b/include/linux/pci.h | ||
1562 | index e444f5b..8b2921a 100644 | ||
1563 | --- a/include/linux/pci.h | ||
1564 | +++ b/include/linux/pci.h | ||
1565 | @@ -176,6 +176,8 @@ enum pci_dev_flags { | ||
1566 | PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, | ||
1567 | /* Provide indication device is assigned by a Virtual Machine Manager */ | ||
1568 | PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, | ||
1569 | + /* Device causes system crash if in D3 during S3 sleep */ | ||
1570 | + PCI_DEV_FLAGS_NO_D3_DURING_SLEEP = (__force pci_dev_flags_t) 8, | ||
1571 | }; | ||
1572 | |||
1573 | enum pci_irq_reroute_variant { | ||
1574 | diff --git a/include/linux/swapops.h b/include/linux/swapops.h | ||
1575 | index 792d16d..47ead51 100644 | ||
1576 | --- a/include/linux/swapops.h | ||
1577 | +++ b/include/linux/swapops.h | ||
1578 | @@ -9,13 +9,15 @@ | ||
1579 | * get good packing density in that tree, so the index should be dense in | ||
1580 | * the low-order bits. | ||
1581 | * | ||
1582 | - * We arrange the `type' and `offset' fields so that `type' is at the five | ||
1583 | + * We arrange the `type' and `offset' fields so that `type' is at the seven | ||
1584 | * high-order bits of the swp_entry_t and `offset' is right-aligned in the | ||
1585 | - * remaining bits. | ||
1586 | + * remaining bits. Although `type' itself needs only five bits, we allow for | ||
1587 | + * shmem/tmpfs to shift it all up a further two bits: see swp_to_radix_entry(). | ||
1588 | * | ||
1589 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. | ||
1590 | */ | ||
1591 | -#define SWP_TYPE_SHIFT(e) (sizeof(e.val) * 8 - MAX_SWAPFILES_SHIFT) | ||
1592 | +#define SWP_TYPE_SHIFT(e) ((sizeof(e.val) * 8) - \ | ||
1593 | + (MAX_SWAPFILES_SHIFT + RADIX_TREE_EXCEPTIONAL_SHIFT)) | ||
1594 | #define SWP_OFFSET_MASK(e) ((1UL << SWP_TYPE_SHIFT(e)) - 1) | ||
1595 | |||
1596 | /* | ||
1597 | diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h | ||
1598 | index d28cc78..5de4157 100644 | ||
1599 | --- a/include/linux/usb/hcd.h | ||
1600 | +++ b/include/linux/usb/hcd.h | ||
1601 | @@ -126,8 +126,6 @@ struct usb_hcd { | ||
1602 | unsigned wireless:1; /* Wireless USB HCD */ | ||
1603 | unsigned authorized_default:1; | ||
1604 | unsigned has_tt:1; /* Integrated TT in root hub */ | ||
1605 | - unsigned broken_pci_sleep:1; /* Don't put the | ||
1606 | - controller in PCI-D3 for system sleep */ | ||
1607 | |||
1608 | unsigned int irq; /* irq allocated */ | ||
1609 | void __iomem *regs; /* device memory/io */ | ||
1610 | diff --git a/kernel/panic.c b/kernel/panic.c | ||
1611 | index 8ed89a1..9ed023b 100644 | ||
1612 | --- a/kernel/panic.c | ||
1613 | +++ b/kernel/panic.c | ||
1614 | @@ -108,8 +108,6 @@ void panic(const char *fmt, ...) | ||
1615 | */ | ||
1616 | crash_kexec(NULL); | ||
1617 | |||
1618 | - kmsg_dump(KMSG_DUMP_PANIC); | ||
1619 | - | ||
1620 | /* | ||
1621 | * Note smp_send_stop is the usual smp shutdown function, which | ||
1622 | * unfortunately means it may not be hardened to work in a panic | ||
1623 | @@ -117,6 +115,8 @@ void panic(const char *fmt, ...) | ||
1624 | */ | ||
1625 | smp_send_stop(); | ||
1626 | |||
1627 | + kmsg_dump(KMSG_DUMP_PANIC); | ||
1628 | + | ||
1629 | atomic_notifier_call_chain(&panic_notifier_list, 0, buf); | ||
1630 | |||
1631 | bust_spinlocks(0); | ||
1632 | diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c | ||
1633 | index f03fd83..e8c8671 100644 | ||
1634 | --- a/kernel/time/ntp.c | ||
1635 | +++ b/kernel/time/ntp.c | ||
1636 | @@ -412,6 +412,7 @@ int second_overflow(unsigned long secs) | ||
1637 | if (secs % 86400 == 0) { | ||
1638 | leap = -1; | ||
1639 | time_state = TIME_OOP; | ||
1640 | + time_tai++; | ||
1641 | printk(KERN_NOTICE | ||
1642 | "Clock: inserting leap second 23:59:60 UTC\n"); | ||
1643 | } | ||
1644 | @@ -426,7 +427,6 @@ int second_overflow(unsigned long secs) | ||
1645 | } | ||
1646 | break; | ||
1647 | case TIME_OOP: | ||
1648 | - time_tai++; | ||
1649 | time_state = TIME_WAIT; | ||
1650 | break; | ||
1651 | |||
1652 | diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c | ||
1653 | index 2a22255..464a96f 100644 | ||
1654 | --- a/kernel/trace/trace.c | ||
1655 | +++ b/kernel/trace/trace.c | ||
1656 | @@ -383,7 +383,7 @@ EXPORT_SYMBOL_GPL(tracing_on); | ||
1657 | void tracing_off(void) | ||
1658 | { | ||
1659 | if (global_trace.buffer) | ||
1660 | - ring_buffer_record_on(global_trace.buffer); | ||
1661 | + ring_buffer_record_off(global_trace.buffer); | ||
1662 | /* | ||
1663 | * This flag is only looked at when buffers haven't been | ||
1664 | * allocated yet. We don't really care about the race | ||
1665 | diff --git a/mm/swapfile.c b/mm/swapfile.c | ||
1666 | index fafc26d..38186d9 100644 | ||
1667 | --- a/mm/swapfile.c | ||
1668 | +++ b/mm/swapfile.c | ||
1669 | @@ -1924,24 +1924,20 @@ static unsigned long read_swap_header(struct swap_info_struct *p, | ||
1670 | |||
1671 | /* | ||
1672 | * Find out how many pages are allowed for a single swap | ||
1673 | - * device. There are three limiting factors: 1) the number | ||
1674 | + * device. There are two limiting factors: 1) the number | ||
1675 | * of bits for the swap offset in the swp_entry_t type, and | ||
1676 | * 2) the number of bits in the swap pte as defined by the | ||
1677 | - * the different architectures, and 3) the number of free bits | ||
1678 | - * in an exceptional radix_tree entry. In order to find the | ||
1679 | + * different architectures. In order to find the | ||
1680 | * largest possible bit mask, a swap entry with swap type 0 | ||
1681 | * and swap offset ~0UL is created, encoded to a swap pte, | ||
1682 | * decoded to a swp_entry_t again, and finally the swap | ||
1683 | * offset is extracted. This will mask all the bits from | ||
1684 | * the initial ~0UL mask that can't be encoded in either | ||
1685 | * the swp_entry_t or the architecture definition of a | ||
1686 | - * swap pte. Then the same is done for a radix_tree entry. | ||
1687 | + * swap pte. | ||
1688 | */ | ||
1689 | maxpages = swp_offset(pte_to_swp_entry( | ||
1690 | - swp_entry_to_pte(swp_entry(0, ~0UL)))); | ||
1691 | - maxpages = swp_offset(radix_to_swp_entry( | ||
1692 | - swp_to_radix_entry(swp_entry(0, maxpages)))) + 1; | ||
1693 | - | ||
1694 | + swp_entry_to_pte(swp_entry(0, ~0UL)))) + 1; | ||
1695 | if (maxpages > swap_header->info.last_page) { | ||
1696 | maxpages = swap_header->info.last_page + 1; | ||
1697 | /* p->max is an unsigned int: don't overflow it */ | ||
1698 | diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c | ||
1699 | index 3d43206..052d343 100644 | ||
1700 | --- a/net/9p/trans_virtio.c | ||
1701 | +++ b/net/9p/trans_virtio.c | ||
1702 | @@ -192,10 +192,10 @@ static int pack_sg_list(struct scatterlist *sg, int start, | ||
1703 | s = rest_of_page(data); | ||
1704 | if (s > count) | ||
1705 | s = count; | ||
1706 | + BUG_ON(index > limit); | ||
1707 | sg_set_buf(&sg[index++], data, s); | ||
1708 | count -= s; | ||
1709 | data += s; | ||
1710 | - BUG_ON(index > limit); | ||
1711 | } | ||
1712 | |||
1713 | return index-start; | ||
1714 | diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c | ||
1715 | index 3b62cf2..faa078f 100644 | ||
1716 | --- a/net/sunrpc/rpc_pipe.c | ||
1717 | +++ b/net/sunrpc/rpc_pipe.c | ||
1718 | @@ -71,7 +71,9 @@ static void rpc_purge_list(wait_queue_head_t *waitq, struct list_head *head, | ||
1719 | msg->errno = err; | ||
1720 | destroy_msg(msg); | ||
1721 | } while (!list_empty(head)); | ||
1722 | - wake_up(waitq); | ||
1723 | + | ||
1724 | + if (waitq) | ||
1725 | + wake_up(waitq); | ||
1726 | } | ||
1727 | |||
1728 | static void | ||
1729 | @@ -91,11 +93,9 @@ rpc_timeout_upcall_queue(struct work_struct *work) | ||
1730 | } | ||
1731 | dentry = dget(pipe->dentry); | ||
1732 | spin_unlock(&pipe->lock); | ||
1733 | - if (dentry) { | ||
1734 | - rpc_purge_list(&RPC_I(dentry->d_inode)->waitq, | ||
1735 | - &free_list, destroy_msg, -ETIMEDOUT); | ||
1736 | - dput(dentry); | ||
1737 | - } | ||
1738 | + rpc_purge_list(dentry ? &RPC_I(dentry->d_inode)->waitq : NULL, | ||
1739 | + &free_list, destroy_msg, -ETIMEDOUT); | ||
1740 | + dput(dentry); | ||
1741 | } | ||
1742 | |||
1743 | ssize_t rpc_pipe_generic_upcall(struct file *filp, struct rpc_pipe_msg *msg, | ||
1744 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c | ||
1745 | index 4153846..234ee39 100644 | ||
1746 | --- a/net/sunrpc/svc.c | ||
1747 | +++ b/net/sunrpc/svc.c | ||
1748 | @@ -1379,7 +1379,8 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, | ||
1749 | sizeof(req->rq_snd_buf)); | ||
1750 | return bc_send(req); | ||
1751 | } else { | ||
1752 | - /* Nothing to do to drop request */ | ||
1753 | + /* drop request */ | ||
1754 | + xprt_free_bc_request(req); | ||
1755 | return 0; | ||
1756 | } | ||
1757 | } | ||
1758 | diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c | ||
1759 | index 65d525d..4e190b5 100644 | ||
1760 | --- a/sound/soc/codecs/wm8904.c | ||
1761 | +++ b/sound/soc/codecs/wm8904.c | ||
1762 | @@ -2084,7 +2084,6 @@ static int wm8904_probe(struct snd_soc_codec *codec) | ||
1763 | { | ||
1764 | struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); | ||
1765 | struct wm8904_pdata *pdata = wm8904->pdata; | ||
1766 | - u16 *reg_cache = codec->reg_cache; | ||
1767 | int ret, i; | ||
1768 | |||
1769 | codec->cache_sync = 1; | ||
1770 | @@ -2180,14 +2179,18 @@ static int wm8904_probe(struct snd_soc_codec *codec) | ||
1771 | if (!pdata->gpio_cfg[i]) | ||
1772 | continue; | ||
1773 | |||
1774 | - reg_cache[WM8904_GPIO_CONTROL_1 + i] | ||
1775 | - = pdata->gpio_cfg[i] & 0xffff; | ||
1776 | + regmap_update_bits(wm8904->regmap, | ||
1777 | + WM8904_GPIO_CONTROL_1 + i, | ||
1778 | + 0xffff, | ||
1779 | + pdata->gpio_cfg[i]); | ||
1780 | } | ||
1781 | |||
1782 | /* Zero is the default value for these anyway */ | ||
1783 | for (i = 0; i < WM8904_MIC_REGS; i++) | ||
1784 | - reg_cache[WM8904_MIC_BIAS_CONTROL_0 + i] | ||
1785 | - = pdata->mic_cfg[i]; | ||
1786 | + regmap_update_bits(wm8904->regmap, | ||
1787 | + WM8904_MIC_BIAS_CONTROL_0 + i, | ||
1788 | + 0xffff, | ||
1789 | + pdata->mic_cfg[i]); | ||
1790 | } | ||
1791 | |||
1792 | /* Set Class W by default - this will be managed by the Class |