/[linux-patches]/genpatches-2.6/tags/2.6.38-5/1000_linux-2.6.38.1.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.38-5/1000_linux-2.6.38.1.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1910 - (show annotations) (download)
Tue May 3 13:08:58 2011 UTC (3 years, 4 months ago) by mpagano
File size: 98276 byte(s)
2.6.38-5 release
1 diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
2 index 87da405..9edb75d 100644
3 --- a/Documentation/i2c/instantiating-devices
4 +++ b/Documentation/i2c/instantiating-devices
5 @@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
6 (...)
7 i2c_adap = i2c_get_adapter(2);
8 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
9 - strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
10 + strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
11 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
12 normal_i2c, NULL);
13 i2c_put_adapter(i2c_adap);
14 diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
15 index 0ca90b8..556bbd4 100644
16 --- a/arch/arm/mach-davinci/board-dm644x-evm.c
17 +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
18 @@ -440,11 +440,6 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
19 gpio_request(gpio + 7, "nCF_SEL");
20 gpio_direction_output(gpio + 7, 1);
21
22 - /* irlml6401 switches over 1A, in under 8 msec;
23 - * now it can be managed by nDRV_VBUS ...
24 - */
25 - davinci_setup_usb(1000, 8);
26 -
27 return 0;
28 }
29
30 @@ -705,6 +700,9 @@ static __init void davinci_evm_init(void)
31 davinci_serial_init(&uart_config);
32 dm644x_init_asp(&dm644x_evm_snd_data);
33
34 + /* irlml6401 switches over 1A, in under 8 msec */
35 + davinci_setup_usb(1000, 8);
36 +
37 soc_info->emac_pdata->phy_id = DM644X_EVM_PHY_ID;
38 /* Register the fixup for PHY on DaVinci */
39 phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK,
40 diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
41 index d840f4a..5bb95a1 100644
42 --- a/arch/microblaze/include/asm/uaccess.h
43 +++ b/arch/microblaze/include/asm/uaccess.h
44 @@ -120,16 +120,16 @@ static inline unsigned long __must_check __clear_user(void __user *to,
45 {
46 /* normal memset with two words to __ex_table */
47 __asm__ __volatile__ ( \
48 - "1: sb r0, %2, r0;" \
49 + "1: sb r0, %1, r0;" \
50 " addik %0, %0, -1;" \
51 " bneid %0, 1b;" \
52 - " addik %2, %2, 1;" \
53 + " addik %1, %1, 1;" \
54 "2: " \
55 __EX_TABLE_SECTION \
56 ".word 1b,2b;" \
57 ".previous;" \
58 - : "=r"(n) \
59 - : "0"(n), "r"(to)
60 + : "=r"(n), "=r"(to) \
61 + : "0"(n), "1"(to)
62 );
63 return n;
64 }
65 diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
66 index d7d94b8..3948f1d 100644
67 --- a/arch/parisc/kernel/irq.c
68 +++ b/arch/parisc/kernel/irq.c
69 @@ -108,7 +108,7 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest)
70 int cpu_dest;
71
72 /* timer and ipi have to always be received on all CPUs */
73 - if (CHECK_IRQ_PER_CPU(irq)) {
74 + if (CHECK_IRQ_PER_CPU(irq_to_desc(irq)->status)) {
75 /* Bad linux design decision. The mask has already
76 * been set; we must reset it */
77 cpumask_setall(irq_desc[irq].affinity);
78 diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
79 index 125fc1a..7626fa7 100644
80 --- a/arch/powerpc/include/asm/reg.h
81 +++ b/arch/powerpc/include/asm/reg.h
82 @@ -880,6 +880,7 @@
83 #define PV_970 0x0039
84 #define PV_POWER5 0x003A
85 #define PV_POWER5p 0x003B
86 +#define PV_POWER7 0x003F
87 #define PV_970FX 0x003C
88 #define PV_630 0x0040
89 #define PV_630p 0x0041
90 diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
91 index ab6f6be..97e0ae4 100644
92 --- a/arch/powerpc/kernel/perf_event.c
93 +++ b/arch/powerpc/kernel/perf_event.c
94 @@ -1269,6 +1269,28 @@ unsigned long perf_instruction_pointer(struct pt_regs *regs)
95 return ip;
96 }
97
98 +static bool pmc_overflow(unsigned long val)
99 +{
100 + if ((int)val < 0)
101 + return true;
102 +
103 + /*
104 + * Events on POWER7 can roll back if a speculative event doesn't
105 + * eventually complete. Unfortunately in some rare cases they will
106 + * raise a performance monitor exception. We need to catch this to
107 + * ensure we reset the PMC. In all cases the PMC will be 256 or less
108 + * cycles from overflow.
109 + *
110 + * We only do this if the first pass fails to find any overflowing
111 + * PMCs because a user might set a period of less than 256 and we
112 + * don't want to mistakenly reset them.
113 + */
114 + if (__is_processor(PV_POWER7) && ((0x80000000 - val) <= 256))
115 + return true;
116 +
117 + return false;
118 +}
119 +
120 /*
121 * Performance monitor interrupt stuff
122 */
123 @@ -1316,7 +1338,7 @@ static void perf_event_interrupt(struct pt_regs *regs)
124 if (is_limited_pmc(i + 1))
125 continue;
126 val = read_pmc(i + 1);
127 - if ((int)val < 0)
128 + if (pmc_overflow(val))
129 write_pmc(i + 1, 0);
130 }
131 }
132 diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
133 index 94b979d..effff47 100644
134 --- a/arch/x86/include/asm/pgtable-3level.h
135 +++ b/arch/x86/include/asm/pgtable-3level.h
136 @@ -69,8 +69,6 @@ static inline void native_pmd_clear(pmd_t *pmd)
137
138 static inline void pud_clear(pud_t *pudp)
139 {
140 - unsigned long pgd;
141 -
142 set_pud(pudp, __pud(0));
143
144 /*
145 @@ -79,13 +77,10 @@ static inline void pud_clear(pud_t *pudp)
146 * section 8.1: in PAE mode we explicitly have to flush the
147 * TLB via cr3 if the top-level pgd is changed...
148 *
149 - * Make sure the pud entry we're updating is within the
150 - * current pgd to avoid unnecessary TLB flushes.
151 + * Currently all places where pud_clear() is called either have
152 + * flush_tlb_mm() followed or don't need TLB flush (x86_64 code or
153 + * pud_clear_bad()), so we don't need TLB flush here.
154 */
155 - pgd = read_cr3();
156 - if (__pa(pudp) >= pgd && __pa(pudp) <
157 - (pgd + sizeof(pgd_t)*PTRS_PER_PGD))
158 - write_cr3(pgd);
159 }
160
161 #ifdef CONFIG_SMP
162 diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
163 index 7038b95..4db3554 100644
164 --- a/arch/x86/kernel/alternative.c
165 +++ b/arch/x86/kernel/alternative.c
166 @@ -620,7 +620,12 @@ static int __kprobes stop_machine_text_poke(void *data)
167 flush_icache_range((unsigned long)p->addr,
168 (unsigned long)p->addr + p->len);
169 }
170 -
171 + /*
172 + * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
173 + * that a core serializing instruction such as "cpuid" should be
174 + * executed on _each_ core before the new instruction is made visible.
175 + */
176 + sync_core();
177 return 0;
178 }
179
180 diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
181 index 294f26d..0b5e2b5 100644
182 --- a/arch/x86/kernel/e820.c
183 +++ b/arch/x86/kernel/e820.c
184 @@ -847,15 +847,21 @@ static int __init parse_memopt(char *p)
185 if (!p)
186 return -EINVAL;
187
188 -#ifdef CONFIG_X86_32
189 if (!strcmp(p, "nopentium")) {
190 +#ifdef CONFIG_X86_32
191 setup_clear_cpu_cap(X86_FEATURE_PSE);
192 return 0;
193 - }
194 +#else
195 + printk(KERN_WARNING "mem=nopentium ignored! (only supported on x86_32)\n");
196 + return -EINVAL;
197 #endif
198 + }
199
200 userdef = 1;
201 mem_size = memparse(p, &p);
202 + /* don't remove all of memory when handling "mem={invalid}" param */
203 + if (mem_size == 0)
204 + return -EINVAL;
205 e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
206
207 return 0;
208 diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
209 index 9efbdcc..3755ef4 100644
210 --- a/arch/x86/kernel/early-quirks.c
211 +++ b/arch/x86/kernel/early-quirks.c
212 @@ -159,7 +159,12 @@ static void __init ati_bugs_contd(int num, int slot, int func)
213 if (rev >= 0x40)
214 acpi_fix_pin2_polarity = 1;
215
216 - if (rev > 0x13)
217 + /*
218 + * SB600: revisions 0x11, 0x12, 0x13, 0x14, ...
219 + * SB700: revisions 0x39, 0x3a, ...
220 + * SB800: revisions 0x40, 0x41, ...
221 + */
222 + if (rev >= 0x39)
223 return;
224
225 if (acpi_use_timer_override)
226 diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
227 index aed1ffb..bbd5c80 100644
228 --- a/arch/x86/kernel/entry_64.S
229 +++ b/arch/x86/kernel/entry_64.S
230 @@ -1248,7 +1248,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs)
231 decl PER_CPU_VAR(irq_count)
232 jmp error_exit
233 CFI_ENDPROC
234 -END(do_hypervisor_callback)
235 +END(xen_do_hypervisor_callback)
236
237 /*
238 * Hypervisor uses this for application faults while it executes.
239 diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
240 index 0113d19..8573b83 100644
241 --- a/arch/x86/mm/pgtable.c
242 +++ b/arch/x86/mm/pgtable.c
243 @@ -168,8 +168,7 @@ void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
244 * section 8.1: in PAE mode we explicitly have to flush the
245 * TLB via cr3 if the top-level pgd is changed...
246 */
247 - if (mm == current->active_mm)
248 - write_cr3(read_cr3());
249 + flush_tlb_mm(mm);
250 }
251 #else /* !CONFIG_X86_PAE */
252
253 diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
254 index b8d96ce..34e08f6 100644
255 --- a/drivers/ata/ahci.c
256 +++ b/drivers/ata/ahci.c
257 @@ -260,6 +260,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
258 { PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */
259 { PCI_VDEVICE(INTEL, 0x1d04), board_ahci }, /* PBG RAID */
260 { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */
261 + { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
262 { PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
263
264 /* JMicron 360/1/3/5/6, match class to avoid IDE function */
265 @@ -383,6 +384,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
266 .class = PCI_CLASS_STORAGE_SATA_AHCI,
267 .class_mask = 0xffffff,
268 .driver_data = board_ahci_yes_fbs }, /* 88se9128 */
269 + { PCI_DEVICE(0x1b4b, 0x9125),
270 + .driver_data = board_ahci_yes_fbs }, /* 88se9125 */
271
272 /* Promise */
273 { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
274 diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
275 index 17a6378..e16850e 100644
276 --- a/drivers/ata/libata-eh.c
277 +++ b/drivers/ata/libata-eh.c
278 @@ -1618,7 +1618,7 @@ static void ata_eh_analyze_serror(struct ata_link *link)
279 * host links. For disabled PMP links, only N bit is
280 * considered as X bit is left at 1 for link plugging.
281 */
282 - if (link->lpm_policy != ATA_LPM_MAX_POWER)
283 + if (link->lpm_policy > ATA_LPM_MAX_POWER)
284 hotplug_mask = 0; /* hotplug doesn't work w/ LPM */
285 else if (!(link->flags & ATA_LFLAG_DISABLED) || ata_is_host_link(link))
286 hotplug_mask = SERR_PHYRDY_CHG | SERR_DEV_XCHG;
287 diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
288 index 85da4c4..2eee8e0 100644
289 --- a/drivers/gpu/drm/drm_sysfs.c
290 +++ b/drivers/gpu/drm/drm_sysfs.c
291 @@ -158,8 +158,15 @@ static ssize_t status_show(struct device *device,
292 {
293 struct drm_connector *connector = to_drm_connector(device);
294 enum drm_connector_status status;
295 + int ret;
296 +
297 + ret = mutex_lock_interruptible(&connector->dev->mode_config.mutex);
298 + if (ret)
299 + return ret;
300
301 status = connector->funcs->detect(connector, true);
302 + mutex_unlock(&connector->dev->mode_config.mutex);
303 +
304 return snprintf(buf, PAGE_SIZE, "%s\n",
305 drm_get_connector_status_name(status));
306 }
307 diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
308 index 8a9e08b..2347bc1 100644
309 --- a/drivers/gpu/drm/i915/i915_irq.c
310 +++ b/drivers/gpu/drm/i915/i915_irq.c
311 @@ -1377,7 +1377,12 @@ int i915_enable_vblank(struct drm_device *dev, int pipe)
312 else
313 i915_enable_pipestat(dev_priv, pipe,
314 PIPE_VBLANK_INTERRUPT_ENABLE);
315 +
316 + /* maintain vblank delivery even in deep C-states */
317 + if (dev_priv->info->gen == 3)
318 + I915_WRITE(INSTPM, INSTPM_AGPBUSY_DIS << 16);
319 spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
320 +
321 return 0;
322 }
323
324 @@ -1390,6 +1395,10 @@ void i915_disable_vblank(struct drm_device *dev, int pipe)
325 unsigned long irqflags;
326
327 spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
328 + if (dev_priv->info->gen == 3)
329 + I915_WRITE(INSTPM,
330 + INSTPM_AGPBUSY_DIS << 16 | INSTPM_AGPBUSY_DIS);
331 +
332 if (HAS_PCH_SPLIT(dev))
333 ironlake_disable_display_irq(dev_priv, (pipe == 0) ?
334 DE_PIPEA_VBLANK: DE_PIPEB_VBLANK);
335 diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
336 index 2abe240..12c547a 100644
337 --- a/drivers/gpu/drm/i915/i915_reg.h
338 +++ b/drivers/gpu/drm/i915/i915_reg.h
339 @@ -405,9 +405,12 @@
340 #define I915_ERROR_INSTRUCTION (1<<0)
341 #define INSTPM 0x020c0
342 #define INSTPM_SELF_EN (1<<12) /* 915GM only */
343 +#define INSTPM_AGPBUSY_DIS (1<<11) /* gen3: when disabled, pending interrupts
344 + will not assert AGPBUSY# and will only
345 + be delivered when out of C3. */
346 #define ACTHD 0x020c8
347 #define FW_BLC 0x020d8
348 -#define FW_BLC2 0x020dc
349 +#define FW_BLC2 0x020dc
350 #define FW_BLC_SELF 0x020e0 /* 915+ only */
351 #define FW_BLC_SELF_EN_MASK (1<<31)
352 #define FW_BLC_SELF_FIFO_MASK (1<<16) /* 945 only */
353 diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
354 index a4e5e53..4a5a73b 100644
355 --- a/drivers/gpu/drm/radeon/atombios_crtc.c
356 +++ b/drivers/gpu/drm/radeon/atombios_crtc.c
357 @@ -61,8 +61,8 @@ static void atombios_overscan_setup(struct drm_crtc *crtc,
358 args.usOverscanLeft = cpu_to_le16((adjusted_mode->crtc_hdisplay - (a2 / mode->crtc_vdisplay)) / 2);
359 args.usOverscanRight = cpu_to_le16((adjusted_mode->crtc_hdisplay - (a2 / mode->crtc_vdisplay)) / 2);
360 } else if (a2 > a1) {
361 - args.usOverscanLeft = cpu_to_le16((adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2);
362 - args.usOverscanRight = cpu_to_le16((adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2);
363 + args.usOverscanTop = cpu_to_le16((adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2);
364 + args.usOverscanBottom = cpu_to_le16((adjusted_mode->crtc_vdisplay - (a1 / mode->crtc_hdisplay)) / 2);
365 }
366 break;
367 case RMX_FULL:
368 diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
369 index 2560f01..ae445b1 100644
370 --- a/drivers/hid/Kconfig
371 +++ b/drivers/hid/Kconfig
372 @@ -68,9 +68,15 @@ config HID_A4TECH
373 ---help---
374 Support for A4 tech X5 and WOP-35 / Trust 450L mice.
375
376 -config HID_ACRUX_FF
377 - tristate "ACRUX force feedback"
378 +config HID_ACRUX
379 + tristate "ACRUX game controller support"
380 depends on USB_HID
381 + ---help---
382 + Say Y here if you want to enable support for ACRUX game controllers.
383 +
384 +config HID_ACRUX_FF
385 + tristate "ACRUX force feedback support"
386 + depends on HID_ACRUX
387 select INPUT_FF_MEMLESS
388 ---help---
389 Say Y here if you want to enable force feedback support for ACRUX
390 @@ -319,10 +325,10 @@ config HID_NTRIG
391 Support for N-Trig touch screen.
392
393 config HID_ORTEK
394 - tristate "Ortek WKB-2000 wireless keyboard and mouse trackpad"
395 + tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpad"
396 depends on USB_HID
397 ---help---
398 - Support for Ortek WKB-2000 wireless keyboard + mouse trackpad.
399 + Support for Ortek PKB-1700/WKB-2000 wireless keyboard + mouse trackpad.
400
401 config HID_PANTHERLORD
402 tristate "Pantherlord/GreenAsia game controller"
403 diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
404 index 6efc2a0..13e6248 100644
405 --- a/drivers/hid/Makefile
406 +++ b/drivers/hid/Makefile
407 @@ -27,7 +27,7 @@ endif
408
409 obj-$(CONFIG_HID_3M_PCT) += hid-3m-pct.o
410 obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
411 -obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o
412 +obj-$(CONFIG_HID_ACRUX) += hid-axff.o
413 obj-$(CONFIG_HID_APPLE) += hid-apple.o
414 obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
415 obj-$(CONFIG_HID_CANDO) += hid-cando.o
416 diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
417 index 61aa712..b85744f 100644
418 --- a/drivers/hid/hid-apple.c
419 +++ b/drivers/hid/hid-apple.c
420 @@ -481,6 +481,12 @@ static const struct hid_device_id apple_devices[] = {
421 .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
422 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
423 .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
424 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI),
425 + .driver_data = APPLE_HAS_FN },
426 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO),
427 + .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
428 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
429 + .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
430 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
431 .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
432 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
433 diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c
434 index e5b961d..b455428 100644
435 --- a/drivers/hid/hid-axff.c
436 +++ b/drivers/hid/hid-axff.c
437 @@ -33,6 +33,8 @@
438 #include <linux/hid.h>
439
440 #include "hid-ids.h"
441 +
442 +#ifdef CONFIG_HID_ACRUX_FF
443 #include "usbhid/usbhid.h"
444
445 struct axff_device {
446 @@ -109,6 +111,12 @@ err_free_mem:
447 kfree(axff);
448 return error;
449 }
450 +#else
451 +static inline int axff_init(struct hid_device *hid)
452 +{
453 + return 0;
454 +}
455 +#endif
456
457 static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id)
458 {
459 @@ -139,9 +147,25 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id)
460 error);
461 }
462
463 + /*
464 + * We need to start polling device right away, otherwise
465 + * it will go into a coma.
466 + */
467 + error = hid_hw_open(hdev);
468 + if (error) {
469 + dev_err(&hdev->dev, "hw open failed\n");
470 + return error;
471 + }
472 +
473 return 0;
474 }
475
476 +static void ax_remove(struct hid_device *hdev)
477 +{
478 + hid_hw_close(hdev);
479 + hid_hw_stop(hdev);
480 +}
481 +
482 static const struct hid_device_id ax_devices[] = {
483 { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802), },
484 { }
485 @@ -149,9 +173,10 @@ static const struct hid_device_id ax_devices[] = {
486 MODULE_DEVICE_TABLE(hid, ax_devices);
487
488 static struct hid_driver ax_driver = {
489 - .name = "acrux",
490 - .id_table = ax_devices,
491 - .probe = ax_probe,
492 + .name = "acrux",
493 + .id_table = ax_devices,
494 + .probe = ax_probe,
495 + .remove = ax_remove,
496 };
497
498 static int __init ax_init(void)
499 diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
500 index d678cf3..9477b2a 100644
501 --- a/drivers/hid/hid-core.c
502 +++ b/drivers/hid/hid-core.c
503 @@ -1256,9 +1256,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
504 { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
505 { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
506 { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) },
507 -#if defined(CONFIG_HID_ACRUX_FF) || defined(CONFIG_HID_ACRUX_FF_MODULE)
508 { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
509 -#endif
510 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
511 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
512 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
513 @@ -1302,6 +1300,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
514 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
515 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
516 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
517 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
518 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
519 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
520 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
521 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
522 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
523 @@ -1400,6 +1401,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
524 { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16) },
525 { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17) },
526 { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
527 + { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
528 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
529 { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
530 { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
531 @@ -1801,6 +1803,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
532 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI) },
533 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO) },
534 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS) },
535 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
536 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
537 + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
538 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
539 { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
540 { }
541 diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
542 index 92a0d61..090bf48 100644
543 --- a/drivers/hid/hid-ids.h
544 +++ b/drivers/hid/hid-ids.h
545 @@ -103,6 +103,9 @@
546 #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
547 #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
548 #define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
549 +#define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245
550 +#define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246
551 +#define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247
552 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239
553 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a
554 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
555 @@ -466,6 +469,7 @@
556 #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
557
558 #define USB_VENDOR_ID_ORTEK 0x05a4
559 +#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
560 #define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
561
562 #define USB_VENDOR_ID_PANJIT 0x134c
563 diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
564 index 7f552bf..ebcc02a 100644
565 --- a/drivers/hid/hid-input.c
566 +++ b/drivers/hid/hid-input.c
567 @@ -290,14 +290,6 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
568 goto ignore;
569 }
570
571 - if (field->report_type == HID_FEATURE_REPORT) {
572 - if (device->driver->feature_mapping) {
573 - device->driver->feature_mapping(device, hidinput, field,
574 - usage);
575 - }
576 - goto ignore;
577 - }
578 -
579 if (device->driver->input_mapping) {
580 int ret = device->driver->input_mapping(device, hidinput, field,
581 usage, &bit, &max);
582 @@ -835,6 +827,24 @@ static void hidinput_close(struct input_dev *dev)
583 hid_hw_close(hid);
584 }
585
586 +static void report_features(struct hid_device *hid)
587 +{
588 + struct hid_driver *drv = hid->driver;
589 + struct hid_report_enum *rep_enum;
590 + struct hid_report *rep;
591 + int i, j;
592 +
593 + if (!drv->feature_mapping)
594 + return;
595 +
596 + rep_enum = &hid->report_enum[HID_FEATURE_REPORT];
597 + list_for_each_entry(rep, &rep_enum->report_list, list)
598 + for (i = 0; i < rep->maxfield; i++)
599 + for (j = 0; j < rep->field[i]->maxusage; j++)
600 + drv->feature_mapping(hid, rep->field[i],
601 + rep->field[i]->usage + j);
602 +}
603 +
604 /*
605 * Register the input device; print a message.
606 * Configure the input layer interface
607 @@ -863,7 +873,9 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
608 return -1;
609 }
610
611 - for (k = HID_INPUT_REPORT; k <= HID_FEATURE_REPORT; k++) {
612 + report_features(hid);
613 +
614 + for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) {
615 if (k == HID_OUTPUT_REPORT &&
616 hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS)
617 continue;
618 diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
619 index 698e645..318cc40 100644
620 --- a/drivers/hid/hid-magicmouse.c
621 +++ b/drivers/hid/hid-magicmouse.c
622 @@ -258,7 +258,7 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
623 input_report_abs(input, ABS_MT_TRACKING_ID, id);
624 input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2);
625 input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2);
626 - input_report_abs(input, ABS_MT_ORIENTATION, orientation);
627 + input_report_abs(input, ABS_MT_ORIENTATION, -orientation);
628 input_report_abs(input, ABS_MT_POSITION_X, x);
629 input_report_abs(input, ABS_MT_POSITION_Y, y);
630
631 @@ -397,7 +397,7 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
632 input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
633 input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
634 input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
635 - input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0);
636 + input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0);
637
638 /* Note: Touch Y position from the device is inverted relative
639 * to how pointer motion is reported (and relative to how USB
640 diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
641 index 07d3183..2bbc954 100644
642 --- a/drivers/hid/hid-multitouch.c
643 +++ b/drivers/hid/hid-multitouch.c
644 @@ -122,7 +122,7 @@ struct mt_class mt_classes[] = {
645 { }
646 };
647
648 -static void mt_feature_mapping(struct hid_device *hdev, struct hid_input *hi,
649 +static void mt_feature_mapping(struct hid_device *hdev,
650 struct hid_field *field, struct hid_usage *usage)
651 {
652 if (usage->hid == HID_DG_INPUTMODE) {
653 diff --git a/drivers/hid/hid-ortek.c b/drivers/hid/hid-ortek.c
654 index e90edfc..ad6faa6 100644
655 --- a/drivers/hid/hid-ortek.c
656 +++ b/drivers/hid/hid-ortek.c
657 @@ -1,5 +1,5 @@
658 /*
659 - * HID driver for Ortek WKB-2000 (wireless keyboard + mouse trackpad).
660 + * HID driver for Ortek PKB-1700/WKB-2000 (wireless keyboard + mouse trackpad).
661 * Fixes LogicalMaximum error in USB report description, see
662 * http://bugzilla.kernel.org/show_bug.cgi?id=14787
663 *
664 @@ -30,6 +30,7 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
665 }
666
667 static const struct hid_device_id ortek_devices[] = {
668 + { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
669 { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
670 { }
671 };
672 diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
673 index a610e78..38a41d2 100644
674 --- a/drivers/hwmon/sht15.c
675 +++ b/drivers/hwmon/sht15.c
676 @@ -333,11 +333,11 @@ static inline int sht15_calc_humid(struct sht15_data *data)
677
678 const int c1 = -4;
679 const int c2 = 40500; /* x 10 ^ -6 */
680 - const int c3 = -2800; /* x10 ^ -9 */
681 + const int c3 = -28; /* x 10 ^ -7 */
682
683 RHlinear = c1*1000
684 + c2 * data->val_humid/1000
685 - + (data->val_humid * data->val_humid * c3)/1000000;
686 + + (data->val_humid * data->val_humid * c3) / 10000;
687 return (temp - 25000) * (10000 + 80 * data->val_humid)
688 / 1000000 + RHlinear;
689 }
690 diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
691 index 64e0903..1d9616b 100644
692 --- a/drivers/infiniband/core/cm.c
693 +++ b/drivers/infiniband/core/cm.c
694 @@ -2989,6 +2989,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
695 goto out; /* No match. */
696 }
697 atomic_inc(&cur_cm_id_priv->refcount);
698 + atomic_inc(&cm_id_priv->refcount);
699 spin_unlock_irq(&cm.lock);
700
701 cm_id_priv->id.cm_handler = cur_cm_id_priv->id.cm_handler;
702 diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
703 index 6884da2..e450c5a 100644
704 --- a/drivers/infiniband/core/cma.c
705 +++ b/drivers/infiniband/core/cma.c
706 @@ -1210,6 +1210,11 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
707 cm_id->context = conn_id;
708 cm_id->cm_handler = cma_ib_handler;
709
710 + /*
711 + * Protect against the user destroying conn_id from another thread
712 + * until we're done accessing it.
713 + */
714 + atomic_inc(&conn_id->refcount);
715 ret = conn_id->id.event_handler(&conn_id->id, &event);
716 if (!ret) {
717 /*
718 @@ -1222,8 +1227,10 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
719 ib_send_cm_mra(cm_id, CMA_CM_MRA_SETTING, NULL, 0);
720 mutex_unlock(&lock);
721 mutex_unlock(&conn_id->handler_mutex);
722 + cma_deref_id(conn_id);
723 goto out;
724 }
725 + cma_deref_id(conn_id);
726
727 /* Destroy the CM ID by returning a non-zero value. */
728 conn_id->cm_id.ib = NULL;
729 @@ -1425,17 +1432,25 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
730 event.param.conn.private_data_len = iw_event->private_data_len;
731 event.param.conn.initiator_depth = attr.max_qp_init_rd_atom;
732 event.param.conn.responder_resources = attr.max_qp_rd_atom;
733 +
734 + /*
735 + * Protect against the user destroying conn_id from another thread
736 + * until we're done accessing it.
737 + */
738 + atomic_inc(&conn_id->refcount);
739 ret = conn_id->id.event_handler(&conn_id->id, &event);
740 if (ret) {
741 /* User wants to destroy the CM ID */
742 conn_id->cm_id.iw = NULL;
743 cma_exch(conn_id, CMA_DESTROYING);
744 mutex_unlock(&conn_id->handler_mutex);
745 + cma_deref_id(conn_id);
746 rdma_destroy_id(&conn_id->id);
747 goto out;
748 }
749
750 mutex_unlock(&conn_id->handler_mutex);
751 + cma_deref_id(conn_id);
752
753 out:
754 if (dev)
755 diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
756 index ee82851..3185314 100644
757 --- a/drivers/input/mouse/bcm5974.c
758 +++ b/drivers/input/mouse/bcm5974.c
759 @@ -63,6 +63,10 @@
760 #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242
761 #define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243
762 #define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244
763 +/* Macbook8 (unibody, March 2011) */
764 +#define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245
765 +#define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246
766 +#define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247
767
768 #define BCM5974_DEVICE(prod) { \
769 .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
770 @@ -96,6 +100,10 @@ static const struct usb_device_id bcm5974_table[] = {
771 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI),
772 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO),
773 BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS),
774 + /* MacbookPro8 */
775 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI),
776 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO),
777 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
778 /* Terminating entry */
779 {}
780 };
781 @@ -274,6 +282,18 @@ static const struct bcm5974_config bcm5974_config_table[] = {
782 { DIM_X, DIM_X / SN_COORD, -4616, 5112 },
783 { DIM_Y, DIM_Y / SN_COORD, -142, 5234 }
784 },
785 + {
786 + USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI,
787 + USB_DEVICE_ID_APPLE_WELLSPRING5_ISO,
788 + USB_DEVICE_ID_APPLE_WELLSPRING5_JIS,
789 + HAS_INTEGRATED_BUTTON,
790 + 0x84, sizeof(struct bt_data),
791 + 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
792 + { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
793 + { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
794 + { DIM_X, DIM_X / SN_COORD, -4415, 5050 },
795 + { DIM_Y, DIM_Y / SN_COORD, -55, 6680 }
796 + },
797 {}
798 };
799
800 diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
801 index ebc62ad..fbe1ea4 100644
802 --- a/drivers/mmc/core/sdio.c
803 +++ b/drivers/mmc/core/sdio.c
804 @@ -395,6 +395,14 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,
805 if (err)
806 goto remove;
807
808 + /*
809 + * Update oldcard with the new RCA received from the SDIO
810 + * device -- we're doing this so that it's updated in the
811 + * "card" struct when oldcard overwrites that later.
812 + */
813 + if (oldcard)
814 + oldcard->rca = card->rca;
815 +
816 mmc_set_bus_mode(host, MMC_BUSMODE_PUSHPULL);
817 }
818
819 diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
820 index 0dc905b..f7e622c 100644
821 --- a/drivers/mmc/host/sdhci-pci.c
822 +++ b/drivers/mmc/host/sdhci-pci.c
823 @@ -547,6 +547,14 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
824 },
825
826 {
827 + .vendor = PCI_VENDOR_ID_RICOH,
828 + .device = 0xe823,
829 + .subvendor = PCI_ANY_ID,
830 + .subdevice = PCI_ANY_ID,
831 + .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
832 + },
833 +
834 + {
835 .vendor = PCI_VENDOR_ID_ENE,
836 .device = PCI_DEVICE_ID_ENE_CB712_SD,
837 .subvendor = PCI_ANY_ID,
838 diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
839 index 9f01e50..7c0a7c4 100644
840 --- a/drivers/net/wireless/ath/ath9k/hw.c
841 +++ b/drivers/net/wireless/ath/ath9k/hw.c
842 @@ -495,6 +495,17 @@ static int __ath9k_hw_init(struct ath_hw *ah)
843 if (ah->hw_version.devid == AR5416_AR9100_DEVID)
844 ah->hw_version.macVersion = AR_SREV_VERSION_9100;
845
846 + /*
847 + * Read back AR_WA into a permanent copy and set bits 14 and 17.
848 + * We need to do this to avoid RMW of this register. We cannot
849 + * read the reg when chip is asleep.
850 + */
851 + ah->WARegVal = REG_READ(ah, AR_WA);
852 + ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
853 + AR_WA_ASPM_TIMER_BASED_DISABLE);
854 +
855 + ath9k_hw_read_revisions(ah);
856 +
857 if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
858 ath_err(common, "Couldn't reset chip\n");
859 return -EIO;
860 @@ -563,14 +574,6 @@ static int __ath9k_hw_init(struct ath_hw *ah)
861
862 ath9k_hw_init_mode_regs(ah);
863
864 - /*
865 - * Read back AR_WA into a permanent copy and set bits 14 and 17.
866 - * We need to do this to avoid RMW of this register. We cannot
867 - * read the reg when chip is asleep.
868 - */
869 - ah->WARegVal = REG_READ(ah, AR_WA);
870 - ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
871 - AR_WA_ASPM_TIMER_BASED_DISABLE);
872
873 if (ah->is_pciexpress)
874 ath9k_hw_configpcipowersave(ah, 0, 0);
875 @@ -1082,8 +1085,6 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
876 return false;
877 }
878
879 - ath9k_hw_read_revisions(ah);
880 -
881 return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM);
882 }
883
884 diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
885 index b2497b8..3867a2e 100644
886 --- a/drivers/net/wireless/ath/ath9k/recv.c
887 +++ b/drivers/net/wireless/ath/ath9k/recv.c
888 @@ -439,9 +439,7 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
889 * mode interface or when in monitor mode. AP mode does not need this
890 * since it receives all in-BSS frames anyway.
891 */
892 - if (((sc->sc_ah->opmode != NL80211_IFTYPE_AP) &&
893 - (sc->rx.rxfilter & FIF_PROMISC_IN_BSS)) ||
894 - (sc->sc_ah->is_monitoring))
895 + if (sc->sc_ah->is_monitoring)
896 rfilt |= ATH9K_RX_FILTER_PROM;
897
898 if (sc->rx.rxfilter & FIF_CONTROL)
899 diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
900 index 6b82cac..2bb5297 100644
901 --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
902 +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
903 @@ -871,23 +871,35 @@ static void rtl8187_work(struct work_struct *work)
904 /* The RTL8187 returns the retry count through register 0xFFFA. In
905 * addition, it appears to be a cumulative retry count, not the
906 * value for the current TX packet. When multiple TX entries are
907 - * queued, the retry count will be valid for the last one in the queue.
908 - * The "error" should not matter for purposes of rate setting. */
909 + * waiting in the queue, the retry count will be the total for all.
910 + * The "error" may matter for purposes of rate setting, but there is
911 + * no other choice with this hardware.
912 + */
913 struct rtl8187_priv *priv = container_of(work, struct rtl8187_priv,
914 work.work);
915 struct ieee80211_tx_info *info;
916 struct ieee80211_hw *dev = priv->dev;
917 static u16 retry;
918 u16 tmp;
919 + u16 avg_retry;
920 + int length;
921
922 mutex_lock(&priv->conf_mutex);
923 tmp = rtl818x_ioread16(priv, (__le16 *)0xFFFA);
924 + length = skb_queue_len(&priv->b_tx_status.queue);
925 + if (unlikely(!length))
926 + length = 1;
927 + if (unlikely(tmp < retry))
928 + tmp = retry;
929 + avg_retry = (tmp - retry) / length;
930 while (skb_queue_len(&priv->b_tx_status.queue) > 0) {
931 struct sk_buff *old_skb;
932
933 old_skb = skb_dequeue(&priv->b_tx_status.queue);
934 info = IEEE80211_SKB_CB(old_skb);
935 - info->status.rates[0].count = tmp - retry + 1;
936 + info->status.rates[0].count = avg_retry + 1;
937 + if (info->status.rates[0].count > RETRY_COUNT)
938 + info->flags &= ~IEEE80211_TX_STAT_ACK;
939 ieee80211_tx_status_irqsafe(dev, old_skb);
940 }
941 retry = tmp;
942 @@ -933,8 +945,8 @@ static int rtl8187_start(struct ieee80211_hw *dev)
943 rtl818x_iowrite32(priv, &priv->map->TX_CONF,
944 RTL818X_TX_CONF_HW_SEQNUM |
945 RTL818X_TX_CONF_DISREQQSIZE |
946 - (7 << 8 /* short retry limit */) |
947 - (7 << 0 /* long retry limit */) |
948 + (RETRY_COUNT << 8 /* short retry limit */) |
949 + (RETRY_COUNT << 0 /* long retry limit */) |
950 (7 << 21 /* MAX TX DMA */));
951 rtl8187_init_urbs(dev);
952 rtl8187b_init_status_urb(dev);
953 @@ -1378,6 +1390,9 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
954 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
955 IEEE80211_HW_SIGNAL_DBM |
956 IEEE80211_HW_RX_INCLUDES_FCS;
957 + /* Initialize rate-control variables */
958 + dev->max_rates = 1;
959 + dev->max_rate_tries = RETRY_COUNT;
960
961 eeprom.data = dev;
962 eeprom.register_read = rtl8187_eeprom_register_read;
963 diff --git a/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
964 index 0d7b142..f1cc907 100644
965 --- a/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
966 +++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
967 @@ -35,6 +35,8 @@
968 #define RFKILL_MASK_8187_89_97 0x2
969 #define RFKILL_MASK_8198 0x4
970
971 +#define RETRY_COUNT 7
972 +
973 struct rtl8187_rx_info {
974 struct urb *urb;
975 struct ieee80211_hw *dev;
976 diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
977 index ea25e5b..c85438a 100644
978 --- a/drivers/pci/pci-sysfs.c
979 +++ b/drivers/pci/pci-sysfs.c
980 @@ -1088,7 +1088,7 @@ static int pci_create_capabilities_sysfs(struct pci_dev *dev)
981 attr->write = write_vpd_attr;
982 retval = sysfs_create_bin_file(&dev->dev.kobj, attr);
983 if (retval) {
984 - kfree(dev->vpd->attr);
985 + kfree(attr);
986 return retval;
987 }
988 dev->vpd->attr = attr;
989 diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
990 index 53a786f..bd80f63 100644
991 --- a/drivers/pci/quirks.c
992 +++ b/drivers/pci/quirks.c
993 @@ -533,6 +533,17 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev)
994 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi);
995 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, quirk_piix4_acpi);
996
997 +#define ICH_PMBASE 0x40
998 +#define ICH_ACPI_CNTL 0x44
999 +#define ICH4_ACPI_EN 0x10
1000 +#define ICH6_ACPI_EN 0x80
1001 +#define ICH4_GPIOBASE 0x58
1002 +#define ICH4_GPIO_CNTL 0x5c
1003 +#define ICH4_GPIO_EN 0x10
1004 +#define ICH6_GPIOBASE 0x48
1005 +#define ICH6_GPIO_CNTL 0x4c
1006 +#define ICH6_GPIO_EN 0x10
1007 +
1008 /*
1009 * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
1010 * 0x40 (128 bytes of ACPI, GPIO & TCO registers)
1011 @@ -541,12 +552,33 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, qui
1012 static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev)
1013 {
1014 u32 region;
1015 + u8 enable;
1016
1017 - pci_read_config_dword(dev, 0x40, &region);
1018 - quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, "ICH4 ACPI/GPIO/TCO");
1019 + /*
1020 + * The check for PCIBIOS_MIN_IO is to ensure we won't create a conflict
1021 + * with low legacy (and fixed) ports. We don't know the decoding
1022 + * priority and can't tell whether the legacy device or the one created
1023 + * here is really at that address. This happens on boards with broken
1024 + * BIOSes.
1025 + */
1026 +
1027 + pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable);
1028 + if (enable & ICH4_ACPI_EN) {
1029 + pci_read_config_dword(dev, ICH_PMBASE, &region);
1030 + region &= PCI_BASE_ADDRESS_IO_MASK;
1031 + if (region >= PCIBIOS_MIN_IO)
1032 + quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES,
1033 + "ICH4 ACPI/GPIO/TCO");
1034 + }
1035
1036 - pci_read_config_dword(dev, 0x58, &region);
1037 - quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1, "ICH4 GPIO");
1038 + pci_read_config_byte(dev, ICH4_GPIO_CNTL, &enable);
1039 + if (enable & ICH4_GPIO_EN) {
1040 + pci_read_config_dword(dev, ICH4_GPIOBASE, &region);
1041 + region &= PCI_BASE_ADDRESS_IO_MASK;
1042 + if (region >= PCIBIOS_MIN_IO)
1043 + quirk_io_region(dev, region, 64,
1044 + PCI_BRIDGE_RESOURCES + 1, "ICH4 GPIO");
1045 + }
1046 }
1047 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, quirk_ich4_lpc_acpi);
1048 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, quirk_ich4_lpc_acpi);
1049 @@ -562,12 +594,25 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, qui
1050 static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev)
1051 {
1052 u32 region;
1053 + u8 enable;
1054
1055 - pci_read_config_dword(dev, 0x40, &region);
1056 - quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES, "ICH6 ACPI/GPIO/TCO");
1057 + pci_read_config_byte(dev, ICH_ACPI_CNTL, &enable);
1058 + if (enable & ICH6_ACPI_EN) {
1059 + pci_read_config_dword(dev, ICH_PMBASE, &region);
1060 + region &= PCI_BASE_ADDRESS_IO_MASK;
1061 + if (region >= PCIBIOS_MIN_IO)
1062 + quirk_io_region(dev, region, 128, PCI_BRIDGE_RESOURCES,
1063 + "ICH6 ACPI/GPIO/TCO");
1064 + }
1065
1066 - pci_read_config_dword(dev, 0x48, &region);
1067 - quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES+1, "ICH6 GPIO");
1068 + pci_read_config_byte(dev, ICH6_GPIO_CNTL, &enable);
1069 + if (enable & ICH4_GPIO_EN) {
1070 + pci_read_config_dword(dev, ICH6_GPIOBASE, &region);
1071 + region &= PCI_BASE_ADDRESS_IO_MASK;
1072 + if (region >= PCIBIOS_MIN_IO)
1073 + quirk_io_region(dev, region, 64,
1074 + PCI_BRIDGE_RESOURCES + 1, "ICH6 GPIO");
1075 + }
1076 }
1077
1078 static void __devinit ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name, int dynsize)
1079 @@ -2618,58 +2663,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375,
1080
1081 #endif /* CONFIG_PCI_MSI */
1082
1083 -#ifdef CONFIG_PCI_IOV
1084 -
1085 -/*
1086 - * For Intel 82576 SR-IOV NIC, if BIOS doesn't allocate resources for the
1087 - * SR-IOV BARs, zero the Flash BAR and program the SR-IOV BARs to use the
1088 - * old Flash Memory Space.
1089 - */
1090 -static void __devinit quirk_i82576_sriov(struct pci_dev *dev)
1091 -{
1092 - int pos, flags;
1093 - u32 bar, start, size;
1094 -
1095 - if (PAGE_SIZE > 0x10000)
1096 - return;
1097 -
1098 - flags = pci_resource_flags(dev, 0);
1099 - if ((flags & PCI_BASE_ADDRESS_SPACE) !=
1100 - PCI_BASE_ADDRESS_SPACE_MEMORY ||
1101 - (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) !=
1102 - PCI_BASE_ADDRESS_MEM_TYPE_32)
1103 - return;
1104 -
1105 - pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
1106 - if (!pos)
1107 - return;
1108 -
1109 - pci_read_config_dword(dev, pos + PCI_SRIOV_BAR, &bar);
1110 - if (bar & PCI_BASE_ADDRESS_MEM_MASK)
1111 - return;
1112 -
1113 - start = pci_resource_start(dev, 1);
1114 - size = pci_resource_len(dev, 1);
1115 - if (!start || size != 0x400000 || start & (size - 1))
1116 - return;
1117 -
1118 - pci_resource_flags(dev, 1) = 0;
1119 - pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, 0);
1120 - pci_write_config_dword(dev, pos + PCI_SRIOV_BAR, start);
1121 - pci_write_config_dword(dev, pos + PCI_SRIOV_BAR + 12, start + size / 2);
1122 -
1123 - dev_info(&dev->dev, "use Flash Memory Space for SR-IOV BARs\n");
1124 -}
1125 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10c9, quirk_i82576_sriov);
1126 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e6, quirk_i82576_sriov);
1127 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e7, quirk_i82576_sriov);
1128 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e8, quirk_i82576_sriov);
1129 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150a, quirk_i82576_sriov);
1130 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150d, quirk_i82576_sriov);
1131 -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1518, quirk_i82576_sriov);
1132 -
1133 -#endif /* CONFIG_PCI_IOV */
1134 -
1135 /* Allow manual resource allocation for PCI hotplug bridges
1136 * via pci=hpmemsize=nnM and pci=hpiosize=nnM parameters. For
1137 * some PCI-PCI hotplug bridges, like PLX 6254 (former HINT HB6),
1138 diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
1139 index 6b72932..30f2b33 100644
1140 --- a/drivers/scsi/device_handler/scsi_dh_alua.c
1141 +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
1142 @@ -285,7 +285,8 @@ static void stpg_endio(struct request *req, int error)
1143 print_alua_state(h->state));
1144 }
1145 done:
1146 - blk_put_request(req);
1147 + req->end_io_data = NULL;
1148 + __blk_put_request(req->q, req);
1149 if (h->callback_fn) {
1150 h->callback_fn(h->callback_data, err);
1151 h->callback_fn = h->callback_data = NULL;
1152 diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
1153 index b47d7aa..e2fe165 100644
1154 --- a/drivers/staging/tidspbridge/rmgr/proc.c
1155 +++ b/drivers/staging/tidspbridge/rmgr/proc.c
1156 @@ -781,12 +781,14 @@ int proc_begin_dma(void *hprocessor, void *pmpu_addr, u32 ul_size,
1157 (u32)pmpu_addr,
1158 ul_size, dir);
1159
1160 + mutex_lock(&proc_lock);
1161 +
1162 /* find requested memory are in cached mapping information */
1163 map_obj = find_containing_mapping(pr_ctxt, (u32) pmpu_addr, ul_size);
1164 if (!map_obj) {
1165 pr_err("%s: find_containing_mapping failed\n", __func__);
1166 status = -EFAULT;
1167 - goto err_out;
1168 + goto no_map;
1169 }
1170
1171 if (memory_give_ownership(map_obj, (u32) pmpu_addr, ul_size, dir)) {
1172 @@ -795,6 +797,8 @@ int proc_begin_dma(void *hprocessor, void *pmpu_addr, u32 ul_size,
1173 status = -EFAULT;
1174 }
1175
1176 +no_map:
1177 + mutex_unlock(&proc_lock);
1178 err_out:
1179
1180 return status;
1181 @@ -819,21 +823,24 @@ int proc_end_dma(void *hprocessor, void *pmpu_addr, u32 ul_size,
1182 (u32)pmpu_addr,
1183 ul_size, dir);
1184
1185 + mutex_lock(&proc_lock);
1186 +
1187 /* find requested memory are in cached mapping information */
1188 map_obj = find_containing_mapping(pr_ctxt, (u32) pmpu_addr, ul_size);
1189 if (!map_obj) {
1190 pr_err("%s: find_containing_mapping failed\n", __func__);
1191 status = -EFAULT;
1192 - goto err_out;
1193 + goto no_map;
1194 }
1195
1196 if (memory_regain_ownership(map_obj, (u32) pmpu_addr, ul_size, dir)) {
1197 pr_err("%s: InValid address parameters %p %x\n",
1198 __func__, pmpu_addr, ul_size);
1199 status = -EFAULT;
1200 - goto err_out;
1201 }
1202
1203 +no_map:
1204 + mutex_unlock(&proc_lock);
1205 err_out:
1206 return status;
1207 }
1208 @@ -1726,9 +1733,8 @@ int proc_un_map(void *hprocessor, void *map_addr,
1209 (p_proc_object->hbridge_context, va_align, size_align);
1210 }
1211
1212 - mutex_unlock(&proc_lock);
1213 if (status)
1214 - goto func_end;
1215 + goto unmap_failed;
1216
1217 /*
1218 * A successful unmap should be followed by removal of map_obj
1219 @@ -1737,6 +1743,9 @@ int proc_un_map(void *hprocessor, void *map_addr,
1220 */
1221 remove_mapping_information(pr_ctxt, (u32) map_addr, size_align);
1222
1223 +unmap_failed:
1224 + mutex_unlock(&proc_lock);
1225 +
1226 func_end:
1227 dev_dbg(bridge, "%s: hprocessor: 0x%p map_addr: 0x%p status: 0x%x\n",
1228 __func__, hprocessor, map_addr, status);
1229 diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
1230 index d7b3aca..6160b2f 100644
1231 --- a/drivers/staging/winbond/core.h
1232 +++ b/drivers/staging/winbond/core.h
1233 @@ -3,6 +3,7 @@
1234
1235 #include <linux/wireless.h>
1236 #include <linux/types.h>
1237 +#include <linux/delay.h>
1238
1239 #include "wbhal.h"
1240 #include "mto.h"
1241 diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c
1242 index 366080b..7f19c8b 100644
1243 --- a/drivers/target/target_core_cdb.c
1244 +++ b/drivers/target/target_core_cdb.c
1245 @@ -667,7 +667,13 @@ target_emulate_readcapacity(struct se_cmd *cmd)
1246 {
1247 struct se_device *dev = SE_DEV(cmd);
1248 unsigned char *buf = cmd->t_task->t_task_buf;
1249 - u32 blocks = dev->transport->get_blocks(dev);
1250 + unsigned long long blocks_long = dev->transport->get_blocks(dev);
1251 + u32 blocks;
1252 +
1253 + if (blocks_long >= 0x00000000ffffffff)
1254 + blocks = 0xffffffff;
1255 + else
1256 + blocks = (u32)blocks_long;
1257
1258 buf[0] = (blocks >> 24) & 0xff;
1259 buf[1] = (blocks >> 16) & 0xff;
1260 diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
1261 index 3975df6..b3b881b 100644
1262 --- a/drivers/tty/serial/8250.c
1263 +++ b/drivers/tty/serial/8250.c
1264 @@ -954,6 +954,23 @@ static int broken_efr(struct uart_8250_port *up)
1265 return 0;
1266 }
1267
1268 +static inline int ns16550a_goto_highspeed(struct uart_8250_port *up)
1269 +{
1270 + unsigned char status;
1271 +
1272 + status = serial_in(up, 0x04); /* EXCR2 */
1273 +#define PRESL(x) ((x) & 0x30)
1274 + if (PRESL(status) == 0x10) {
1275 + /* already in high speed mode */
1276 + return 0;
1277 + } else {
1278 + status &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */
1279 + status |= 0x10; /* 1.625 divisor for baud_base --> 921600 */
1280 + serial_outp(up, 0x04, status);
1281 + }
1282 + return 1;
1283 +}
1284 +
1285 /*
1286 * We know that the chip has FIFOs. Does it have an EFR? The
1287 * EFR is located in the same register position as the IIR and
1288 @@ -1025,12 +1042,8 @@ static void autoconfig_16550a(struct uart_8250_port *up)
1289 quot = serial_dl_read(up);
1290 quot <<= 3;
1291
1292 - status1 = serial_in(up, 0x04); /* EXCR2 */
1293 - status1 &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */
1294 - status1 |= 0x10; /* 1.625 divisor for baud_base --> 921600 */
1295 - serial_outp(up, 0x04, status1);
1296 -
1297 - serial_dl_write(up, quot);
1298 + if (ns16550a_goto_highspeed(up))
1299 + serial_dl_write(up, quot);
1300
1301 serial_outp(up, UART_LCR, 0);
1302
1303 @@ -3025,17 +3038,13 @@ void serial8250_resume_port(int line)
1304 struct uart_8250_port *up = &serial8250_ports[line];
1305
1306 if (up->capabilities & UART_NATSEMI) {
1307 - unsigned char tmp;
1308 -
1309 /* Ensure it's still in high speed mode */
1310 serial_outp(up, UART_LCR, 0xE0);
1311
1312 - tmp = serial_in(up, 0x04); /* EXCR2 */
1313 - tmp &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */
1314 - tmp |= 0x10; /* 1.625 divisor for baud_base --> 921600 */
1315 - serial_outp(up, 0x04, tmp);
1316 + ns16550a_goto_highspeed(up);
1317
1318 serial_outp(up, UART_LCR, 0);
1319 + up->port.uartclk = 921600*16;
1320 }
1321 uart_resume_port(&serial8250_reg, &up->port);
1322 }
1323 diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c
1324 index b62857b..37e13c3 100644
1325 --- a/drivers/tty/serial/mrst_max3110.c
1326 +++ b/drivers/tty/serial/mrst_max3110.c
1327 @@ -51,7 +51,7 @@
1328 struct uart_max3110 {
1329 struct uart_port port;
1330 struct spi_device *spi;
1331 - char name[24];
1332 + char name[SPI_NAME_SIZE];
1333
1334 wait_queue_head_t wq;
1335 struct task_struct *main_thread;
1336 diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
1337 index f71e8e3..d370885 100644
1338 --- a/drivers/usb/core/hcd-pci.c
1339 +++ b/drivers/usb/core/hcd-pci.c
1340 @@ -363,8 +363,7 @@ static int check_root_hub_suspended(struct device *dev)
1341 struct pci_dev *pci_dev = to_pci_dev(dev);
1342 struct usb_hcd *hcd = pci_get_drvdata(pci_dev);
1343
1344 - if (!(hcd->state == HC_STATE_SUSPENDED ||
1345 - hcd->state == HC_STATE_HALT)) {
1346 + if (HCD_RH_RUNNING(hcd)) {
1347 dev_warn(dev, "Root hub is not suspended\n");
1348 return -EBUSY;
1349 }
1350 @@ -386,7 +385,7 @@ static int suspend_common(struct device *dev, bool do_wakeup)
1351 if (retval)
1352 return retval;
1353
1354 - if (hcd->driver->pci_suspend) {
1355 + if (hcd->driver->pci_suspend && !HCD_DEAD(hcd)) {
1356 /* Optimization: Don't suspend if a root-hub wakeup is
1357 * pending and it would cause the HCD to wake up anyway.
1358 */
1359 @@ -427,7 +426,7 @@ static int resume_common(struct device *dev, int event)
1360 struct usb_hcd *hcd = pci_get_drvdata(pci_dev);
1361 int retval;
1362
1363 - if (hcd->state != HC_STATE_SUSPENDED) {
1364 + if (HCD_RH_RUNNING(hcd)) {
1365 dev_dbg(dev, "can't resume, not suspended!\n");
1366 return 0;
1367 }
1368 @@ -442,7 +441,7 @@ static int resume_common(struct device *dev, int event)
1369
1370 clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
1371
1372 - if (hcd->driver->pci_resume) {
1373 + if (hcd->driver->pci_resume && !HCD_DEAD(hcd)) {
1374 if (event != PM_EVENT_AUTO_RESUME)
1375 wait_for_companions(pci_dev, hcd);
1376
1377 @@ -475,10 +474,10 @@ static int hcd_pci_suspend_noirq(struct device *dev)
1378
1379 pci_save_state(pci_dev);
1380
1381 - /* If the root hub is HALTed rather than SUSPENDed,
1382 + /* If the root hub is dead rather than suspended,
1383 * disallow remote wakeup.
1384 */
1385 - if (hcd->state == HC_STATE_HALT)
1386 + if (HCD_DEAD(hcd))
1387 device_set_wakeup_enable(dev, 0);
1388 dev_dbg(dev, "wakeup: %d\n", device_may_wakeup(dev));
1389
1390 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
1391 index e935f71..c34a935 100644
1392 --- a/drivers/usb/core/hcd.c
1393 +++ b/drivers/usb/core/hcd.c
1394 @@ -983,7 +983,7 @@ static int register_root_hub(struct usb_hcd *hcd)
1395 spin_unlock_irq (&hcd_root_hub_lock);
1396
1397 /* Did the HC die before the root hub was registered? */
1398 - if (hcd->state == HC_STATE_HALT)
1399 + if (HCD_DEAD(hcd) || hcd->state == HC_STATE_HALT)
1400 usb_hc_died (hcd); /* This time clean up */
1401 }
1402
1403 @@ -1089,13 +1089,10 @@ int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb)
1404 * Check the host controller's state and add the URB to the
1405 * endpoint's queue.
1406 */
1407 - switch (hcd->state) {
1408 - case HC_STATE_RUNNING:
1409 - case HC_STATE_RESUMING:
1410 + if (HCD_RH_RUNNING(hcd)) {
1411 urb->unlinked = 0;
1412 list_add_tail(&urb->urb_list, &urb->ep->urb_list);
1413 - break;
1414 - default:
1415 + } else {
1416 rc = -ESHUTDOWN;
1417 goto done;
1418 }
1419 @@ -1913,7 +1910,7 @@ int usb_hcd_get_frame_number (struct usb_device *udev)
1420 {
1421 struct usb_hcd *hcd = bus_to_hcd(udev->bus);
1422
1423 - if (!HC_IS_RUNNING (hcd->state))
1424 + if (!HCD_RH_RUNNING(hcd))
1425 return -ESHUTDOWN;
1426 return hcd->driver->get_frame_number (hcd);
1427 }
1428 @@ -1930,9 +1927,15 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
1429
1430 dev_dbg(&rhdev->dev, "bus %s%s\n",
1431 (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "suspend");
1432 + if (HCD_DEAD(hcd)) {
1433 + dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "suspend");
1434 + return 0;
1435 + }
1436 +
1437 if (!hcd->driver->bus_suspend) {
1438 status = -ENOENT;
1439 } else {
1440 + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1441 hcd->state = HC_STATE_QUIESCING;
1442 status = hcd->driver->bus_suspend(hcd);
1443 }
1444 @@ -1940,7 +1943,12 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
1445 usb_set_device_state(rhdev, USB_STATE_SUSPENDED);
1446 hcd->state = HC_STATE_SUSPENDED;
1447 } else {
1448 - hcd->state = old_state;
1449 + spin_lock_irq(&hcd_root_hub_lock);
1450 + if (!HCD_DEAD(hcd)) {
1451 + set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1452 + hcd->state = old_state;
1453 + }
1454 + spin_unlock_irq(&hcd_root_hub_lock);
1455 dev_dbg(&rhdev->dev, "bus %s fail, err %d\n",
1456 "suspend", status);
1457 }
1458 @@ -1955,9 +1963,13 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
1459
1460 dev_dbg(&rhdev->dev, "usb %s%s\n",
1461 (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume");
1462 + if (HCD_DEAD(hcd)) {
1463 + dev_dbg(&rhdev->dev, "skipped %s of dead bus\n", "resume");
1464 + return 0;
1465 + }
1466 if (!hcd->driver->bus_resume)
1467 return -ENOENT;
1468 - if (hcd->state == HC_STATE_RUNNING)
1469 + if (HCD_RH_RUNNING(hcd))
1470 return 0;
1471
1472 hcd->state = HC_STATE_RESUMING;
1473 @@ -1966,10 +1978,15 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
1474 if (status == 0) {
1475 /* TRSMRCY = 10 msec */
1476 msleep(10);
1477 - usb_set_device_state(rhdev, rhdev->actconfig
1478 - ? USB_STATE_CONFIGURED
1479 - : USB_STATE_ADDRESS);
1480 - hcd->state = HC_STATE_RUNNING;
1481 + spin_lock_irq(&hcd_root_hub_lock);
1482 + if (!HCD_DEAD(hcd)) {
1483 + usb_set_device_state(rhdev, rhdev->actconfig
1484 + ? USB_STATE_CONFIGURED
1485 + : USB_STATE_ADDRESS);
1486 + set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1487 + hcd->state = HC_STATE_RUNNING;
1488 + }
1489 + spin_unlock_irq(&hcd_root_hub_lock);
1490 } else {
1491 hcd->state = old_state;
1492 dev_dbg(&rhdev->dev, "bus %s fail, err %d\n",
1493 @@ -2080,7 +2097,7 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd)
1494 */
1495 local_irq_save(flags);
1496
1497 - if (unlikely(hcd->state == HC_STATE_HALT || !HCD_HW_ACCESSIBLE(hcd))) {
1498 + if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) {
1499 rc = IRQ_NONE;
1500 } else if (hcd->driver->irq(hcd) == IRQ_NONE) {
1501 rc = IRQ_NONE;
1502 @@ -2114,6 +2131,8 @@ void usb_hc_died (struct usb_hcd *hcd)
1503 dev_err (hcd->self.controller, "HC died; cleaning up\n");
1504
1505 spin_lock_irqsave (&hcd_root_hub_lock, flags);
1506 + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1507 + set_bit(HCD_FLAG_DEAD, &hcd->flags);
1508 if (hcd->rh_registered) {
1509 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1510
1511 @@ -2256,6 +2275,12 @@ int usb_add_hcd(struct usb_hcd *hcd,
1512 */
1513 device_init_wakeup(&rhdev->dev, 1);
1514
1515 + /* HCD_FLAG_RH_RUNNING doesn't matter until the root hub is
1516 + * registered. But since the controller can die at any time,
1517 + * let's initialize the flag before touching the hardware.
1518 + */
1519 + set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1520 +
1521 /* "reset" is misnamed; its role is now one-time init. the controller
1522 * should already have been reset (and boot firmware kicked off etc).
1523 */
1524 @@ -2323,6 +2348,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
1525 return retval;
1526
1527 error_create_attr_group:
1528 + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1529 if (HC_IS_RUNNING(hcd->state))
1530 hcd->state = HC_STATE_QUIESCING;
1531 spin_lock_irq(&hcd_root_hub_lock);
1532 @@ -2375,6 +2401,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
1533 usb_get_dev(rhdev);
1534 sysfs_remove_group(&rhdev->dev.kobj, &usb_bus_attr_group);
1535
1536 + clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
1537 if (HC_IS_RUNNING (hcd->state))
1538 hcd->state = HC_STATE_QUIESCING;
1539
1540 diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
1541 index c14fc08..ae334b0 100644
1542 --- a/drivers/usb/core/urb.c
1543 +++ b/drivers/usb/core/urb.c
1544 @@ -366,7 +366,16 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
1545 if (xfertype == USB_ENDPOINT_XFER_ISOC) {
1546 int n, len;
1547
1548 - /* FIXME SuperSpeed isoc endpoints have up to 16 bursts */
1549 + /* SuperSpeed isoc endpoints have up to 16 bursts of up to
1550 + * 3 packets each
1551 + */
1552 + if (dev->speed == USB_SPEED_SUPER) {
1553 + int burst = 1 + ep->ss_ep_comp.bMaxBurst;
1554 + int mult = USB_SS_MULT(ep->ss_ep_comp.bmAttributes);
1555 + max *= burst;
1556 + max *= mult;
1557 + }
1558 +
1559 /* "high bandwidth" mode, 1-3 packets/uframe? */
1560 if (dev->speed == USB_SPEED_HIGH) {
1561 int mult = 1 + ((max >> 11) & 0x03);
1562 diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
1563 index 8a515f0..72ae77c 100644
1564 --- a/drivers/usb/host/ehci-hub.c
1565 +++ b/drivers/usb/host/ehci-hub.c
1566 @@ -106,6 +106,27 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
1567 ehci->owned_ports = 0;
1568 }
1569
1570 +static int ehci_port_change(struct ehci_hcd *ehci)
1571 +{
1572 + int i = HCS_N_PORTS(ehci->hcs_params);
1573 +
1574 + /* First check if the controller indicates a change event */
1575 +
1576 + if (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)
1577 + return 1;
1578 +
1579 + /*
1580 + * Not all controllers appear to update this while going from D3 to D0,
1581 + * so check the individual port status registers as well
1582 + */
1583 +
1584 + while (i--)
1585 + if (ehci_readl(ehci, &ehci->regs->port_status[i]) & PORT_CSC)
1586 + return 1;
1587 +
1588 + return 0;
1589 +}
1590 +
1591 static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
1592 bool suspending, bool do_wakeup)
1593 {
1594 @@ -173,7 +194,7 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
1595 }
1596
1597 /* Does the root hub have a port wakeup pending? */
1598 - if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD))
1599 + if (!suspending && ehci_port_change(ehci))
1600 usb_hcd_resume_root_hub(ehci_to_hcd(ehci));
1601
1602 spin_unlock_irqrestore(&ehci->lock, flags);
1603 diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
1604 index bdba8c5..c470cc8 100644
1605 --- a/drivers/usb/host/isp1760-hcd.c
1606 +++ b/drivers/usb/host/isp1760-hcd.c
1607 @@ -33,6 +33,7 @@ struct isp1760_hcd {
1608 struct inter_packet_info atl_ints[32];
1609 struct inter_packet_info int_ints[32];
1610 struct memory_chunk memory_pool[BLOCKS];
1611 + u32 atl_queued;
1612
1613 /* periodic schedule support */
1614 #define DEFAULT_I_TDPS 1024
1615 @@ -850,6 +851,11 @@ static void enqueue_an_ATL_packet(struct usb_hcd *hcd, struct isp1760_qh *qh,
1616 skip_map &= ~queue_entry;
1617 isp1760_writel(skip_map, hcd->regs + HC_ATL_PTD_SKIPMAP_REG);
1618
1619 + priv->atl_queued++;
1620 + if (priv->atl_queued == 2)
1621 + isp1760_writel(INTERRUPT_ENABLE_SOT_MASK,
1622 + hcd->regs + HC_INTERRUPT_ENABLE);
1623 +
1624 buffstatus = isp1760_readl(hcd->regs + HC_BUFFER_STATUS_REG);
1625 buffstatus |= ATL_BUFFER;
1626 isp1760_writel(buffstatus, hcd->regs + HC_BUFFER_STATUS_REG);
1627 @@ -992,6 +998,7 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
1628 u32 dw3;
1629
1630 status = 0;
1631 + priv->atl_queued--;
1632
1633 queue_entry = __ffs(done_map);
1634 done_map &= ~(1 << queue_entry);
1635 @@ -1054,11 +1061,6 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
1636 * device is not able to send data fast enough.
1637 * This happens mostly on slower hardware.
1638 */
1639 - printk(KERN_NOTICE "Reloading ptd %p/%p... qh %p read: "
1640 - "%d of %zu done: %08x cur: %08x\n", qtd,
1641 - urb, qh, PTD_XFERRED_LENGTH(dw3),
1642 - qtd->length, done_map,
1643 - (1 << queue_entry));
1644
1645 /* RL counter = ERR counter */
1646 dw3 &= ~(0xf << 19);
1647 @@ -1086,6 +1088,11 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
1648 priv_write_copy(priv, (u32 *)&ptd, usb_hcd->regs +
1649 atl_regs, sizeof(ptd));
1650
1651 + priv->atl_queued++;
1652 + if (priv->atl_queued == 2)
1653 + isp1760_writel(INTERRUPT_ENABLE_SOT_MASK,
1654 + usb_hcd->regs + HC_INTERRUPT_ENABLE);
1655 +
1656 buffstatus = isp1760_readl(usb_hcd->regs +
1657 HC_BUFFER_STATUS_REG);
1658 buffstatus |= ATL_BUFFER;
1659 @@ -1191,6 +1198,9 @@ static void do_atl_int(struct usb_hcd *usb_hcd)
1660 skip_map = isp1760_readl(usb_hcd->regs +
1661 HC_ATL_PTD_SKIPMAP_REG);
1662 }
1663 + if (priv->atl_queued <= 1)
1664 + isp1760_writel(INTERRUPT_ENABLE_MASK,
1665 + usb_hcd->regs + HC_INTERRUPT_ENABLE);
1666 }
1667
1668 static void do_intl_int(struct usb_hcd *usb_hcd)
1669 @@ -1770,7 +1780,7 @@ static irqreturn_t isp1760_irq(struct usb_hcd *usb_hcd)
1670 goto leave;
1671
1672 isp1760_writel(imask, usb_hcd->regs + HC_INTERRUPT_REG);
1673 - if (imask & HC_ATL_INT)
1674 + if (imask & (HC_ATL_INT | HC_SOT_INT))
1675 do_atl_int(usb_hcd);
1676
1677 if (imask & HC_INTL_INT)
1678 diff --git a/drivers/usb/host/isp1760-hcd.h b/drivers/usb/host/isp1760-hcd.h
1679 index 6931ef5..612bce5 100644
1680 --- a/drivers/usb/host/isp1760-hcd.h
1681 +++ b/drivers/usb/host/isp1760-hcd.h
1682 @@ -69,6 +69,7 @@ void deinit_kmem_cache(void);
1683
1684 #define HC_INTERRUPT_ENABLE 0x314
1685 #define INTERRUPT_ENABLE_MASK (HC_INTL_INT | HC_ATL_INT | HC_EOT_INT)
1686 +#define INTERRUPT_ENABLE_SOT_MASK (HC_INTL_INT | HC_SOT_INT | HC_EOT_INT)
1687
1688 #define HC_ISO_INT (1 << 9)
1689 #define HC_ATL_INT (1 << 8)
1690 diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
1691 index 3289bf4..d3f0406 100644
1692 --- a/drivers/usb/host/xhci-ring.c
1693 +++ b/drivers/usb/host/xhci-ring.c
1694 @@ -500,15 +500,26 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
1695 state->new_cycle_state = ~(state->new_cycle_state) & 0x1;
1696 next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
1697
1698 + /*
1699 + * If there is only one segment in a ring, find_trb_seg()'s while loop
1700 + * will not run, and it will return before it has a chance to see if it
1701 + * needs to toggle the cycle bit. It can't tell if the stalled transfer
1702 + * ended just before the link TRB on a one-segment ring, or if the TD
1703 + * wrapped around the top of the ring, because it doesn't have the TD in
1704 + * question. Look for the one-segment case where stalled TRB's address
1705 + * is greater than the new dequeue pointer address.
1706 + */
1707 + if (ep_ring->first_seg == ep_ring->first_seg->next &&
1708 + state->new_deq_ptr < dev->eps[ep_index].stopped_trb)
1709 + state->new_cycle_state ^= 0x1;
1710 + xhci_dbg(xhci, "Cycle state = 0x%x\n", state->new_cycle_state);
1711 +
1712 /* Don't update the ring cycle state for the producer (us). */
1713 xhci_dbg(xhci, "New dequeue segment = %p (virtual)\n",
1714 state->new_deq_seg);
1715 addr = xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr);
1716 xhci_dbg(xhci, "New dequeue pointer = 0x%llx (DMA)\n",
1717 (unsigned long long) addr);
1718 - xhci_dbg(xhci, "Setting dequeue pointer in internal ring state.\n");
1719 - ep_ring->dequeue = state->new_deq_ptr;
1720 - ep_ring->deq_seg = state->new_deq_seg;
1721 }
1722
1723 static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
1724 @@ -951,9 +962,26 @@ static void handle_set_deq_completion(struct xhci_hcd *xhci,
1725 } else {
1726 xhci_dbg(xhci, "Successful Set TR Deq Ptr cmd, deq = @%08llx\n",
1727 ep_ctx->deq);
1728 + if (xhci_trb_virt_to_dma(dev->eps[ep_index].queued_deq_seg,
1729 + dev->eps[ep_index].queued_deq_ptr) ==
1730 + (ep_ctx->deq & ~(EP_CTX_CYCLE_MASK))) {
1731 + /* Update the ring's dequeue segment and dequeue pointer
1732 + * to reflect the new position.
1733 + */
1734 + ep_ring->deq_seg = dev->eps[ep_index].queued_deq_seg;
1735 + ep_ring->dequeue = dev->eps[ep_index].queued_deq_ptr;
1736 + } else {
1737 + xhci_warn(xhci, "Mismatch between completed Set TR Deq "
1738 + "Ptr command & xHCI internal state.\n");
1739 + xhci_warn(xhci, "ep deq seg = %p, deq ptr = %p\n",
1740 + dev->eps[ep_index].queued_deq_seg,
1741 + dev->eps[ep_index].queued_deq_ptr);
1742 + }
1743 }
1744
1745 dev->eps[ep_index].ep_state &= ~SET_DEQ_PENDING;
1746 + dev->eps[ep_index].queued_deq_seg = NULL;
1747 + dev->eps[ep_index].queued_deq_ptr = NULL;
1748 /* Restart any rings with pending URBs */
1749 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1750 }
1751 @@ -3229,6 +3257,7 @@ static int queue_set_tr_deq(struct xhci_hcd *xhci, int slot_id,
1752 u32 trb_ep_index = EP_ID_FOR_TRB(ep_index);
1753 u32 trb_stream_id = STREAM_ID_FOR_TRB(stream_id);
1754 u32 type = TRB_TYPE(TRB_SET_DEQ);
1755 + struct xhci_virt_ep *ep;
1756
1757 addr = xhci_trb_virt_to_dma(deq_seg, deq_ptr);
1758 if (addr == 0) {
1759 @@ -3237,6 +3266,14 @@ static int queue_set_tr_deq(struct xhci_hcd *xhci, int slot_id,
1760 deq_seg, deq_ptr);
1761 return 0;
1762 }
1763 + ep = &xhci->devs[slot_id]->eps[ep_index];
1764 + if ((ep->ep_state & SET_DEQ_PENDING)) {
1765 + xhci_warn(xhci, "WARN Cannot submit Set TR Deq Ptr\n");
1766 + xhci_warn(xhci, "A Set TR Deq Ptr command is pending.\n");
1767 + return 0;
1768 + }
1769 + ep->queued_deq_seg = deq_seg;
1770 + ep->queued_deq_ptr = deq_ptr;
1771 return queue_command(xhci, lower_32_bits(addr) | cycle_state,
1772 upper_32_bits(addr), trb_stream_id,
1773 trb_slot_id | trb_ep_index | type, false);
1774 diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
1775 index 7f127df..62bc1bc 100644
1776 --- a/drivers/usb/host/xhci.h
1777 +++ b/drivers/usb/host/xhci.h
1778 @@ -644,6 +644,9 @@ struct xhci_ep_ctx {
1779 #define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff)
1780 #define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16)
1781
1782 +/* deq bitmasks */
1783 +#define EP_CTX_CYCLE_MASK (1 << 0)
1784 +
1785
1786 /**
1787 * struct xhci_input_control_context
1788 @@ -746,6 +749,12 @@ struct xhci_virt_ep {
1789 struct timer_list stop_cmd_timer;
1790 int stop_cmds_pending;
1791 struct xhci_hcd *xhci;
1792 + /* Dequeue pointer and dequeue segment for a submitted Set TR Dequeue
1793 + * command. We'll need to update the ring's dequeue segment and dequeue
1794 + * pointer after the command completes.
1795 + */
1796 + struct xhci_segment *queued_deq_seg;
1797 + union xhci_trb *queued_deq_ptr;
1798 /*
1799 * Sometimes the xHC can not process isochronous endpoint ring quickly
1800 * enough, and it will miss some isoc tds on the ring and generate
1801 diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
1802 index 7b8815d..14ac87e 100644
1803 --- a/drivers/usb/serial/ch341.c
1804 +++ b/drivers/usb/serial/ch341.c
1805 @@ -75,6 +75,7 @@ static int debug;
1806 static const struct usb_device_id id_table[] = {
1807 { USB_DEVICE(0x4348, 0x5523) },
1808 { USB_DEVICE(0x1a86, 0x7523) },
1809 + { USB_DEVICE(0x1a86, 0x5523) },
1810 { },
1811 };
1812 MODULE_DEVICE_TABLE(usb, id_table);
1813 diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
1814 index bd5bd85..b382d9a 100644
1815 --- a/drivers/usb/serial/kobil_sct.c
1816 +++ b/drivers/usb/serial/kobil_sct.c
1817 @@ -372,7 +372,7 @@ static void kobil_read_int_callback(struct urb *urb)
1818 }
1819
1820 tty = tty_port_tty_get(&port->port);
1821 - if (urb->actual_length) {
1822 + if (tty && urb->actual_length) {
1823
1824 /* BEGIN DEBUG */
1825 /*
1826 diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
1827 index 5f46838..75c7f45 100644
1828 --- a/drivers/usb/serial/option.c
1829 +++ b/drivers/usb/serial/option.c
1830 @@ -652,7 +652,8 @@ static const struct usb_device_id option_ids[] = {
1831 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
1832 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
1833 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
1834 - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) },
1835 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff,
1836 + 0xff, 0xff), .driver_info = (kernel_ulong_t)&four_g_w14_blacklist },
1837 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
1838 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
1839 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) },
1840 diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
1841 index 546a521..2ff90a9 100644
1842 --- a/drivers/usb/serial/usb-serial.c
1843 +++ b/drivers/usb/serial/usb-serial.c
1844 @@ -911,9 +911,8 @@ int usb_serial_probe(struct usb_interface *interface,
1845 dev_err(&interface->dev, "No free urbs available\n");
1846 goto probe_error;
1847 }
1848 - buffer_size = serial->type->bulk_in_size;
1849 - if (!buffer_size)
1850 - buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
1851 + buffer_size = max_t(int, serial->type->bulk_in_size,
1852 + le16_to_cpu(endpoint->wMaxPacketSize));
1853 port->bulk_in_size = buffer_size;
1854 port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
1855 port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
1856 diff --git a/fs/dcache.c b/fs/dcache.c
1857 index 611ffe9..a39fe47 100644
1858 --- a/fs/dcache.c
1859 +++ b/fs/dcache.c
1860 @@ -296,8 +296,12 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent)
1861 __releases(parent->d_lock)
1862 __releases(dentry->d_inode->i_lock)
1863 {
1864 - dentry->d_parent = NULL;
1865 list_del(&dentry->d_u.d_child);
1866 + /*
1867 + * Inform try_to_ascend() that we are no longer attached to the
1868 + * dentry tree
1869 + */
1870 + dentry->d_flags |= DCACHE_DISCONNECTED;
1871 if (parent)
1872 spin_unlock(&parent->d_lock);
1873 dentry_iput(dentry);
1874 @@ -1012,6 +1016,35 @@ void shrink_dcache_for_umount(struct super_block *sb)
1875 }
1876
1877 /*
1878 + * This tries to ascend one level of parenthood, but
1879 + * we can race with renaming, so we need to re-check
1880 + * the parenthood after dropping the lock and check
1881 + * that the sequence number still matches.
1882 + */
1883 +static struct dentry *try_to_ascend(struct dentry *old, int locked, unsigned seq)
1884 +{
1885 + struct dentry *new = old->d_parent;
1886 +
1887 + rcu_read_lock();
1888 + spin_unlock(&old->d_lock);
1889 + spin_lock(&new->d_lock);
1890 +
1891 + /*
1892 + * might go back up the wrong parent if we have had a rename
1893 + * or deletion
1894 + */
1895 + if (new != old->d_parent ||
1896 + (old->d_flags & DCACHE_DISCONNECTED) ||
1897 + (!locked && read_seqretry(&rename_lock, seq))) {
1898 + spin_unlock(&new->d_lock);
1899 + new = NULL;
1900 + }
1901 + rcu_read_unlock();
1902 + return new;
1903 +}
1904 +
1905 +
1906 +/*
1907 * Search for at least 1 mount point in the dentry's subdirs.
1908 * We descend to the next level whenever the d_subdirs
1909 * list is non-empty and continue searching.
1910 @@ -1066,24 +1099,10 @@ resume:
1911 * All done at this level ... ascend and resume the search.
1912 */
1913 if (this_parent != parent) {
1914 - struct dentry *tmp;
1915 - struct dentry *child;
1916 -
1917 - tmp = this_parent->d_parent;
1918 - rcu_read_lock();
1919 - spin_unlock(&this_parent->d_lock);
1920 - child = this_parent;
1921 - this_parent = tmp;
1922 - spin_lock(&this_parent->d_lock);
1923 - /* might go back up the wrong parent if we have had a rename
1924 - * or deletion */
1925 - if (this_parent != child->d_parent ||
1926 - (!locked && read_seqretry(&rename_lock, seq))) {
1927 - spin_unlock(&this_parent->d_lock);
1928 - rcu_read_unlock();
1929 + struct dentry *child = this_parent;
1930 + this_parent = try_to_ascend(this_parent, locked, seq);
1931 + if (!this_parent)
1932 goto rename_retry;
1933 - }
1934 - rcu_read_unlock();
1935 next = child->d_u.d_child.next;
1936 goto resume;
1937 }
1938 @@ -1181,24 +1200,10 @@ resume:
1939 * All done at this level ... ascend and resume the search.
1940 */
1941 if (this_parent != parent) {
1942 - struct dentry *tmp;
1943 - struct dentry *child;
1944 -
1945 - tmp = this_parent->d_parent;
1946 - rcu_read_lock();
1947 - spin_unlock(&this_parent->d_lock);
1948 - child = this_parent;
1949 - this_parent = tmp;
1950 - spin_lock(&this_parent->d_lock);
1951 - /* might go back up the wrong parent if we have had a rename
1952 - * or deletion */
1953 - if (this_parent != child->d_parent ||
1954 - (!locked && read_seqretry(&rename_lock, seq))) {
1955 - spin_unlock(&this_parent->d_lock);
1956 - rcu_read_unlock();
1957 + struct dentry *child = this_parent;
1958 + this_parent = try_to_ascend(this_parent, locked, seq);
1959 + if (!this_parent)
1960 goto rename_retry;
1961 - }
1962 - rcu_read_unlock();
1963 next = child->d_u.d_child.next;
1964 goto resume;
1965 }
1966 @@ -2942,28 +2947,14 @@ resume:
1967 spin_unlock(&dentry->d_lock);
1968 }
1969 if (this_parent != root) {
1970 - struct dentry *tmp;
1971 - struct dentry *child;
1972 -
1973 - tmp = this_parent->d_parent;
1974 + struct dentry *child = this_parent;
1975 if (!(this_parent->d_flags & DCACHE_GENOCIDE)) {
1976 this_parent->d_flags |= DCACHE_GENOCIDE;
1977 this_parent->d_count--;
1978 }
1979 - rcu_read_lock();
1980 - spin_unlock(&this_parent->d_lock);
1981 - child = this_parent;
1982 - this_parent = tmp;
1983 - spin_lock(&this_parent->d_lock);
1984 - /* might go back up the wrong parent if we have had a rename
1985 - * or deletion */
1986 - if (this_parent != child->d_parent ||
1987 - (!locked && read_seqretry(&rename_lock, seq))) {
1988 - spin_unlock(&this_parent->d_lock);
1989 - rcu_read_unlock();
1990 + this_parent = try_to_ascend(this_parent, locked, seq);
1991 + if (!this_parent)
1992 goto rename_retry;
1993 - }
1994 - rcu_read_unlock();
1995 next = child->d_u.d_child.next;
1996 goto resume;
1997 }
1998 diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
1999 index b27ba71..75c968e 100644
2000 --- a/fs/ext3/namei.c
2001 +++ b/fs/ext3/namei.c
2002 @@ -1540,8 +1540,8 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
2003 goto cleanup;
2004 node2 = (struct dx_node *)(bh2->b_data);
2005 entries2 = node2->entries;
2006 + memset(&node2->fake, 0, sizeof(struct fake_dirent));
2007 node2->fake.rec_len = ext3_rec_len_to_disk(sb->s_blocksize);
2008 - node2->fake.inode = 0;
2009 BUFFER_TRACE(frame->bh, "get_write_access");
2010 err = ext3_journal_get_write_access(handle, frame->bh);
2011 if (err)
2012 diff --git a/fs/partitions/osf.c b/fs/partitions/osf.c
2013 index be03a0b..764b86a 100644
2014 --- a/fs/partitions/osf.c
2015 +++ b/fs/partitions/osf.c
2016 @@ -10,7 +10,7 @@
2017 #include "check.h"
2018 #include "osf.h"
2019
2020 -#define MAX_OSF_PARTITIONS 8
2021 +#define MAX_OSF_PARTITIONS 18
2022
2023 int osf_partition(struct parsed_partitions *state)
2024 {
2025 diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
2026 index dcd6a7c..ca29e03 100644
2027 --- a/include/linux/ftrace.h
2028 +++ b/include/linux/ftrace.h
2029 @@ -428,6 +428,7 @@ extern void unregister_ftrace_graph(void);
2030
2031 extern void ftrace_graph_init_task(struct task_struct *t);
2032 extern void ftrace_graph_exit_task(struct task_struct *t);
2033 +extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu);
2034
2035 static inline int task_curr_ret_stack(struct task_struct *t)
2036 {
2037 @@ -451,6 +452,7 @@ static inline void unpause_graph_tracing(void)
2038
2039 static inline void ftrace_graph_init_task(struct task_struct *t) { }
2040 static inline void ftrace_graph_exit_task(struct task_struct *t) { }
2041 +static inline void ftrace_graph_init_idle_task(struct task_struct *t, int cpu) { }
2042
2043 static inline int register_ftrace_graph(trace_func_graph_ret_t retfunc,
2044 trace_func_graph_ent_t entryfunc)
2045 diff --git a/include/linux/hid.h b/include/linux/hid.h
2046 index d91c25e..fc5faf6 100644
2047 --- a/include/linux/hid.h
2048 +++ b/include/linux/hid.h
2049 @@ -638,7 +638,7 @@ struct hid_driver {
2050 struct hid_input *hidinput, struct hid_field *field,
2051 struct hid_usage *usage, unsigned long **bit, int *max);
2052 void (*feature_mapping)(struct hid_device *hdev,
2053 - struct hid_input *hidinput, struct hid_field *field,
2054 + struct hid_field *field,
2055 struct hid_usage *usage);
2056 #ifdef CONFIG_PM
2057 int (*suspend)(struct hid_device *hdev, pm_message_t message);
2058 diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
2059 index ab46194..76d896c 100644
2060 --- a/include/linux/usb/ch9.h
2061 +++ b/include/linux/usb/ch9.h
2062 @@ -585,6 +585,8 @@ struct usb_ss_ep_comp_descriptor {
2063 #define USB_DT_SS_EP_COMP_SIZE 6
2064 /* Bits 4:0 of bmAttributes if this is a bulk endpoint */
2065 #define USB_SS_MAX_STREAMS(p) (1 << (p & 0x1f))
2066 +/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
2067 +#define USB_SS_MULT(p) (1 + ((p) & 0x3))
2068
2069 /*-------------------------------------------------------------------------*/
2070
2071 diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
2072 index a854fe8..f21f599 100644
2073 --- a/include/linux/usb/hcd.h
2074 +++ b/include/linux/usb/hcd.h
2075 @@ -99,6 +99,8 @@ struct usb_hcd {
2076 #define HCD_FLAG_POLL_RH 2 /* poll for rh status? */
2077 #define HCD_FLAG_POLL_PENDING 3 /* status has changed? */
2078 #define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */
2079 +#define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */
2080 +#define HCD_FLAG_DEAD 6 /* controller has died? */
2081
2082 /* The flags can be tested using these macros; they are likely to
2083 * be slightly faster than test_bit().
2084 @@ -108,6 +110,8 @@ struct usb_hcd {
2085 #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH))
2086 #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING))
2087 #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))
2088 +#define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING))
2089 +#define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD))
2090
2091 /* Flags that get set only during HCD registration or removal. */
2092 unsigned rh_registered:1;/* is root hub registered? */
2093 diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
2094 index c904913..45f3b9d 100644
2095 --- a/include/linux/usb/serial.h
2096 +++ b/include/linux/usb/serial.h
2097 @@ -191,7 +191,8 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data)
2098 * @id_table: pointer to a list of usb_device_id structures that define all
2099 * of the devices this structure can support.
2100 * @num_ports: the number of different ports this device will have.
2101 - * @bulk_in_size: bytes to allocate for bulk-in buffer (0 = end-point size)
2102 + * @bulk_in_size: minimum number of bytes to allocate for bulk-in buffer
2103 + * (0 = end-point size)
2104 * @bulk_out_size: bytes to allocate for bulk-out buffer (0 = end-point size)
2105 * @calc_num_ports: pointer to a function to determine how many ports this
2106 * device has dynamically. It will be called after the probe()
2107 diff --git a/kernel/perf_event.c b/kernel/perf_event.c
2108 index 656222f..b22a2ef 100644
2109 --- a/kernel/perf_event.c
2110 +++ b/kernel/perf_event.c
2111 @@ -4567,7 +4567,7 @@ static int perf_exclude_event(struct perf_event *event,
2112 struct pt_regs *regs)
2113 {
2114 if (event->hw.state & PERF_HES_STOPPED)
2115 - return 0;
2116 + return 1;
2117
2118 if (regs) {
2119 if (event->attr.exclude_user && user_mode(regs))
2120 @@ -4923,6 +4923,8 @@ static int perf_tp_event_match(struct perf_event *event,
2121 struct perf_sample_data *data,
2122 struct pt_regs *regs)
2123 {
2124 + if (event->hw.state & PERF_HES_STOPPED)
2125 + return 0;
2126 /*
2127 * All tracepoints are from kernel-space.
2128 */
2129 diff --git a/kernel/sched.c b/kernel/sched.c
2130 index 42eab5a..c164920 100644
2131 --- a/kernel/sched.c
2132 +++ b/kernel/sched.c
2133 @@ -5572,7 +5572,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
2134 * The idle tasks have their own, simple scheduling class:
2135 */
2136 idle->sched_class = &idle_sched_class;
2137 - ftrace_graph_init_task(idle);
2138 + ftrace_graph_init_idle_task(idle, cpu);
2139 }
2140
2141 /*
2142 diff --git a/kernel/smp.c b/kernel/smp.c
2143 index 9910744..9545489 100644
2144 --- a/kernel/smp.c
2145 +++ b/kernel/smp.c
2146 @@ -450,7 +450,7 @@ void smp_call_function_many(const struct cpumask *mask,
2147 {
2148 struct call_function_data *data;
2149 unsigned long flags;
2150 - int cpu, next_cpu, this_cpu = smp_processor_id();
2151 + int refs, cpu, next_cpu, this_cpu = smp_processor_id();
2152
2153 /*
2154 * Can deadlock when called with interrupts disabled.
2155 @@ -461,7 +461,7 @@ void smp_call_function_many(const struct cpumask *mask,
2156 WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled()
2157 && !oops_in_progress && !early_boot_irqs_disabled);
2158
2159 - /* So, what's a CPU they want? Ignoring this one. */
2160 + /* Try to fastpath. So, what's a CPU they want? Ignoring this one. */
2161 cpu = cpumask_first_and(mask, cpu_online_mask);
2162 if (cpu == this_cpu)
2163 cpu = cpumask_next_and(cpu, mask, cpu_online_mask);
2164 @@ -483,22 +483,49 @@ void smp_call_function_many(const struct cpumask *mask,
2165
2166 data = &__get_cpu_var(cfd_data);
2167 csd_lock(&data->csd);
2168 +
2169 + /* This BUG_ON verifies our reuse assertions and can be removed */
2170 BUG_ON(atomic_read(&data->refs) || !cpumask_empty(data->cpumask));
2171
2172 + /*
2173 + * The global call function queue list add and delete are protected
2174 + * by a lock, but the list is traversed without any lock, relying
2175 + * on the rcu list add and delete to allow safe concurrent traversal.
2176 + * We reuse the call function data without waiting for any grace
2177 + * period after some other cpu removes it from the global queue.
2178 + * This means a cpu might find our data block as it is being
2179 + * filled out.
2180 + *
2181 + * We hold off the interrupt handler on the other cpu by
2182 + * ordering our writes to the cpu mask vs our setting of the
2183 + * refs counter. We assert only the cpu owning the data block
2184 + * will set a bit in cpumask, and each bit will only be cleared
2185 + * by the subject cpu. Each cpu must first find its bit is
2186 + * set and then check that refs is set indicating the element is
2187 + * ready to be processed, otherwise it must skip the entry.
2188 + *
2189 + * On the previous iteration refs was set to 0 by another cpu.
2190 + * To avoid the use of transitivity, set the counter to 0 here
2191 + * so the wmb will pair with the rmb in the interrupt handler.
2192 + */
2193 + atomic_set(&data->refs, 0); /* convert 3rd to 1st party write */
2194 +
2195 data->csd.func = func;
2196 data->csd.info = info;
2197 - cpumask_and(data->cpumask, mask, cpu_online_mask);
2198 - cpumask_clear_cpu(this_cpu, data->cpumask);
2199
2200 - /*
2201 - * To ensure the interrupt handler gets an complete view
2202 - * we order the cpumask and refs writes and order the read
2203 - * of them in the interrupt handler. In addition we may
2204 - * only clear our own cpu bit from the mask.
2205 - */
2206 + /* Ensure 0 refs is visible before mask. Also orders func and info */
2207 smp_wmb();
2208
2209 - atomic_set(&data->refs, cpumask_weight(data->cpumask));
2210 + /* We rely on the "and" being processed before the store */
2211 + cpumask_and(data->cpumask, mask, cpu_online_mask);
2212 + cpumask_clear_cpu(this_cpu, data->cpumask);
2213 + refs = cpumask_weight(data->cpumask);
2214 +
2215 + /* Some callers race with other cpus changing the passed mask */
2216 + if (unlikely(!refs)) {
2217 + csd_unlock(&data->csd);
2218 + return;
2219 + }
2220
2221 raw_spin_lock_irqsave(&call_function.lock, flags);
2222 /*
2223 @@ -507,6 +534,12 @@ void smp_call_function_many(const struct cpumask *mask,
2224 * will not miss any other list entries:
2225 */
2226 list_add_rcu(&data->csd.list, &call_function.queue);
2227 + /*
2228 + * We rely on the wmb() in list_add_rcu to complete our writes
2229 + * to the cpumask before this write to refs, which indicates
2230 + * data is on the list and is ready to be processed.
2231 + */
2232 + atomic_set(&data->refs, refs);
2233 raw_spin_unlock_irqrestore(&call_function.lock, flags);
2234
2235 /*
2236 diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
2237 index f3dadae..888b611 100644
2238 --- a/kernel/trace/ftrace.c
2239 +++ b/kernel/trace/ftrace.c
2240 @@ -3328,7 +3328,7 @@ static int start_graph_tracing(void)
2241 /* The cpu_boot init_task->ret_stack will never be freed */
2242 for_each_online_cpu(cpu) {
2243 if (!idle_task(cpu)->ret_stack)
2244 - ftrace_graph_init_task(idle_task(cpu));
2245 + ftrace_graph_init_idle_task(idle_task(cpu), cpu);
2246 }
2247
2248 do {
2249 @@ -3418,6 +3418,49 @@ void unregister_ftrace_graph(void)
2250 mutex_unlock(&ftrace_lock);
2251 }
2252
2253 +static DEFINE_PER_CPU(struct ftrace_ret_stack *, idle_ret_stack);
2254 +
2255 +static void
2256 +graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
2257 +{
2258 + atomic_set(&t->tracing_graph_pause, 0);
2259 + atomic_set(&t->trace_overrun, 0);
2260 + t->ftrace_timestamp = 0;
2261 + /* make curr_ret_stack visable before we add the ret_stack */
2262 + smp_wmb();
2263 + t->ret_stack = ret_stack;
2264 +}
2265 +
2266 +/*
2267 + * Allocate a return stack for the idle task. May be the first
2268 + * time through, or it may be done by CPU hotplug online.
2269 + */
2270 +void ftrace_graph_init_idle_task(struct task_struct *t, int cpu)
2271 +{
2272 + t->curr_ret_stack = -1;
2273 + /*
2274 + * The idle task has no parent, it either has its own
2275 + * stack or no stack at all.
2276 + */
2277 + if (t->ret_stack)
2278 + WARN_ON(t->ret_stack != per_cpu(idle_ret_stack, cpu));
2279 +
2280 + if (ftrace_graph_active) {
2281 + struct ftrace_ret_stack *ret_stack;
2282 +
2283 + ret_stack = per_cpu(idle_ret_stack, cpu);
2284 + if (!ret_stack) {
2285 + ret_stack = kmalloc(FTRACE_RETFUNC_DEPTH
2286 + * sizeof(struct ftrace_ret_stack),
2287 + GFP_KERNEL);
2288 + if (!ret_stack)
2289 + return;
2290 + per_cpu(idle_ret_stack, cpu) = ret_stack;
2291 + }
2292 + graph_init_task(t, ret_stack);
2293 + }
2294 +}
2295 +
2296 /* Allocate a return stack for newly created task */
2297 void ftrace_graph_init_task(struct task_struct *t)
2298 {
2299 @@ -3433,12 +3476,7 @@ void ftrace_graph_init_task(struct task_struct *t)
2300 GFP_KERNEL);
2301 if (!ret_stack)
2302 return;
2303 - atomic_set(&t->tracing_graph_pause, 0);
2304 - atomic_set(&t->trace_overrun, 0);
2305 - t->ftrace_timestamp = 0;
2306 - /* make curr_ret_stack visable before we add the ret_stack */
2307 - smp_wmb();
2308 - t->ret_stack = ret_stack;
2309 + graph_init_task(t, ret_stack);
2310 }
2311 }
2312
2313 diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
2314 index 57d344c..35d046b 100644
2315 --- a/net/sunrpc/clnt.c
2316 +++ b/net/sunrpc/clnt.c
2317 @@ -436,7 +436,9 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
2318 if (!(rovr->tk_flags & RPC_TASK_KILLED)) {
2319 rovr->tk_flags |= RPC_TASK_KILLED;
2320 rpc_exit(rovr, -EIO);
2321 - rpc_wake_up_queued_task(rovr->tk_waitqueue, rovr);
2322 + if (RPC_IS_QUEUED(rovr))
2323 + rpc_wake_up_queued_task(rovr->tk_waitqueue,
2324 + rovr);
2325 }
2326 }
2327 spin_unlock(&clnt->cl_lock);
2328 diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
2329 index 59e5994..17c3e3a 100644
2330 --- a/net/sunrpc/sched.c
2331 +++ b/net/sunrpc/sched.c
2332 @@ -637,14 +637,12 @@ static void __rpc_execute(struct rpc_task *task)
2333 save_callback = task->tk_callback;
2334 task->tk_callback = NULL;
2335 save_callback(task);
2336 - }
2337 -
2338 - /*
2339 - * Perform the next FSM step.
2340 - * tk_action may be NULL when the task has been killed
2341 - * by someone else.
2342 - */
2343 - if (!RPC_IS_QUEUED(task)) {
2344 + } else {
2345 + /*
2346 + * Perform the next FSM step.
2347 + * tk_action may be NULL when the task has been killed
2348 + * by someone else.
2349 + */
2350 if (task->tk_action == NULL)
2351 break;
2352 task->tk_action(task);
2353 diff --git a/security/tomoyo/file.c b/security/tomoyo/file.c
2354 index 9d32f18..cb09f1f 100644
2355 --- a/security/tomoyo/file.c
2356 +++ b/security/tomoyo/file.c
2357 @@ -927,7 +927,7 @@ int tomoyo_check_open_permission(struct tomoyo_domain_info *domain,
2358 struct path *path, const int flag)
2359 {
2360 const u8 acc_mode = ACC_MODE(flag);
2361 - int error = -ENOMEM;
2362 + int error = 0;
2363 struct tomoyo_path_info buf;
2364 struct tomoyo_request_info r;
2365 int idx;
2366 @@ -938,9 +938,6 @@ int tomoyo_check_open_permission(struct tomoyo_domain_info *domain,
2367 buf.name = NULL;
2368 r.mode = TOMOYO_CONFIG_DISABLED;
2369 idx = tomoyo_read_lock();
2370 - if (!tomoyo_get_realpath(&buf, path))
2371 - goto out;
2372 - error = 0;
2373 /*
2374 * If the filename is specified by "deny_rewrite" keyword,
2375 * we need to check "allow_rewrite" permission when the filename is not
2376 diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
2377 index 12b44b0..a0da775 100644
2378 --- a/sound/drivers/aloop.c
2379 +++ b/sound/drivers/aloop.c
2380 @@ -482,8 +482,9 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable)
2381 cable->streams[SNDRV_PCM_STREAM_CAPTURE];
2382 unsigned long delta_play = 0, delta_capt = 0;
2383 unsigned int running;
2384 + unsigned long flags;
2385
2386 - spin_lock(&cable->lock);
2387 + spin_lock_irqsave(&cable->lock, flags);
2388 running = cable->running ^ cable->pause;
2389 if (running & (1 << SNDRV_PCM_STREAM_PLAYBACK)) {
2390 delta_play = jiffies - dpcm_play->last_jiffies;
2391 @@ -495,10 +496,8 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable)
2392 dpcm_capt->last_jiffies += delta_capt;
2393 }
2394
2395 - if (delta_play == 0 && delta_capt == 0) {
2396 - spin_unlock(&cable->lock);
2397 - return running;
2398 - }
2399 + if (delta_play == 0 && delta_capt == 0)
2400 + goto unlock;
2401
2402 if (delta_play > delta_capt) {
2403 loopback_bytepos_update(dpcm_play, delta_play - delta_capt,
2404 @@ -510,14 +509,14 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable)
2405 delta_capt = delta_play;
2406 }
2407
2408 - if (delta_play == 0 && delta_capt == 0) {
2409 - spin_unlock(&cable->lock);
2410 - return running;
2411 - }
2412 + if (delta_play == 0 && delta_capt == 0)
2413 + goto unlock;
2414 +
2415 /* note delta_capt == delta_play at this moment */
2416 loopback_bytepos_update(dpcm_capt, delta_capt, BYTEPOS_UPDATE_COPY);
2417 loopback_bytepos_update(dpcm_play, delta_play, BYTEPOS_UPDATE_POSONLY);
2418 - spin_unlock(&cable->lock);
2419 + unlock:
2420 + spin_unlock_irqrestore(&cable->lock, flags);
2421 return running;
2422 }
2423
2424 diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
2425 index 22dbd91..448dd01 100644
2426 --- a/sound/pci/asihpi/hpioctl.c
2427 +++ b/sound/pci/asihpi/hpioctl.c
2428 @@ -155,6 +155,11 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2429 goto out;
2430 }
2431
2432 + if (hm->h.adapter_index >= HPI_MAX_ADAPTERS) {
2433 + err = -EINVAL;
2434 + goto out;
2435 + }
2436 +
2437 pa = &adapters[hm->h.adapter_index];
2438 hr->h.size = 0;
2439 if (hm->h.object == HPI_OBJ_SUBSYSTEM) {
2440 diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
2441 index 1bff80c..b932154 100644
2442 --- a/sound/pci/ctxfi/ctatc.c
2443 +++ b/sound/pci/ctxfi/ctatc.c
2444 @@ -869,7 +869,7 @@ spdif_passthru_playback_setup(struct ct_atc *atc, struct ct_atc_pcm *apcm)
2445 mutex_lock(&atc->atc_mutex);
2446 dao->ops->get_spos(dao, &status);
2447 if (((status >> 24) & IEC958_AES3_CON_FS) != iec958_con_fs) {
2448 - status &= ((~IEC958_AES3_CON_FS) << 24);
2449 + status &= ~(IEC958_AES3_CON_FS << 24);
2450 status |= (iec958_con_fs << 24);
2451 dao->ops->set_spos(dao, status);
2452 dao->ops->commit_write(dao);
2453 diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c
2454 index af56eb9..47d9ea9 100644
2455 --- a/sound/pci/ctxfi/ctdaio.c
2456 +++ b/sound/pci/ctxfi/ctdaio.c
2457 @@ -176,6 +176,7 @@ static int dao_set_left_input(struct dao *dao, struct rsc *input)
2458 if (!entry)
2459 return -ENOMEM;
2460
2461 + dao->ops->clear_left_input(dao);
2462 /* Program master and conjugate resources */
2463 input->ops->master(input);
2464 daio->rscl.ops->master(&daio->rscl);
2465 @@ -204,6 +205,7 @@ static int dao_set_right_input(struct dao *dao, struct rsc *input)
2466 if (!entry)
2467 return -ENOMEM;
2468
2469 + dao->ops->clear_right_input(dao);
2470 /* Program master and conjugate resources */
2471 input->ops->master(input);
2472 daio->rscr.ops->master(&daio->rscr);
2473 diff --git a/sound/pci/ctxfi/ctmixer.c b/sound/pci/ctxfi/ctmixer.c
2474 index 15c1e72..c3519ff 100644
2475 --- a/sound/pci/ctxfi/ctmixer.c
2476 +++ b/sound/pci/ctxfi/ctmixer.c
2477 @@ -566,19 +566,6 @@ static int ct_spdif_get_mask(struct snd_kcontrol *kcontrol,
2478 return 0;
2479 }
2480
2481 -static int ct_spdif_default_get(struct snd_kcontrol *kcontrol,
2482 - struct snd_ctl_elem_value *ucontrol)
2483 -{
2484 - unsigned int status = SNDRV_PCM_DEFAULT_CON_SPDIF;
2485 -
2486 - ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
2487 - ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
2488 - ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
2489 - ucontrol->value.iec958.status[3] = (status >> 24) & 0xff;
2490 -
2491 - return 0;
2492 -}
2493 -
2494 static int ct_spdif_get(struct snd_kcontrol *kcontrol,
2495 struct snd_ctl_elem_value *ucontrol)
2496 {
2497 @@ -586,6 +573,10 @@ static int ct_spdif_get(struct snd_kcontrol *kcontrol,
2498 unsigned int status;
2499
2500 atc->spdif_out_get_status(atc, &status);
2501 +
2502 + if (status == 0)
2503 + status = SNDRV_PCM_DEFAULT_CON_SPDIF;
2504 +
2505 ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
2506 ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
2507 ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
2508 @@ -629,7 +620,7 @@ static struct snd_kcontrol_new iec958_default_ctl = {
2509 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
2510 .count = 1,
2511 .info = ct_spdif_info,
2512 - .get = ct_spdif_default_get,
2513 + .get = ct_spdif_get,
2514 .put = ct_spdif_put,
2515 .private_value = MIXER_IEC958_DEFAULT
2516 };
2517 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
2518 index 4261bb8..acd2099 100644
2519 --- a/sound/pci/hda/patch_realtek.c
2520 +++ b/sound/pci/hda/patch_realtek.c
2521 @@ -394,6 +394,7 @@ struct alc_spec {
2522 /* other flags */
2523 unsigned int no_analog :1; /* digital I/O only */
2524 unsigned int dual_adc_switch:1; /* switch ADCs (for ALC275) */
2525 + unsigned int single_input_src:1;
2526 int init_amp;
2527 int codec_variant; /* flag for other variants */
2528
2529 @@ -3919,6 +3920,8 @@ static struct hda_amp_list alc880_lg_loopbacks[] = {
2530 * Common callbacks
2531 */
2532
2533 +static void alc_init_special_input_src(struct hda_codec *codec);
2534 +
2535 static int alc_init(struct hda_codec *codec)
2536 {
2537 struct alc_spec *spec = codec->spec;
2538 @@ -3929,6 +3932,7 @@ static int alc_init(struct hda_codec *codec)
2539
2540 for (i = 0; i < spec->num_init_verbs; i++)
2541 snd_hda_sequence_write(codec, spec->init_verbs[i]);
2542 + alc_init_special_input_src(codec);
2543
2544 if (spec->init_hook)
2545 spec->init_hook(codec);
2546 @@ -5151,7 +5155,9 @@ static const char *alc_get_line_out_pfx(const struct auto_pin_cfg *cfg,
2547
2548 switch (cfg->line_out_type) {
2549 case AUTO_PIN_SPEAKER_OUT:
2550 - return "Speaker";
2551 + if (cfg->line_outs == 1)
2552 + return "Speaker";
2553 + break;
2554 case AUTO_PIN_HP_OUT:
2555 return "Headphone";
2556 default:
2557 @@ -5205,16 +5211,19 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec,
2558 return err;
2559 } else {
2560 const char *name = pfx;
2561 - if (!name)
2562 + int index = i;
2563 + if (!name) {
2564 name = chname[i];
2565 + index = 0;
2566 + }
2567 err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL,
2568 - name, i,
2569 + name, index,
2570 HDA_COMPOSE_AMP_VAL(nid, 3, 0,
2571 HDA_OUTPUT));
2572 if (err < 0)
2573 return err;
2574 err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE,
2575 - name, i,
2576 + name, index,
2577 HDA_COMPOSE_AMP_VAL(nid, 3, 2,
2578 HDA_INPUT));
2579 if (err < 0)
2580 @@ -5585,6 +5594,7 @@ static void fixup_single_adc(struct hda_codec *codec)
2581 spec->capsrc_nids += i;
2582 spec->adc_nids += i;
2583 spec->num_adc_nids = 1;
2584 + spec->single_input_src = 1;
2585 }
2586 }
2587
2588 @@ -5596,6 +5606,16 @@ static void fixup_dual_adc_switch(struct hda_codec *codec)
2589 init_capsrc_for_pin(codec, spec->int_mic.pin);
2590 }
2591
2592 +/* initialize some special cases for input sources */
2593 +static void alc_init_special_input_src(struct hda_codec *codec)
2594 +{
2595 + struct alc_spec *spec = codec->spec;
2596 + if (spec->dual_adc_switch)
2597 + fixup_dual_adc_switch(codec);
2598 + else if (spec->single_input_src)
2599 + init_capsrc_for_pin(codec, spec->autocfg.inputs[0].pin);
2600 +}
2601 +
2602 static void set_capture_mixer(struct hda_codec *codec)
2603 {
2604 struct alc_spec *spec = codec->spec;
2605 @@ -5611,7 +5631,7 @@ static void set_capture_mixer(struct hda_codec *codec)
2606 int mux = 0;
2607 int num_adcs = spec->num_adc_nids;
2608 if (spec->dual_adc_switch)
2609 - fixup_dual_adc_switch(codec);
2610 + num_adcs = 1;
2611 else if (spec->auto_mic)
2612 fixup_automic_adc(codec);
2613 else if (spec->input_mux) {
2614 @@ -5620,8 +5640,6 @@ static void set_capture_mixer(struct hda_codec *codec)
2615 else if (spec->input_mux->num_items == 1)
2616 fixup_single_adc(codec);
2617 }
2618 - if (spec->dual_adc_switch)
2619 - num_adcs = 1;
2620 spec->cap_mixer = caps[mux][num_adcs - 1];
2621 }
2622 }
2623 @@ -10748,6 +10766,7 @@ static struct alc_config_preset alc882_presets[] = {
2624 */
2625 enum {
2626 PINFIX_ABIT_AW9D_MAX,
2627 + PINFIX_LENOVO_Y530,
2628 PINFIX_PB_M5210,
2629 PINFIX_ACER_ASPIRE_7736,
2630 };
2631 @@ -10762,6 +10781,14 @@ static const struct alc_fixup alc882_fixups[] = {
2632 { }
2633 }
2634 },
2635 + [PINFIX_LENOVO_Y530] = {
2636 + .type = ALC_FIXUP_PINS,
2637 + .v.pins = (const struct alc_pincfg[]) {
2638 + { 0x15, 0x99130112 }, /* rear int speakers */
2639 + { 0x16, 0x99130111 }, /* subwoofer */
2640 + { }
2641 + }
2642 + },
2643 [PINFIX_PB_M5210] = {
2644 .type = ALC_FIXUP_VERBS,
2645 .v.verbs = (const struct hda_verb[]) {
2646 @@ -10777,6 +10804,7 @@ static const struct alc_fixup alc882_fixups[] = {
2647
2648 static struct snd_pci_quirk alc882_fixup_tbl[] = {
2649 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", PINFIX_PB_M5210),
2650 + SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", PINFIX_LENOVO_Y530),
2651 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX),
2652 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", PINFIX_ACER_ASPIRE_7736),
2653 {}
2654 @@ -10829,23 +10857,28 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
2655 hda_nid_t pin, dac;
2656 int i;
2657
2658 - for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
2659 - pin = spec->autocfg.hp_pins[i];
2660 - if (!pin)
2661 - break;
2662 - dac = spec->multiout.hp_nid;
2663 - if (!dac)
2664 - dac = spec->multiout.dac_nids[0]; /* to front */
2665 - alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
2666 + if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
2667 + for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
2668 + pin = spec->autocfg.hp_pins[i];
2669 + if (!pin)
2670 + break;
2671 + dac = spec->multiout.hp_nid;
2672 + if (!dac)
2673 + dac = spec->multiout.dac_nids[0]; /* to front */
2674 + alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
2675 + }
2676 }
2677 - for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
2678 - pin = spec->autocfg.speaker_pins[i];
2679 - if (!pin)
2680 - break;
2681 - dac = spec->multiout.extra_out_nid[0];
2682 - if (!dac)
2683 - dac = spec->multiout.dac_nids[0]; /* to front */
2684 - alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
2685 +
2686 + if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
2687 + for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
2688 + pin = spec->autocfg.speaker_pins[i];
2689 + if (!pin)
2690 + break;
2691 + dac = spec->multiout.extra_out_nid[0];
2692 + if (!dac)
2693 + dac = spec->multiout.dac_nids[0]; /* to front */
2694 + alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
2695 + }
2696 }
2697 }
2698
2699 diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
2700 index bd7b123..052062d 100644
2701 --- a/sound/pci/hda/patch_sigmatel.c
2702 +++ b/sound/pci/hda/patch_sigmatel.c
2703 @@ -757,7 +757,7 @@ static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
2704 struct sigmatel_spec *spec = codec->spec;
2705 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
2706 const struct hda_input_mux *imux = spec->input_mux;
2707 - unsigned int idx, prev_idx;
2708 + unsigned int idx, prev_idx, didx;
2709
2710 idx = ucontrol->value.enumerated.item[0];
2711 if (idx >= imux->num_items)
2712 @@ -769,7 +769,8 @@ static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
2713 snd_hda_codec_write_cache(codec, spec->mux_nids[adc_idx], 0,
2714 AC_VERB_SET_CONNECT_SEL,
2715 imux->items[idx].index);
2716 - if (prev_idx >= spec->num_analog_muxes) {
2717 + if (prev_idx >= spec->num_analog_muxes &&
2718 + spec->mux_nids[adc_idx] != spec->dmux_nids[adc_idx]) {
2719 imux = spec->dinput_mux;
2720 /* 0 = analog */
2721 snd_hda_codec_write_cache(codec,
2722 @@ -779,9 +780,13 @@ static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
2723 }
2724 } else {
2725 imux = spec->dinput_mux;
2726 + /* first dimux item is hardcoded to select analog imux,
2727 + * so lets skip it
2728 + */
2729 + didx = idx - spec->num_analog_muxes + 1;
2730 snd_hda_codec_write_cache(codec, spec->dmux_nids[adc_idx], 0,
2731 AC_VERB_SET_CONNECT_SEL,
2732 - imux->items[idx - 1].index);
2733 + imux->items[didx].index);
2734 }
2735 spec->cur_mux[adc_idx] = idx;
2736 return 1;
2737 diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c
2738 index 3ceaef6..838a0d5 100644
2739 --- a/sound/soc/pxa/z2.c
2740 +++ b/sound/soc/pxa/z2.c
2741 @@ -147,7 +147,7 @@ static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd)
2742 snd_soc_dapm_disable_pin(dapm, "LINPUT3");
2743 snd_soc_dapm_disable_pin(dapm, "RINPUT3");
2744 snd_soc_dapm_disable_pin(dapm, "OUT3");
2745 - snd_soc_dapm_disable_pin(dapm, "MONO");
2746 + snd_soc_dapm_disable_pin(dapm, "MONO1");
2747
2748 /* Add z2 specific widgets */
2749 snd_soc_dapm_new_controls(dapm, wm8750_dapm_widgets,
2750 diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
2751 index 97d7656..26d4d3f 100755
2752 --- a/tools/perf/util/PERF-VERSION-GEN
2753 +++ b/tools/perf/util/PERF-VERSION-GEN
2754 @@ -23,10 +23,10 @@ if test -d ../../.git -o -f ../../.git &&
2755 then
2756 VN=$(echo "$VN" | sed -e 's/-/./g');
2757 else
2758 - eval `grep '^VERSION\s*=' ../../Makefile|tr -d ' '`
2759 - eval `grep '^PATCHLEVEL\s*=' ../../Makefile|tr -d ' '`
2760 - eval `grep '^SUBLEVEL\s*=' ../../Makefile|tr -d ' '`
2761 - eval `grep '^EXTRAVERSION\s*=' ../../Makefile|tr -d ' '`
2762 + eval $(grep '^VERSION[[:space:]]*=' ../../Makefile|tr -d ' ')
2763 + eval $(grep '^PATCHLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ')
2764 + eval $(grep '^SUBLEVEL[[:space:]]*=' ../../Makefile|tr -d ' ')
2765 + eval $(grep '^EXTRAVERSION[[:space:]]*=' ../../Makefile|tr -d ' ')
2766
2767 VN="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}"
2768 fi

  ViewVC Help
Powered by ViewVC 1.1.20