]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.kernel.org/patch-2.6.27.25-26
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.kernel.org / patch-2.6.27.25-26
CommitLineData
00e5a55c
BS
1From: Greg Kroah-Hartman <gregkh@suse.de>
2Subject: Upstream 2.6.27.26 release from kernel.org
3
4Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
5
6diff --git a/Makefile b/Makefile
7index 1314692..90764ee 100644
8--- a/Makefile
9+++ b/Makefile
10@@ -1,7 +1,7 @@
11 VERSION = 2
12 PATCHLEVEL = 6
13 SUBLEVEL = 27
14-EXTRAVERSION = .25
15+EXTRAVERSION = .26
16 NAME = Trembling Tortoise
17
18 # *DOCUMENTATION*
19diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
20index dfaa343..1177f10 100644
21--- a/arch/x86/kernel/reboot.c
22+++ b/arch/x86/kernel/reboot.c
23@@ -169,6 +169,24 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
24 DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
25 },
26 },
27+ { /* Handle problems with rebooting on Dell Optiplex 360 with 0T656F */
28+ .callback = set_bios_reboot,
29+ .ident = "Dell OptiPlex 360",
30+ .matches = {
31+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
32+ DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
33+ DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
34+ },
35+ },
36+ { /* Handle problems with rebooting on Dell Optiplex 330 with 0KP561 */
37+ .callback = set_bios_reboot,
38+ .ident = "Dell OptiPlex 330",
39+ .matches = {
40+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
41+ DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
42+ DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
43+ },
44+ },
45 { /* Handle problems with rebooting on Dell 2400's */
46 .callback = set_bios_reboot,
47 .ident = "Dell PowerEdge 2400",
48diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
49index 2781331..f0b164b 100644
50--- a/arch/x86/kernel/setup.c
51+++ b/arch/x86/kernel/setup.c
52@@ -250,15 +250,13 @@ static inline void copy_edd(void)
53
54 #ifdef CONFIG_BLK_DEV_INITRD
55
56-#ifdef CONFIG_X86_32
57-
58 #define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT)
59 static void __init relocate_initrd(void)
60 {
61
62 u64 ramdisk_image = boot_params.hdr.ramdisk_image;
63 u64 ramdisk_size = boot_params.hdr.ramdisk_size;
64- u64 end_of_lowmem = max_low_pfn << PAGE_SHIFT;
65+ u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT;
66 u64 ramdisk_here;
67 unsigned long slop, clen, mapaddr;
68 char *p, *q;
69@@ -314,14 +312,13 @@ static void __init relocate_initrd(void)
70 ramdisk_image, ramdisk_image + ramdisk_size - 1,
71 ramdisk_here, ramdisk_here + ramdisk_size - 1);
72 }
73-#endif
74
75 static void __init reserve_initrd(void)
76 {
77 u64 ramdisk_image = boot_params.hdr.ramdisk_image;
78 u64 ramdisk_size = boot_params.hdr.ramdisk_size;
79 u64 ramdisk_end = ramdisk_image + ramdisk_size;
80- u64 end_of_lowmem = max_low_pfn << PAGE_SHIFT;
81+ u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT;
82
83 if (!boot_params.hdr.type_of_loader ||
84 !ramdisk_image || !ramdisk_size)
85@@ -351,14 +348,8 @@ static void __init reserve_initrd(void)
86 return;
87 }
88
89-#ifdef CONFIG_X86_32
90 relocate_initrd();
91-#else
92- printk(KERN_ERR "initrd extends beyond end of memory "
93- "(0x%08llx > 0x%08llx)\ndisabling initrd\n",
94- ramdisk_end, end_of_lowmem);
95- initrd_start = 0;
96-#endif
97+
98 free_early(ramdisk_image, ramdisk_end);
99 }
100 #else
101diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
102index 395f8ea..615fcd3 100644
103--- a/drivers/block/floppy.c
104+++ b/drivers/block/floppy.c
105@@ -177,6 +177,7 @@ static int print_unex = 1;
106 #include <linux/interrupt.h>
107 #include <linux/init.h>
108 #include <linux/platform_device.h>
109+#include <linux/mod_devicetable.h>
110 #include <linux/buffer_head.h> /* for invalidate_buffers() */
111 #include <linux/mutex.h>
112
113@@ -551,6 +552,8 @@ static void process_fd_request(void);
114 static void recalibrate_floppy(void);
115 static void floppy_shutdown(unsigned long);
116
117+static int floppy_request_regions(int);
118+static void floppy_release_regions(int);
119 static int floppy_grab_irq_and_dma(void);
120 static void floppy_release_irq_and_dma(void);
121
122@@ -4273,8 +4276,7 @@ static int __init floppy_init(void)
123 FDCS->rawcmd = 2;
124 if (user_reset_fdc(-1, FD_RESET_ALWAYS, 0)) {
125 /* free ioports reserved by floppy_grab_irq_and_dma() */
126- release_region(FDCS->address + 2, 4);
127- release_region(FDCS->address + 7, 1);
128+ floppy_release_regions(fdc);
129 FDCS->address = -1;
130 FDCS->version = FDC_NONE;
131 continue;
132@@ -4283,8 +4285,7 @@ static int __init floppy_init(void)
133 FDCS->version = get_fdc_version();
134 if (FDCS->version == FDC_NONE) {
135 /* free ioports reserved by floppy_grab_irq_and_dma() */
136- release_region(FDCS->address + 2, 4);
137- release_region(FDCS->address + 7, 1);
138+ floppy_release_regions(fdc);
139 FDCS->address = -1;
140 continue;
141 }
142@@ -4357,6 +4358,47 @@ out_put_disk:
143
144 static DEFINE_SPINLOCK(floppy_usage_lock);
145
146+static const struct io_region {
147+ int offset;
148+ int size;
149+} io_regions[] = {
150+ { 2, 1 },
151+ /* address + 3 is sometimes reserved by pnp bios for motherboard */
152+ { 4, 2 },
153+ /* address + 6 is reserved, and may be taken by IDE.
154+ * Unfortunately, Adaptec doesn't know this :-(, */
155+ { 7, 1 },
156+};
157+
158+static void floppy_release_allocated_regions(int fdc, const struct io_region *p)
159+{
160+ while (p != io_regions) {
161+ p--;
162+ release_region(FDCS->address + p->offset, p->size);
163+ }
164+}
165+
166+#define ARRAY_END(X) (&((X)[ARRAY_SIZE(X)]))
167+
168+static int floppy_request_regions(int fdc)
169+{
170+ const struct io_region *p;
171+
172+ for (p = io_regions; p < ARRAY_END(io_regions); p++) {
173+ if (!request_region(FDCS->address + p->offset, p->size, "floppy")) {
174+ DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address + p->offset);
175+ floppy_release_allocated_regions(fdc, p);
176+ return -EBUSY;
177+ }
178+ }
179+ return 0;
180+}
181+
182+static void floppy_release_regions(int fdc)
183+{
184+ floppy_release_allocated_regions(fdc, ARRAY_END(io_regions));
185+}
186+
187 static int floppy_grab_irq_and_dma(void)
188 {
189 unsigned long flags;
190@@ -4398,18 +4440,8 @@ static int floppy_grab_irq_and_dma(void)
191
192 for (fdc = 0; fdc < N_FDC; fdc++) {
193 if (FDCS->address != -1) {
194- if (!request_region(FDCS->address + 2, 4, "floppy")) {
195- DPRINT("Floppy io-port 0x%04lx in use\n",
196- FDCS->address + 2);
197- goto cleanup1;
198- }
199- if (!request_region(FDCS->address + 7, 1, "floppy DIR")) {
200- DPRINT("Floppy io-port 0x%04lx in use\n",
201- FDCS->address + 7);
202- goto cleanup2;
203- }
204- /* address + 6 is reserved, and may be taken by IDE.
205- * Unfortunately, Adaptec doesn't know this :-(, */
206+ if (floppy_request_regions(fdc))
207+ goto cleanup;
208 }
209 }
210 for (fdc = 0; fdc < N_FDC; fdc++) {
211@@ -4431,15 +4463,11 @@ static int floppy_grab_irq_and_dma(void)
212 fdc = 0;
213 irqdma_allocated = 1;
214 return 0;
215-cleanup2:
216- release_region(FDCS->address + 2, 4);
217-cleanup1:
218+cleanup:
219 fd_free_irq();
220 fd_free_dma();
221- while (--fdc >= 0) {
222- release_region(FDCS->address + 2, 4);
223- release_region(FDCS->address + 7, 1);
224- }
225+ while (--fdc >= 0)
226+ floppy_release_regions(fdc);
227 spin_lock_irqsave(&floppy_usage_lock, flags);
228 usage_count--;
229 spin_unlock_irqrestore(&floppy_usage_lock, flags);
230@@ -4500,10 +4528,8 @@ static void floppy_release_irq_and_dma(void)
231 #endif
232 old_fdc = fdc;
233 for (fdc = 0; fdc < N_FDC; fdc++)
234- if (FDCS->address != -1) {
235- release_region(FDCS->address + 2, 4);
236- release_region(FDCS->address + 7, 1);
237- }
238+ if (FDCS->address != -1)
239+ floppy_release_regions(fdc);
240 fdc = old_fdc;
241 }
242
243@@ -4572,6 +4598,13 @@ MODULE_AUTHOR("Alain L. Knaff");
244 MODULE_SUPPORTED_DEVICE("fd");
245 MODULE_LICENSE("GPL");
246
247+/* This doesn't actually get used other than for module information */
248+static const struct pnp_device_id floppy_pnpids[] = {
249+ { "PNP0700", 0 },
250+ { }
251+};
252+MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
253+
254 #else
255
256 __setup("floppy=", floppy_setup);
257diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
258index d3d7864..729be5e 100644
259--- a/drivers/char/moxa.c
260+++ b/drivers/char/moxa.c
261@@ -1158,6 +1158,11 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
262 return -ENODEV;
263 }
264
265+ if (port % MAX_PORTS_PER_BOARD >= brd->numPorts) {
266+ retval = -ENODEV;
267+ goto out_unlock;
268+ }
269+
270 ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
271 ch->port.count++;
272 tty->driver_data = ch;
273@@ -1182,8 +1187,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
274 moxa_close_port(ch);
275 } else
276 ch->port.flags |= ASYNC_NORMAL_ACTIVE;
277+out_unlock:
278 mutex_unlock(&moxa_openlock);
279-
280 return retval;
281 }
282
283diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
284index b638403..ebda9a8 100644
285--- a/drivers/char/mxser.c
286+++ b/drivers/char/mxser.c
287@@ -2790,7 +2790,7 @@ static int __init mxser_module_init(void)
288 continue;
289
290 brd = &mxser_boards[m];
291- retval = mxser_get_ISA_conf(!ioaddr[b], brd);
292+ retval = mxser_get_ISA_conf(ioaddr[b], brd);
293 if (retval <= 0) {
294 brd->info = NULL;
295 continue;
296diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
297index f070ae7..0b255b9 100644
298--- a/drivers/char/pcmcia/cm4000_cs.c
299+++ b/drivers/char/pcmcia/cm4000_cs.c
300@@ -1575,7 +1575,8 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
301 clear_bit(LOCK_IO, &dev->flags);
302 wake_up_interruptible(&dev->ioq);
303
304- return 0;
305+ rc = 0;
306+ break;
307 case CM_IOCSPTS:
308 {
309 struct ptsreq krnptsreq;
310diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
311index 3bf8ee1..a36e9aa 100644
312--- a/drivers/firmware/memmap.c
313+++ b/drivers/firmware/memmap.c
314@@ -31,8 +31,12 @@
315 * information is necessary as for the resource tree.
316 */
317 struct firmware_map_entry {
318- resource_size_t start; /* start of the memory range */
319- resource_size_t end; /* end of the memory range (incl.) */
320+ /*
321+ * start and end must be u64 rather than resource_size_t, because e820
322+ * resources can lie at addresses above 4G.
323+ */
324+ u64 start; /* start of the memory range */
325+ u64 end; /* end of the memory range (incl.) */
326 const char *type; /* type of the memory range */
327 struct list_head list; /* entry for the linked list */
328 struct kobject kobj; /* kobject for each entry */
329@@ -101,7 +105,7 @@ static LIST_HEAD(map_entries);
330 * Common implementation of firmware_map_add() and firmware_map_add_early()
331 * which expects a pre-allocated struct firmware_map_entry.
332 **/
333-static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
334+static int firmware_map_add_entry(u64 start, u64 end,
335 const char *type,
336 struct firmware_map_entry *entry)
337 {
338@@ -132,8 +136,7 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
339 *
340 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
341 **/
342-int firmware_map_add(resource_size_t start, resource_size_t end,
343- const char *type)
344+int firmware_map_add(u64 start, u64 end, const char *type)
345 {
346 struct firmware_map_entry *entry;
347
348@@ -157,8 +160,7 @@ int firmware_map_add(resource_size_t start, resource_size_t end,
349 *
350 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
351 **/
352-int __init firmware_map_add_early(resource_size_t start, resource_size_t end,
353- const char *type)
354+int __init firmware_map_add_early(u64 start, u64 end, const char *type)
355 {
356 struct firmware_map_entry *entry;
357
358diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
359index 9559248..8c844a1 100644
360--- a/drivers/infiniband/hw/mlx4/qp.c
361+++ b/drivers/infiniband/hw/mlx4/qp.c
362@@ -1563,12 +1563,16 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
363 break;
364
365 case IB_WR_LOCAL_INV:
366+ ctrl->srcrb_flags |=
367+ cpu_to_be32(MLX4_WQE_CTRL_STRONG_ORDER);
368 set_local_inv_seg(wqe, wr->ex.invalidate_rkey);
369 wqe += sizeof (struct mlx4_wqe_local_inval_seg);
370 size += sizeof (struct mlx4_wqe_local_inval_seg) / 16;
371 break;
372
373 case IB_WR_FAST_REG_MR:
374+ ctrl->srcrb_flags |=
375+ cpu_to_be32(MLX4_WQE_CTRL_STRONG_ORDER);
376 set_fmr_seg(wqe, wr);
377 wqe += sizeof (struct mlx4_wqe_fmr_seg);
378 size += sizeof (struct mlx4_wqe_fmr_seg) / 16;
379diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
380index f126566..3d337d9 100644
381--- a/drivers/isdn/hisax/hfc_pci.c
382+++ b/drivers/isdn/hisax/hfc_pci.c
383@@ -82,8 +82,9 @@ release_io_hfcpci(struct IsdnCardState *cs)
384 Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2);
385 pci_write_config_word(cs->hw.hfcpci.dev, PCI_COMMAND, 0); /* disable memory mapped ports + busmaster */
386 del_timer(&cs->hw.hfcpci.timer);
387- kfree(cs->hw.hfcpci.share_start);
388- cs->hw.hfcpci.share_start = NULL;
389+ pci_free_consistent(cs->hw.hfcpci.dev, 0x8000,
390+ cs->hw.hfcpci.fifos, cs->hw.hfcpci.dma);
391+ cs->hw.hfcpci.fifos = NULL;
392 iounmap((void *)cs->hw.hfcpci.pci_io);
393 }
394
395@@ -1663,8 +1664,19 @@ setup_hfcpci(struct IsdnCard *card)
396 dev_hfcpci);
397 i++;
398 if (tmp_hfcpci) {
399+ dma_addr_t dma_mask = DMA_BIT_MASK(32) & ~0x7fffUL;
400 if (pci_enable_device(tmp_hfcpci))
401 continue;
402+ if (pci_set_dma_mask(tmp_hfcpci, dma_mask)) {
403+ printk(KERN_WARNING
404+ "HiSax hfc_pci: No suitable DMA available.\n");
405+ continue;
406+ }
407+ if (pci_set_consistent_dma_mask(tmp_hfcpci, dma_mask)) {
408+ printk(KERN_WARNING
409+ "HiSax hfc_pci: No suitable consistent DMA available.\n");
410+ continue;
411+ }
412 pci_set_master(tmp_hfcpci);
413 if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK)))
414 continue;
415@@ -1693,22 +1705,29 @@ setup_hfcpci(struct IsdnCard *card)
416 printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
417 return (0);
418 }
419+
420 /* Allocate memory for FIFOS */
421- /* Because the HFC-PCI needs a 32K physical alignment, we */
422- /* need to allocate the double mem and align the address */
423- if (!(cs->hw.hfcpci.share_start = kmalloc(65536, GFP_KERNEL))) {
424- printk(KERN_WARNING "HFC-PCI: Error allocating memory for FIFO!\n");
425+ cs->hw.hfcpci.fifos = pci_alloc_consistent(cs->hw.hfcpci.dev,
426+ 0x8000, &cs->hw.hfcpci.dma);
427+ if (!cs->hw.hfcpci.fifos) {
428+ printk(KERN_WARNING "HFC-PCI: Error allocating FIFO memory!\n");
429+ return 0;
430+ }
431+ if (cs->hw.hfcpci.dma & 0x7fff) {
432+ printk(KERN_WARNING
433+ "HFC-PCI: Error DMA memory not on 32K boundary (%lx)\n",
434+ (u_long)cs->hw.hfcpci.dma);
435+ pci_free_consistent(cs->hw.hfcpci.dev, 0x8000,
436+ cs->hw.hfcpci.fifos, cs->hw.hfcpci.dma);
437 return 0;
438 }
439- cs->hw.hfcpci.fifos = (void *)
440- (((ulong) cs->hw.hfcpci.share_start) & ~0x7FFF) + 0x8000;
441- pci_write_config_dword(cs->hw.hfcpci.dev, 0x80, (u_int) virt_to_bus(cs->hw.hfcpci.fifos));
442+ pci_write_config_dword(cs->hw.hfcpci.dev, 0x80, (u32)cs->hw.hfcpci.dma);
443 cs->hw.hfcpci.pci_io = ioremap((ulong) cs->hw.hfcpci.pci_io, 256);
444 printk(KERN_INFO
445- "HFC-PCI: defined at mem %p fifo %p(%#x) IRQ %d HZ %d\n",
446+ "HFC-PCI: defined at mem %p fifo %p(%lx) IRQ %d HZ %d\n",
447 cs->hw.hfcpci.pci_io,
448 cs->hw.hfcpci.fifos,
449- (u_int) virt_to_bus(cs->hw.hfcpci.fifos),
450+ (u_long)cs->hw.hfcpci.dma,
451 cs->irq, HZ);
452
453 spin_lock_irqsave(&cs->lock, flags);
454diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
455index e8d429f..f1a828b 100644
456--- a/drivers/isdn/hisax/hisax.h
457+++ b/drivers/isdn/hisax/hisax.h
458@@ -694,7 +694,7 @@ struct hfcPCI_hw {
459 int nt_timer;
460 struct pci_dev *dev;
461 unsigned char *pci_io; /* start of PCI IO memory */
462- void *share_start; /* shared memory for Fifos start */
463+ dma_addr_t dma; /* dma handle for Fifos */
464 void *fifos; /* FIFO memory */
465 int last_bfifo_cnt[2]; /* marker saving last b-fifo frame count */
466 struct timer_list timer;
467diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
468index 61f5753..7830b01 100644
469--- a/drivers/md/dm-mpath.c
470+++ b/drivers/md/dm-mpath.c
471@@ -540,6 +540,12 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg,
472 return -EINVAL;
473 }
474
475+ if (ps_argc > as->argc) {
476+ dm_put_path_selector(pst);
477+ ti->error = "not enough arguments for path selector";
478+ return -EINVAL;
479+ }
480+
481 r = pst->create(&pg->ps, ps_argc, as->argv);
482 if (r) {
483 dm_put_path_selector(pst);
484@@ -684,6 +690,11 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m)
485 if (!hw_argc)
486 return 0;
487
488+ if (hw_argc > as->argc) {
489+ ti->error = "not enough arguments for hardware handler";
490+ return -EINVAL;
491+ }
492+
493 m->hw_handler_name = kstrdup(shift(as), GFP_KERNEL);
494 request_module("scsi_dh_%s", m->hw_handler_name);
495 if (scsi_dh_handler_exist(m->hw_handler_name) == 0) {
496diff --git a/drivers/md/dm.c b/drivers/md/dm.c
497index ace998c..925efaf 100644
498--- a/drivers/md/dm.c
499+++ b/drivers/md/dm.c
500@@ -265,6 +265,10 @@ static int dm_blk_open(struct inode *inode, struct file *file)
501 goto out;
502 }
503
504+ if (test_bit(DMF_FREEING, &md->flags) ||
505+ test_bit(DMF_DELETING, &md->flags))
506+ return NULL;
507+
508 dm_get(md);
509 atomic_inc(&md->open_count);
510
511diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
512index 224de02..562ab63 100644
513--- a/drivers/md/raid5.c
514+++ b/drivers/md/raid5.c
515@@ -3431,6 +3431,7 @@ static int make_request(struct request_queue *q, struct bio * bi)
516 spin_unlock_irq(&conf->device_lock);
517 if (must_retry) {
518 release_stripe(sh);
519+ schedule();
520 goto retry;
521 }
522 }
523diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
524index 3bdb473..f164239 100644
525--- a/drivers/net/bonding/bond_sysfs.c
526+++ b/drivers/net/bonding/bond_sysfs.c
527@@ -1464,6 +1464,7 @@ int bond_create_sysfs(void)
528 printk(KERN_ERR
529 "network device named %s already exists in sysfs",
530 class_attr_bonding_masters.attr.name);
531+ ret = 0;
532 }
533
534 return ret;
535diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
536index a98d31a..5952522 100644
537--- a/drivers/net/r8169.c
538+++ b/drivers/net/r8169.c
539@@ -65,7 +65,6 @@ static const int multicast_filter_limit = 32;
540 #define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
541 #define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
542 #define EarlyTxThld 0x3F /* 0x3F means NO early transmit */
543-#define RxPacketMaxSize 0x3FE8 /* 16K - 1 - ETH_HLEN - VLAN - CRC... */
544 #define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */
545 #define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
546
547@@ -1976,10 +1975,10 @@ static u16 rtl_rw_cpluscmd(void __iomem *ioaddr)
548 return cmd;
549 }
550
551-static void rtl_set_rx_max_size(void __iomem *ioaddr)
552+static void rtl_set_rx_max_size(void __iomem *ioaddr, unsigned int rx_buf_sz)
553 {
554 /* Low hurts. Let's disable the filtering. */
555- RTL_W16(RxMaxSize, 16383);
556+ RTL_W16(RxMaxSize, rx_buf_sz);
557 }
558
559 static void rtl8169_set_magic_reg(void __iomem *ioaddr, unsigned mac_version)
560@@ -2026,7 +2025,7 @@ static void rtl_hw_start_8169(struct net_device *dev)
561
562 RTL_W8(EarlyTxThres, EarlyTxThld);
563
564- rtl_set_rx_max_size(ioaddr);
565+ rtl_set_rx_max_size(ioaddr, tp->rx_buf_sz);
566
567 if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
568 (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
569@@ -2090,7 +2089,7 @@ static void rtl_hw_start_8168(struct net_device *dev)
570
571 RTL_W8(EarlyTxThres, EarlyTxThld);
572
573- rtl_set_rx_max_size(ioaddr);
574+ rtl_set_rx_max_size(ioaddr, tp->rx_buf_sz);
575
576 rtl_set_rx_tx_config_registers(tp);
577
578@@ -2142,7 +2141,7 @@ static void rtl_hw_start_8101(struct net_device *dev)
579
580 RTL_W8(EarlyTxThres, EarlyTxThld);
581
582- rtl_set_rx_max_size(ioaddr);
583+ rtl_set_rx_max_size(ioaddr, tp->rx_buf_sz);
584
585 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW;
586
587diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
588index 8a846ad..7f0c60c 100644
589--- a/drivers/parport/parport_pc.c
590+++ b/drivers/parport/parport_pc.c
591@@ -1413,11 +1413,13 @@ static void __devinit decode_smsc(int efer, int key, int devid, int devrev)
592
593 static void __devinit winbond_check(int io, int key)
594 {
595- int devid,devrev,oldid,x_devid,x_devrev,x_oldid;
596+ int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid;
597
598 if (!request_region(io, 3, __func__))
599 return;
600
601+ origval = inb(io); /* Save original value */
602+
603 /* First probe without key */
604 outb(0x20,io);
605 x_devid=inb(io+1);
606@@ -1437,6 +1439,8 @@ static void __devinit winbond_check(int io, int key)
607 oldid=inb(io+1);
608 outb(0xaa,io); /* Magic Seal */
609
610+ outb(origval, io); /* in case we poked some entirely different hardware */
611+
612 if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid))
613 goto out; /* protection against false positives */
614
615@@ -1447,11 +1451,15 @@ out:
616
617 static void __devinit winbond_check2(int io,int key)
618 {
619- int devid,devrev,oldid,x_devid,x_devrev,x_oldid;
620+ int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid;
621
622 if (!request_region(io, 3, __func__))
623 return;
624
625+ origval[0] = inb(io); /* Save original values */
626+ origval[1] = inb(io + 1);
627+ origval[2] = inb(io + 2);
628+
629 /* First probe without the key */
630 outb(0x20,io+2);
631 x_devid=inb(io+2);
632@@ -1470,6 +1478,10 @@ static void __devinit winbond_check2(int io,int key)
633 oldid=inb(io+2);
634 outb(0xaa,io); /* Magic Seal */
635
636+ outb(origval[0], io); /* in case we poked some entirely different hardware */
637+ outb(origval[1], io + 1);
638+ outb(origval[2], io + 2);
639+
640 if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid))
641 goto out; /* protection against false positives */
642
643@@ -1480,11 +1492,13 @@ out:
644
645 static void __devinit smsc_check(int io, int key)
646 {
647- int id,rev,oldid,oldrev,x_id,x_rev,x_oldid,x_oldrev;
648+ int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev;
649
650 if (!request_region(io, 3, __func__))
651 return;
652
653+ origval = inb(io); /* Save original value */
654+
655 /* First probe without the key */
656 outb(0x0d,io);
657 x_oldid=inb(io+1);
658@@ -1508,6 +1522,8 @@ static void __devinit smsc_check(int io, int key)
659 rev=inb(io+1);
660 outb(0xaa,io); /* Magic Seal */
661
662+ outb(origval, io); /* in case we poked some entirely different hardware */
663+
664 if ((x_id == id) && (x_oldrev == oldrev) &&
665 (x_oldid == oldid) && (x_rev == rev))
666 goto out; /* protection against false positives */
667@@ -1544,11 +1560,12 @@ static void __devinit detect_and_report_smsc (void)
668 static void __devinit detect_and_report_it87(void)
669 {
670 u16 dev;
671- u8 r;
672+ u8 origval, r;
673 if (verbose_probing)
674 printk(KERN_DEBUG "IT8705 Super-IO detection, now testing port 2E ...\n");
675- if (!request_region(0x2e, 1, __func__))
676+ if (!request_region(0x2e, 2, __func__))
677 return;
678+ origval = inb(0x2e); /* Save original value */
679 outb(0x87, 0x2e);
680 outb(0x01, 0x2e);
681 outb(0x55, 0x2e);
682@@ -1568,8 +1585,10 @@ static void __devinit detect_and_report_it87(void)
683 outb(r | 8, 0x2F);
684 outb(0x02, 0x2E); /* Lock */
685 outb(0x02, 0x2F);
686+ } else {
687+ outb(origval, 0x2e); /* Oops, sorry to disturb */
688 }
689- release_region(0x2e, 1);
690+ release_region(0x2e, 2);
691 }
692 #endif /* CONFIG_PARPORT_PC_SUPERIO */
693
694@@ -2192,6 +2211,9 @@ struct parport *parport_pc_probe_port (unsigned long int base,
695 if (IS_ERR(pdev))
696 return NULL;
697 dev = &pdev->dev;
698+
699+ dev->coherent_dma_mask = DMA_BIT_MASK(24);
700+ dev->dma_mask = &dev->coherent_dma_mask;
701 }
702
703 ops = kmalloc(sizeof (struct parport_operations), GFP_KERNEL);
704diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
705index 032db81..f349211 100644
706--- a/drivers/parport/parport_serial.c
707+++ b/drivers/parport/parport_serial.c
708@@ -30,6 +30,7 @@ enum parport_pc_pci_cards {
709 titan_210l,
710 netmos_9xx5_combo,
711 netmos_9855,
712+ netmos_9855_2p,
713 avlab_1s1p,
714 avlab_1s2p,
715 avlab_2s1p,
716@@ -62,7 +63,7 @@ struct parport_pc_pci {
717 struct parport_pc_pci *card, int failed);
718 };
719
720-static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma)
721+static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *par, int autoirq, int autodma)
722 {
723 /* the rule described below doesn't hold for this device */
724 if (dev->device == PCI_DEVICE_ID_NETMOS_9835 &&
725@@ -74,9 +75,17 @@ static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc
726 * and serial ports. The form is 0x00PS, where <P> is the number of
727 * parallel ports and <S> is the number of serial ports.
728 */
729- card->numports = (dev->subsystem_device & 0xf0) >> 4;
730- if (card->numports > ARRAY_SIZE(card->addr))
731- card->numports = ARRAY_SIZE(card->addr);
732+ par->numports = (dev->subsystem_device & 0xf0) >> 4;
733+ if (par->numports > ARRAY_SIZE(par->addr))
734+ par->numports = ARRAY_SIZE(par->addr);
735+ /*
736+ * This function is currently only called for cards with up to
737+ * one parallel port.
738+ * Parallel port BAR is either before or after serial ports BARS;
739+ * hence, lo should be either 0 or equal to the number of serial ports.
740+ */
741+ if (par->addr[0].lo != 0)
742+ par->addr[0].lo = dev->subsystem_device & 0xf;
743 return 0;
744 }
745
746@@ -84,7 +93,8 @@ static struct parport_pc_pci cards[] __devinitdata = {
747 /* titan_110l */ { 1, { { 3, -1 }, } },
748 /* titan_210l */ { 1, { { 3, -1 }, } },
749 /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init },
750- /* netmos_9855 */ { 1, { { 2, -1 }, }, netmos_parallel_init },
751+ /* netmos_9855 */ { 1, { { 0, -1 }, }, netmos_parallel_init },
752+ /* netmos_9855_2p */ { 2, { { 0, -1 }, { 2, -1 }, } },
753 /* avlab_1s1p */ { 1, { { 1, 2}, } },
754 /* avlab_1s2p */ { 2, { { 1, 2}, { 3, 4 },} },
755 /* avlab_2s1p */ { 1, { { 2, 3}, } },
756@@ -110,6 +120,10 @@ static struct pci_device_id parport_serial_pci_tbl[] = {
757 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9845,
758 PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo },
759 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
760+ 0x1000, 0x0020, 0, 0, netmos_9855_2p },
761+ { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
762+ 0x1000, 0x0022, 0, 0, netmos_9855_2p },
763+ { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
764 PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 },
765 /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
766 { PCI_VENDOR_ID_AFAVLAB, 0x2110,
767@@ -192,6 +206,12 @@ static struct pciserial_board pci_parport_serial_boards[] __devinitdata = {
768 .uart_offset = 8,
769 },
770 [netmos_9855] = {
771+ .flags = FL_BASE2 | FL_BASE_BARS,
772+ .num_ports = 1,
773+ .base_baud = 115200,
774+ .uart_offset = 8,
775+ },
776+ [netmos_9855_2p] = {
777 .flags = FL_BASE4 | FL_BASE_BARS,
778 .num_ports = 1,
779 .base_baud = 115200,
780diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
781index 409e00e..33cc148 100644
782--- a/drivers/pci/pci.c
783+++ b/drivers/pci/pci.c
784@@ -473,6 +473,8 @@ pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
785 pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
786 pmcsr |= state;
787 break;
788+ case PCI_D3hot:
789+ case PCI_D3cold:
790 case PCI_UNKNOWN: /* Boot-up */
791 if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot
792 && !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET))
793@@ -1184,15 +1186,14 @@ pci_power_t pci_target_state(struct pci_dev *dev)
794 default:
795 target_state = state;
796 }
797+ } else if (!dev->pm_cap) {
798+ target_state = PCI_D0;
799 } else if (device_may_wakeup(&dev->dev)) {
800 /*
801 * Find the deepest state from which the device can generate
802 * wake-up events, make it the target state and enable device
803 * to generate PME#.
804 */
805- if (!dev->pm_cap)
806- return PCI_POWER_ERROR;
807-
808 if (dev->pme_support) {
809 while (target_state
810 && !(dev->pme_support & (1 << target_state)))
811diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
812index e4df84b..def3398 100644
813--- a/drivers/pci/pcie/aspm.c
814+++ b/drivers/pci/pcie/aspm.c
815@@ -633,6 +633,10 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
816 if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
817 pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
818 return;
819+ /* VIA has a strange chipset, root port is under a bridge */
820+ if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT &&
821+ pdev->bus->self)
822+ return;
823 down_read(&pci_bus_sem);
824 if (list_empty(&pdev->subordinate->devices))
825 goto out;
826diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
827index 75dac57..3105bdc 100644
828--- a/drivers/video/atmel_lcdfb.c
829+++ b/drivers/video/atmel_lcdfb.c
830@@ -29,14 +29,8 @@
831
832 /* configurable parameters */
833 #define ATMEL_LCDC_CVAL_DEFAULT 0xc8
834-#define ATMEL_LCDC_DMA_BURST_LEN 8
835-
836-#if defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91CAP9) || \
837- defined(CONFIG_ARCH_AT91SAM9RL)
838-#define ATMEL_LCDC_FIFO_SIZE 2048
839-#else
840-#define ATMEL_LCDC_FIFO_SIZE 512
841-#endif
842+#define ATMEL_LCDC_DMA_BURST_LEN 8 /* words */
843+#define ATMEL_LCDC_FIFO_SIZE 512 /* words */
844
845 #if defined(CONFIG_ARCH_AT91)
846 #define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
847diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
848index ae08c05..558088d 100644
849--- a/fs/jbd/commit.c
850+++ b/fs/jbd/commit.c
851@@ -238,7 +238,7 @@ write_out_data:
852 spin_lock(&journal->j_list_lock);
853 }
854 /* Someone already cleaned up the buffer? */
855- if (!buffer_jbd(bh)
856+ if (!buffer_jbd(bh) || bh2jh(bh) != jh
857 || jh->b_transaction != commit_transaction
858 || jh->b_jlist != BJ_SyncData) {
859 jbd_unlock_bh_state(bh);
860@@ -463,7 +463,9 @@ void journal_commit_transaction(journal_t *journal)
861 spin_lock(&journal->j_list_lock);
862 continue;
863 }
864- if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) {
865+ if (buffer_jbd(bh) && bh2jh(bh) == jh &&
866+ jh->b_transaction == commit_transaction &&
867+ jh->b_jlist == BJ_Locked) {
868 __journal_unfile_buffer(jh);
869 jbd_unlock_bh_state(bh);
870 journal_remove_journal_head(bh);
871diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h
872index 6e199c8..67e88a6 100644
873--- a/include/linux/firmware-map.h
874+++ b/include/linux/firmware-map.h
875@@ -24,21 +24,17 @@
876 */
877 #ifdef CONFIG_FIRMWARE_MEMMAP
878
879-int firmware_map_add(resource_size_t start, resource_size_t end,
880- const char *type);
881-int firmware_map_add_early(resource_size_t start, resource_size_t end,
882- const char *type);
883+int firmware_map_add(u64 start, u64 end, const char *type);
884+int firmware_map_add_early(u64 start, u64 end, const char *type);
885
886 #else /* CONFIG_FIRMWARE_MEMMAP */
887
888-static inline int firmware_map_add(resource_size_t start, resource_size_t end,
889- const char *type)
890+static inline int firmware_map_add(u64 start, u64 end, const char *type)
891 {
892 return 0;
893 }
894
895-static inline int firmware_map_add_early(resource_size_t start,
896- resource_size_t end, const char *type)
897+static inline int firmware_map_add_early(u64 start, u64 end, const char *type)
898 {
899 return 0;
900 }
901diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
902index bf8f119..9f29d86 100644
903--- a/include/linux/mlx4/qp.h
904+++ b/include/linux/mlx4/qp.h
905@@ -165,6 +165,7 @@ enum {
906 MLX4_WQE_CTRL_IP_CSUM = 1 << 4,
907 MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5,
908 MLX4_WQE_CTRL_INS_VLAN = 1 << 6,
909+ MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7,
910 };
911
912 struct mlx4_wqe_ctrl_seg {
913diff --git a/kernel/acct.c b/kernel/acct.c
914index a272f53..2dac228 100644
915--- a/kernel/acct.c
916+++ b/kernel/acct.c
917@@ -215,6 +215,7 @@ static void acct_file_reopen(struct bsd_acct_struct *acct, struct file *file,
918 static int acct_on(char *name)
919 {
920 struct file *file;
921+ struct vfsmount *mnt;
922 int error;
923 struct pid_namespace *ns;
924 struct bsd_acct_struct *acct = NULL;
925@@ -256,11 +257,12 @@ static int acct_on(char *name)
926 acct = NULL;
927 }
928
929- mnt_pin(file->f_path.mnt);
930+ mnt = file->f_path.mnt;
931+ mnt_pin(mnt);
932 acct_file_reopen(ns->bacct, file, ns);
933 spin_unlock(&acct_lock);
934
935- mntput(file->f_path.mnt); /* it's pinned, now give up active reference */
936+ mntput(mnt); /* it's pinned, now give up active reference */
937 kfree(acct);
938
939 return 0;
940diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
941index 0b50481..d3dce7c 100644
942--- a/lib/Kconfig.debug
943+++ b/lib/Kconfig.debug
944@@ -394,7 +394,7 @@ config LOCKDEP
945 bool
946 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
947 select STACKTRACE
948- select FRAME_POINTER if !X86 && !MIPS && !PPC
949+ select FRAME_POINTER if !MIPS && !PPC
950 select KALLSYMS
951 select KALLSYMS_ALL
952
953diff --git a/mm/page_alloc.c b/mm/page_alloc.c
954index 4205f7f..85799e8 100644
955--- a/mm/page_alloc.c
956+++ b/mm/page_alloc.c
957@@ -2764,7 +2764,7 @@ bad:
958 if (dzone == zone)
959 break;
960 kfree(zone_pcp(dzone, cpu));
961- zone_pcp(dzone, cpu) = NULL;
962+ zone_pcp(dzone, cpu) = &boot_pageset[cpu];
963 }
964 return -ENOMEM;
965 }
966@@ -2779,7 +2779,7 @@ static inline void free_zone_pagesets(int cpu)
967 /* Free per_cpu_pageset if it is slab allocated */
968 if (pset != &boot_pageset[cpu])
969 kfree(pset);
970- zone_pcp(zone, cpu) = NULL;
971+ zone_pcp(zone, cpu) = &boot_pageset[cpu];
972 }
973 }
974
975@@ -4409,6 +4409,8 @@ int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
976 if (!write || (ret == -EINVAL))
977 return ret;
978 for_each_zone(zone) {
979+ if (!populated_zone(zone))
980+ continue;
981 for_each_online_cpu(cpu) {
982 unsigned long high;
983 high = zone->present_pages / percpu_pagelist_fraction;
984diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
985index 011478e..0b3c404 100644
986--- a/net/ipv4/tcp_ipv4.c
987+++ b/net/ipv4/tcp_ipv4.c
988@@ -1364,6 +1364,10 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
989 tcp_mtup_init(newsk);
990 tcp_sync_mss(newsk, dst_mtu(dst));
991 newtp->advmss = dst_metric(dst, RTAX_ADVMSS);
992+ if (tcp_sk(sk)->rx_opt.user_mss &&
993+ tcp_sk(sk)->rx_opt.user_mss < newtp->advmss)
994+ newtp->advmss = tcp_sk(sk)->rx_opt.user_mss;
995+
996 tcp_initialize_rcv_mss(newsk);
997
998 #ifdef CONFIG_TCP_MD5SIG
999diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
1000index d083f9a..c89cd75 100644
1001--- a/net/ipv4/tcp_output.c
1002+++ b/net/ipv4/tcp_output.c
1003@@ -2252,6 +2252,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
1004 struct sk_buff *skb;
1005 struct tcp_md5sig_key *md5;
1006 __u8 *md5_hash_location;
1007+ int mss;
1008
1009 skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15, 1, GFP_ATOMIC);
1010 if (skb == NULL)
1011@@ -2262,13 +2263,17 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
1012
1013 skb->dst = dst_clone(dst);
1014
1015+ mss = dst_metric(dst, RTAX_ADVMSS);
1016+ if (tp->rx_opt.user_mss && tp->rx_opt.user_mss < mss)
1017+ mss = tp->rx_opt.user_mss;
1018+
1019 if (req->rcv_wnd == 0) { /* ignored for retransmitted syns */
1020 __u8 rcv_wscale;
1021 /* Set this up on the first call only */
1022 req->window_clamp = tp->window_clamp ? : dst_metric(dst, RTAX_WINDOW);
1023 /* tcp_full_space because it is guaranteed to be the first packet */
1024 tcp_select_initial_window(tcp_full_space(sk),
1025- dst_metric(dst, RTAX_ADVMSS) - (ireq->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0),
1026+ mss - (ireq->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0),
1027 &req->rcv_wnd,
1028 &req->window_clamp,
1029 ireq->wscale_ok,
1030@@ -2283,8 +2288,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
1031 else
1032 #endif
1033 TCP_SKB_CB(skb)->when = tcp_time_stamp;
1034- tcp_header_size = tcp_synack_options(sk, req,
1035- dst_metric(dst, RTAX_ADVMSS),
1036+ tcp_header_size = tcp_synack_options(sk, req, mss,
1037 skb, &opts, &md5) +
1038 sizeof(struct tcphdr);
1039
1040@@ -2353,6 +2357,9 @@ static void tcp_connect_init(struct sock *sk)
1041 if (!tp->window_clamp)
1042 tp->window_clamp = dst_metric(dst, RTAX_WINDOW);
1043 tp->advmss = dst_metric(dst, RTAX_ADVMSS);
1044+ if (tp->rx_opt.user_mss && tp->rx_opt.user_mss < tp->advmss)
1045+ tp->advmss = tp->rx_opt.user_mss;
1046+
1047 tcp_initialize_rcv_mss(sk);
1048
1049 tcp_select_initial_window(tcp_full_space(sk),
1050diff --git a/scripts/unifdef.c b/scripts/unifdef.c
1051index 552025e..05a31a6 100644
1052--- a/scripts/unifdef.c
1053+++ b/scripts/unifdef.c
1054@@ -206,7 +206,7 @@ static void done(void);
1055 static void error(const char *);
1056 static int findsym(const char *);
1057 static void flushline(bool);
1058-static Linetype getline(void);
1059+static Linetype get_line(void);
1060 static Linetype ifeval(const char **);
1061 static void ignoreoff(void);
1062 static void ignoreon(void);
1063@@ -512,7 +512,7 @@ process(void)
1064
1065 for (;;) {
1066 linenum++;
1067- lineval = getline();
1068+ lineval = get_line();
1069 trans_table[ifstate[depth]][lineval]();
1070 debug("process %s -> %s depth %d",
1071 linetype_name[lineval],
1072@@ -526,7 +526,7 @@ process(void)
1073 * help from skipcomment().
1074 */
1075 static Linetype
1076-getline(void)
1077+get_line(void)
1078 {
1079 const char *cp;
1080 int cursym;
1081diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
1082index 8284f17..b5d6ea4 100644
1083--- a/sound/core/seq/seq_midi_event.c
1084+++ b/sound/core/seq/seq_midi_event.c
1085@@ -504,10 +504,10 @@ static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf,
1086 if (dev->nostat && count < 12)
1087 return -ENOMEM;
1088 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f);
1089- bytes[0] = ev->data.control.param & 0x007f;
1090- bytes[1] = (ev->data.control.param & 0x3f80) >> 7;
1091- bytes[2] = ev->data.control.value & 0x007f;
1092- bytes[3] = (ev->data.control.value & 0x3f80) >> 7;
1093+ bytes[0] = (ev->data.control.param & 0x3f80) >> 7;
1094+ bytes[1] = ev->data.control.param & 0x007f;
1095+ bytes[2] = (ev->data.control.value & 0x3f80) >> 7;
1096+ bytes[3] = ev->data.control.value & 0x007f;
1097 if (cmd != dev->lastcmd && !dev->nostat) {
1098 if (count < 9)
1099 return -ENOMEM;
1100diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c
1101index 3025ed1..c0f4718 100644
1102--- a/sound/pci/ca0106/ca0106_mixer.c
1103+++ b/sound/pci/ca0106/ca0106_mixer.c
1104@@ -761,6 +761,9 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
1105 snd_ca0106_master_db_scale);
1106 if (!vmaster)
1107 return -ENOMEM;
1108+ err = snd_ctl_add(card, vmaster);
1109+ if (err < 0)
1110+ return err;
1111 add_slaves(card, vmaster, slave_vols);
1112
1113 if (emu->details->spi_dac == 1) {
1114@@ -768,6 +771,9 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
1115 NULL);
1116 if (!vmaster)
1117 return -ENOMEM;
1118+ err = snd_ctl_add(card, vmaster);
1119+ if (err < 0)
1120+ return err;
1121 add_slaves(card, vmaster, slave_sws);
1122 }
1123 return 0;