1 From: Greg Kroah-Hartman <gregkh@suse.de>
2 Subject: Upstream 2.6.27.26 release from kernel.org
4 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
6 diff --git a/Makefile b/Makefile
7 index 1314692..90764ee 100644
16 NAME = Trembling Tortoise
19 diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
20 index 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"),
27 + { /* Handle problems with rebooting on Dell Optiplex 360 with 0T656F */
28 + .callback = set_bios_reboot,
29 + .ident = "Dell OptiPlex 360",
31 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
32 + DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
33 + DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
36 + { /* Handle problems with rebooting on Dell Optiplex 330 with 0KP561 */
37 + .callback = set_bios_reboot,
38 + .ident = "Dell OptiPlex 330",
40 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
41 + DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
42 + DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
45 { /* Handle problems with rebooting on Dell 2400's */
46 .callback = set_bios_reboot,
47 .ident = "Dell PowerEdge 2400",
48 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
49 index 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)
54 #ifdef CONFIG_BLK_DEV_INITRD
58 #define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT)
59 static void __init relocate_initrd(void)
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;
67 unsigned long slop, clen, mapaddr;
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);
75 static void __init reserve_initrd(void)
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;
83 if (!boot_params.hdr.type_of_loader ||
84 !ramdisk_image || !ramdisk_size)
85 @@ -351,14 +348,8 @@ static void __init reserve_initrd(void)
92 - printk(KERN_ERR "initrd extends beyond end of memory "
93 - "(0x%08llx > 0x%08llx)\ndisabling initrd\n",
94 - ramdisk_end, end_of_lowmem);
98 free_early(ramdisk_image, ramdisk_end);
101 diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
102 index 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>
113 @@ -551,6 +552,8 @@ static void process_fd_request(void);
114 static void recalibrate_floppy(void);
115 static void floppy_shutdown(unsigned long);
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);
122 @@ -4273,8 +4276,7 @@ static int __init floppy_init(void)
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);
130 FDCS->version = FDC_NONE;
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);
142 @@ -4357,6 +4358,47 @@ out_put_disk:
144 static DEFINE_SPINLOCK(floppy_usage_lock);
146 +static const struct io_region {
151 + /* address + 3 is sometimes reserved by pnp bios for motherboard */
153 + /* address + 6 is reserved, and may be taken by IDE.
154 + * Unfortunately, Adaptec doesn't know this :-(, */
158 +static void floppy_release_allocated_regions(int fdc, const struct io_region *p)
160 + while (p != io_regions) {
162 + release_region(FDCS->address + p->offset, p->size);
166 +#define ARRAY_END(X) (&((X)[ARRAY_SIZE(X)]))
168 +static int floppy_request_regions(int fdc)
170 + const struct io_region *p;
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);
182 +static void floppy_release_regions(int fdc)
184 + floppy_release_allocated_regions(fdc, ARRAY_END(io_regions));
187 static int floppy_grab_irq_and_dma(void)
190 @@ -4398,18 +4440,8 @@ static int floppy_grab_irq_and_dma(void)
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);
199 - if (!request_region(FDCS->address + 7, 1, "floppy DIR")) {
200 - DPRINT("Floppy io-port 0x%04lx in use\n",
201 - FDCS->address + 7);
204 - /* address + 6 is reserved, and may be taken by IDE.
205 - * Unfortunately, Adaptec doesn't know this :-(, */
206 + if (floppy_request_regions(fdc))
210 for (fdc = 0; fdc < N_FDC; fdc++) {
211 @@ -4431,15 +4463,11 @@ static int floppy_grab_irq_and_dma(void)
213 irqdma_allocated = 1;
216 - release_region(FDCS->address + 2, 4);
221 - while (--fdc >= 0) {
222 - release_region(FDCS->address + 2, 4);
223 - release_region(FDCS->address + 7, 1);
226 + floppy_release_regions(fdc);
227 spin_lock_irqsave(&floppy_usage_lock, flags);
229 spin_unlock_irqrestore(&floppy_usage_lock, flags);
230 @@ -4500,10 +4528,8 @@ static void floppy_release_irq_and_dma(void)
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);
238 + if (FDCS->address != -1)
239 + floppy_release_regions(fdc);
243 @@ -4572,6 +4598,13 @@ MODULE_AUTHOR("Alain L. Knaff");
244 MODULE_SUPPORTED_DEVICE("fd");
245 MODULE_LICENSE("GPL");
247 +/* This doesn't actually get used other than for module information */
248 +static const struct pnp_device_id floppy_pnpids[] = {
252 +MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
256 __setup("floppy=", floppy_setup);
257 diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
258 index 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)
265 + if (port % MAX_PORTS_PER_BOARD >= brd->numPorts) {
270 ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
272 tty->driver_data = ch;
273 @@ -1182,8 +1187,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
276 ch->port.flags |= ASYNC_NORMAL_ACTIVE;
278 mutex_unlock(&moxa_openlock);
283 diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
284 index 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)
290 brd = &mxser_boards[m];
291 - retval = mxser_get_ISA_conf(!ioaddr[b], brd);
292 + retval = mxser_get_ISA_conf(ioaddr[b], brd);
296 diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
297 index 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);
309 struct ptsreq krnptsreq;
310 diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
311 index 3bf8ee1..a36e9aa 100644
312 --- a/drivers/firmware/memmap.c
313 +++ b/drivers/firmware/memmap.c
315 * information is necessary as for the resource tree.
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.) */
321 + * start and end must be u64 rather than resource_size_t, because e820
322 + * resources can lie at addresses above 4G.
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.
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,
336 struct firmware_map_entry *entry)
338 @@ -132,8 +136,7 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
340 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
342 -int firmware_map_add(resource_size_t start, resource_size_t end,
344 +int firmware_map_add(u64 start, u64 end, const char *type)
346 struct firmware_map_entry *entry;
348 @@ -157,8 +160,7 @@ int firmware_map_add(resource_size_t start, resource_size_t end,
350 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
352 -int __init firmware_map_add_early(resource_size_t start, resource_size_t end,
354 +int __init firmware_map_add_early(u64 start, u64 end, const char *type)
356 struct firmware_map_entry *entry;
358 diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
359 index 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,
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;
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;
379 diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
380 index 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);
395 @@ -1663,8 +1664,19 @@ setup_hfcpci(struct IsdnCard *card)
399 + dma_addr_t dma_mask = DMA_BIT_MASK(32) & ~0x7fffUL;
400 if (pci_enable_device(tmp_hfcpci))
402 + if (pci_set_dma_mask(tmp_hfcpci, dma_mask)) {
403 + printk(KERN_WARNING
404 + "HiSax hfc_pci: No suitable DMA available.\n");
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");
412 pci_set_master(tmp_hfcpci);
413 if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK)))
415 @@ -1693,22 +1705,29 @@ setup_hfcpci(struct IsdnCard *card)
416 printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
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");
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);
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);
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,
449 - (u_int) virt_to_bus(cs->hw.hfcpci.fifos),
450 + (u_long)cs->hw.hfcpci.dma,
453 spin_lock_irqsave(&cs->lock, flags);
454 diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
455 index 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 {
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;
467 diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
468 index 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,
475 + if (ps_argc > as->argc) {
476 + dm_put_path_selector(pst);
477 + ti->error = "not enough arguments for path selector";
481 r = pst->create(&pg->ps, ps_argc, as->argv);
483 dm_put_path_selector(pst);
484 @@ -684,6 +690,11 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m)
488 + if (hw_argc > as->argc) {
489 + ti->error = "not enough arguments for hardware handler";
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) {
496 diff --git a/drivers/md/dm.c b/drivers/md/dm.c
497 index 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)
504 + if (test_bit(DMF_FREEING, &md->flags) ||
505 + test_bit(DMF_DELETING, &md->flags))
509 atomic_inc(&md->open_count);
511 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
512 index 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);
523 diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
524 index 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)
529 "network device named %s already exists in sysfs",
530 class_attr_bonding_masters.attr.name);
535 diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
536 index 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 */
547 @@ -1976,10 +1975,10 @@ static u16 rtl_rw_cpluscmd(void __iomem *ioaddr)
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)
554 /* Low hurts. Let's disable the filtering. */
555 - RTL_W16(RxMaxSize, 16383);
556 + RTL_W16(RxMaxSize, rx_buf_sz);
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)
562 RTL_W8(EarlyTxThres, EarlyTxThld);
564 - rtl_set_rx_max_size(ioaddr);
565 + rtl_set_rx_max_size(ioaddr, tp->rx_buf_sz);
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)
571 RTL_W8(EarlyTxThres, EarlyTxThld);
573 - rtl_set_rx_max_size(ioaddr);
574 + rtl_set_rx_max_size(ioaddr, tp->rx_buf_sz);
576 rtl_set_rx_tx_config_registers(tp);
578 @@ -2142,7 +2141,7 @@ static void rtl_hw_start_8101(struct net_device *dev)
580 RTL_W8(EarlyTxThres, EarlyTxThld);
582 - rtl_set_rx_max_size(ioaddr);
583 + rtl_set_rx_max_size(ioaddr, tp->rx_buf_sz);
585 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW;
587 diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
588 index 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)
593 static void __devinit winbond_check(int io, int key)
595 - int devid,devrev,oldid,x_devid,x_devrev,x_oldid;
596 + int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid;
598 if (!request_region(io, 3, __func__))
601 + origval = inb(io); /* Save original value */
603 /* First probe without key */
606 @@ -1437,6 +1439,8 @@ static void __devinit winbond_check(int io, int key)
608 outb(0xaa,io); /* Magic Seal */
610 + outb(origval, io); /* in case we poked some entirely different hardware */
612 if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid))
613 goto out; /* protection against false positives */
615 @@ -1447,11 +1451,15 @@ out:
617 static void __devinit winbond_check2(int io,int key)
619 - int devid,devrev,oldid,x_devid,x_devrev,x_oldid;
620 + int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid;
622 if (!request_region(io, 3, __func__))
625 + origval[0] = inb(io); /* Save original values */
626 + origval[1] = inb(io + 1);
627 + origval[2] = inb(io + 2);
629 /* First probe without the key */
632 @@ -1470,6 +1478,10 @@ static void __devinit winbond_check2(int io,int key)
634 outb(0xaa,io); /* Magic Seal */
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);
640 if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid))
641 goto out; /* protection against false positives */
643 @@ -1480,11 +1492,13 @@ out:
645 static void __devinit smsc_check(int io, int key)
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;
650 if (!request_region(io, 3, __func__))
653 + origval = inb(io); /* Save original value */
655 /* First probe without the key */
658 @@ -1508,6 +1522,8 @@ static void __devinit smsc_check(int io, int key)
660 outb(0xaa,io); /* Magic Seal */
662 + outb(origval, io); /* in case we poked some entirely different hardware */
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)
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__))
678 + origval = inb(0x2e); /* Save original value */
682 @@ -1568,8 +1585,10 @@ static void __devinit detect_and_report_it87(void)
684 outb(0x02, 0x2E); /* Lock */
687 + outb(origval, 0x2e); /* Oops, sorry to disturb */
689 - release_region(0x2e, 1);
690 + release_region(0x2e, 2);
692 #endif /* CONFIG_PARPORT_PC_SUPERIO */
694 @@ -2192,6 +2211,9 @@ struct parport *parport_pc_probe_port (unsigned long int base,
699 + dev->coherent_dma_mask = DMA_BIT_MASK(24);
700 + dev->dma_mask = &dev->coherent_dma_mask;
703 ops = kmalloc(sizeof (struct parport_operations), GFP_KERNEL);
704 diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
705 index 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 {
716 @@ -62,7 +63,7 @@ struct parport_pc_pci {
717 struct parport_pc_pci *card, int failed);
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)
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.
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);
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.
741 + if (par->addr[0].lo != 0)
742 + par->addr[0].lo = dev->subsystem_device & 0xf;
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 = {
771 + .flags = FL_BASE2 | FL_BASE_BARS,
773 + .base_baud = 115200,
776 + [netmos_9855_2p] = {
777 .flags = FL_BASE4 | FL_BASE_BARS,
780 diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
781 index 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;
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)
795 target_state = state;
797 + } else if (!dev->pm_cap) {
798 + target_state = PCI_D0;
799 } else if (device_may_wakeup(&dev->dev)) {
801 * Find the deepest state from which the device can generate
802 * wake-up events, make it the target state and enable device
806 - return PCI_POWER_ERROR;
808 if (dev->pme_support) {
810 && !(dev->pme_support & (1 << target_state)))
811 diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
812 index 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)
819 + /* VIA has a strange chipset, root port is under a bridge */
820 + if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT &&
823 down_read(&pci_bus_sem);
824 if (list_empty(&pdev->subordinate->devices))
826 diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
827 index 75dac57..3105bdc 100644
828 --- a/drivers/video/atmel_lcdfb.c
829 +++ b/drivers/video/atmel_lcdfb.c
832 /* configurable parameters */
833 #define ATMEL_LCDC_CVAL_DEFAULT 0xc8
834 -#define ATMEL_LCDC_DMA_BURST_LEN 8
836 -#if defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91CAP9) || \
837 - defined(CONFIG_ARCH_AT91SAM9RL)
838 -#define ATMEL_LCDC_FIFO_SIZE 2048
840 -#define ATMEL_LCDC_FIFO_SIZE 512
842 +#define ATMEL_LCDC_DMA_BURST_LEN 8 /* words */
843 +#define ATMEL_LCDC_FIFO_SIZE 512 /* words */
845 #if defined(CONFIG_ARCH_AT91)
846 #define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
847 diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
848 index 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);
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);
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);
871 diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h
872 index 6e199c8..67e88a6 100644
873 --- a/include/linux/firmware-map.h
874 +++ b/include/linux/firmware-map.h
877 #ifdef CONFIG_FIRMWARE_MEMMAP
879 -int firmware_map_add(resource_size_t start, resource_size_t end,
881 -int firmware_map_add_early(resource_size_t start, resource_size_t end,
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);
886 #else /* CONFIG_FIRMWARE_MEMMAP */
888 -static inline int firmware_map_add(resource_size_t start, resource_size_t end,
890 +static inline int firmware_map_add(u64 start, u64 end, const char *type)
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)
901 diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
902 index 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,
912 struct mlx4_wqe_ctrl_seg {
913 diff --git a/kernel/acct.c b/kernel/acct.c
914 index a272f53..2dac228 100644
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)
921 + struct vfsmount *mnt;
923 struct pid_namespace *ns;
924 struct bsd_acct_struct *acct = NULL;
925 @@ -256,11 +257,12 @@ static int acct_on(char *name)
929 - mnt_pin(file->f_path.mnt);
930 + mnt = file->f_path.mnt;
932 acct_file_reopen(ns->bacct, file, ns);
933 spin_unlock(&acct_lock);
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 */
940 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
941 index 0b50481..d3dce7c 100644
942 --- a/lib/Kconfig.debug
943 +++ b/lib/Kconfig.debug
944 @@ -394,7 +394,7 @@ config LOCKDEP
946 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
948 - select FRAME_POINTER if !X86 && !MIPS && !PPC
949 + select FRAME_POINTER if !MIPS && !PPC
953 diff --git a/mm/page_alloc.c b/mm/page_alloc.c
954 index 4205f7f..85799e8 100644
955 --- a/mm/page_alloc.c
956 +++ b/mm/page_alloc.c
957 @@ -2764,7 +2764,7 @@ bad:
960 kfree(zone_pcp(dzone, cpu));
961 - zone_pcp(dzone, cpu) = NULL;
962 + zone_pcp(dzone, cpu) = &boot_pageset[cpu];
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])
970 - zone_pcp(zone, cpu) = NULL;
971 + zone_pcp(zone, cpu) = &boot_pageset[cpu];
975 @@ -4409,6 +4409,8 @@ int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
976 if (!write || (ret == -EINVAL))
978 for_each_zone(zone) {
979 + if (!populated_zone(zone))
981 for_each_online_cpu(cpu) {
983 high = zone->present_pages / percpu_pagelist_fraction;
984 diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
985 index 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;
996 tcp_initialize_rcv_mss(newsk);
998 #ifdef CONFIG_TCP_MD5SIG
999 diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
1000 index 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;
1009 skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15, 1, GFP_ATOMIC);
1011 @@ -2262,13 +2263,17 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
1013 skb->dst = dst_clone(dst);
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;
1019 if (req->rcv_wnd == 0) { /* ignored for retransmitted syns */
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),
1030 @@ -2283,8 +2288,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
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,
1038 sizeof(struct tcphdr);
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;
1047 tcp_initialize_rcv_mss(sk);
1049 tcp_select_initial_window(tcp_full_space(sk),
1050 diff --git a/scripts/unifdef.c b/scripts/unifdef.c
1051 index 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)
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().
1081 diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
1082 index 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)
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) {
1100 diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c
1101 index 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);
1108 + err = snd_ctl_add(card, vmaster);
1111 add_slaves(card, vmaster, slave_vols);
1113 if (emu->details->spi_dac == 1) {
1114 @@ -768,6 +771,9 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
1118 + err = snd_ctl_add(card, vmaster);
1121 add_slaves(card, vmaster, slave_sws);