Advertisement
Guest User

Untitled

a guest
Jul 6th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 86.43 KB | None | 0 0
  1. diff -Naru linux-2.6.32.41/arch/powerpc/kernel/misc_64.S linux-2.6.32.42/arch/powerpc/kernel/misc_64.S
  2. --- linux-2.6.32.41/arch/powerpc/kernel/misc_64.S 2011-05-24 01:21:22.000000000 +0700
  3. +++ linux-2.6.32.42/arch/powerpc/kernel/misc_64.S 2011-06-24 05:24:26.000000000 +0700
  4. @@ -463,7 +463,8 @@
  5. * wait for the flag to change, indicating this kernel is going away but
  6. * the slave code for the next one is at addresses 0 to 100.
  7. *
  8. - * This is used by all slaves.
  9. + * This is used by all slaves, even those that did not find a matching
  10. + * paca in the secondary startup code.
  11. *
  12. * Physical (hardware) cpu id should be in r3.
  13. */
  14. @@ -472,10 +473,6 @@
  15. 1: mflr r5
  16. addi r5,r5,kexec_flag-1b
  17.  
  18. - li r4,KEXEC_STATE_REAL_MODE
  19. - stb r4,PACAKEXECSTATE(r13)
  20. - SYNC
  21. -
  22. 99: HMT_LOW
  23. #ifdef CONFIG_KEXEC /* use no memory without kexec */
  24. lwz r4,0(r5)
  25. @@ -500,11 +497,17 @@
  26. *
  27. * get phys id from paca
  28. * switch to real mode
  29. + * mark the paca as no longer used
  30. * join other cpus in kexec_wait(phys_id)
  31. */
  32. _GLOBAL(kexec_smp_wait)
  33. lhz r3,PACAHWCPUID(r13)
  34. bl real_mode
  35. +
  36. + li r4,KEXEC_STATE_REAL_MODE
  37. + stb r4,PACAKEXECSTATE(r13)
  38. + SYNC
  39. +
  40. b .kexec_wait
  41.  
  42. /*
  43. diff -Naru linux-2.6.32.41/arch/powerpc/oprofile/op_model_power4.c linux-2.6.32.42/arch/powerpc/oprofile/op_model_power4.c
  44. --- linux-2.6.32.41/arch/powerpc/oprofile/op_model_power4.c 2011-05-24 01:21:22.000000000 +0700
  45. +++ linux-2.6.32.42/arch/powerpc/oprofile/op_model_power4.c 2011-06-24 05:24:26.000000000 +0700
  46. @@ -261,6 +261,28 @@
  47. return is_kernel;
  48. }
  49.  
  50. +static bool pmc_overflow(unsigned long val)
  51. +{
  52. + if ((int)val < 0)
  53. + return true;
  54. +
  55. + /*
  56. + * Events on POWER7 can roll back if a speculative event doesn't
  57. + * eventually complete. Unfortunately in some rare cases they will
  58. + * raise a performance monitor exception. We need to catch this to
  59. + * ensure we reset the PMC. In all cases the PMC will be 256 or less
  60. + * cycles from overflow.
  61. + *
  62. + * We only do this if the first pass fails to find any overflowing
  63. + * PMCs because a user might set a period of less than 256 and we
  64. + * don't want to mistakenly reset them.
  65. + */
  66. + if (__is_processor(PV_POWER7) && ((0x80000000 - val) <= 256))
  67. + return true;
  68. +
  69. + return false;
  70. +}
  71. +
  72. static void power4_handle_interrupt(struct pt_regs *regs,
  73. struct op_counter_config *ctr)
  74. {
  75. @@ -281,7 +303,7 @@
  76.  
  77. for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) {
  78. val = classic_ctr_read(i);
  79. - if (val < 0) {
  80. + if (pmc_overflow(val)) {
  81. if (oprofile_running && ctr[i].enabled) {
  82. oprofile_add_ext_sample(pc, regs, i, is_kernel);
  83. classic_ctr_write(i, reset_value[i]);
  84. diff -Naru linux-2.6.32.41/arch/x86/include/asm/uaccess.h linux-2.6.32.42/arch/x86/include/asm/uaccess.h
  85. --- linux-2.6.32.41/arch/x86/include/asm/uaccess.h 2011-05-24 01:21:22.000000000 +0700
  86. +++ linux-2.6.32.42/arch/x86/include/asm/uaccess.h 2011-06-24 05:24:26.000000000 +0700
  87. @@ -42,7 +42,7 @@
  88. * Returns 0 if the range is valid, nonzero otherwise.
  89. *
  90. * This is equivalent to the following test:
  91. - * (u33)addr + (u33)size >= (u33)current->addr_limit.seg (u65 for x86_64)
  92. + * (u33)addr + (u33)size > (u33)current->addr_limit.seg (u65 for x86_64)
  93. *
  94. * This needs 33-bit (65-bit for x86_64) arithmetic. We have a carry...
  95. */
  96. diff -Naru linux-2.6.32.41/arch/x86/kernel/amd_iommu_init.c linux-2.6.32.42/arch/x86/kernel/amd_iommu_init.c
  97. --- linux-2.6.32.41/arch/x86/kernel/amd_iommu_init.c 2011-05-24 01:21:22.000000000 +0700
  98. +++ linux-2.6.32.42/arch/x86/kernel/amd_iommu_init.c 2011-06-24 05:24:26.000000000 +0700
  99. @@ -640,8 +640,8 @@
  100. {
  101. u8 *p = (u8 *)h;
  102. u8 *end = p, flags = 0;
  103. - u16 dev_i, devid = 0, devid_start = 0, devid_to = 0;
  104. - u32 ext_flags = 0;
  105. + u16 devid = 0, devid_start = 0, devid_to = 0;
  106. + u32 dev_i, ext_flags = 0;
  107. bool alias = false;
  108. struct ivhd_entry *e;
  109.  
  110. @@ -796,7 +796,7 @@
  111. /* Initializes the device->iommu mapping for the driver */
  112. static int __init init_iommu_devices(struct amd_iommu *iommu)
  113. {
  114. - u16 i;
  115. + u32 i;
  116.  
  117. for (i = iommu->first_device; i <= iommu->last_device; ++i)
  118. set_iommu_for_device(iommu, i);
  119. @@ -1068,7 +1068,7 @@
  120. */
  121. static void init_device_table(void)
  122. {
  123. - u16 devid;
  124. + u32 devid;
  125.  
  126. for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) {
  127. set_dev_entry_bit(devid, DEV_ENTRY_VALID);
  128. diff -Naru linux-2.6.32.41/arch/x86/kernel/cpu/amd.c linux-2.6.32.42/arch/x86/kernel/cpu/amd.c
  129. --- linux-2.6.32.41/arch/x86/kernel/cpu/amd.c 2011-05-24 01:21:22.000000000 +0700
  130. +++ linux-2.6.32.42/arch/x86/kernel/cpu/amd.c 2011-06-24 05:24:26.000000000 +0700
  131. @@ -567,8 +567,11 @@
  132. }
  133. #endif
  134.  
  135. - /* As a rule processors have APIC timer running in deep C states */
  136. - if (c->x86 > 0xf && !cpu_has_amd_erratum(amd_erratum_400))
  137. + /*
  138. + * Family 0x12 and above processors have APIC timer
  139. + * running in deep C states.
  140. + */
  141. + if (c->x86 > 0x11)
  142. set_cpu_cap(c, X86_FEATURE_ARAT);
  143.  
  144. /*
  145. @@ -584,10 +587,13 @@
  146. * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012
  147. */
  148. u64 mask;
  149. + int err;
  150.  
  151. - rdmsrl(MSR_AMD64_MCx_MASK(4), mask);
  152. - mask |= (1 << 10);
  153. - wrmsrl(MSR_AMD64_MCx_MASK(4), mask);
  154. + err = rdmsrl_safe(MSR_AMD64_MCx_MASK(4), &mask);
  155. + if (err == 0) {
  156. + mask |= (1 << 10);
  157. + checking_wrmsrl(MSR_AMD64_MCx_MASK(4), mask);
  158. + }
  159. }
  160. }
  161.  
  162. diff -Naru linux-2.6.32.41/arch/x86/kernel/process_32.c linux-2.6.32.42/arch/x86/kernel/process_32.c
  163. --- linux-2.6.32.41/arch/x86/kernel/process_32.c 2011-05-24 01:21:22.000000000 +0700
  164. +++ linux-2.6.32.42/arch/x86/kernel/process_32.c 2011-06-24 05:24:26.000000000 +0700
  165. @@ -298,7 +298,6 @@
  166. {
  167. set_user_gs(regs, 0);
  168. regs->fs = 0;
  169. - set_fs(USER_DS);
  170. regs->ds = __USER_DS;
  171. regs->es = __USER_DS;
  172. regs->ss = __USER_DS;
  173. diff -Naru linux-2.6.32.41/arch/x86/kernel/process_64.c linux-2.6.32.42/arch/x86/kernel/process_64.c
  174. --- linux-2.6.32.41/arch/x86/kernel/process_64.c 2011-05-24 01:21:22.000000000 +0700
  175. +++ linux-2.6.32.42/arch/x86/kernel/process_64.c 2011-06-24 05:24:26.000000000 +0700
  176. @@ -356,7 +356,6 @@
  177. regs->cs = __USER_CS;
  178. regs->ss = __USER_DS;
  179. regs->flags = 0x200;
  180. - set_fs(USER_DS);
  181. /*
  182. * Free the old FP and other extended state
  183. */
  184. diff -Naru linux-2.6.32.41/arch/x86/lib/copy_user_64.S linux-2.6.32.42/arch/x86/lib/copy_user_64.S
  185. --- linux-2.6.32.41/arch/x86/lib/copy_user_64.S 2011-05-24 01:21:22.000000000 +0700
  186. +++ linux-2.6.32.42/arch/x86/lib/copy_user_64.S 2011-06-24 05:24:26.000000000 +0700
  187. @@ -72,7 +72,7 @@
  188. addq %rdx,%rcx
  189. jc bad_to_user
  190. cmpq TI_addr_limit(%rax),%rcx
  191. - jae bad_to_user
  192. + ja bad_to_user
  193. ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
  194. CFI_ENDPROC
  195. ENDPROC(copy_to_user)
  196. @@ -85,7 +85,7 @@
  197. addq %rdx,%rcx
  198. jc bad_from_user
  199. cmpq TI_addr_limit(%rax),%rcx
  200. - jae bad_from_user
  201. + ja bad_from_user
  202. ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
  203. CFI_ENDPROC
  204. ENDPROC(copy_from_user)
  205. diff -Naru linux-2.6.32.41/arch/x86/xen/mmu.c linux-2.6.32.42/arch/x86/xen/mmu.c
  206. --- linux-2.6.32.41/arch/x86/xen/mmu.c 2011-05-24 01:21:22.000000000 +0700
  207. +++ linux-2.6.32.42/arch/x86/xen/mmu.c 2011-06-24 05:24:26.000000000 +0700
  208. @@ -1141,7 +1141,7 @@
  209.  
  210. active_mm = percpu_read(cpu_tlbstate.active_mm);
  211.  
  212. - if (active_mm == mm)
  213. + if (active_mm == mm && percpu_read(cpu_tlbstate.state) != TLBSTATE_OK)
  214. leave_mm(smp_processor_id());
  215.  
  216. /* If this cpu still has a stale cr3 reference, then make sure
  217. diff -Naru linux-2.6.32.41/arch/x86/xen/multicalls.c linux-2.6.32.42/arch/x86/xen/multicalls.c
  218. --- linux-2.6.32.41/arch/x86/xen/multicalls.c 2011-05-24 01:21:22.000000000 +0700
  219. +++ linux-2.6.32.42/arch/x86/xen/multicalls.c 2011-06-24 05:24:26.000000000 +0700
  220. @@ -189,10 +189,10 @@
  221. unsigned argidx = roundup(b->argidx, sizeof(u64));
  222.  
  223. BUG_ON(preemptible());
  224. - BUG_ON(b->argidx > MC_ARGS);
  225. + BUG_ON(b->argidx >= MC_ARGS);
  226.  
  227. if (b->mcidx == MC_BATCH ||
  228. - (argidx + args) > MC_ARGS) {
  229. + (argidx + args) >= MC_ARGS) {
  230. mc_stats_flush(b->mcidx == MC_BATCH ? FL_SLOTS : FL_ARGS);
  231. xen_mc_flush();
  232. argidx = roundup(b->argidx, sizeof(u64));
  233. @@ -206,7 +206,7 @@
  234. ret.args = &b->args[argidx];
  235. b->argidx = argidx + args;
  236.  
  237. - BUG_ON(b->argidx > MC_ARGS);
  238. + BUG_ON(b->argidx >= MC_ARGS);
  239. return ret;
  240. }
  241.  
  242. @@ -216,7 +216,7 @@
  243. struct multicall_space ret = { NULL, NULL };
  244.  
  245. BUG_ON(preemptible());
  246. - BUG_ON(b->argidx > MC_ARGS);
  247. + BUG_ON(b->argidx >= MC_ARGS);
  248.  
  249. if (b->mcidx == 0)
  250. return ret;
  251. @@ -224,14 +224,14 @@
  252. if (b->entries[b->mcidx - 1].op != op)
  253. return ret;
  254.  
  255. - if ((b->argidx + size) > MC_ARGS)
  256. + if ((b->argidx + size) >= MC_ARGS)
  257. return ret;
  258.  
  259. ret.mc = &b->entries[b->mcidx - 1];
  260. ret.args = &b->args[b->argidx];
  261. b->argidx += size;
  262.  
  263. - BUG_ON(b->argidx > MC_ARGS);
  264. + BUG_ON(b->argidx >= MC_ARGS);
  265. return ret;
  266. }
  267.  
  268. diff -Naru linux-2.6.32.41/block/blk.h linux-2.6.32.42/block/blk.h
  269. --- linux-2.6.32.41/block/blk.h 2011-05-24 01:21:22.000000000 +0700
  270. +++ linux-2.6.32.42/block/blk.h 2011-06-24 05:24:26.000000000 +0700
  271. @@ -62,7 +62,8 @@
  272. return rq;
  273. }
  274.  
  275. - if (!q->elevator->ops->elevator_dispatch_fn(q, 0))
  276. + if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags) ||
  277. + !q->elevator->ops->elevator_dispatch_fn(q, 0))
  278. return NULL;
  279. }
  280. }
  281. diff -Naru linux-2.6.32.41/drivers/acpi/scan.c linux-2.6.32.42/drivers/acpi/scan.c
  282. --- linux-2.6.32.41/drivers/acpi/scan.c 2011-05-24 01:21:22.000000000 +0700
  283. +++ linux-2.6.32.42/drivers/acpi/scan.c 2011-06-24 05:24:26.000000000 +0700
  284. @@ -1026,12 +1026,6 @@
  285. if (ACPI_IS_ROOT_DEVICE(device)) {
  286. acpi_add_id(device, ACPI_SYSTEM_HID);
  287. break;
  288. - } else if (ACPI_IS_ROOT_DEVICE(device->parent)) {
  289. - /* \_SB_, the only root-level namespace device */
  290. - acpi_add_id(device, ACPI_BUS_HID);
  291. - strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
  292. - strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
  293. - break;
  294. }
  295.  
  296. status = acpi_get_object_info(device->handle, &info);
  297. @@ -1064,6 +1058,12 @@
  298. acpi_add_id(device, ACPI_BAY_HID);
  299. else if (ACPI_SUCCESS(acpi_dock_match(device)))
  300. acpi_add_id(device, ACPI_DOCK_HID);
  301. + else if (!acpi_device_hid(device) &&
  302. + ACPI_IS_ROOT_DEVICE(device->parent)) {
  303. + acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */
  304. + strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
  305. + strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
  306. + }
  307.  
  308. break;
  309. case ACPI_BUS_TYPE_POWER:
  310. diff -Naru linux-2.6.32.41/drivers/ata/pata_cmd64x.c linux-2.6.32.42/drivers/ata/pata_cmd64x.c
  311. --- linux-2.6.32.41/drivers/ata/pata_cmd64x.c 2011-05-24 01:21:22.000000000 +0700
  312. +++ linux-2.6.32.42/drivers/ata/pata_cmd64x.c 2011-06-24 05:24:26.000000000 +0700
  313. @@ -2,6 +2,7 @@
  314. * pata_cmd64x.c - CMD64x PATA for new ATA layer
  315. * (C) 2005 Red Hat Inc
  316. * Alan Cox <alan@lxorguk.ukuu.org.uk>
  317. + * (C) 2009-2010 Bartlomiej Zolnierkiewicz
  318. *
  319. * Based upon
  320. * linux/drivers/ide/pci/cmd64x.c Version 1.30 Sept 10, 2002
  321. @@ -39,11 +40,10 @@
  322.  
  323. enum {
  324. CFR = 0x50,
  325. - CFR_INTR_CH0 = 0x02,
  326. - CNTRL = 0x51,
  327. - CNTRL_DIS_RA0 = 0x40,
  328. - CNTRL_DIS_RA1 = 0x80,
  329. - CNTRL_ENA_2ND = 0x08,
  330. + CFR_INTR_CH0 = 0x04,
  331. + CNTRL = 0x51,
  332. + CNTRL_CH0 = 0x04,
  333. + CNTRL_CH1 = 0x08,
  334. CMDTIM = 0x52,
  335. ARTTIM0 = 0x53,
  336. DRWTIM0 = 0x54,
  337. @@ -53,9 +53,6 @@
  338. ARTTIM23_DIS_RA2 = 0x04,
  339. ARTTIM23_DIS_RA3 = 0x08,
  340. ARTTIM23_INTR_CH1 = 0x10,
  341. - ARTTIM2 = 0x57,
  342. - ARTTIM3 = 0x57,
  343. - DRWTIM23 = 0x58,
  344. DRWTIM2 = 0x58,
  345. BRST = 0x59,
  346. DRWTIM3 = 0x5b,
  347. @@ -63,14 +60,11 @@
  348. MRDMODE = 0x71,
  349. MRDMODE_INTR_CH0 = 0x04,
  350. MRDMODE_INTR_CH1 = 0x08,
  351. - MRDMODE_BLK_CH0 = 0x10,
  352. - MRDMODE_BLK_CH1 = 0x20,
  353. BMIDESR0 = 0x72,
  354. UDIDETCR0 = 0x73,
  355. DTPR0 = 0x74,
  356. BMIDECR1 = 0x78,
  357. BMIDECSR = 0x79,
  358. - BMIDESR1 = 0x7A,
  359. UDIDETCR1 = 0x7B,
  360. DTPR1 = 0x7C
  361. };
  362. @@ -147,7 +141,9 @@
  363. /* Now convert the clocks into values we can actually stuff into
  364. the chip */
  365.  
  366. - if (t.recover > 1)
  367. + if (t.recover == 16)
  368. + t.recover = 0;
  369. + else if (t.recover > 1)
  370. t.recover--;
  371. else
  372. t.recover = 15;
  373. @@ -245,7 +241,7 @@
  374. struct pci_dev *pdev = to_pci_dev(ap->host->dev);
  375. u8 dma_intr;
  376. int dma_mask = ap->port_no ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
  377. - int dma_reg = ap->port_no ? ARTTIM2 : CFR;
  378. + int dma_reg = ap->port_no ? ARTTIM23 : CFR;
  379.  
  380. ata_bmdma_stop(qc);
  381.  
  382. @@ -294,8 +290,6 @@
  383.  
  384. static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
  385. {
  386. - u32 class_rev;
  387. -
  388. static const struct ata_port_info cmd_info[6] = {
  389. { /* CMD 643 - no UDMA */
  390. .flags = ATA_FLAG_SLAVE_POSS,
  391. @@ -337,27 +331,41 @@
  392. .port_ops = &cmd648_port_ops
  393. }
  394. };
  395. - const struct ata_port_info *ppi[] = { &cmd_info[id->driver_data], NULL };
  396. - u8 mrdmode;
  397. + const struct ata_port_info *ppi[] = {
  398. + &cmd_info[id->driver_data],
  399. + &cmd_info[id->driver_data],
  400. + NULL
  401. + };
  402. + u8 mrdmode, reg;
  403. int rc;
  404. + struct pci_dev *bridge = pdev->bus->self;
  405. + /* mobility split bridges don't report enabled ports correctly */
  406. + int port_ok = !(bridge && bridge->vendor ==
  407. + PCI_VENDOR_ID_MOBILITY_ELECTRONICS);
  408. + /* all (with exceptions below) apart from 643 have CNTRL_CH0 bit */
  409. + int cntrl_ch0_ok = (id->driver_data != 0);
  410.  
  411. rc = pcim_enable_device(pdev);
  412. if (rc)
  413. return rc;
  414.  
  415. - pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class_rev);
  416. - class_rev &= 0xFF;
  417. -
  418. if (id->driver_data == 0) /* 643 */
  419. ata_pci_bmdma_clear_simplex(pdev);
  420.  
  421. if (pdev->device == PCI_DEVICE_ID_CMD_646) {
  422. /* Does UDMA work ? */
  423. - if (class_rev > 4)
  424. + if (pdev->revision > 4) {
  425. ppi[0] = &cmd_info[2];
  426. + ppi[1] = &cmd_info[2];
  427. + }
  428. /* Early rev with other problems ? */
  429. - else if (class_rev == 1)
  430. + else if (pdev->revision == 1) {
  431. ppi[0] = &cmd_info[3];
  432. + ppi[1] = &cmd_info[3];
  433. + }
  434. + /* revs 1,2 have no CNTRL_CH0 */
  435. + if (pdev->revision < 3)
  436. + cntrl_ch0_ok = 0;
  437. }
  438.  
  439. pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
  440. @@ -366,6 +374,20 @@
  441. mrdmode |= 0x02; /* Memory read line enable */
  442. pci_write_config_byte(pdev, MRDMODE, mrdmode);
  443.  
  444. + /* check for enabled ports */
  445. + pci_read_config_byte(pdev, CNTRL, &reg);
  446. + if (!port_ok)
  447. + dev_printk(KERN_NOTICE, &pdev->dev, "Mobility Bridge detected, ignoring CNTRL port enable/disable\n");
  448. + if (port_ok && cntrl_ch0_ok && !(reg & CNTRL_CH0)) {
  449. + dev_printk(KERN_NOTICE, &pdev->dev, "Primary port is disabled\n");
  450. + ppi[0] = &ata_dummy_port_info;
  451. +
  452. + }
  453. + if (port_ok && !(reg & CNTRL_CH1)) {
  454. + dev_printk(KERN_NOTICE, &pdev->dev, "Secondary port is disabled\n");
  455. + ppi[1] = &ata_dummy_port_info;
  456. + }
  457. +
  458. /* Force PIO 0 here.. */
  459.  
  460. /* PPC specific fixup copied from old driver */
  461. diff -Naru linux-2.6.32.41/drivers/ata/pata_hpt366.c linux-2.6.32.42/drivers/ata/pata_hpt366.c
  462. --- linux-2.6.32.41/drivers/ata/pata_hpt366.c 2011-05-24 01:21:22.000000000 +0700
  463. +++ linux-2.6.32.42/drivers/ata/pata_hpt366.c 2011-06-24 05:24:26.000000000 +0700
  464. @@ -344,7 +344,6 @@
  465. const struct ata_port_info *ppi[] = { &info_hpt366, NULL };
  466.  
  467. void *hpriv = NULL;
  468. - u32 class_rev;
  469. u32 reg1;
  470. int rc;
  471.  
  472. @@ -352,13 +351,10 @@
  473. if (rc)
  474. return rc;
  475.  
  476. - pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
  477. - class_rev &= 0xFF;
  478. -
  479. /* May be a later chip in disguise. Check */
  480. /* Newer chips are not in the HPT36x driver. Ignore them */
  481. - if (class_rev > 2)
  482. - return -ENODEV;
  483. + if (dev->revision > 2)
  484. + return -ENODEV;
  485.  
  486. hpt36x_init_chipset(dev);
  487.  
  488. diff -Naru linux-2.6.32.41/drivers/ata/pata_hpt37x.c linux-2.6.32.42/drivers/ata/pata_hpt37x.c
  489. --- linux-2.6.32.41/drivers/ata/pata_hpt37x.c 2011-05-24 01:21:22.000000000 +0700
  490. +++ linux-2.6.32.42/drivers/ata/pata_hpt37x.c 2011-06-24 05:24:26.000000000 +0700
  491. @@ -789,9 +789,8 @@
  492. static const int MHz[4] = { 33, 40, 50, 66 };
  493. void *private_data = NULL;
  494. const struct ata_port_info *ppi[] = { NULL, NULL };
  495. -
  496. + u8 rev = dev->revision;
  497. u8 irqmask;
  498. - u32 class_rev;
  499. u8 mcr1;
  500. u32 freq;
  501. int prefer_dpll = 1;
  502. @@ -806,19 +805,16 @@
  503. if (rc)
  504. return rc;
  505.  
  506. - pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
  507. - class_rev &= 0xFF;
  508. -
  509. if (dev->device == PCI_DEVICE_ID_TTI_HPT366) {
  510. /* May be a later chip in disguise. Check */
  511. /* Older chips are in the HPT366 driver. Ignore them */
  512. - if (class_rev < 3)
  513. + if (rev < 3)
  514. return -ENODEV;
  515. /* N series chips have their own driver. Ignore */
  516. - if (class_rev == 6)
  517. + if (rev == 6)
  518. return -ENODEV;
  519.  
  520. - switch(class_rev) {
  521. + switch(rev) {
  522. case 3:
  523. ppi[0] = &info_hpt370;
  524. chip_table = &hpt370;
  525. @@ -834,28 +830,29 @@
  526. chip_table = &hpt372;
  527. break;
  528. default:
  529. - printk(KERN_ERR "pata_hpt37x: Unknown HPT366 subtype please report (%d).\n", class_rev);
  530. + printk(KERN_ERR "pata_hpt37x: Unknown HPT366 "
  531. + "subtype, please report (%d).\n", rev);
  532. return -ENODEV;
  533. }
  534. } else {
  535. switch(dev->device) {
  536. case PCI_DEVICE_ID_TTI_HPT372:
  537. /* 372N if rev >= 2*/
  538. - if (class_rev >= 2)
  539. + if (rev >= 2)
  540. return -ENODEV;
  541. ppi[0] = &info_hpt372;
  542. chip_table = &hpt372a;
  543. break;
  544. case PCI_DEVICE_ID_TTI_HPT302:
  545. /* 302N if rev > 1 */
  546. - if (class_rev > 1)
  547. + if (rev > 1)
  548. return -ENODEV;
  549. ppi[0] = &info_hpt372;
  550. /* Check this */
  551. chip_table = &hpt302;
  552. break;
  553. case PCI_DEVICE_ID_TTI_HPT371:
  554. - if (class_rev > 1)
  555. + if (rev > 1)
  556. return -ENODEV;
  557. ppi[0] = &info_hpt372;
  558. chip_table = &hpt371;
  559. diff -Naru linux-2.6.32.41/drivers/ata/pata_hpt3x2n.c linux-2.6.32.42/drivers/ata/pata_hpt3x2n.c
  560. --- linux-2.6.32.41/drivers/ata/pata_hpt3x2n.c 2011-05-24 01:21:22.000000000 +0700
  561. +++ linux-2.6.32.42/drivers/ata/pata_hpt3x2n.c 2011-06-24 05:24:26.000000000 +0700
  562. @@ -452,10 +452,8 @@
  563. .port_ops = &hpt3x2n_port_ops
  564. };
  565. const struct ata_port_info *ppi[] = { &info, NULL };
  566. -
  567. + u8 rev = dev->revision;
  568. u8 irqmask;
  569. - u32 class_rev;
  570. -
  571. unsigned int pci_mhz;
  572. unsigned int f_low, f_high;
  573. int adjust;
  574. @@ -467,26 +465,23 @@
  575. if (rc)
  576. return rc;
  577.  
  578. - pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
  579. - class_rev &= 0xFF;
  580. -
  581. switch(dev->device) {
  582. case PCI_DEVICE_ID_TTI_HPT366:
  583. - if (class_rev < 6)
  584. + if (rev < 6)
  585. return -ENODEV;
  586. break;
  587. case PCI_DEVICE_ID_TTI_HPT371:
  588. - if (class_rev < 2)
  589. + if (rev < 2)
  590. return -ENODEV;
  591. /* 371N if rev > 1 */
  592. break;
  593. case PCI_DEVICE_ID_TTI_HPT372:
  594. /* 372N if rev >= 2*/
  595. - if (class_rev < 2)
  596. + if (rev < 2)
  597. return -ENODEV;
  598. break;
  599. case PCI_DEVICE_ID_TTI_HPT302:
  600. - if (class_rev < 2)
  601. + if (rev < 2)
  602. return -ENODEV;
  603. break;
  604. case PCI_DEVICE_ID_TTI_HPT372N:
  605. diff -Naru linux-2.6.32.41/drivers/ata/pata_sil680.c linux-2.6.32.42/drivers/ata/pata_sil680.c
  606. --- linux-2.6.32.41/drivers/ata/pata_sil680.c 2011-05-24 01:21:22.000000000 +0700
  607. +++ linux-2.6.32.42/drivers/ata/pata_sil680.c 2011-06-24 05:24:26.000000000 +0700
  608. @@ -212,13 +212,11 @@
  609.  
  610. static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio)
  611. {
  612. - u32 class_rev = 0;
  613. u8 tmpbyte = 0;
  614.  
  615. - pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class_rev);
  616. - class_rev &= 0xff;
  617. /* FIXME: double check */
  618. - pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, (class_rev) ? 1 : 255);
  619. + pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE,
  620. + pdev->revision ? 1 : 255);
  621.  
  622. pci_write_config_byte(pdev, 0x80, 0x00);
  623. pci_write_config_byte(pdev, 0x84, 0x00);
  624. diff -Naru linux-2.6.32.41/drivers/block/brd.c linux-2.6.32.42/drivers/block/brd.c
  625. --- linux-2.6.32.41/drivers/block/brd.c 2011-05-24 01:21:22.000000000 +0700
  626. +++ linux-2.6.32.42/drivers/block/brd.c 2011-06-24 05:24:26.000000000 +0700
  627. @@ -498,7 +498,7 @@
  628. struct kobject *kobj;
  629.  
  630. mutex_lock(&brd_devices_mutex);
  631. - brd = brd_init_one(dev & MINORMASK);
  632. + brd = brd_init_one(MINOR(dev) >> part_shift);
  633. kobj = brd ? get_disk(brd->brd_disk) : ERR_PTR(-ENOMEM);
  634. mutex_unlock(&brd_devices_mutex);
  635.  
  636. @@ -531,15 +531,18 @@
  637. if (max_part > 0)
  638. part_shift = fls(max_part);
  639.  
  640. + if ((1UL << part_shift) > DISK_MAX_PARTS)
  641. + return -EINVAL;
  642. +
  643. if (rd_nr > 1UL << (MINORBITS - part_shift))
  644. return -EINVAL;
  645.  
  646. if (rd_nr) {
  647. nr = rd_nr;
  648. - range = rd_nr;
  649. + range = rd_nr << part_shift;
  650. } else {
  651. nr = CONFIG_BLK_DEV_RAM_COUNT;
  652. - range = 1UL << (MINORBITS - part_shift);
  653. + range = 1UL << MINORBITS;
  654. }
  655.  
  656. if (register_blkdev(RAMDISK_MAJOR, "ramdisk"))
  657. @@ -578,7 +581,7 @@
  658. unsigned long range;
  659. struct brd_device *brd, *next;
  660.  
  661. - range = rd_nr ? rd_nr : 1UL << (MINORBITS - part_shift);
  662. + range = rd_nr ? rd_nr << part_shift : 1UL << MINORBITS;
  663.  
  664. list_for_each_entry_safe(brd, next, &brd_devices, brd_list)
  665. brd_del_one(brd);
  666. diff -Naru linux-2.6.32.41/drivers/block/loop.c linux-2.6.32.42/drivers/block/loop.c
  667. --- linux-2.6.32.41/drivers/block/loop.c 2011-05-24 01:21:22.000000000 +0700
  668. +++ linux-2.6.32.42/drivers/block/loop.c 2011-06-24 05:24:26.000000000 +0700
  669. @@ -1572,7 +1572,7 @@
  670. struct kobject *kobj;
  671.  
  672. mutex_lock(&loop_devices_mutex);
  673. - lo = loop_init_one(dev & MINORMASK);
  674. + lo = loop_init_one(MINOR(dev) >> part_shift);
  675. kobj = lo ? get_disk(lo->lo_disk) : ERR_PTR(-ENOMEM);
  676. mutex_unlock(&loop_devices_mutex);
  677.  
  678. @@ -1605,15 +1605,18 @@
  679. if (max_part > 0)
  680. part_shift = fls(max_part);
  681.  
  682. + if ((1UL << part_shift) > DISK_MAX_PARTS)
  683. + return -EINVAL;
  684. +
  685. if (max_loop > 1UL << (MINORBITS - part_shift))
  686. return -EINVAL;
  687.  
  688. if (max_loop) {
  689. nr = max_loop;
  690. - range = max_loop;
  691. + range = max_loop << part_shift;
  692. } else {
  693. nr = 8;
  694. - range = 1UL << (MINORBITS - part_shift);
  695. + range = 1UL << MINORBITS;
  696. }
  697.  
  698. if (register_blkdev(LOOP_MAJOR, "loop"))
  699. @@ -1652,7 +1655,7 @@
  700. unsigned long range;
  701. struct loop_device *lo, *next;
  702.  
  703. - range = max_loop ? max_loop : 1UL << (MINORBITS - part_shift);
  704. + range = max_loop ? max_loop << part_shift : 1UL << MINORBITS;
  705.  
  706. list_for_each_entry_safe(lo, next, &loop_devices, lo_list)
  707. loop_del_one(lo);
  708. diff -Naru linux-2.6.32.41/drivers/block/nbd.c linux-2.6.32.42/drivers/block/nbd.c
  709. --- linux-2.6.32.41/drivers/block/nbd.c 2011-05-24 01:21:22.000000000 +0700
  710. +++ linux-2.6.32.42/drivers/block/nbd.c 2011-06-24 05:24:26.000000000 +0700
  711. @@ -754,6 +754,12 @@
  712. if (max_part > 0)
  713. part_shift = fls(max_part);
  714.  
  715. + if ((1UL << part_shift) > DISK_MAX_PARTS)
  716. + return -EINVAL;
  717. +
  718. + if (nbds_max > 1UL << (MINORBITS - part_shift))
  719. + return -EINVAL;
  720. +
  721. for (i = 0; i < nbds_max; i++) {
  722. struct gendisk *disk = alloc_disk(1 << part_shift);
  723. if (!disk)
  724. diff -Naru linux-2.6.32.41/drivers/char/i8k.c linux-2.6.32.42/drivers/char/i8k.c
  725. --- linux-2.6.32.41/drivers/char/i8k.c 2011-05-24 01:21:22.000000000 +0700
  726. +++ linux-2.6.32.42/drivers/char/i8k.c 2011-06-24 05:24:26.000000000 +0700
  727. @@ -138,8 +138,8 @@
  728. "movl %%edi,20(%%rax)\n\t"
  729. "popq %%rdx\n\t"
  730. "movl %%edx,0(%%rax)\n\t"
  731. - "lahf\n\t"
  732. - "shrl $8,%%eax\n\t"
  733. + "pushfq\n\t"
  734. + "popq %%rax\n\t"
  735. "andl $1,%%eax\n"
  736. :"=a"(rc)
  737. : "a"(regs)
  738. diff -Naru linux-2.6.32.41/drivers/cpufreq/cpufreq.c linux-2.6.32.42/drivers/cpufreq/cpufreq.c
  739. --- linux-2.6.32.41/drivers/cpufreq/cpufreq.c 2011-05-24 01:21:22.000000000 +0700
  740. +++ linux-2.6.32.42/drivers/cpufreq/cpufreq.c 2011-06-24 05:24:26.000000000 +0700
  741. @@ -1183,12 +1183,28 @@
  742.  
  743. unlock_policy_rwsem_write(cpu);
  744.  
  745. + cpufreq_debug_enable_ratelimit();
  746. +
  747. +#ifdef CONFIG_HOTPLUG_CPU
  748. + /* when the CPU which is the parent of the kobj is hotplugged
  749. + * offline, check for siblings, and create cpufreq sysfs interface
  750. + * and symlinks
  751. + */
  752. + if (unlikely(cpumask_weight(data->cpus) > 1)) {
  753. + /* first sibling now owns the new sysfs dir */
  754. + cpumask_clear_cpu(cpu, data->cpus);
  755. + cpufreq_add_dev(get_cpu_sysdev(cpumask_first(data->cpus)));
  756. +
  757. + /* finally remove our own symlink */
  758. + lock_policy_rwsem_write(cpu);
  759. + __cpufreq_remove_dev(sys_dev);
  760. + }
  761. +#endif
  762. +
  763. free_cpumask_var(data->related_cpus);
  764. free_cpumask_var(data->cpus);
  765. kfree(data);
  766. - per_cpu(cpufreq_cpu_data, cpu) = NULL;
  767.  
  768. - cpufreq_debug_enable_ratelimit();
  769. return 0;
  770. }
  771.  
  772. diff -Naru linux-2.6.32.41/drivers/cpufreq/cpufreq_stats.c linux-2.6.32.42/drivers/cpufreq/cpufreq_stats.c
  773. --- linux-2.6.32.41/drivers/cpufreq/cpufreq_stats.c 2011-05-24 01:21:22.000000000 +0700
  774. +++ linux-2.6.32.42/drivers/cpufreq/cpufreq_stats.c 2011-06-24 05:24:26.000000000 +0700
  775. @@ -164,17 +164,27 @@
  776. return -1;
  777. }
  778.  
  779. +/* should be called late in the CPU removal sequence so that the stats
  780. + * memory is still available in case someone tries to use it.
  781. + */
  782. static void cpufreq_stats_free_table(unsigned int cpu)
  783. {
  784. struct cpufreq_stats *stat = per_cpu(cpufreq_stats_table, cpu);
  785. - struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
  786. - if (policy && policy->cpu == cpu)
  787. - sysfs_remove_group(&policy->kobj, &stats_attr_group);
  788. if (stat) {
  789. kfree(stat->time_in_state);
  790. kfree(stat);
  791. }
  792. per_cpu(cpufreq_stats_table, cpu) = NULL;
  793. +}
  794. +
  795. +/* must be called early in the CPU removal sequence (before
  796. + * cpufreq_remove_dev) so that policy is still valid.
  797. + */
  798. +static void cpufreq_stats_free_sysfs(unsigned int cpu)
  799. +{
  800. + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
  801. + if (policy && policy->cpu == cpu)
  802. + sysfs_remove_group(&policy->kobj, &stats_attr_group);
  803. if (policy)
  804. cpufreq_cpu_put(policy);
  805. }
  806. @@ -315,6 +325,9 @@
  807. case CPU_ONLINE_FROZEN:
  808. cpufreq_update_policy(cpu);
  809. break;
  810. + case CPU_DOWN_PREPARE:
  811. + cpufreq_stats_free_sysfs(cpu);
  812. + break;
  813. case CPU_DEAD:
  814. case CPU_DEAD_FROZEN:
  815. cpufreq_stats_free_table(cpu);
  816. @@ -323,9 +336,11 @@
  817. return NOTIFY_OK;
  818. }
  819.  
  820. +/* priority=1 so this will get called before cpufreq_remove_dev */
  821. static struct notifier_block cpufreq_stat_cpu_notifier __refdata =
  822. {
  823. .notifier_call = cpufreq_stat_cpu_callback,
  824. + .priority = 1,
  825. };
  826.  
  827. static struct notifier_block notifier_policy_block = {
  828. @@ -372,6 +387,7 @@
  829. unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
  830. for_each_online_cpu(cpu) {
  831. cpufreq_stats_free_table(cpu);
  832. + cpufreq_stats_free_sysfs(cpu);
  833. }
  834. }
  835.  
  836. diff -Naru linux-2.6.32.41/drivers/cpuidle/governors/menu.c linux-2.6.32.42/drivers/cpuidle/governors/menu.c
  837. --- linux-2.6.32.41/drivers/cpuidle/governors/menu.c 2011-05-24 01:21:22.000000000 +0700
  838. +++ linux-2.6.32.42/drivers/cpuidle/governors/menu.c 2011-06-24 05:24:26.000000000 +0700
  839. @@ -185,6 +185,7 @@
  840. int latency_req = pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY);
  841. int i;
  842. int multiplier;
  843. + struct timespec t;
  844.  
  845. if (data->needs_update) {
  846. menu_update(dev);
  847. @@ -199,8 +200,9 @@
  848. return 0;
  849.  
  850. /* determine the expected residency time, round up */
  851. + t = ktime_to_timespec(tick_nohz_get_sleep_length());
  852. data->expected_us =
  853. - DIV_ROUND_UP((u32)ktime_to_ns(tick_nohz_get_sleep_length()), 1000);
  854. + t.tv_sec * USEC_PER_SEC + t.tv_nsec / NSEC_PER_USEC;
  855.  
  856.  
  857. data->bucket = which_bucket(data->expected_us);
  858. diff -Naru linux-2.6.32.41/drivers/gpu/drm/i915/intel_lvds.c linux-2.6.32.42/drivers/gpu/drm/i915/intel_lvds.c
  859. --- linux-2.6.32.41/drivers/gpu/drm/i915/intel_lvds.c 2011-05-24 01:21:22.000000000 +0700
  860. +++ linux-2.6.32.42/drivers/gpu/drm/i915/intel_lvds.c 2011-06-24 05:24:26.000000000 +0700
  861. @@ -905,6 +905,14 @@
  862. DMI_MATCH(DMI_PRODUCT_NAME, "U800"),
  863. },
  864. },
  865. + {
  866. + .callback = intel_no_lvds_dmi_callback,
  867. + .ident = "Asus EeeBox PC EB1007",
  868. + .matches = {
  869. + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer INC."),
  870. + DMI_MATCH(DMI_PRODUCT_NAME, "EB1007"),
  871. + },
  872. + },
  873.  
  874. { } /* terminating entry */
  875. };
  876. diff -Naru linux-2.6.32.41/drivers/gpu/drm/radeon/radeon_device.c linux-2.6.32.42/drivers/gpu/drm/radeon/radeon_device.c
  877. --- linux-2.6.32.41/drivers/gpu/drm/radeon/radeon_device.c 2011-05-24 01:21:22.000000000 +0700
  878. +++ linux-2.6.32.42/drivers/gpu/drm/radeon/radeon_device.c 2011-06-24 05:24:26.000000000 +0700
  879. @@ -572,6 +572,7 @@
  880. dma_bits = rdev->need_dma32 ? 32 : 40;
  881. r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
  882. if (r) {
  883. + rdev->need_dma32 = true;
  884. printk(KERN_WARNING "radeon: No suitable DMA available.\n");
  885. }
  886.  
  887. diff -Naru linux-2.6.32.41/drivers/md/dm-table.c linux-2.6.32.42/drivers/md/dm-table.c
  888. --- linux-2.6.32.41/drivers/md/dm-table.c 2011-05-24 01:21:22.000000000 +0700
  889. +++ linux-2.6.32.42/drivers/md/dm-table.c 2011-06-24 05:24:26.000000000 +0700
  890. @@ -348,6 +348,7 @@
  891. static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
  892. sector_t start, sector_t len, void *data)
  893. {
  894. + struct request_queue *q;
  895. struct queue_limits *limits = data;
  896. struct block_device *bdev = dev->bdev;
  897. sector_t dev_size =
  898. @@ -356,6 +357,22 @@
  899. limits->logical_block_size >> SECTOR_SHIFT;
  900. char b[BDEVNAME_SIZE];
  901.  
  902. + /*
  903. + * Some devices exist without request functions,
  904. + * such as loop devices not yet bound to backing files.
  905. + * Forbid the use of such devices.
  906. + */
  907. + q = bdev_get_queue(bdev);
  908. + if (!q || !q->make_request_fn) {
  909. + DMWARN("%s: %s is not yet initialised: "
  910. + "start=%llu, len=%llu, dev_size=%llu",
  911. + dm_device_name(ti->table->md), bdevname(bdev, b),
  912. + (unsigned long long)start,
  913. + (unsigned long long)len,
  914. + (unsigned long long)dev_size);
  915. + return 1;
  916. + }
  917. +
  918. if (!dev_size)
  919. return 0;
  920.  
  921. diff -Naru linux-2.6.32.41/drivers/md/md.c linux-2.6.32.42/drivers/md/md.c
  922. --- linux-2.6.32.41/drivers/md/md.c 2011-05-24 01:21:22.000000000 +0700
  923. +++ linux-2.6.32.42/drivers/md/md.c 2011-06-24 05:24:26.000000000 +0700
  924. @@ -2262,7 +2262,7 @@
  925. if (rdev->raid_disk == -1)
  926. return -EEXIST;
  927. /* personality does all needed checks */
  928. - if (rdev->mddev->pers->hot_add_disk == NULL)
  929. + if (rdev->mddev->pers->hot_remove_disk == NULL)
  930. return -EINVAL;
  931. err = rdev->mddev->pers->
  932. hot_remove_disk(rdev->mddev, rdev->raid_disk);
  933. diff -Naru linux-2.6.32.41/drivers/md/raid5.c linux-2.6.32.42/drivers/md/raid5.c
  934. --- linux-2.6.32.41/drivers/md/raid5.c 2011-05-24 01:21:22.000000000 +0700
  935. +++ linux-2.6.32.42/drivers/md/raid5.c 2011-06-24 05:24:26.000000000 +0700
  936. @@ -127,7 +127,7 @@
  937.  
  938. static inline void raid5_set_bi_hw_segments(struct bio *bio, unsigned int cnt)
  939. {
  940. - bio->bi_phys_segments = raid5_bi_phys_segments(bio) || (cnt << 16);
  941. + bio->bi_phys_segments = raid5_bi_phys_segments(bio) | (cnt << 16);
  942. }
  943.  
  944. /* Find first data disk in a raid6 stripe */
  945. @@ -446,7 +446,7 @@
  946. bi = &sh->dev[i].req;
  947.  
  948. bi->bi_rw = rw;
  949. - if (rw == WRITE)
  950. + if (rw & WRITE)
  951. bi->bi_end_io = raid5_end_write_request;
  952. else
  953. bi->bi_end_io = raid5_end_read_request;
  954. @@ -480,13 +480,13 @@
  955. bi->bi_io_vec[0].bv_offset = 0;
  956. bi->bi_size = STRIPE_SIZE;
  957. bi->bi_next = NULL;
  958. - if (rw == WRITE &&
  959. + if ((rw & WRITE) &&
  960. test_bit(R5_ReWrite, &sh->dev[i].flags))
  961. atomic_add(STRIPE_SECTORS,
  962. &rdev->corrected_errors);
  963. generic_make_request(bi);
  964. } else {
  965. - if (rw == WRITE)
  966. + if (rw & WRITE)
  967. set_bit(STRIPE_DEGRADED, &sh->state);
  968. pr_debug("skip op %ld on disc %d for sector %llu\n",
  969. bi->bi_rw, i, (unsigned long long)sh->sector);
  970. diff -Naru linux-2.6.32.41/drivers/mtd/mtdconcat.c linux-2.6.32.42/drivers/mtd/mtdconcat.c
  971. --- linux-2.6.32.41/drivers/mtd/mtdconcat.c 2011-05-24 01:21:22.000000000 +0700
  972. +++ linux-2.6.32.42/drivers/mtd/mtdconcat.c 2011-06-24 05:24:26.000000000 +0700
  973. @@ -306,7 +306,7 @@
  974. if (!(mtd->flags & MTD_WRITEABLE))
  975. return -EROFS;
  976.  
  977. - ops->retlen = 0;
  978. + ops->retlen = ops->oobretlen = 0;
  979.  
  980. for (i = 0; i < concat->num_subdev; i++) {
  981. struct mtd_info *subdev = concat->subdev[i];
  982. @@ -321,7 +321,7 @@
  983. devops.len = subdev->size - to;
  984.  
  985. err = subdev->write_oob(subdev, to, &devops);
  986. - ops->retlen += devops.retlen;
  987. + ops->retlen += devops.oobretlen;
  988. if (err)
  989. return err;
  990.  
  991. diff -Naru linux-2.6.32.41/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.32.42/drivers/net/wireless/iwlwifi/iwl-5000.c
  992. --- linux-2.6.32.41/drivers/net/wireless/iwlwifi/iwl-5000.c 2011-05-24 01:21:22.000000000 +0700
  993. +++ linux-2.6.32.42/drivers/net/wireless/iwlwifi/iwl-5000.c 2011-06-24 05:24:26.000000000 +0700
  994. @@ -47,7 +47,7 @@
  995. #include "iwl-6000-hw.h"
  996.  
  997. /* Highest firmware API version supported */
  998. -#define IWL5000_UCODE_API_MAX 5
  999. +#define IWL5000_UCODE_API_MAX 2
  1000. #define IWL5150_UCODE_API_MAX 2
  1001.  
  1002. /* Lowest firmware API version supported */
  1003. diff -Naru linux-2.6.32.41/drivers/net/wireless/p54/p54usb.c linux-2.6.32.42/drivers/net/wireless/p54/p54usb.c
  1004. --- linux-2.6.32.41/drivers/net/wireless/p54/p54usb.c 2011-05-24 01:21:22.000000000 +0700
  1005. +++ linux-2.6.32.42/drivers/net/wireless/p54/p54usb.c 2011-06-24 05:24:26.000000000 +0700
  1006. @@ -80,6 +80,7 @@
  1007. {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */
  1008. {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */
  1009. {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */
  1010. + {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */
  1011. {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */
  1012. {USB_DEVICE(0x0846, 0x4240)}, /* Netgear WG111 (v2) */
  1013. {USB_DEVICE(0x0915, 0x2000)}, /* Cohiba Proto board */
  1014. diff -Naru linux-2.6.32.41/drivers/pci/hotplug/pcihp_slot.c linux-2.6.32.42/drivers/pci/hotplug/pcihp_slot.c
  1015. --- linux-2.6.32.41/drivers/pci/hotplug/pcihp_slot.c 2011-05-24 01:21:22.000000000 +0700
  1016. +++ linux-2.6.32.42/drivers/pci/hotplug/pcihp_slot.c 2011-06-24 05:24:26.000000000 +0700
  1017. @@ -158,6 +158,47 @@
  1018. */
  1019. }
  1020.  
  1021. +/* Program PCIE MaxPayload setting on device: ensure parent maxpayload <= device */
  1022. +static int pci_set_payload(struct pci_dev *dev)
  1023. +{
  1024. + int pos, ppos;
  1025. + u16 pctl, psz;
  1026. + u16 dctl, dsz, dcap, dmax;
  1027. + struct pci_dev *parent;
  1028. +
  1029. + parent = dev->bus->self;
  1030. + pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
  1031. + if (!pos)
  1032. + return 0;
  1033. +
  1034. + /* Read Device MaxPayload capability and setting */
  1035. + pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &dctl);
  1036. + pci_read_config_word(dev, pos + PCI_EXP_DEVCAP, &dcap);
  1037. + dsz = (dctl & PCI_EXP_DEVCTL_PAYLOAD) >> 5;
  1038. + dmax = (dcap & PCI_EXP_DEVCAP_PAYLOAD);
  1039. +
  1040. + /* Read Parent MaxPayload setting */
  1041. + ppos = pci_find_capability(parent, PCI_CAP_ID_EXP);
  1042. + if (!ppos)
  1043. + return 0;
  1044. + pci_read_config_word(parent, ppos + PCI_EXP_DEVCTL, &pctl);
  1045. + psz = (pctl & PCI_EXP_DEVCTL_PAYLOAD) >> 5;
  1046. +
  1047. + /* If parent payload > device max payload -> error
  1048. + * If parent payload > device payload -> set speed
  1049. + * If parent payload <= device payload -> do nothing
  1050. + */
  1051. + if (psz > dmax)
  1052. + return -1;
  1053. + else if (psz > dsz) {
  1054. + dev_info(&dev->dev, "Setting MaxPayload to %d\n", 128 << psz);
  1055. + pci_write_config_word(dev, pos + PCI_EXP_DEVCTL,
  1056. + (dctl & ~PCI_EXP_DEVCTL_PAYLOAD) +
  1057. + (psz << 5));
  1058. + }
  1059. + return 0;
  1060. +}
  1061. +
  1062. void pci_configure_slot(struct pci_dev *dev)
  1063. {
  1064. struct pci_dev *cdev;
  1065. @@ -169,6 +210,10 @@
  1066. (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)))
  1067. return;
  1068.  
  1069. + ret = pci_set_payload(dev);
  1070. + if (ret)
  1071. + dev_warn(&dev->dev, "could not set device max payload\n");
  1072. +
  1073. memset(&hpp, 0, sizeof(hpp));
  1074. ret = pci_get_hp_params(dev, &hpp);
  1075. if (ret)
  1076. diff -Naru linux-2.6.32.41/drivers/pci/pci.c linux-2.6.32.42/drivers/pci/pci.c
  1077. --- linux-2.6.32.41/drivers/pci/pci.c 2011-05-24 01:21:22.000000000 +0700
  1078. +++ linux-2.6.32.42/drivers/pci/pci.c 2011-06-24 05:24:26.000000000 +0700
  1079. @@ -373,8 +373,12 @@
  1080. continue; /* Wrong type */
  1081. if (!((res->flags ^ r->flags) & IORESOURCE_PREFETCH))
  1082. return r; /* Exact match */
  1083. - if ((res->flags & IORESOURCE_PREFETCH) && !(r->flags & IORESOURCE_PREFETCH))
  1084. - best = r; /* Approximating prefetchable by non-prefetchable */
  1085. + /* We can't insert a non-prefetch resource inside a prefetchable parent .. */
  1086. + if (r->flags & IORESOURCE_PREFETCH)
  1087. + continue;
  1088. + /* .. but we can put a prefetchable resource inside a non-prefetchable one */
  1089. + if (!best)
  1090. + best = r;
  1091. }
  1092. return best;
  1093. }
  1094. diff -Naru linux-2.6.32.41/drivers/pci/quirks.c linux-2.6.32.42/drivers/pci/quirks.c
  1095. --- linux-2.6.32.41/drivers/pci/quirks.c 2011-05-24 01:21:22.000000000 +0700
  1096. +++ linux-2.6.32.42/drivers/pci/quirks.c 2011-06-24 05:24:26.000000000 +0700
  1097. @@ -2540,6 +2540,16 @@
  1098.  
  1099. #endif /* CONFIG_PCI_MSI */
  1100.  
  1101. +static void __devinit fixup_ti816x_class(struct pci_dev* dev)
  1102. +{
  1103. + /* TI 816x devices do not have class code set when in PCIe boot mode */
  1104. + if (dev->class == PCI_CLASS_NOT_DEFINED) {
  1105. + dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
  1106. + dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
  1107. + }
  1108. +}
  1109. +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class);
  1110. +
  1111. static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
  1112. struct pci_fixup *end)
  1113. {
  1114. diff -Naru linux-2.6.32.41/drivers/scsi/scsi_scan.c linux-2.6.32.42/drivers/scsi/scsi_scan.c
  1115. --- linux-2.6.32.41/drivers/scsi/scsi_scan.c 2011-05-24 01:21:22.000000000 +0700
  1116. +++ linux-2.6.32.42/drivers/scsi/scsi_scan.c 2011-06-24 05:24:26.000000000 +0700
  1117. @@ -293,7 +293,7 @@
  1118. kfree(sdev);
  1119. goto out;
  1120. }
  1121. -
  1122. + blk_get_queue(sdev->request_queue);
  1123. sdev->request_queue->queuedata = sdev;
  1124. scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun);
  1125.  
  1126. @@ -1336,8 +1336,10 @@
  1127. sdev = scsi_alloc_sdev(starget, 0, NULL);
  1128. if (!sdev)
  1129. return 0;
  1130. - if (scsi_device_get(sdev))
  1131. + if (scsi_device_get(sdev)) {
  1132. + __scsi_remove_device(sdev);
  1133. return 0;
  1134. + }
  1135. }
  1136.  
  1137. sprintf(devname, "host %d channel %d id %d",
  1138. @@ -1904,10 +1906,9 @@
  1139. goto out;
  1140.  
  1141. sdev = scsi_alloc_sdev(starget, 0, NULL);
  1142. - if (sdev) {
  1143. - sdev->sdev_gendev.parent = get_device(&starget->dev);
  1144. + if (sdev)
  1145. sdev->borken = 0;
  1146. - } else
  1147. + else
  1148. scsi_target_reap(starget);
  1149. put_device(&starget->dev);
  1150. out:
  1151. diff -Naru linux-2.6.32.41/drivers/scsi/scsi_sysfs.c linux-2.6.32.42/drivers/scsi/scsi_sysfs.c
  1152. --- linux-2.6.32.41/drivers/scsi/scsi_sysfs.c 2011-05-24 01:21:22.000000000 +0700
  1153. +++ linux-2.6.32.42/drivers/scsi/scsi_sysfs.c 2011-06-24 05:24:26.000000000 +0700
  1154. @@ -318,6 +318,7 @@
  1155. kfree(evt);
  1156. }
  1157.  
  1158. + blk_put_queue(sdev->request_queue);
  1159. /* NULL queue means the device can't be used */
  1160. sdev->request_queue = NULL;
  1161.  
  1162. @@ -838,7 +839,8 @@
  1163. struct request_queue *rq = sdev->request_queue;
  1164. struct scsi_target *starget = sdev->sdev_target;
  1165.  
  1166. - if ((error = scsi_device_set_state(sdev, SDEV_RUNNING)) != 0)
  1167. + error = scsi_device_set_state(sdev, SDEV_RUNNING);
  1168. + if (error)
  1169. return error;
  1170.  
  1171. error = scsi_target_add(starget);
  1172. @@ -849,13 +851,13 @@
  1173. error = device_add(&sdev->sdev_gendev);
  1174. if (error) {
  1175. printk(KERN_INFO "error 1\n");
  1176. - goto out_remove;
  1177. + return error;
  1178. }
  1179. error = device_add(&sdev->sdev_dev);
  1180. if (error) {
  1181. printk(KERN_INFO "error 2\n");
  1182. device_del(&sdev->sdev_gendev);
  1183. - goto out_remove;
  1184. + return error;
  1185. }
  1186. transport_add_device(&sdev->sdev_gendev);
  1187. sdev->is_visible = 1;
  1188. @@ -866,14 +868,14 @@
  1189. else
  1190. error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_depth);
  1191. if (error)
  1192. - goto out_remove;
  1193. + return error;
  1194.  
  1195. if (sdev->host->hostt->change_queue_type)
  1196. error = device_create_file(&sdev->sdev_gendev, &sdev_attr_queue_type_rw);
  1197. else
  1198. error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_type);
  1199. if (error)
  1200. - goto out_remove;
  1201. + return error;
  1202.  
  1203. error = bsg_register_queue(rq, &sdev->sdev_gendev, NULL, NULL);
  1204.  
  1205. @@ -889,16 +891,11 @@
  1206. error = device_create_file(&sdev->sdev_gendev,
  1207. sdev->host->hostt->sdev_attrs[i]);
  1208. if (error)
  1209. - goto out_remove;
  1210. + return error;
  1211. }
  1212. }
  1213.  
  1214. - return 0;
  1215. -
  1216. - out_remove:
  1217. - __scsi_remove_device(sdev);
  1218. return error;
  1219. -
  1220. }
  1221.  
  1222. void __scsi_remove_device(struct scsi_device *sdev)
  1223. diff -Naru linux-2.6.32.41/drivers/scsi/ultrastor.c linux-2.6.32.42/drivers/scsi/ultrastor.c
  1224. --- linux-2.6.32.41/drivers/scsi/ultrastor.c 2011-05-24 01:21:22.000000000 +0700
  1225. +++ linux-2.6.32.42/drivers/scsi/ultrastor.c 2011-06-24 05:24:26.000000000 +0700
  1226. @@ -306,7 +306,7 @@
  1227. "0: bsfw %1,%w0\n\t"
  1228. "btr %0,%1\n\t"
  1229. "jnc 0b"
  1230. - : "=&r" (rv), "=m" (*field) :);
  1231. + : "=&r" (rv), "+m" (*field) :);
  1232.  
  1233. return rv;
  1234. }
  1235. diff -Naru linux-2.6.32.41/drivers/staging/usbip/usbip_common.c linux-2.6.32.42/drivers/staging/usbip/usbip_common.c
  1236. --- linux-2.6.32.41/drivers/staging/usbip/usbip_common.c 2011-05-24 01:21:22.000000000 +0700
  1237. +++ linux-2.6.32.42/drivers/staging/usbip/usbip_common.c 2011-06-24 05:24:26.000000000 +0700
  1238. @@ -770,7 +770,7 @@
  1239. be32_to_cpus(&pdu->status);
  1240. be32_to_cpus(&pdu->actual_length);
  1241. be32_to_cpus(&pdu->start_frame);
  1242. - cpu_to_be32s(&pdu->number_of_packets);
  1243. + be32_to_cpus(&pdu->number_of_packets);
  1244. be32_to_cpus(&pdu->error_count);
  1245. }
  1246. }
  1247. diff -Naru linux-2.6.32.41/drivers/usb/class/cdc-acm.c linux-2.6.32.42/drivers/usb/class/cdc-acm.c
  1248. --- linux-2.6.32.41/drivers/usb/class/cdc-acm.c 2011-05-24 01:21:22.000000000 +0700
  1249. +++ linux-2.6.32.42/drivers/usb/class/cdc-acm.c 2011-06-24 05:24:26.000000000 +0700
  1250. @@ -1602,6 +1602,8 @@
  1251. { NOKIA_PCSUITE_ACM_INFO(0x04ce), }, /* Nokia E90 */
  1252. { NOKIA_PCSUITE_ACM_INFO(0x01d4), }, /* Nokia E55 */
  1253. { NOKIA_PCSUITE_ACM_INFO(0x0302), }, /* Nokia N8 */
  1254. + { NOKIA_PCSUITE_ACM_INFO(0x0335), }, /* Nokia E7 */
  1255. + { NOKIA_PCSUITE_ACM_INFO(0x03cd), }, /* Nokia C7 */
  1256. { SAMSUNG_PCSUITE_ACM_INFO(0x6651), }, /* Samsung GTi8510 (INNOV8) */
  1257.  
  1258. /* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */
  1259. diff -Naru linux-2.6.32.41/drivers/usb/core/hub.c linux-2.6.32.42/drivers/usb/core/hub.c
  1260. --- linux-2.6.32.41/drivers/usb/core/hub.c 2011-05-24 01:21:22.000000000 +0700
  1261. +++ linux-2.6.32.42/drivers/usb/core/hub.c 2011-06-24 05:24:26.000000000 +0700
  1262. @@ -326,7 +326,8 @@
  1263. {
  1264. int i, status = -ETIMEDOUT;
  1265.  
  1266. - for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
  1267. + for (i = 0; i < USB_STS_RETRIES &&
  1268. + (status == -ETIMEDOUT || status == -EPIPE); i++) {
  1269. status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
  1270. USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0,
  1271. data, sizeof(*data), USB_STS_TIMEOUT);
  1272. @@ -342,7 +343,8 @@
  1273. {
  1274. int i, status = -ETIMEDOUT;
  1275.  
  1276. - for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
  1277. + for (i = 0; i < USB_STS_RETRIES &&
  1278. + (status == -ETIMEDOUT || status == -EPIPE); i++) {
  1279. status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
  1280. USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1,
  1281. data, sizeof(*data), USB_STS_TIMEOUT);
  1282. diff -Naru linux-2.6.32.41/drivers/usb/gadget/at91_udc.c linux-2.6.32.42/drivers/usb/gadget/at91_udc.c
  1283. --- linux-2.6.32.41/drivers/usb/gadget/at91_udc.c 2011-05-24 01:21:22.000000000 +0700
  1284. +++ linux-2.6.32.42/drivers/usb/gadget/at91_udc.c 2011-06-24 05:24:26.000000000 +0700
  1285. @@ -1687,7 +1687,7 @@
  1286. }
  1287.  
  1288. /* newer chips have more FIFO memory than rm9200 */
  1289. - if (cpu_is_at91sam9260()) {
  1290. + if (cpu_is_at91sam9260() || cpu_is_at91sam9g20()) {
  1291. udc->ep[0].maxpacket = 64;
  1292. udc->ep[3].maxpacket = 64;
  1293. udc->ep[4].maxpacket = 512;
  1294. diff -Naru linux-2.6.32.41/drivers/usb/gadget/f_rndis.c linux-2.6.32.42/drivers/usb/gadget/f_rndis.c
  1295. --- linux-2.6.32.41/drivers/usb/gadget/f_rndis.c 2011-05-24 01:21:22.000000000 +0700
  1296. +++ linux-2.6.32.42/drivers/usb/gadget/f_rndis.c 2011-06-24 05:24:26.000000000 +0700
  1297. @@ -400,8 +400,7 @@
  1298. */
  1299. case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8)
  1300. | USB_CDC_SEND_ENCAPSULATED_COMMAND:
  1301. - if (w_length > req->length || w_value
  1302. - || w_index != rndis->ctrl_id)
  1303. + if (w_value || w_index != rndis->ctrl_id)
  1304. goto invalid;
  1305. /* read the request; process it later */
  1306. value = w_length;
  1307. diff -Naru linux-2.6.32.41/drivers/usb/host/ohci-pci.c linux-2.6.32.42/drivers/usb/host/ohci-pci.c
  1308. --- linux-2.6.32.41/drivers/usb/host/ohci-pci.c 2011-05-24 01:21:22.000000000 +0700
  1309. +++ linux-2.6.32.42/drivers/usb/host/ohci-pci.c 2011-06-24 05:24:26.000000000 +0700
  1310. @@ -207,10 +207,18 @@
  1311. */
  1312. static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
  1313. {
  1314. + struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
  1315. struct ohci_hcd *ohci = hcd_to_ohci(hcd);
  1316.  
  1317. - ohci->flags |= OHCI_QUIRK_SHUTDOWN;
  1318. - ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
  1319. + /* Evidently nVidia fixed their later hardware; this is a guess at
  1320. + * the changeover point.
  1321. + */
  1322. +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_USB 0x026d
  1323. +
  1324. + if (pdev->device < PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_USB) {
  1325. + ohci->flags |= OHCI_QUIRK_SHUTDOWN;
  1326. + ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
  1327. + }
  1328.  
  1329. return 0;
  1330. }
  1331. diff -Naru linux-2.6.32.41/drivers/usb/host/xhci-mem.c linux-2.6.32.42/drivers/usb/host/xhci-mem.c
  1332. --- linux-2.6.32.41/drivers/usb/host/xhci-mem.c 2011-05-24 01:21:22.000000000 +0700
  1333. +++ linux-2.6.32.42/drivers/usb/host/xhci-mem.c 2011-06-24 05:24:26.000000000 +0700
  1334. @@ -452,9 +452,19 @@
  1335. interval = clamp_val(ep->desc.bInterval, 1, 16) - 1;
  1336. if (interval != ep->desc.bInterval - 1)
  1337. dev_warn(&udev->dev,
  1338. - "ep %#x - rounding interval to %d microframes\n",
  1339. + "ep %#x - rounding interval to %d %sframes\n",
  1340. ep->desc.bEndpointAddress,
  1341. - 1 << interval);
  1342. + 1 << interval,
  1343. + udev->speed == USB_SPEED_FULL ? "" : "micro");
  1344. +
  1345. + if (udev->speed == USB_SPEED_FULL) {
  1346. + /*
  1347. + * Full speed isoc endpoints specify interval in frames,
  1348. + * not microframes. We are using microframes everywhere,
  1349. + * so adjust accordingly.
  1350. + */
  1351. + interval += 3; /* 1 frame = 2^3 uframes */
  1352. + }
  1353.  
  1354. return interval;
  1355. }
  1356. @@ -511,12 +521,12 @@
  1357. break;
  1358.  
  1359. case USB_SPEED_FULL:
  1360. - if (usb_endpoint_xfer_int(&ep->desc)) {
  1361. + if (usb_endpoint_xfer_isoc(&ep->desc)) {
  1362. interval = xhci_parse_exponent_interval(udev, ep);
  1363. break;
  1364. }
  1365. /*
  1366. - * Fall through for isochronous endpoint interval decoding
  1367. + * Fall through for interrupt endpoint interval decoding
  1368. * since it uses the same rules as low speed interrupt
  1369. * endpoints.
  1370. */
  1371. diff -Naru linux-2.6.32.41/drivers/usb/serial/cp210x.c linux-2.6.32.42/drivers/usb/serial/cp210x.c
  1372. --- linux-2.6.32.41/drivers/usb/serial/cp210x.c 2011-05-24 01:21:22.000000000 +0700
  1373. +++ linux-2.6.32.42/drivers/usb/serial/cp210x.c 2011-06-24 05:24:26.000000000 +0700
  1374. @@ -114,6 +114,10 @@
  1375. { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */
  1376. { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
  1377. { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */
  1378. + { USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */
  1379. + { USB_DEVICE(0x10C4, 0x85EB) }, /* AC-Services CIS-IBUS */
  1380. + { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
  1381. + { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
  1382. { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
  1383. { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
  1384. { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
  1385. diff -Naru linux-2.6.32.41/drivers/usb/serial/ftdi_sio.c linux-2.6.32.42/drivers/usb/serial/ftdi_sio.c
  1386. --- linux-2.6.32.41/drivers/usb/serial/ftdi_sio.c 2011-05-24 01:21:22.000000000 +0700
  1387. +++ linux-2.6.32.42/drivers/usb/serial/ftdi_sio.c 2011-06-24 05:24:26.000000000 +0700
  1388. @@ -570,6 +570,7 @@
  1389. { USB_DEVICE(FTDI_VID, FTDI_IBS_APP70_PID) },
  1390. { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) },
  1391. { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) },
  1392. + { USB_DEVICE(FTDI_VID, FTDI_TAVIR_STK500_PID) },
  1393. /*
  1394. * ELV devices:
  1395. */
  1396. @@ -650,6 +651,7 @@
  1397. { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) },
  1398. { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) },
  1399. { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) },
  1400. + { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_3_PID) },
  1401. { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_0_PID) },
  1402. { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_1_PID) },
  1403. { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_2_PID) },
  1404. diff -Naru linux-2.6.32.41/drivers/usb/serial/ftdi_sio_ids.h linux-2.6.32.42/drivers/usb/serial/ftdi_sio_ids.h
  1405. --- linux-2.6.32.41/drivers/usb/serial/ftdi_sio_ids.h 2011-05-24 01:21:22.000000000 +0700
  1406. +++ linux-2.6.32.42/drivers/usb/serial/ftdi_sio_ids.h 2011-06-24 05:24:26.000000000 +0700
  1407. @@ -351,6 +351,7 @@
  1408. */
  1409. #define FTDI_4N_GALAXY_DE_1_PID 0xF3C0
  1410. #define FTDI_4N_GALAXY_DE_2_PID 0xF3C1
  1411. +#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2
  1412.  
  1413. /*
  1414. * Linx Technologies product ids
  1415. @@ -491,6 +492,11 @@
  1416. /* www.canusb.com Lawicel CANUSB device (FTDI_VID) */
  1417. #define FTDI_CANUSB_PID 0xFFA8 /* Product Id */
  1418.  
  1419. +/*
  1420. + * TavIR AVR product ids (FTDI_VID)
  1421. + */
  1422. +#define FTDI_TAVIR_STK500_PID 0xFA33 /* STK500 AVR programmer */
  1423. +
  1424.  
  1425.  
  1426. /********************************/
  1427. diff -Naru linux-2.6.32.41/drivers/usb/serial/garmin_gps.c linux-2.6.32.42/drivers/usb/serial/garmin_gps.c
  1428. --- linux-2.6.32.41/drivers/usb/serial/garmin_gps.c 2011-05-24 01:21:22.000000000 +0700
  1429. +++ linux-2.6.32.42/drivers/usb/serial/garmin_gps.c 2011-06-24 05:24:26.000000000 +0700
  1430. @@ -1,7 +1,7 @@
  1431. /*
  1432. * Garmin GPS driver
  1433. *
  1434. - * Copyright (C) 2006-2009 Hermann Kneissel herkne@users.sourceforge.net
  1435. + * Copyright (C) 2006-2011 Hermann Kneissel herkne@gmx.de
  1436. *
  1437. * The latest version of the driver can be found at
  1438. * http://sourceforge.net/projects/garmin-gps/
  1439. @@ -51,7 +51,7 @@
  1440. */
  1441.  
  1442. #define VERSION_MAJOR 0
  1443. -#define VERSION_MINOR 33
  1444. +#define VERSION_MINOR 36
  1445.  
  1446. #define _STR(s) #s
  1447. #define _DRIVER_VERSION(a, b) "v" _STR(a) "." _STR(b)
  1448. @@ -411,6 +411,7 @@
  1449. */
  1450. static int gsp_rec_packet(struct garmin_data *garmin_data_p, int count)
  1451. {
  1452. + unsigned long flags;
  1453. const __u8 *recpkt = garmin_data_p->inbuffer+GSP_INITIAL_OFFSET;
  1454. __le32 *usbdata = (__le32 *) garmin_data_p->inbuffer;
  1455.  
  1456. @@ -459,7 +460,9 @@
  1457. /* if this was an abort-transfer command, flush all
  1458. queued data. */
  1459. if (isAbortTrfCmnd(garmin_data_p->inbuffer)) {
  1460. + spin_lock_irqsave(&garmin_data_p->lock, flags);
  1461. garmin_data_p->flags |= FLAGS_DROP_DATA;
  1462. + spin_unlock_irqrestore(&garmin_data_p->lock, flags);
  1463. pkt_clear(garmin_data_p);
  1464. }
  1465.  
  1466. @@ -944,7 +947,7 @@
  1467. spin_lock_irqsave(&garmin_data_p->lock, flags);
  1468. garmin_data_p->mode = initial_mode;
  1469. garmin_data_p->count = 0;
  1470. - garmin_data_p->flags = 0;
  1471. + garmin_data_p->flags &= FLAGS_SESSION_REPLY1_SEEN;
  1472. spin_unlock_irqrestore(&garmin_data_p->lock, flags);
  1473.  
  1474. /* shutdown any bulk reads that might be going on */
  1475. @@ -1179,7 +1182,8 @@
  1476.  
  1477.  
  1478. static void garmin_read_process(struct garmin_data *garmin_data_p,
  1479. - unsigned char *data, unsigned data_length)
  1480. + unsigned char *data, unsigned data_length,
  1481. + int bulk_data)
  1482. {
  1483. unsigned long flags;
  1484.  
  1485. @@ -1194,7 +1198,8 @@
  1486. send it directly to the tty port */
  1487. if (garmin_data_p->flags & FLAGS_QUEUING) {
  1488. pkt_add(garmin_data_p, data, data_length);
  1489. - } else if (getLayerId(data) == GARMIN_LAYERID_APPL) {
  1490. + } else if (bulk_data ||
  1491. + getLayerId(data) == GARMIN_LAYERID_APPL) {
  1492.  
  1493. spin_lock_irqsave(&garmin_data_p->lock, flags);
  1494. garmin_data_p->flags |= APP_RESP_SEEN;
  1495. @@ -1238,7 +1243,7 @@
  1496. usb_serial_debug_data(debug, &port->dev,
  1497. __func__, urb->actual_length, data);
  1498.  
  1499. - garmin_read_process(garmin_data_p, data, urb->actual_length);
  1500. + garmin_read_process(garmin_data_p, data, urb->actual_length, 1);
  1501.  
  1502. if (urb->actual_length == 0 &&
  1503. 0 != (garmin_data_p->flags & FLAGS_BULK_IN_RESTART)) {
  1504. @@ -1348,7 +1353,7 @@
  1505. __func__, garmin_data_p->serial_num);
  1506. }
  1507.  
  1508. - garmin_read_process(garmin_data_p, data, urb->actual_length);
  1509. + garmin_read_process(garmin_data_p, data, urb->actual_length, 0);
  1510.  
  1511. port->interrupt_in_urb->dev = port->serial->dev;
  1512. retval = usb_submit_urb(urb, GFP_ATOMIC);
  1513. @@ -1463,6 +1468,7 @@
  1514. garmin_data_p->timer.function = timeout_handler;
  1515. garmin_data_p->port = port;
  1516. garmin_data_p->state = 0;
  1517. + garmin_data_p->flags = 0;
  1518. garmin_data_p->count = 0;
  1519. usb_set_serial_port_data(port, garmin_data_p);
  1520.  
  1521. diff -Naru linux-2.6.32.41/drivers/usb/serial/moto_modem.c linux-2.6.32.42/drivers/usb/serial/moto_modem.c
  1522. --- linux-2.6.32.41/drivers/usb/serial/moto_modem.c 2011-05-24 01:21:22.000000000 +0700
  1523. +++ linux-2.6.32.42/drivers/usb/serial/moto_modem.c 2011-06-24 05:24:26.000000000 +0700
  1524. @@ -25,6 +25,7 @@
  1525. { USB_DEVICE(0x05c6, 0x3197) }, /* unknown Motorola phone */
  1526. { USB_DEVICE(0x0c44, 0x0022) }, /* unknown Mororola phone */
  1527. { USB_DEVICE(0x22b8, 0x2a64) }, /* Motorola KRZR K1m */
  1528. + { USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */
  1529. { USB_DEVICE(0x22b8, 0x2c64) }, /* Motorola V950 phone */
  1530. { },
  1531. };
  1532. diff -Naru linux-2.6.32.41/drivers/xen/events.c linux-2.6.32.42/drivers/xen/events.c
  1533. --- linux-2.6.32.41/drivers/xen/events.c 2011-05-24 01:21:22.000000000 +0700
  1534. +++ linux-2.6.32.42/drivers/xen/events.c 2011-06-24 05:24:26.000000000 +0700
  1535. @@ -536,7 +536,7 @@
  1536. if (irq < 0)
  1537. return irq;
  1538.  
  1539. - irqflags |= IRQF_NO_SUSPEND;
  1540. + irqflags |= IRQF_NO_SUSPEND | IRQF_FORCE_RESUME;
  1541. retval = request_irq(irq, handler, irqflags, devname, dev_id);
  1542. if (retval != 0) {
  1543. unbind_from_irq(irq);
  1544. diff -Naru linux-2.6.32.41/fs/block_dev.c linux-2.6.32.42/fs/block_dev.c
  1545. --- linux-2.6.32.41/fs/block_dev.c 2011-05-24 01:21:22.000000000 +0700
  1546. +++ linux-2.6.32.42/fs/block_dev.c 2011-06-24 05:24:26.000000000 +0700
  1547. @@ -1203,6 +1203,7 @@
  1548. if (!bdev->bd_part)
  1549. goto out_clear;
  1550.  
  1551. + ret = 0;
  1552. if (disk->fops->open) {
  1553. ret = disk->fops->open(bdev, mode);
  1554. if (ret == -ERESTARTSYS) {
  1555. @@ -1218,9 +1219,18 @@
  1556. mutex_unlock(&bdev->bd_mutex);
  1557. goto restart;
  1558. }
  1559. - if (ret)
  1560. - goto out_clear;
  1561. }
  1562. + /*
  1563. + * If the device is invalidated, rescan partition
  1564. + * if open succeeded or failed with -ENOMEDIUM.
  1565. + * The latter is necessary to prevent ghost
  1566. + * partitions on a removed medium.
  1567. + */
  1568. + if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
  1569. + rescan_partitions(disk, bdev);
  1570. + if (ret)
  1571. + goto out_clear;
  1572. +
  1573. if (!bdev->bd_openers) {
  1574. bd_set_size(bdev,(loff_t)get_capacity(disk)<<9);
  1575. bdi = blk_get_backing_dev_info(bdev);
  1576. @@ -1228,8 +1238,6 @@
  1577. bdi = &default_backing_dev_info;
  1578. bdev->bd_inode->i_data.backing_dev_info = bdi;
  1579. }
  1580. - if (bdev->bd_invalidated)
  1581. - rescan_partitions(disk, bdev);
  1582. } else {
  1583. struct block_device *whole;
  1584. whole = bdget_disk(disk, 0);
  1585. @@ -1256,13 +1264,14 @@
  1586. put_disk(disk);
  1587. disk = NULL;
  1588. if (bdev->bd_contains == bdev) {
  1589. - if (bdev->bd_disk->fops->open) {
  1590. + ret = 0;
  1591. + if (bdev->bd_disk->fops->open)
  1592. ret = bdev->bd_disk->fops->open(bdev, mode);
  1593. - if (ret)
  1594. - goto out_unlock_bdev;
  1595. - }
  1596. - if (bdev->bd_invalidated)
  1597. + /* the same as first opener case, read comment there */
  1598. + if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
  1599. rescan_partitions(bdev->bd_disk, bdev);
  1600. + if (ret)
  1601. + goto out_unlock_bdev;
  1602. }
  1603. }
  1604. bdev->bd_openers++;
  1605. diff -Naru linux-2.6.32.41/fs/dcookies.c linux-2.6.32.42/fs/dcookies.c
  1606. --- linux-2.6.32.41/fs/dcookies.c 2011-05-24 01:21:22.000000000 +0700
  1607. +++ linux-2.6.32.42/fs/dcookies.c 2011-06-24 05:24:26.000000000 +0700
  1608. @@ -178,6 +178,8 @@
  1609. /* FIXME: (deleted) ? */
  1610. path = d_path(&dcs->path, kbuf, PAGE_SIZE);
  1611.  
  1612. + mutex_unlock(&dcookie_mutex);
  1613. +
  1614. if (IS_ERR(path)) {
  1615. err = PTR_ERR(path);
  1616. goto out_free;
  1617. @@ -194,6 +196,7 @@
  1618.  
  1619. out_free:
  1620. kfree(kbuf);
  1621. + return err;
  1622. out:
  1623. mutex_unlock(&dcookie_mutex);
  1624. return err;
  1625. diff -Naru linux-2.6.32.41/fs/ecryptfs/keystore.c linux-2.6.32.42/fs/ecryptfs/keystore.c
  1626. --- linux-2.6.32.41/fs/ecryptfs/keystore.c 2011-05-24 01:21:22.000000000 +0700
  1627. +++ linux-2.6.32.42/fs/ecryptfs/keystore.c 2011-06-24 05:24:26.000000000 +0700
  1628. @@ -481,8 +481,8 @@
  1629. struct mutex *tfm_mutex;
  1630. char *block_aligned_filename;
  1631. struct ecryptfs_auth_tok *auth_tok;
  1632. - struct scatterlist src_sg;
  1633. - struct scatterlist dst_sg;
  1634. + struct scatterlist src_sg[2];
  1635. + struct scatterlist dst_sg[2];
  1636. struct blkcipher_desc desc;
  1637. char iv[ECRYPTFS_MAX_IV_BYTES];
  1638. char hash[ECRYPTFS_TAG_70_DIGEST_SIZE];
  1639. @@ -695,23 +695,21 @@
  1640. memcpy(&s->block_aligned_filename[s->num_rand_bytes], filename,
  1641. filename_size);
  1642. rc = virt_to_scatterlist(s->block_aligned_filename,
  1643. - s->block_aligned_filename_size, &s->src_sg, 1);
  1644. - if (rc != 1) {
  1645. + s->block_aligned_filename_size, s->src_sg, 2);
  1646. + if (rc < 1) {
  1647. printk(KERN_ERR "%s: Internal error whilst attempting to "
  1648. - "convert filename memory to scatterlist; "
  1649. - "expected rc = 1; got rc = [%d]. "
  1650. + "convert filename memory to scatterlist; rc = [%d]. "
  1651. "block_aligned_filename_size = [%zd]\n", __func__, rc,
  1652. s->block_aligned_filename_size);
  1653. goto out_release_free_unlock;
  1654. }
  1655. rc = virt_to_scatterlist(&dest[s->i], s->block_aligned_filename_size,
  1656. - &s->dst_sg, 1);
  1657. - if (rc != 1) {
  1658. + s->dst_sg, 2);
  1659. + if (rc < 1) {
  1660. printk(KERN_ERR "%s: Internal error whilst attempting to "
  1661. "convert encrypted filename memory to scatterlist; "
  1662. - "expected rc = 1; got rc = [%d]. "
  1663. - "block_aligned_filename_size = [%zd]\n", __func__, rc,
  1664. - s->block_aligned_filename_size);
  1665. + "rc = [%d]. block_aligned_filename_size = [%zd]\n",
  1666. + __func__, rc, s->block_aligned_filename_size);
  1667. goto out_release_free_unlock;
  1668. }
  1669. /* The characters in the first block effectively do the job
  1670. @@ -734,7 +732,7 @@
  1671. mount_crypt_stat->global_default_fn_cipher_key_bytes);
  1672. goto out_release_free_unlock;
  1673. }
  1674. - rc = crypto_blkcipher_encrypt_iv(&s->desc, &s->dst_sg, &s->src_sg,
  1675. + rc = crypto_blkcipher_encrypt_iv(&s->desc, s->dst_sg, s->src_sg,
  1676. s->block_aligned_filename_size);
  1677. if (rc) {
  1678. printk(KERN_ERR "%s: Error attempting to encrypt filename; "
  1679. @@ -766,8 +764,8 @@
  1680. struct mutex *tfm_mutex;
  1681. char *decrypted_filename;
  1682. struct ecryptfs_auth_tok *auth_tok;
  1683. - struct scatterlist src_sg;
  1684. - struct scatterlist dst_sg;
  1685. + struct scatterlist src_sg[2];
  1686. + struct scatterlist dst_sg[2];
  1687. struct blkcipher_desc desc;
  1688. char fnek_sig_hex[ECRYPTFS_SIG_SIZE_HEX + 1];
  1689. char iv[ECRYPTFS_MAX_IV_BYTES];
  1690. @@ -872,13 +870,12 @@
  1691. }
  1692. mutex_lock(s->tfm_mutex);
  1693. rc = virt_to_scatterlist(&data[(*packet_size)],
  1694. - s->block_aligned_filename_size, &s->src_sg, 1);
  1695. - if (rc != 1) {
  1696. + s->block_aligned_filename_size, s->src_sg, 2);
  1697. + if (rc < 1) {
  1698. printk(KERN_ERR "%s: Internal error whilst attempting to "
  1699. "convert encrypted filename memory to scatterlist; "
  1700. - "expected rc = 1; got rc = [%d]. "
  1701. - "block_aligned_filename_size = [%zd]\n", __func__, rc,
  1702. - s->block_aligned_filename_size);
  1703. + "rc = [%d]. block_aligned_filename_size = [%zd]\n",
  1704. + __func__, rc, s->block_aligned_filename_size);
  1705. goto out_unlock;
  1706. }
  1707. (*packet_size) += s->block_aligned_filename_size;
  1708. @@ -892,13 +889,12 @@
  1709. goto out_unlock;
  1710. }
  1711. rc = virt_to_scatterlist(s->decrypted_filename,
  1712. - s->block_aligned_filename_size, &s->dst_sg, 1);
  1713. - if (rc != 1) {
  1714. + s->block_aligned_filename_size, s->dst_sg, 2);
  1715. + if (rc < 1) {
  1716. printk(KERN_ERR "%s: Internal error whilst attempting to "
  1717. "convert decrypted filename memory to scatterlist; "
  1718. - "expected rc = 1; got rc = [%d]. "
  1719. - "block_aligned_filename_size = [%zd]\n", __func__, rc,
  1720. - s->block_aligned_filename_size);
  1721. + "rc = [%d]. block_aligned_filename_size = [%zd]\n",
  1722. + __func__, rc, s->block_aligned_filename_size);
  1723. goto out_free_unlock;
  1724. }
  1725. /* The characters in the first block effectively do the job of
  1726. @@ -937,7 +933,7 @@
  1727. mount_crypt_stat->global_default_fn_cipher_key_bytes);
  1728. goto out_free_unlock;
  1729. }
  1730. - rc = crypto_blkcipher_decrypt_iv(&s->desc, &s->dst_sg, &s->src_sg,
  1731. + rc = crypto_blkcipher_decrypt_iv(&s->desc, s->dst_sg, s->src_sg,
  1732. s->block_aligned_filename_size);
  1733. if (rc) {
  1734. printk(KERN_ERR "%s: Error attempting to decrypt filename; "
  1735. diff -Naru linux-2.6.32.41/fs/exec.c linux-2.6.32.42/fs/exec.c
  1736. --- linux-2.6.32.41/fs/exec.c 2011-05-24 01:21:22.000000000 +0700
  1737. +++ linux-2.6.32.42/fs/exec.c 2011-06-24 05:24:26.000000000 +0700
  1738. @@ -1009,6 +1009,7 @@
  1739.  
  1740. bprm->mm = NULL; /* We're using it now */
  1741.  
  1742. + set_fs(USER_DS);
  1743. current->flags &= ~PF_RANDOMIZE;
  1744. flush_thread();
  1745. current->personality &= ~bprm->per_clear;
  1746. @@ -1276,10 +1277,6 @@
  1747. if (retval)
  1748. return retval;
  1749.  
  1750. - /* kernel module loader fixup */
  1751. - /* so we don't try to load run modprobe in kernel space. */
  1752. - set_fs(USER_DS);
  1753. -
  1754. retval = audit_bprm(bprm);
  1755. if (retval)
  1756. return retval;
  1757. diff -Naru linux-2.6.32.41/fs/ext3/namei.c linux-2.6.32.42/fs/ext3/namei.c
  1758. --- linux-2.6.32.41/fs/ext3/namei.c 2011-05-24 01:21:22.000000000 +0700
  1759. +++ linux-2.6.32.42/fs/ext3/namei.c 2011-06-24 05:24:26.000000000 +0700
  1760. @@ -1425,10 +1425,19 @@
  1761. frame->at = entries;
  1762. frame->bh = bh;
  1763. bh = bh2;
  1764. + /*
  1765. + * Mark buffers dirty here so that if do_split() fails we write a
  1766. + * consistent set of buffers to disk.
  1767. + */
  1768. + ext3_journal_dirty_metadata(handle, frame->bh);
  1769. + ext3_journal_dirty_metadata(handle, bh);
  1770. de = do_split(handle,dir, &bh, frame, &hinfo, &retval);
  1771. - dx_release (frames);
  1772. - if (!(de))
  1773. + if (!de) {
  1774. + ext3_mark_inode_dirty(handle, dir);
  1775. + dx_release(frames);
  1776. return retval;
  1777. + }
  1778. + dx_release(frames);
  1779.  
  1780. return add_dirent_to_buf(handle, dentry, inode, de, bh);
  1781. }
  1782. diff -Naru linux-2.6.32.41/fs/ext4/mballoc.c linux-2.6.32.42/fs/ext4/mballoc.c
  1783. --- linux-2.6.32.41/fs/ext4/mballoc.c 2011-05-24 01:21:22.000000000 +0700
  1784. +++ linux-2.6.32.42/fs/ext4/mballoc.c 2011-06-24 05:24:26.000000000 +0700
  1785. @@ -1173,6 +1173,8 @@
  1786. return 0;
  1787.  
  1788. err:
  1789. + if (page)
  1790. + page_cache_release(page);
  1791. if (e4b->bd_bitmap_page)
  1792. page_cache_release(e4b->bd_bitmap_page);
  1793. if (e4b->bd_buddy_page)
  1794. diff -Naru linux-2.6.32.41/fs/fat/file.c linux-2.6.32.42/fs/fat/file.c
  1795. --- linux-2.6.32.41/fs/fat/file.c 2011-05-24 01:21:22.000000000 +0700
  1796. +++ linux-2.6.32.42/fs/fat/file.c 2011-06-24 05:24:26.000000000 +0700
  1797. @@ -101,7 +101,7 @@
  1798. if (attr & ATTR_SYS)
  1799. inode->i_flags |= S_IMMUTABLE;
  1800. else
  1801. - inode->i_flags &= S_IMMUTABLE;
  1802. + inode->i_flags &= ~S_IMMUTABLE;
  1803. }
  1804.  
  1805. fat_save_attrs(inode, attr);
  1806. diff -Naru linux-2.6.32.41/fs/jbd/commit.c linux-2.6.32.42/fs/jbd/commit.c
  1807. --- linux-2.6.32.41/fs/jbd/commit.c 2011-05-24 01:21:22.000000000 +0700
  1808. +++ linux-2.6.32.42/fs/jbd/commit.c 2011-06-24 05:24:26.000000000 +0700
  1809. @@ -746,8 +746,13 @@
  1810. required. */
  1811. JBUFFER_TRACE(jh, "file as BJ_Forget");
  1812. journal_file_buffer(jh, commit_transaction, BJ_Forget);
  1813. - /* Wake up any transactions which were waiting for this
  1814. - IO to complete */
  1815. + /*
  1816. + * Wake up any transactions which were waiting for this
  1817. + * IO to complete. The barrier must be here so that changes
  1818. + * by journal_file_buffer() take effect before wake_up_bit()
  1819. + * does the waitqueue check.
  1820. + */
  1821. + smp_mb();
  1822. wake_up_bit(&bh->b_state, BH_Unshadow);
  1823. JBUFFER_TRACE(jh, "brelse shadowed buffer");
  1824. __brelse(bh);
  1825. diff -Naru linux-2.6.32.41/fs/jbd/journal.c linux-2.6.32.42/fs/jbd/journal.c
  1826. --- linux-2.6.32.41/fs/jbd/journal.c 2011-05-24 01:21:22.000000000 +0700
  1827. +++ linux-2.6.32.42/fs/jbd/journal.c 2011-06-24 05:24:26.000000000 +0700
  1828. @@ -435,9 +435,12 @@
  1829. int __log_start_commit(journal_t *journal, tid_t target)
  1830. {
  1831. /*
  1832. - * Are we already doing a recent enough commit?
  1833. + * The only transaction we can possibly wait upon is the
  1834. + * currently running transaction (if it exists). Otherwise,
  1835. + * the target tid must be an old one.
  1836. */
  1837. - if (!tid_geq(journal->j_commit_request, target)) {
  1838. + if (journal->j_running_transaction &&
  1839. + journal->j_running_transaction->t_tid == target) {
  1840. /*
  1841. * We want a new commit: OK, mark the request and wakup the
  1842. * commit thread. We do _not_ do the commit ourselves.
  1843. @@ -449,7 +452,14 @@
  1844. journal->j_commit_sequence);
  1845. wake_up(&journal->j_wait_commit);
  1846. return 1;
  1847. - }
  1848. + } else if (!tid_geq(journal->j_commit_request, target))
  1849. + /* This should never happen, but if it does, preserve
  1850. + the evidence before kjournald goes into a loop and
  1851. + increments j_commit_sequence beyond all recognition. */
  1852. + WARN_ONCE(1, "jbd: bad log_start_commit: %u %u %u %u\n",
  1853. + journal->j_commit_request, journal->j_commit_sequence,
  1854. + target, journal->j_running_transaction ?
  1855. + journal->j_running_transaction->t_tid : 0);
  1856. return 0;
  1857. }
  1858.  
  1859. diff -Naru linux-2.6.32.41/fs/partitions/ldm.c linux-2.6.32.42/fs/partitions/ldm.c
  1860. --- linux-2.6.32.41/fs/partitions/ldm.c 2011-05-24 01:21:22.000000000 +0700
  1861. +++ linux-2.6.32.42/fs/partitions/ldm.c 2011-06-24 05:24:26.000000000 +0700
  1862. @@ -1335,6 +1335,11 @@
  1863.  
  1864. list_add_tail (&f->list, frags);
  1865. found:
  1866. + if (rec >= f->num) {
  1867. + ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num);
  1868. + return false;
  1869. + }
  1870. +
  1871. if (f->map & (1 << rec)) {
  1872. ldm_error ("Duplicate VBLK, part %d.", rec);
  1873. f->map &= 0x7F; /* Mark the group as broken */
  1874. diff -Naru linux-2.6.32.41/fs/ubifs/journal.c linux-2.6.32.42/fs/ubifs/journal.c
  1875. --- linux-2.6.32.41/fs/ubifs/journal.c 2011-05-24 01:21:22.000000000 +0700
  1876. +++ linux-2.6.32.42/fs/ubifs/journal.c 2011-06-24 05:24:26.000000000 +0700
  1877. @@ -665,6 +665,7 @@
  1878.  
  1879. out_release:
  1880. release_head(c, BASEHD);
  1881. + kfree(dent);
  1882. out_ro:
  1883. ubifs_ro_mode(c, err);
  1884. if (last_reference)
  1885. diff -Naru linux-2.6.32.41/fs/ubifs/sb.c linux-2.6.32.42/fs/ubifs/sb.c
  1886. --- linux-2.6.32.41/fs/ubifs/sb.c 2011-05-24 01:21:22.000000000 +0700
  1887. +++ linux-2.6.32.42/fs/ubifs/sb.c 2011-06-24 05:24:26.000000000 +0700
  1888. @@ -474,7 +474,8 @@
  1889. * @c: UBIFS file-system description object
  1890. *
  1891. * This function returns a pointer to the superblock node or a negative error
  1892. - * code.
  1893. + * code. Note, the user of this function is responsible of kfree()'ing the
  1894. + * returned superblock buffer.
  1895. */
  1896. struct ubifs_sb_node *ubifs_read_sb_node(struct ubifs_info *c)
  1897. {
  1898. diff -Naru linux-2.6.32.41/fs/ubifs/shrinker.c linux-2.6.32.42/fs/ubifs/shrinker.c
  1899. --- linux-2.6.32.41/fs/ubifs/shrinker.c 2011-05-24 01:21:22.000000000 +0700
  1900. +++ linux-2.6.32.42/fs/ubifs/shrinker.c 2011-06-24 05:24:26.000000000 +0700
  1901. @@ -283,7 +283,11 @@
  1902. long clean_zn_cnt = atomic_long_read(&ubifs_clean_zn_cnt);
  1903.  
  1904. if (nr == 0)
  1905. - return clean_zn_cnt;
  1906. + /*
  1907. + * Due to the way UBIFS updates the clean znode counter it may
  1908. + * temporarily be negative.
  1909. + */
  1910. + return clean_zn_cnt >= 0 ? clean_zn_cnt : 1;
  1911.  
  1912. if (!clean_zn_cnt) {
  1913. /*
  1914. diff -Naru linux-2.6.32.41/fs/ubifs/super.c linux-2.6.32.42/fs/ubifs/super.c
  1915. --- linux-2.6.32.41/fs/ubifs/super.c 2011-05-24 01:21:22.000000000 +0700
  1916. +++ linux-2.6.32.42/fs/ubifs/super.c 2011-06-24 05:24:26.000000000 +0700
  1917. @@ -1550,6 +1550,7 @@
  1918. }
  1919. sup->leb_cnt = cpu_to_le32(c->leb_cnt);
  1920. err = ubifs_write_sb_node(c, sup);
  1921. + kfree(sup);
  1922. if (err)
  1923. goto out;
  1924. }
  1925. diff -Naru linux-2.6.32.41/fs/xfs/linux-2.6/xfs_sync.c linux-2.6.32.42/fs/xfs/linux-2.6/xfs_sync.c
  1926. --- linux-2.6.32.41/fs/xfs/linux-2.6/xfs_sync.c 2011-05-24 01:21:22.000000000 +0700
  1927. +++ linux-2.6.32.42/fs/xfs/linux-2.6/xfs_sync.c 2011-06-24 05:24:26.000000000 +0700
  1928. @@ -711,16 +711,24 @@
  1929. }
  1930.  
  1931. void
  1932. -__xfs_inode_clear_reclaim_tag(
  1933. - xfs_mount_t *mp,
  1934. +__xfs_inode_clear_reclaim(
  1935. xfs_perag_t *pag,
  1936. xfs_inode_t *ip)
  1937. {
  1938. - radix_tree_tag_clear(&pag->pag_ici_root,
  1939. - XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG);
  1940. pag->pag_ici_reclaimable--;
  1941. }
  1942.  
  1943. +void
  1944. +__xfs_inode_clear_reclaim_tag(
  1945. + xfs_mount_t *mp,
  1946. + xfs_perag_t *pag,
  1947. + xfs_inode_t *ip)
  1948. +{
  1949. + radix_tree_tag_clear(&pag->pag_ici_root,
  1950. + XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG);
  1951. + __xfs_inode_clear_reclaim(pag, ip);
  1952. +}
  1953. +
  1954. STATIC int
  1955. xfs_reclaim_inode(
  1956. struct xfs_inode *ip,
  1957. diff -Naru linux-2.6.32.41/fs/xfs/linux-2.6/xfs_sync.h linux-2.6.32.42/fs/xfs/linux-2.6/xfs_sync.h
  1958. --- linux-2.6.32.41/fs/xfs/linux-2.6/xfs_sync.h 2011-05-24 01:21:22.000000000 +0700
  1959. +++ linux-2.6.32.42/fs/xfs/linux-2.6/xfs_sync.h 2011-06-24 05:24:26.000000000 +0700
  1960. @@ -48,6 +48,7 @@
  1961.  
  1962. void xfs_inode_set_reclaim_tag(struct xfs_inode *ip);
  1963. void __xfs_inode_set_reclaim_tag(struct xfs_perag *pag, struct xfs_inode *ip);
  1964. +void __xfs_inode_clear_reclaim(struct xfs_perag *pag, struct xfs_inode *ip);
  1965. void __xfs_inode_clear_reclaim_tag(struct xfs_mount *mp, struct xfs_perag *pag,
  1966. struct xfs_inode *ip);
  1967.  
  1968. diff -Naru linux-2.6.32.41/fs/xfs/xfs_iget.c linux-2.6.32.42/fs/xfs/xfs_iget.c
  1969. --- linux-2.6.32.41/fs/xfs/xfs_iget.c 2011-05-24 01:21:22.000000000 +0700
  1970. +++ linux-2.6.32.42/fs/xfs/xfs_iget.c 2011-06-24 05:24:26.000000000 +0700
  1971. @@ -529,6 +529,7 @@
  1972. write_lock(&pag->pag_ici_lock);
  1973. if (!radix_tree_delete(&pag->pag_ici_root, agino))
  1974. ASSERT(0);
  1975. + __xfs_inode_clear_reclaim(pag, ip);
  1976. write_unlock(&pag->pag_ici_lock);
  1977. xfs_put_perag(mp, pag);
  1978.  
  1979. diff -Naru linux-2.6.32.41/include/linux/interrupt.h linux-2.6.32.42/include/linux/interrupt.h
  1980. --- linux-2.6.32.41/include/linux/interrupt.h 2011-05-24 01:21:22.000000000 +0700
  1981. +++ linux-2.6.32.42/include/linux/interrupt.h 2011-06-24 05:24:26.000000000 +0700
  1982. @@ -53,7 +53,7 @@
  1983. * Used by threaded interrupts which need to keep the
  1984. * irq line disabled until the threaded handler has been run.
  1985. * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend
  1986. - *
  1987. + * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set
  1988. */
  1989. #define IRQF_DISABLED 0x00000020
  1990. #define IRQF_SAMPLE_RANDOM 0x00000040
  1991. @@ -65,6 +65,7 @@
  1992. #define IRQF_IRQPOLL 0x00001000
  1993. #define IRQF_ONESHOT 0x00002000
  1994. #define IRQF_NO_SUSPEND 0x00004000
  1995. +#define IRQF_FORCE_RESUME 0x00008000
  1996.  
  1997. #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND)
  1998.  
  1999. diff -Naru linux-2.6.32.41/include/linux/pci_ids.h linux-2.6.32.42/include/linux/pci_ids.h
  2000. --- linux-2.6.32.41/include/linux/pci_ids.h 2011-05-24 01:21:22.000000000 +0700
  2001. +++ linux-2.6.32.42/include/linux/pci_ids.h 2011-06-24 05:24:26.000000000 +0700
  2002. @@ -605,6 +605,8 @@
  2003. #define PCI_DEVICE_ID_MATROX_G550 0x2527
  2004. #define PCI_DEVICE_ID_MATROX_VIA 0x4536
  2005.  
  2006. +#define PCI_VENDOR_ID_MOBILITY_ELECTRONICS 0x14f2
  2007. +
  2008. #define PCI_VENDOR_ID_CT 0x102c
  2009. #define PCI_DEVICE_ID_CT_69000 0x00c0
  2010. #define PCI_DEVICE_ID_CT_65545 0x00d8
  2011. diff -Naru linux-2.6.32.41/include/linux/seqlock.h linux-2.6.32.42/include/linux/seqlock.h
  2012. --- linux-2.6.32.41/include/linux/seqlock.h 2011-05-24 01:21:22.000000000 +0700
  2013. +++ linux-2.6.32.42/include/linux/seqlock.h 2011-06-24 05:24:26.000000000 +0700
  2014. @@ -88,12 +88,12 @@
  2015. unsigned ret;
  2016.  
  2017. repeat:
  2018. - ret = sl->sequence;
  2019. - smp_rmb();
  2020. + ret = ACCESS_ONCE(sl->sequence);
  2021. if (unlikely(ret & 1)) {
  2022. cpu_relax();
  2023. goto repeat;
  2024. }
  2025. + smp_rmb();
  2026.  
  2027. return ret;
  2028. }
  2029. diff -Naru linux-2.6.32.41/kernel/irq/manage.c linux-2.6.32.42/kernel/irq/manage.c
  2030. --- linux-2.6.32.41/kernel/irq/manage.c 2011-05-24 01:21:22.000000000 +0700
  2031. +++ linux-2.6.32.42/kernel/irq/manage.c 2011-06-24 05:24:26.000000000 +0700
  2032. @@ -265,8 +265,17 @@
  2033.  
  2034. void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume)
  2035. {
  2036. - if (resume)
  2037. + if (resume) {
  2038. + if (!(desc->status & IRQ_SUSPENDED)) {
  2039. + if (!desc->action)
  2040. + return;
  2041. + if (!(desc->action->flags & IRQF_FORCE_RESUME))
  2042. + return;
  2043. + /* Pretend that it got disabled ! */
  2044. + desc->depth++;
  2045. + }
  2046. desc->status &= ~IRQ_SUSPENDED;
  2047. + }
  2048.  
  2049. switch (desc->depth) {
  2050. case 0:
  2051. diff -Naru linux-2.6.32.41/kernel/irq/pm.c linux-2.6.32.42/kernel/irq/pm.c
  2052. --- linux-2.6.32.41/kernel/irq/pm.c 2011-05-24 01:21:22.000000000 +0700
  2053. +++ linux-2.6.32.42/kernel/irq/pm.c 2011-06-24 05:24:26.000000000 +0700
  2054. @@ -53,9 +53,6 @@
  2055. for_each_irq_desc(irq, desc) {
  2056. unsigned long flags;
  2057.  
  2058. - if (!(desc->status & IRQ_SUSPENDED))
  2059. - continue;
  2060. -
  2061. spin_lock_irqsave(&desc->lock, flags);
  2062. __enable_irq(desc, irq, true);
  2063. spin_unlock_irqrestore(&desc->lock, flags);
  2064. diff -Naru linux-2.6.32.41/kernel/lockdep.c linux-2.6.32.42/kernel/lockdep.c
  2065. --- linux-2.6.32.41/kernel/lockdep.c 2011-05-24 01:21:22.000000000 +0700
  2066. +++ linux-2.6.32.42/kernel/lockdep.c 2011-06-24 05:24:26.000000000 +0700
  2067. @@ -3243,7 +3243,7 @@
  2068. int ret = 0;
  2069.  
  2070. if (unlikely(current->lockdep_recursion))
  2071. - return ret;
  2072. + return 1; /* avoid false negative lockdep_assert_held() */
  2073.  
  2074. raw_local_irq_save(flags);
  2075. check_flags(flags);
  2076. diff -Naru linux-2.6.32.41/kernel/time/timekeeping.c linux-2.6.32.42/kernel/time/timekeeping.c
  2077. --- linux-2.6.32.41/kernel/time/timekeeping.c 2011-05-24 01:21:22.000000000 +0700
  2078. +++ linux-2.6.32.42/kernel/time/timekeeping.c 2011-06-24 05:24:26.000000000 +0700
  2079. @@ -32,6 +32,8 @@
  2080. cycle_t cycle_interval;
  2081. /* Number of clock shifted nano seconds in one NTP interval. */
  2082. u64 xtime_interval;
  2083. + /* shifted nano seconds left over when rounding cycle_interval */
  2084. + s64 xtime_remainder;
  2085. /* Raw nano seconds accumulated per NTP interval. */
  2086. u32 raw_interval;
  2087.  
  2088. @@ -62,7 +64,7 @@
  2089. static void timekeeper_setup_internals(struct clocksource *clock)
  2090. {
  2091. cycle_t interval;
  2092. - u64 tmp;
  2093. + u64 tmp, ntpinterval;
  2094.  
  2095. timekeeper.clock = clock;
  2096. clock->cycle_last = clock->read(clock);
  2097. @@ -70,6 +72,7 @@
  2098. /* Do the ns -> cycle conversion first, using original mult */
  2099. tmp = NTP_INTERVAL_LENGTH;
  2100. tmp <<= clock->shift;
  2101. + ntpinterval = tmp;
  2102. tmp += clock->mult/2;
  2103. do_div(tmp, clock->mult);
  2104. if (tmp == 0)
  2105. @@ -80,6 +83,7 @@
  2106.  
  2107. /* Go back from cycles -> shifted ns */
  2108. timekeeper.xtime_interval = (u64) interval * clock->mult;
  2109. + timekeeper.xtime_remainder = ntpinterval - timekeeper.xtime_interval;
  2110. timekeeper.raw_interval =
  2111. ((u64) interval * clock->mult) >> clock->shift;
  2112.  
  2113. @@ -788,7 +792,8 @@
  2114.  
  2115. /* accumulate error between NTP and clock interval */
  2116. timekeeper.ntp_error += tick_length;
  2117. - timekeeper.ntp_error -= timekeeper.xtime_interval <<
  2118. + timekeeper.ntp_error -=
  2119. + (timekeeper.xtime_interval + timekeeper.xtime_remainder) <<
  2120. timekeeper.ntp_error_shift;
  2121. }
  2122.  
  2123. diff -Naru linux-2.6.32.41/kernel/trace/ftrace.c linux-2.6.32.42/kernel/trace/ftrace.c
  2124. --- linux-2.6.32.41/kernel/trace/ftrace.c 2011-05-24 01:21:22.000000000 +0700
  2125. +++ linux-2.6.32.42/kernel/trace/ftrace.c 2011-06-24 05:24:26.000000000 +0700
  2126. @@ -2360,14 +2360,16 @@
  2127. ftrace_match_records(parser->buffer, parser->idx, enable);
  2128. }
  2129.  
  2130. - mutex_lock(&ftrace_lock);
  2131. - if (ftrace_start_up && ftrace_enabled)
  2132. - ftrace_run_update_code(FTRACE_ENABLE_CALLS);
  2133. - mutex_unlock(&ftrace_lock);
  2134. -
  2135. trace_parser_put(parser);
  2136. kfree(iter);
  2137.  
  2138. + if (file->f_mode & FMODE_WRITE) {
  2139. + mutex_lock(&ftrace_lock);
  2140. + if (ftrace_start_up && ftrace_enabled)
  2141. + ftrace_run_update_code(FTRACE_ENABLE_CALLS);
  2142. + mutex_unlock(&ftrace_lock);
  2143. + }
  2144. +
  2145. mutex_unlock(&ftrace_regex_lock);
  2146. return 0;
  2147. }
  2148. diff -Naru linux-2.6.32.41/lib/locking-selftest.c linux-2.6.32.42/lib/locking-selftest.c
  2149. --- linux-2.6.32.41/lib/locking-selftest.c 2011-05-24 01:21:22.000000000 +0700
  2150. +++ linux-2.6.32.42/lib/locking-selftest.c 2011-06-24 05:24:26.000000000 +0700
  2151. @@ -144,7 +144,7 @@
  2152.  
  2153. #define HARDIRQ_ENTER() \
  2154. local_irq_disable(); \
  2155. - irq_enter(); \
  2156. + __irq_enter(); \
  2157. WARN_ON(!in_irq());
  2158.  
  2159. #define HARDIRQ_EXIT() \
  2160. diff -Naru linux-2.6.32.41/Makefile linux-2.6.32.42/Makefile
  2161. --- linux-2.6.32.41/Makefile 2011-05-24 01:21:22.000000000 +0700
  2162. +++ linux-2.6.32.42/Makefile 2011-06-24 05:24:26.000000000 +0700
  2163. @@ -1,7 +1,7 @@
  2164. VERSION = 2
  2165. PATCHLEVEL = 6
  2166. SUBLEVEL = 32
  2167. -EXTRAVERSION = .41
  2168. +EXTRAVERSION = .42
  2169. NAME = Man-Eating Seals of Antiquity
  2170.  
  2171. # *DOCUMENTATION*
  2172. diff -Naru linux-2.6.32.41/mm/hugetlb.c linux-2.6.32.42/mm/hugetlb.c
  2173. --- linux-2.6.32.41/mm/hugetlb.c 2011-05-24 01:21:22.000000000 +0700
  2174. +++ linux-2.6.32.42/mm/hugetlb.c 2011-06-24 05:24:26.000000000 +0700
  2175. @@ -995,10 +995,10 @@
  2176. */
  2177. chg = vma_needs_reservation(h, vma, addr);
  2178. if (chg < 0)
  2179. - return ERR_PTR(chg);
  2180. + return ERR_PTR(-VM_FAULT_OOM);
  2181. if (chg)
  2182. if (hugetlb_get_quota(inode->i_mapping, chg))
  2183. - return ERR_PTR(-ENOSPC);
  2184. + return ERR_PTR(-VM_FAULT_SIGBUS);
  2185.  
  2186. spin_lock(&hugetlb_lock);
  2187. page = dequeue_huge_page_vma(h, vma, addr, avoid_reserve);
  2188. diff -Naru linux-2.6.32.41/mm/kmemleak.c linux-2.6.32.42/mm/kmemleak.c
  2189. --- linux-2.6.32.41/mm/kmemleak.c 2011-05-24 01:21:22.000000000 +0700
  2190. +++ linux-2.6.32.42/mm/kmemleak.c 2011-06-24 05:24:26.000000000 +0700
  2191. @@ -1354,9 +1354,12 @@
  2192. ++(*pos);
  2193.  
  2194. list_for_each_continue_rcu(n, &object_list) {
  2195. - next_obj = list_entry(n, struct kmemleak_object, object_list);
  2196. - if (get_object(next_obj))
  2197. + struct kmemleak_object *obj =
  2198. + list_entry(n, struct kmemleak_object, object_list);
  2199. + if (get_object(obj)) {
  2200. + next_obj = obj;
  2201. break;
  2202. + }
  2203. }
  2204.  
  2205. put_object(prev_obj);
  2206. diff -Naru linux-2.6.32.41/mm/page_alloc.c linux-2.6.32.42/mm/page_alloc.c
  2207. --- linux-2.6.32.41/mm/page_alloc.c 2011-05-24 01:21:22.000000000 +0700
  2208. +++ linux-2.6.32.42/mm/page_alloc.c 2011-06-24 05:24:26.000000000 +0700
  2209. @@ -1841,6 +1841,7 @@
  2210. */
  2211. alloc_flags = gfp_to_alloc_flags(gfp_mask);
  2212.  
  2213. +rebalance:
  2214. /* This is the last chance, in general, before the goto nopage. */
  2215. page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist,
  2216. high_zoneidx, alloc_flags & ~ALLOC_NO_WATERMARKS,
  2217. @@ -1848,7 +1849,6 @@
  2218. if (page)
  2219. goto got_pg;
  2220.  
  2221. -rebalance:
  2222. /* Allocate without watermarks if the context allows */
  2223. if (alloc_flags & ALLOC_NO_WATERMARKS) {
  2224. page = __alloc_pages_high_priority(gfp_mask, order,
  2225. diff -Naru linux-2.6.32.41/net/atm/atm_sysfs.c linux-2.6.32.42/net/atm/atm_sysfs.c
  2226. --- linux-2.6.32.41/net/atm/atm_sysfs.c 2011-05-24 01:21:22.000000000 +0700
  2227. +++ linux-2.6.32.42/net/atm/atm_sysfs.c 2011-06-24 05:24:26.000000000 +0700
  2228. @@ -57,6 +57,14 @@
  2229. return pos - buf;
  2230. }
  2231.  
  2232. +static ssize_t show_atmindex(struct device *cdev,
  2233. + struct device_attribute *attr, char *buf)
  2234. +{
  2235. + struct atm_dev *adev = to_atm_dev(cdev);
  2236. +
  2237. + return sprintf(buf, "%d\n", adev->number);
  2238. +}
  2239. +
  2240. static ssize_t show_carrier(struct device *cdev,
  2241. struct device_attribute *attr, char *buf)
  2242. {
  2243. @@ -97,6 +105,7 @@
  2244.  
  2245. static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
  2246. static DEVICE_ATTR(atmaddress, S_IRUGO, show_atmaddress, NULL);
  2247. +static DEVICE_ATTR(atmindex, S_IRUGO, show_atmindex, NULL);
  2248. static DEVICE_ATTR(carrier, S_IRUGO, show_carrier, NULL);
  2249. static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
  2250. static DEVICE_ATTR(link_rate, S_IRUGO, show_link_rate, NULL);
  2251. @@ -104,6 +113,7 @@
  2252. static struct device_attribute *atm_attrs[] = {
  2253. &dev_attr_atmaddress,
  2254. &dev_attr_address,
  2255. + &dev_attr_atmindex,
  2256. &dev_attr_carrier,
  2257. &dev_attr_type,
  2258. &dev_attr_link_rate,
  2259. diff -Naru linux-2.6.32.41/net/ipv6/netfilter/ip6t_REJECT.c linux-2.6.32.42/net/ipv6/netfilter/ip6t_REJECT.c
  2260. --- linux-2.6.32.41/net/ipv6/netfilter/ip6t_REJECT.c 2011-05-24 01:21:22.000000000 +0700
  2261. +++ linux-2.6.32.42/net/ipv6/netfilter/ip6t_REJECT.c 2011-06-24 05:24:26.000000000 +0700
  2262. @@ -43,6 +43,8 @@
  2263. int tcphoff, needs_ack;
  2264. const struct ipv6hdr *oip6h = ipv6_hdr(oldskb);
  2265. struct ipv6hdr *ip6h;
  2266. +#define DEFAULT_TOS_VALUE 0x0U
  2267. + const __u8 tclass = DEFAULT_TOS_VALUE;
  2268. struct dst_entry *dst = NULL;
  2269. u8 proto;
  2270. struct flowi fl;
  2271. @@ -121,7 +123,7 @@
  2272. skb_put(nskb, sizeof(struct ipv6hdr));
  2273. skb_reset_network_header(nskb);
  2274. ip6h = ipv6_hdr(nskb);
  2275. - ip6h->version = 6;
  2276. + *(__be32 *)ip6h = htonl(0x60000000 | (tclass << 20));
  2277. ip6h->hop_limit = dst_metric(dst, RTAX_HOPLIMIT);
  2278. ip6h->nexthdr = IPPROTO_TCP;
  2279. ipv6_addr_copy(&ip6h->saddr, &oip6h->daddr);
  2280. diff -Naru linux-2.6.32.41/net/ipv6/netfilter/nf_conntrack_reasm.c linux-2.6.32.42/net/ipv6/netfilter/nf_conntrack_reasm.c
  2281. --- linux-2.6.32.41/net/ipv6/netfilter/nf_conntrack_reasm.c 2011-05-24 01:21:22.000000000 +0700
  2282. +++ linux-2.6.32.42/net/ipv6/netfilter/nf_conntrack_reasm.c 2011-06-24 05:24:26.000000000 +0700
  2283. @@ -474,7 +474,7 @@
  2284.  
  2285. /* all original skbs are linked into the NFCT_FRAG6_CB(head).orig */
  2286. fp = skb_shinfo(head)->frag_list;
  2287. - if (NFCT_FRAG6_CB(fp)->orig == NULL)
  2288. + if (fp && NFCT_FRAG6_CB(fp)->orig == NULL)
  2289. /* at above code, head skb is divided into two skbs. */
  2290. fp = fp->next;
  2291.  
  2292. @@ -600,12 +600,6 @@
  2293. hdr = ipv6_hdr(clone);
  2294. fhdr = (struct frag_hdr *)skb_transport_header(clone);
  2295.  
  2296. - if (!(fhdr->frag_off & htons(0xFFF9))) {
  2297. - pr_debug("Invalid fragment offset\n");
  2298. - /* It is not a fragmented frame */
  2299. - goto ret_orig;
  2300. - }
  2301. -
  2302. if (atomic_read(&nf_init_frags.mem) > nf_init_frags.high_thresh)
  2303. nf_ct_frag6_evictor();
  2304.  
  2305. diff -Naru linux-2.6.32.41/net/netfilter/xt_DSCP.c linux-2.6.32.42/net/netfilter/xt_DSCP.c
  2306. --- linux-2.6.32.41/net/netfilter/xt_DSCP.c 2011-05-24 01:21:22.000000000 +0700
  2307. +++ linux-2.6.32.42/net/netfilter/xt_DSCP.c 2011-06-24 05:24:26.000000000 +0700
  2308. @@ -99,7 +99,7 @@
  2309. u_int8_t orig, nv;
  2310.  
  2311. orig = ipv6_get_dsfield(iph);
  2312. - nv = (orig & info->tos_mask) ^ info->tos_value;
  2313. + nv = (orig & ~info->tos_mask) ^ info->tos_value;
  2314.  
  2315. if (orig != nv) {
  2316. if (!skb_make_writable(skb, sizeof(struct iphdr)))
  2317. diff -Naru linux-2.6.32.41/net/sunrpc/xprtsock.c linux-2.6.32.42/net/sunrpc/xprtsock.c
  2318. --- linux-2.6.32.41/net/sunrpc/xprtsock.c 2011-05-24 01:21:22.000000000 +0700
  2319. +++ linux-2.6.32.42/net/sunrpc/xprtsock.c 2011-06-24 05:24:26.000000000 +0700
  2320. @@ -1381,7 +1381,6 @@
  2321. case TCP_CLOSE_WAIT:
  2322. /* The server initiated a shutdown of the socket */
  2323. xprt_force_disconnect(xprt);
  2324. - case TCP_SYN_SENT:
  2325. xprt->connect_cookie++;
  2326. case TCP_CLOSING:
  2327. /*
  2328. @@ -1843,6 +1842,7 @@
  2329. static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
  2330. {
  2331. struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
  2332. + int ret = -ENOTCONN;
  2333.  
  2334. if (!transport->inet) {
  2335. struct sock *sk = sock->sk;
  2336. @@ -1874,12 +1874,22 @@
  2337. }
  2338.  
  2339. if (!xprt_bound(xprt))
  2340. - return -ENOTCONN;
  2341. + goto out;
  2342.  
  2343. /* Tell the socket layer to start connecting... */
  2344. xprt->stat.connect_count++;
  2345. xprt->stat.connect_start = jiffies;
  2346. - return kernel_connect(sock, xs_addr(xprt), xprt->addrlen, O_NONBLOCK);
  2347. + ret = kernel_connect(sock, xs_addr(xprt), xprt->addrlen, O_NONBLOCK);
  2348. + switch (ret) {
  2349. + case 0:
  2350. + case -EINPROGRESS:
  2351. + /* SYN_SENT! */
  2352. + xprt->connect_cookie++;
  2353. + if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO)
  2354. + xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO;
  2355. + }
  2356. +out:
  2357. + return ret;
  2358. }
  2359.  
  2360. /**
  2361. diff -Naru linux-2.6.32.41/net/wireless/nl80211.c linux-2.6.32.42/net/wireless/nl80211.c
  2362. --- linux-2.6.32.41/net/wireless/nl80211.c 2011-05-24 01:21:22.000000000 +0700
  2363. +++ linux-2.6.32.42/net/wireless/nl80211.c 2011-06-24 05:24:26.000000000 +0700
  2364. @@ -2995,12 +2995,12 @@
  2365. i = 0;
  2366. if (info->attrs[NL80211_ATTR_SCAN_SSIDS]) {
  2367. nla_for_each_nested(attr, info->attrs[NL80211_ATTR_SCAN_SSIDS], tmp) {
  2368. + request->ssids[i].ssid_len = nla_len(attr);
  2369. if (request->ssids[i].ssid_len > IEEE80211_MAX_SSID_LEN) {
  2370. err = -EINVAL;
  2371. goto out_free;
  2372. }
  2373. memcpy(request->ssids[i].ssid, nla_data(attr), nla_len(attr));
  2374. - request->ssids[i].ssid_len = nla_len(attr);
  2375. i++;
  2376. }
  2377. }
  2378. diff -Naru linux-2.6.32.41/sound/pci/hda/patch_realtek.c linux-2.6.32.42/sound/pci/hda/patch_realtek.c
  2379. --- linux-2.6.32.41/sound/pci/hda/patch_realtek.c 2011-05-24 01:21:22.000000000 +0700
  2380. +++ linux-2.6.32.42/sound/pci/hda/patch_realtek.c 2011-06-24 05:24:26.000000000 +0700
  2381. @@ -12662,6 +12662,7 @@
  2382. SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One",
  2383. ALC268_ACER_ASPIRE_ONE),
  2384. SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL),
  2385. + SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron 910", ALC268_AUTO),
  2386. SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0,
  2387. "Dell Inspiron Mini9/Vostro A90", ALC268_DELL),
  2388. /* almost compatible with toshiba but with optional digital outs;
  2389. diff -Naru linux-2.6.32.41/sound/pci/hda/patch_sigmatel.c linux-2.6.32.42/sound/pci/hda/patch_sigmatel.c
  2390. --- linux-2.6.32.41/sound/pci/hda/patch_sigmatel.c 2011-05-24 01:21:22.000000000 +0700
  2391. +++ linux-2.6.32.42/sound/pci/hda/patch_sigmatel.c 2011-06-24 05:24:26.000000000 +0700
  2392. @@ -1600,7 +1600,7 @@
  2393. SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02fe,
  2394. "Dell Studio XPS 1645", STAC_DELL_M6_BOTH),
  2395. SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0413,
  2396. - "Dell Studio 1558", STAC_DELL_M6_BOTH),
  2397. + "Dell Studio 1558", STAC_DELL_M6_DMIC),
  2398. {} /* terminator */
  2399. };
  2400.  
  2401. diff -Naru linux-2.6.32.41/sound/soc/codecs/wm_hubs.c linux-2.6.32.42/sound/soc/codecs/wm_hubs.c
  2402. --- linux-2.6.32.41/sound/soc/codecs/wm_hubs.c 2011-05-24 01:21:22.000000000 +0700
  2403. +++ linux-2.6.32.42/sound/soc/codecs/wm_hubs.c 2011-06-24 05:24:26.000000000 +0700
  2404. @@ -639,17 +639,17 @@
  2405. static const struct snd_soc_dapm_route lineout1_diff_routes[] = {
  2406. { "LINEOUT1 Mixer", "IN1L Switch", "IN1L PGA" },
  2407. { "LINEOUT1 Mixer", "IN1R Switch", "IN1R PGA" },
  2408. - { "LINEOUT1 Mixer", "Output Switch", "Left Output Mixer" },
  2409. + { "LINEOUT1 Mixer", "Output Switch", "Left Output PGA" },
  2410.  
  2411. { "LINEOUT1N Driver", NULL, "LINEOUT1 Mixer" },
  2412. { "LINEOUT1P Driver", NULL, "LINEOUT1 Mixer" },
  2413. };
  2414.  
  2415. static const struct snd_soc_dapm_route lineout1_se_routes[] = {
  2416. - { "LINEOUT1N Mixer", "Left Output Switch", "Left Output Mixer" },
  2417. - { "LINEOUT1N Mixer", "Right Output Switch", "Left Output Mixer" },
  2418. + { "LINEOUT1N Mixer", "Left Output Switch", "Left Output PGA" },
  2419. + { "LINEOUT1N Mixer", "Right Output Switch", "Right Output PGA" },
  2420.  
  2421. - { "LINEOUT1P Mixer", "Left Output Switch", "Left Output Mixer" },
  2422. + { "LINEOUT1P Mixer", "Left Output Switch", "Left Output PGA" },
  2423.  
  2424. { "LINEOUT1N Driver", NULL, "LINEOUT1N Mixer" },
  2425. { "LINEOUT1P Driver", NULL, "LINEOUT1P Mixer" },
  2426. @@ -658,17 +658,17 @@
  2427. static const struct snd_soc_dapm_route lineout2_diff_routes[] = {
  2428. { "LINEOUT2 Mixer", "IN2L Switch", "IN2L PGA" },
  2429. { "LINEOUT2 Mixer", "IN2R Switch", "IN2R PGA" },
  2430. - { "LINEOUT2 Mixer", "Output Switch", "Right Output Mixer" },
  2431. + { "LINEOUT2 Mixer", "Output Switch", "Right Output PGA" },
  2432.  
  2433. { "LINEOUT2N Driver", NULL, "LINEOUT2 Mixer" },
  2434. { "LINEOUT2P Driver", NULL, "LINEOUT2 Mixer" },
  2435. };
  2436.  
  2437. static const struct snd_soc_dapm_route lineout2_se_routes[] = {
  2438. - { "LINEOUT2N Mixer", "Left Output Switch", "Left Output Mixer" },
  2439. - { "LINEOUT2N Mixer", "Right Output Switch", "Left Output Mixer" },
  2440. + { "LINEOUT2N Mixer", "Left Output Switch", "Left Output PGA" },
  2441. + { "LINEOUT2N Mixer", "Right Output Switch", "Right Output PGA" },
  2442.  
  2443. - { "LINEOUT2P Mixer", "Right Output Switch", "Right Output Mixer" },
  2444. + { "LINEOUT2P Mixer", "Right Output Switch", "Right Output PGA" },
  2445.  
  2446. { "LINEOUT2N Driver", NULL, "LINEOUT2N Mixer" },
  2447. { "LINEOUT2P Driver", NULL, "LINEOUT2P Mixer" },
  2448. @@ -686,17 +686,21 @@
  2449. snd_soc_update_bits(codec, WM8993_RIGHT_LINE_INPUT_3_4_VOLUME,
  2450. WM8993_IN2_VU, WM8993_IN2_VU);
  2451.  
  2452. + snd_soc_update_bits(codec, WM8993_SPEAKER_VOLUME_LEFT,
  2453. + WM8993_SPKOUT_VU, WM8993_SPKOUT_VU);
  2454. snd_soc_update_bits(codec, WM8993_SPEAKER_VOLUME_RIGHT,
  2455. WM8993_SPKOUT_VU, WM8993_SPKOUT_VU);
  2456.  
  2457. snd_soc_update_bits(codec, WM8993_LEFT_OUTPUT_VOLUME,
  2458. - WM8993_HPOUT1L_ZC, WM8993_HPOUT1L_ZC);
  2459. + WM8993_HPOUT1_VU | WM8993_HPOUT1L_ZC,
  2460. + WM8993_HPOUT1_VU | WM8993_HPOUT1L_ZC);
  2461. snd_soc_update_bits(codec, WM8993_RIGHT_OUTPUT_VOLUME,
  2462. WM8993_HPOUT1_VU | WM8993_HPOUT1R_ZC,
  2463. WM8993_HPOUT1_VU | WM8993_HPOUT1R_ZC);
  2464.  
  2465. snd_soc_update_bits(codec, WM8993_LEFT_OPGA_VOLUME,
  2466. - WM8993_MIXOUTL_ZC, WM8993_MIXOUTL_ZC);
  2467. + WM8993_MIXOUTL_ZC | WM8993_MIXOUT_VU,
  2468. + WM8993_MIXOUTL_ZC | WM8993_MIXOUT_VU);
  2469. snd_soc_update_bits(codec, WM8993_RIGHT_OPGA_VOLUME,
  2470. WM8993_MIXOUTR_ZC | WM8993_MIXOUT_VU,
  2471. WM8993_MIXOUTR_ZC | WM8993_MIXOUT_VU);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement