Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
authorLinus Torvalds <torvalds@woody.osdl.org>
Mon, 20 Nov 2006 18:48:23 +0000 (10:48 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Mon, 20 Nov 2006 18:48:23 +0000 (10:48 -0800)
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Clear high octet in QP number

157 files changed:
CREDITS
Documentation/filesystems/udf.txt
Documentation/kernel-parameters.txt
Documentation/kprobes.txt
Documentation/sound/alsa/ALSA-Configuration.txt
MAINTAINERS
Makefile
arch/arm/configs/ateb9200_defconfig
arch/arm/configs/collie_defconfig
arch/arm/configs/ixp4xx_defconfig
arch/arm/configs/omap_h2_1610_defconfig
arch/arm/configs/s3c2410_defconfig
arch/arm/configs/versatile_defconfig
arch/arm/mach-pnx4008/core.c
arch/arm/oprofile/op_counter.h
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/earlyquirk.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/process.c
arch/i386/kernel/traps.c
arch/i386/pci/irq.c
arch/ia64/hp/sim/Kconfig
arch/ia64/hp/sim/hpsim_irq.c
arch/ia64/kernel/iosapic.c
arch/ia64/kernel/irq.c
arch/ia64/kernel/irq_ia64.c
arch/ia64/kernel/irq_lsapic.c
arch/ia64/mm/hugetlbpage.c
arch/ia64/sn/kernel/bte.c
arch/ia64/sn/kernel/irq.c
arch/m68knommu/kernel/setup.c
arch/m68knommu/kernel/time.c
arch/m68knommu/platform/5307/ints.c
arch/powerpc/mm/hugetlbpage.c
arch/x86_64/Makefile
arch/x86_64/boot/setup.S
arch/x86_64/ia32/ptrace32.c
arch/x86_64/kernel/e820.c
arch/x86_64/kernel/early-quirks.c
arch/x86_64/kernel/io_apic.c
arch/x86_64/kernel/process.c
arch/x86_64/kernel/smp.c
arch/x86_64/kernel/time.c
arch/x86_64/kernel/traps.c
arch/x86_64/kernel/vsyscall.c
arch/x86_64/mm/init.c
arch/x86_64/pci/mmconfig.c
block/scsi_ioctl.c
drivers/acpi/osl.c
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c
drivers/ata/pata_artop.c
drivers/ata/pata_hpt37x.c
drivers/block/aoe/aoeblk.c
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/char/ftape/zftape/zftape-buffers.c
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/isicom.c
drivers/firmware/dell_rbu.c
drivers/i2c/busses/i2c-ixp4xx.c
drivers/i2c/busses/scx200_acb.c
drivers/ide/legacy/hd.c
drivers/infiniband/hw/ipath/Kconfig
drivers/infiniband/hw/ipath/Makefile
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/input/keyboard/lkkbd.c
drivers/isdn/hisax/Kconfig
drivers/macintosh/windfarm_pm112.c
drivers/macintosh/windfarm_pm81.c
drivers/macintosh/windfarm_pm91.c
drivers/mmc/mmc.c
drivers/net/tg3.c
drivers/parport/parport_ip32.c
drivers/pci/quirks.c
drivers/pcmcia/ds.c
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-9xxx.h
drivers/scsi/aic94xx/aic94xx_hwi.c
drivers/scsi/aic94xx/aic94xx_hwi.h
drivers/scsi/aic94xx/aic94xx_init.c
drivers/scsi/aic94xx/aic94xx_sas.h
drivers/scsi/aic94xx/aic94xx_scb.c
drivers/scsi/aic94xx/aic94xx_seq.c
drivers/scsi/aic94xx/aic94xx_seq.h
drivers/scsi/gdth.c
drivers/scsi/iscsi_tcp.c
drivers/scsi/libiscsi.c
drivers/scsi/libsas/sas_expander.c
drivers/scsi/psi240i.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/sg.c
drivers/usb/core/message.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/input/hid-core.c
drivers/usb/input/hid-input.c
drivers/usb/input/hid.h
drivers/usb/misc/auerswald.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/ipaq.c
drivers/usb/storage/unusual_devs.h
drivers/video/aty/atyfb_base.c
drivers/video/aty/radeon_i2c.c
drivers/video/fb_ddc.c
drivers/video/nvidia/nv_setup.c
drivers/video/pnx4008/pnxrgbfb.c
drivers/video/pnx4008/sdum.c
drivers/w1/masters/matrox_w1.c
fs/Kconfig
fs/autofs/inode.c
fs/autofs/waitq.c
fs/autofs4/inode.c
fs/autofs4/waitq.c
fs/debugfs/inode.c
fs/ecryptfs/dentry.c
fs/ecryptfs/inode.c
fs/fat/file.c
fs/hfs/super.c
fs/hugetlbfs/inode.c
fs/msdos/namei.c
fs/vfat/namei.c
include/asm-i386/acpi.h
include/asm-m68knommu/irq_regs.h [new file with mode: 0644]
include/asm-m68knommu/irqnode.h
include/asm-m68knommu/machdep.h
include/asm-powerpc/systbl.h
include/asm-powerpc/topology.h
include/asm-powerpc/unistd.h
include/asm-x86_64/acpi.h
include/asm-x86_64/pda.h
include/asm-x86_64/vsyscall.h
include/linux/crypto.h
include/linux/hugetlb.h
include/linux/in6.h
include/linux/msdos_fs.h
include/linux/netfilter/x_tables.h
include/linux/netfilter_arp/arp_tables.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netfilter_ipv6/ip6_tables.h
include/linux/pci_regs.h
kernel/fork.c
kernel/irq/chip.c
kernel/irq/manage.c
kernel/lockdep.c
mm/mmap.c
mm/vmalloc.c
net/ipv4/netfilter/ip_queue.c
net/ipv4/tcp.c
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c
sound/pci/hda/hda_intel.c

diff --git a/CREDITS b/CREDITS
index 606d407cfc1565c1715912142e251289fb88d332..ccd4f9f4dd711493a02458146fadab1851bfd10e 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -3511,14 +3511,12 @@ D: The Linux Support Team Erlangen
 
 N: David Weinehall
 E: tao@acc.umu.se
+P: 1024D/DC47CA16 7ACE 0FB0 7A74 F994 9B36  E1D1 D14E 8526 DC47 CA16
 W: http://www.acc.umu.se/~tao/
-W: http://www.acc.umu.se/~mcalinux/
+D: v2.0 kernel maintainer
 D: Fixes for the NE/2-driver
 D: Miscellaneous MCA-support
 D: Cleanup of the Config-files
-S: Axtorpsvagen 40:20
-S: S-903 37  UMEA
-S: Sweden
 
 N: Matt Welsh
 E: mdw@metalab.unc.edu
index 511b4230c0536add9d0650cbc1f702becc2e54e2..fde829a756e6510a9d5cd4d56c981e204151fa8c 100644 (file)
@@ -7,8 +7,17 @@ If you encounter problems with reading UDF discs using this driver,
 please report them to linux_udf@hpesjro.fc.hp.com, which is the
 developer's list.
 
-Write support requires a block driver which supports writing. The current
-scsi and ide cdrom drivers do not support writing.
+Write support requires a block driver which supports writing.  Currently
+dvd+rw drives and media support true random sector writes, and so a udf
+filesystem on such devices can be directly mounted read/write.  CD-RW
+media however, does not support this.  Instead the media can be formatted
+for packet mode using the utility cdrwtool, then the pktcdvd driver can
+be bound to the underlying cd device to provide the required buffering
+and read-modify-write cycles to allow the filesystem random sector writes
+while providing the hardware with only full packet writes.  While not
+required for dvd+rw media, use of the pktcdvd driver often enhances
+performance due to very poor read-modify-write support supplied internally
+by drive firmware.
 
 -------------------------------------------------------------------------------
 The following mount options are supported:
index dd00fd556a60abad15662319d5c46fd0f166b26a..67473849f20e0e42cc4d2ef6ae015634b4c830ba 100644 (file)
@@ -164,6 +164,10 @@ and is between 256 and 4096 characters. It is defined in the file
        acpi_skip_timer_override [HW,ACPI]
                        Recognize and ignore IRQ0/pin2 Interrupt Override.
                        For broken nForce2 BIOS resulting in XT-PIC timer.
+       acpi_use_timer_override [HW,ACPI}
+                       Use timer override. For some broken Nvidia NF5 boards
+                       that require a timer override, but don't have
+                       HPET
 
        acpi_dbg_layer= [HW,ACPI]
                        Format: <int>
index ba26201d50234ba3c78e2c0c9084b1d6d25d7110..d71fafffce90de81cba916c5d98dae7db5e9eb63 100644 (file)
@@ -442,9 +442,10 @@ static int __init kprobe_init(void)
        kp.fault_handler = handler_fault;
        kp.symbol_name = "do_fork";
 
-       if ((ret = register_kprobe(&kp) < 0)) {
+       ret = register_kprobe(&kp);
+       if (ret < 0) {
                printk("register_kprobe failed, returned %d\n", ret);
-               return -1;
+               return ret;
        }
        printk("kprobe registered\n");
        return 0;
index 138673a907f581e58fbeb07fa9b1a73497ca4177..3472d9c4ef1b0e637072e75690e474e834e348c5 100644 (file)
@@ -753,7 +753,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
     position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
     single_cmd  - Use single immediate commands to communicate with
                codecs (for debugging only)
-    disable_msi - Disable Message Signaled Interrupt (MSI)
+    enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
 
     This module supports one card and autoprobe.
 
index 8732daeae3038328772e410d951cceb85bae1731..a5508f930ed94c3104e05ef108386779d52fce7b 100644 (file)
@@ -3072,6 +3072,13 @@ L:       video4linux-list@redhat.com
 W:     http://www.linux-projects.org
 S:     Maintained
 
+USB GADGET/PERIPHERAL SUBSYSTEM
+P:     David Brownell
+M:     dbrownell@users.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+W:     http://www.linux-usb.org/gadget
+S:     Maintained
+
 USB HID/HIDBP DRIVERS
 P:     Vojtech Pavlik
 M:     vojtech@suse.cz
@@ -3255,10 +3262,11 @@ L:      linux-usb-users@lists.sourceforge.net
 L:     linux-usb-devel@lists.sourceforge.net
 S:     Maintained
 
-USB "USBNET" DRIVER
+USB "USBNET" DRIVER FRAMEWORK
 P:     David Brownell
 M:     dbrownell@users.sourceforge.net
 L:     linux-usb-devel@lists.sourceforge.net
+W:     http://www.linux-usb.org/usbnet
 S:     Maintained
 
 USB W996[87]CF DRIVER
index 8484be116e96df3ef283e9ecb4e671757065d14c..958fad6739b3348170615435307d2fa34f7d4ba5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 19
-EXTRAVERSION =-rc5
+EXTRAVERSION =-rc6
 NAME=Avast! A bilge rat!
 
 # *DOCUMENTATION*
index 15e6b0bbbde8af55b646d579a5e13a7887bfef2d..3de5c643848c744229ed614af7836ee7f54774a0 100644 (file)
@@ -217,7 +217,7 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 CONFIG_PM=y
-CONFIG_PM_LEGACY=y
+# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 # CONFIG_APM is not set
 
index 074c47a4fb2e20170169259fa003d822df4c6e3a..a3758913c0bb10e09f275301357be685ae055b49 100644 (file)
@@ -219,7 +219,7 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 CONFIG_PM=y
-CONFIG_PM_LEGACY=y
+# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_APM=y
 
index 4975b914f923407667579aee4aae907c80f4bdb8..fac7c3b240c0574b659fc791508dc6d0b866df4c 100644 (file)
@@ -206,10 +206,8 @@ CONFIG_BINFMT_ELF=y
 #
 # Power management options
 #
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_APM=y
+# CONFIG_PM is not set
+# CONFIG_APM is not set
 
 #
 # Networking
index 05adb0b34e729a31fd1054553984b51fd11e0b5c..b0efd4ca993561437c70058477627efad7845cce 100644 (file)
@@ -257,7 +257,7 @@ CONFIG_BINFMT_AOUT=y
 # Power management options
 #
 CONFIG_PM=y
-CONFIG_PM_LEGACY=y
+# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 # CONFIG_APM is not set
 
index 0563c14395e1fa41e33098a958bcbd8b0a16b21a..c0152393e494ec7551e5af61a8ba7638b925576a 100644 (file)
@@ -258,7 +258,7 @@ CONFIG_BINFMT_AOUT=y
 # Power management options
 #
 CONFIG_PM=y
-CONFIG_PM_LEGACY=y
+# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 # CONFIG_PM_SYSFS_DEPRECATED is not set
 CONFIG_APM=y
index 96b7a77624265c54010d1e8b206833ee0c8ee978..f7bf6ef27d19158ac4444aa19c70c784b7782deb 100644 (file)
@@ -200,7 +200,7 @@ CONFIG_BINFMT_ELF=y
 # Power management options
 #
 CONFIG_PM=y
-CONFIG_PM_LEGACY=y
+# CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 # CONFIG_APM is not set
 
index 3d73c1e937529f03878ca6803dbc4872891458e9..429c796938be94660a99b9877bf1d362ca9db1ba 100644 (file)
@@ -133,10 +133,79 @@ static struct platform_device serial_device = {
        },
 };
 
+static struct platform_device nand_flash_device = {
+       .name = "pnx4008-flash",
+       .id = -1,
+       .dev = {
+               .coherent_dma_mask = 0xFFFFFFFF,
+       },
+};
+
+/* The dmamask must be set for OHCI to work */
+static u64 ohci_dmamask = ~(u32) 0;
+
+static struct resource ohci_resources[] = {
+       {
+               .start = IO_ADDRESS(PNX4008_USB_CONFIG_BASE),
+               .end = IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0x100),
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = USB_HOST_INT,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device ohci_device = {
+       .name = "pnx4008-usb-ohci",
+       .id = -1,
+       .dev = {
+               .dma_mask = &ohci_dmamask,
+               .coherent_dma_mask = 0xffffffff,
+               },
+       .num_resources = ARRAY_SIZE(ohci_resources),
+       .resource = ohci_resources,
+};
+
+static struct platform_device sdum_device = {
+       .name = "pnx4008-sdum",
+       .id = 0,
+       .dev = {
+               .coherent_dma_mask = 0xffffffff,
+       },
+};
+
+static struct platform_device rgbfb_device = {
+       .name = "pnx4008-rgbfb",
+       .id = 0,
+       .dev = {
+               .coherent_dma_mask = 0xffffffff,
+       }
+};
+
+struct resource watchdog_resources[] = {
+       {
+               .start = PNX4008_WDOG_BASE,
+               .end = PNX4008_WDOG_BASE + SZ_4K - 1,
+               .flags = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device watchdog_device = {
+       .name = "pnx4008-watchdog",
+       .id = -1,
+       .num_resources = ARRAY_SIZE(watchdog_resources),
+       .resource = watchdog_resources,
+};
+
 static struct platform_device *devices[] __initdata = {
        &spipnx_1,
        &spipnx_2,
        &serial_device,
+       &ohci_device,
+       &nand_flash_device,
+       &sdum_device,
+       &rgbfb_device,
+       &watchdog_device,
 };
 
 
index 8c5351d751cf3eec2768cea0dda38cbef0605bd6..ca942a63b52fecba064c03b2a38aa4d397a7d779 100644 (file)
@@ -10,8 +10,6 @@
 #ifndef OP_COUNTER_H
 #define OP_COUNTER_H
 
-#define OP_MAX_COUNTER 5
-
 /* Per performance monitor configuration as set via
  * oprofilefs.
  */
index 22e4c466e5a3632b74a740d5a9f3111e8d36b3ad..d12fb97a533774f01385b4fb34c1d0e96e1ec44e 100644 (file)
@@ -82,6 +82,7 @@ EXPORT_SYMBOL(acpi_strict);
 acpi_interrupt_flags acpi_sci_flags __initdata;
 int acpi_sci_override_gsi __initdata;
 int acpi_skip_timer_override __initdata;
+int acpi_use_timer_override __initdata;
 
 #ifdef CONFIG_X86_LOCAL_APIC
 static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
@@ -1300,6 +1301,13 @@ static int __init parse_acpi_skip_timer_override(char *arg)
        return 0;
 }
 early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override);
+
+static int __init parse_acpi_use_timer_override(char *arg)
+{
+       acpi_use_timer_override = 1;
+       return 0;
+}
+early_param("acpi_use_timer_override", parse_acpi_use_timer_override);
 #endif /* CONFIG_X86_IO_APIC */
 
 static int __init setup_acpi_sci(char *s)
index fe799b11ac0a7e9ce0b6707fe561902a4b4ad4ab..c9841692bb7cc1170861044ecd973916373b18d3 100644 (file)
@@ -27,11 +27,17 @@ static int __init check_bridge(int vendor, int device)
 #ifdef CONFIG_ACPI
        /* According to Nvidia all timer overrides are bogus unless HPET
           is enabled. */
-       if (vendor == PCI_VENDOR_ID_NVIDIA) {
+       if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
                nvidia_hpet_detected = 0;
                acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
                if (nvidia_hpet_detected == 0) {
                        acpi_skip_timer_override = 1;
+                         printk(KERN_INFO "Nvidia board "
+                       "detected. Ignoring ACPI "
+                       "timer override.\n");
+                printk(KERN_INFO "If you got timer trouble "
+                                "try acpi_use_timer_override\n");
+
                }
        }
 #endif
index ad84bc2802a6a2900b4bb2f4bc3c61fad8332948..3b7a63e0ed1a5b07121ae63c9e35863ae0469a2b 100644 (file)
@@ -1287,9 +1287,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
                        trigger == IOAPIC_LEVEL)
                set_irq_chip_and_handler_name(irq, &ioapic_chip,
                                         handle_fasteoi_irq, "fasteoi");
-       else
+       else {
+               irq_desc[irq].status |= IRQ_DELAYED_DISABLE;
                set_irq_chip_and_handler_name(irq, &ioapic_chip,
                                         handle_edge_irq, "edge");
+       }
        set_intr_gate(vector, interrupt[irq]);
 }
 
index 1e1fa3e391a3889ec822c869c19bd9feb76e5e36..dd53c58f64f1bd944dd65190fc5d8f98bf6c8643 100644 (file)
@@ -205,7 +205,7 @@ void cpu_idle(void)
 void cpu_idle_wait(void)
 {
        unsigned int cpu, this_cpu = get_cpu();
-       cpumask_t map;
+       cpumask_t map, tmp = current->cpus_allowed;
 
        set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
        put_cpu();
@@ -227,6 +227,8 @@ void cpu_idle_wait(void)
                }
                cpus_and(map, map, cpu_online_map);
        } while (!cpus_empty(map));
+
+       set_cpus_allowed(current, tmp);
 }
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
index 00489b706d2719c2083172342569381b60f5ce7e..fe9c5e8e7e6f5066e5f92865f0c6d71ec2887050 100644 (file)
@@ -129,15 +129,19 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
 
 #ifdef CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
+               unsigned long new_ebp;
                addr = *(unsigned long *)(ebp + 4);
                ops->address(data, addr);
                /*
                 * break out of recursive entries (such as
-                * end_of_stack_stop_unwind_function):
+                * end_of_stack_stop_unwind_function). Also,
+                * we can never allow a frame pointer to
+                * move downwards!
                 */
-               if (ebp == *(unsigned long *)ebp)
+               new_ebp = *(unsigned long *)ebp;
+               if (new_ebp <= ebp)
                        break;
-               ebp = *(unsigned long *)ebp;
+               ebp = new_ebp;
        }
 #else
        while (valid_stack_ptr(tinfo, stack)) {
index dbc4aae919592b926255d73ce7ebdeec675164cd..69163998adeb79fad0b4fcad749390f8acd432e7 100644 (file)
@@ -255,13 +255,13 @@ static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, i
  */
 static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
 {
-       static const unsigned int pirqmap[4] = { 3, 2, 5, 1 };
+       static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 };
        return read_config_nybble(router, 0x55, pirqmap[pirq-1]);
 }
 
 static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
 {
-       static const unsigned int pirqmap[4] = { 3, 2, 5, 1 };
+       static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 };
        write_config_nybble(router, 0x55, pirqmap[pirq-1], irq);
        return 1;
 }
index 18ccb1266e182d00a54cbcd53b0e0087bd5a68a4..f92306bbedb848eb146ece3afde7729abdddac13 100644 (file)
@@ -13,8 +13,8 @@ config HP_SIMSERIAL_CONSOLE
        depends on HP_SIMSERIAL
 
 config HP_SIMSCSI
-       tristate "Simulated SCSI disk"
-       depends on SCSI
+       bool "Simulated SCSI disk"
+       depends on SCSI=y
 
 endmenu
 
index 8145547bb52daf891199affd969a5dd9cb8cee9a..c2f58ff364e7144c43de3e49958bfac7b3b3b0ad 100644 (file)
@@ -27,7 +27,7 @@ hpsim_set_affinity_noop (unsigned int a, cpumask_t b)
 }
 
 static struct hw_interrupt_type irq_type_hp_sim = {
-       .typename =     "hpsim",
+       .name =         "hpsim",
        .startup =      hpsim_irq_startup,
        .shutdown =     hpsim_irq_noop,
        .enable =       hpsim_irq_noop,
index 9bf15fefa7e4e00517f2203cdde817b9299d9a14..60d64950e3c202f5ed6ae3c666e24195ff6700d5 100644 (file)
@@ -426,7 +426,7 @@ iosapic_end_level_irq (unsigned int irq)
 #define iosapic_ack_level_irq          nop
 
 struct hw_interrupt_type irq_type_iosapic_level = {
-       .typename =     "IO-SAPIC-level",
+       .name =         "IO-SAPIC-level",
        .startup =      iosapic_startup_level_irq,
        .shutdown =     iosapic_shutdown_level_irq,
        .enable =       iosapic_enable_level_irq,
@@ -473,7 +473,7 @@ iosapic_ack_edge_irq (unsigned int irq)
 #define iosapic_end_edge_irq           nop
 
 struct hw_interrupt_type irq_type_iosapic_edge = {
-       .typename =     "IO-SAPIC-edge",
+       .name =         "IO-SAPIC-edge",
        .startup =      iosapic_startup_edge_irq,
        .shutdown =     iosapic_disable_edge_irq,
        .enable =       iosapic_enable_edge_irq,
@@ -664,7 +664,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
                        printk(KERN_WARNING
                               "%s: changing vector %d from %s to %s\n",
                               __FUNCTION__, vector,
-                              idesc->chip->typename, irq_type->typename);
+                              idesc->chip->name, irq_type->name);
                idesc->chip = irq_type;
        }
        return 0;
index f07c0864b0b424bd7743b310e89ee1868fe1af12..54d55e4d64f7e1e70aa30d8d2c853a35bafe5f0a 100644 (file)
@@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v)
                        seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
                }
 #endif
-               seq_printf(p, " %14s", irq_desc[i].chip->typename);
+               seq_printf(p, " %14s", irq_desc[i].chip->name);
                seq_printf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
@@ -197,7 +197,7 @@ void fixup_irqs(void)
                        struct pt_regs *old_regs = set_irq_regs(NULL);
 
                        vectors_in_migration[irq]=0;
-                       __do_IRQ(irq);
+                       generic_handle_irq(irq);
                        set_irq_regs(old_regs);
                }
        }
index 9c6dafa2d0df613e95ee0d776672c85bac6d14b1..ba3ba8bc50bef1aa77758256ec818e000eb88ff4 100644 (file)
@@ -186,7 +186,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
                        ia64_setreg(_IA64_REG_CR_TPR, vector);
                        ia64_srlz_d();
 
-                       __do_IRQ(local_vector_to_irq(vector));
+                       generic_handle_irq(local_vector_to_irq(vector));
 
                        /*
                         * Disable interrupts and send EOI:
@@ -242,7 +242,7 @@ void ia64_process_pending_intr(void)
                         * Probably could shared code.
                         */
                        vectors_in_migration[local_vector_to_irq(vector)]=0;
-                       __do_IRQ(local_vector_to_irq(vector));
+                       generic_handle_irq(local_vector_to_irq(vector));
                        set_irq_regs(old_regs);
 
                        /*
index 1ab58b09f3d7163df640f5765efd7d8d3a020c02..c2f07beb17590fcd9e2796208c1355e555d0827f 100644 (file)
@@ -34,7 +34,7 @@ static int lsapic_retrigger(unsigned int irq)
 }
 
 struct hw_interrupt_type irq_type_ia64_lsapic = {
-       .typename =     "LSAPIC",
+       .name =         "LSAPIC",
        .startup =      lsapic_noop_startup,
        .shutdown =     lsapic_noop,
        .enable =       lsapic_noop,
index eee5c1cfbe3223c1376c4d0a9239d4def44be824..f3a9585e98a8337a8cbd8b06c6916d5a8b3a8612 100644 (file)
@@ -70,8 +70,10 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr)
  * Don't actually need to do any preparation, but need to make sure
  * the address is in the right region.
  */
-int prepare_hugepage_range(unsigned long addr, unsigned long len)
+int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff)
 {
+       if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
+               return -EINVAL;
        if (len & ~HPAGE_MASK)
                return -EINVAL;
        if (addr & ~HPAGE_MASK)
index 7f73ad4408aaee3ad8977ad1ef2d1a89302cfbe5..ff1c55601178b2c2ff7071b26f03bf64f5638865 100644 (file)
@@ -381,14 +381,13 @@ bte_result_t bte_unaligned_copy(u64 src, u64 dest, u64 len, u64 mode)
                 * bcopy to the destination.
                 */
 
-               /* Add the leader from source */
-               headBteLen = len + (src & L1_CACHE_MASK);
-               /* Add the trailing bytes from footer. */
-               headBteLen += L1_CACHE_BYTES - (headBteLen & L1_CACHE_MASK);
-               headBteSource = src & ~L1_CACHE_MASK;
                headBcopySrcOffset = src & L1_CACHE_MASK;
                headBcopyDest = dest;
                headBcopyLen = len;
+
+               headBteSource = src - headBcopySrcOffset;
+               /* Add the leading and trailing bytes from source */
+               headBteLen = L1_CACHE_ALIGN(len + headBcopySrcOffset);
        }
 
        if (headBcopyLen > 0) {
index 7bb6ad188ba39855f1516465e4fee89f5b4ef145..0b49459a878a92a1047f916bd40af84b489701a9 100644 (file)
@@ -201,7 +201,7 @@ static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask)
 }
 
 struct hw_interrupt_type irq_type_sn = {
-       .typename       = "SN hub",
+       .name           = "SN hub",
        .startup        = sn_startup_irq,
        .shutdown       = sn_shutdown_irq,
        .enable         = sn_enable_irq,
index bde9811cf98c927dcb4bb787bacbdb81a2e6122c..7b21959eaeae66b17f08f5337e42f06cb2842299 100644 (file)
@@ -62,7 +62,7 @@ int (*mach_kbdrate) (struct kbd_repeat *);
 void (*mach_kbd_leds) (unsigned int);
 /* machine dependent irq functions */
 void (*mach_init_IRQ) (void);
-irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
+irq_handler_t mach_default_handler;
 int (*mach_get_irq_list) (struct seq_file *, void *);
 void (*mach_process_int) (int irq, struct pt_regs *fp);
 void (*mach_trap_init) (void);
index c5667bdddd5ef263551ef7e6c7633d75bc64a14b..9226264abf1ab610846d9df98afa4a9c9dfca91d 100644 (file)
@@ -54,7 +54,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
        update_process_times(user_mode(regs));
 #endif
        if (current->pid)
-               profile_tick(CPU_PROFILING, regs);
+               profile_tick(CPU_PROFILING);
 
        /*
         * If we have an externally synchronized Linux clock, then update
index b4b55093ae7e867a23093883a620e16fc52af909..a57239ec6c8c6fe05453d73330b6034b0e4ea197 100644 (file)
@@ -33,7 +33,7 @@
 /*
  *     This table stores the address info for each vector handler.
  */
-irq_handler_t irq_list[SYS_IRQS];
+struct irq_entry irq_list[SYS_IRQS];
 
 #define NUM_IRQ_NODES 16
 static irq_node_t nodes[NUM_IRQ_NODES];
@@ -44,7 +44,7 @@ volatile unsigned int num_spurious;
 unsigned int local_bh_count[NR_CPUS];
 unsigned int local_irq_count[NR_CPUS];
 
-static irqreturn_t default_irq_handler(int irq, void *ptr, struct pt_regs *regs)
+static irqreturn_t default_irq_handler(int irq, void *ptr)
 {
 #if 1
        printk(KERN_INFO "%s(%d): default irq handler vec=%d [0x%x]\n",
@@ -70,7 +70,7 @@ void __init init_IRQ(void)
 
        for (i = 0; i < SYS_IRQS; i++) {
                if (mach_default_handler)
-                       irq_list[i].handler = (*mach_default_handler)[i];
+                       irq_list[i].handler = mach_default_handler;
                else
                        irq_list[i].handler = default_irq_handler;
                irq_list[i].flags   = IRQ_FLG_STD;
@@ -100,7 +100,7 @@ irq_node_t *new_irq_node(void)
 
 int request_irq(
        unsigned int irq,
-       irqreturn_t (*handler)(int, void *, struct pt_regs *),
+       irq_handler_t handler,
        unsigned long flags,
        const char *devname,
        void *dev_id)
@@ -157,7 +157,7 @@ void free_irq(unsigned int irq, void *dev_id)
        }
 
        if (mach_default_handler)
-               irq_list[irq].handler = (*mach_default_handler)[irq];
+               irq_list[irq].handler = mach_default_handler;
        else
                irq_list[irq].handler = default_irq_handler;
        irq_list[irq].flags   = IRQ_FLG_STD;
@@ -168,8 +168,7 @@ void free_irq(unsigned int irq, void *dev_id)
 EXPORT_SYMBOL(free_irq);
 
 
-int sys_request_irq(unsigned int irq, 
-                    irqreturn_t (*handler)(int, void *, struct pt_regs *), 
+int sys_request_irq(unsigned int irq, irq_handler_t handler, 
                     unsigned long flags, const char *devname, void *dev_id)
 {
        if (irq > IRQ7) {
@@ -211,7 +210,7 @@ void sys_free_irq(unsigned int irq, void *dev_id)
                printk(KERN_WARNING "%s: Removing probably wrong IRQ %d from %s\n",
                       __FUNCTION__, irq, irq_list[irq].devname);
 
-       irq_list[irq].handler = (*mach_default_handler)[irq];
+       irq_list[irq].handler = mach_default_handler;
        irq_list[irq].flags   = 0;
        irq_list[irq].dev_id  = NULL;
        irq_list[irq].devname = NULL;
@@ -241,7 +240,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
        if (vec >= VEC_INT1 && vec <= VEC_INT7) {
                vec -= VEC_SPUR;
                kstat_cpu(0).irqs[vec]++;
-               irq_list[vec].handler(vec, irq_list[vec].dev_id, fp);
+               irq_list[vec].handler(vec, irq_list[vec].dev_id);
        } else {
                if (mach_process_int)
                        mach_process_int(vec, fp);
index fd68b74c07c3c4e5c457371c1dd54c52767cec8a..506d89768d455ba8625ed480d4122c7d1c8264c9 100644 (file)
@@ -491,11 +491,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
        return 0;
 }
 
-int prepare_hugepage_range(unsigned long addr, unsigned long len)
+int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff)
 {
        int err = 0;
 
-       if ( (addr+len) < addr )
+       if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
+               return -EINVAL;
+       if (len & ~HPAGE_MASK)
+               return -EINVAL;
+       if (addr & ~HPAGE_MASK)
                return -EINVAL;
 
        if (addr < 0x100000000UL)
index 13972148058dac9cae6c7e2829bf4c5b73b78bd9..6e38d4daeed7f6786c7e3067bd5329f0da2cb5ef 100644 (file)
@@ -66,8 +66,8 @@ AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
 AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
 
-cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) -fstack-protector )
-cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) -fstack-protector-all )
+cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector )
+cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all )
 
 CFLAGS += $(cflags-y)
 CFLAGS_KERNEL += $(cflags-kernel-y)
index c3bfd223ab49e2866bc54f154dac6bf9867e18a9..770940cc0108872e24f7208657d67825c06018fe 100644 (file)
@@ -836,13 +836,12 @@ gdt:
        .word   0x9200                          # data read/write
        .word   0x00CF                          # granularity = 4096, 386
                                                #  (+5th nibble of limit)
+gdt_end:
 idt_48:
        .word   0                               # idt limit = 0
        .word   0, 0                            # idt base = 0L
 gdt_48:
-       .word   0x8000                          # gdt limit=2048,
-                                               #  256 GDT entries
-
+       .word   gdt_end-gdt-1                   # gdt limit
        .word   0, 0                            # gdt base (filled in later)
 
 # Include video setup & detection code
index 3a7561d4703e6cbd3ff85bc9137b665bed383858..04566fe5de494887b510259d9a4c146e7986aefc 100644 (file)
@@ -244,6 +244,8 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
        case PTRACE_DETACH:
        case PTRACE_SYSCALL:
        case PTRACE_SETOPTIONS:
+       case PTRACE_SET_THREAD_AREA:
+       case PTRACE_GET_THREAD_AREA:
                return sys_ptrace(request, pid, addr, data); 
 
        default:
index a75c829c2b02b16bf23ea495a326d0307cd9685b..6fe191c5808465ddc7c8673c8996d52a67858d98 100644 (file)
@@ -278,7 +278,7 @@ e820_register_active_regions(int nid, unsigned long start_pfn,
                                                                >> PAGE_SHIFT;
 
                /* Skip map entries smaller than a page */
-               if (ei_startpfn > ei_endpfn)
+               if (ei_startpfn >= ei_endpfn)
                        continue;
 
                /* Check if end_pfn_map should be updated */
@@ -594,7 +594,9 @@ static int __init parse_memmap_opt(char *p)
                 * size before original memory map is
                 * reset.
                 */
+               e820_register_active_regions(0, 0, -1UL);
                saved_max_pfn = e820_end_of_ram();
+               remove_all_active_ranges();
 #endif
                end_pfn_map = 0;
                e820.nr_map = 0;
index 2b1245d8625849de6033eda814ed72b860faf232..68273bff58ccf251f1f83c5da27e4a71b8f97f5b 100644 (file)
@@ -45,7 +45,13 @@ static void nvidia_bugs(void)
        /*
         * All timer overrides on Nvidia are
         * wrong unless HPET is enabled.
+        * Unfortunately that's not true on many Asus boards.
+        * We don't know yet how to detect this automatically, but
+        * at least allow a command line override.
         */
+       if (acpi_use_timer_override)
+               return;
+
        nvidia_hpet_detected = 0;
        acpi_table_parse(ACPI_HPET, nvidia_hpet_check);
        if (nvidia_hpet_detected == 0) {
@@ -53,6 +59,8 @@ static void nvidia_bugs(void)
                printk(KERN_INFO "Nvidia board "
                       "detected. Ignoring ACPI "
                       "timer override.\n");
+               printk(KERN_INFO "If you got timer trouble "
+                       "try acpi_use_timer_override\n");
        }
 #endif
        /* RED-PEN skip them on mptables too? */
index 41bfc49301ad139cd32583d8b542a1dbc482fe08..14654e6824116f5c96766b07c93cacf1a6a28c5d 100644 (file)
@@ -790,9 +790,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
                        trigger == IOAPIC_LEVEL)
                set_irq_chip_and_handler_name(irq, &ioapic_chip,
                                              handle_fasteoi_irq, "fasteoi");
-       else
+       else {
+               irq_desc[irq].status |= IRQ_DELAYED_DISABLE;
                set_irq_chip_and_handler_name(irq, &ioapic_chip,
                                              handle_edge_irq, "edge");
+       }
 }
 
 static void __init setup_IO_APIC_irqs(void)
index 49f7fac6229e5f4e920d58fcdec1fd5e49e8667b..7451a4c43c1681639c0aa5fbb2640d509ccac603 100644 (file)
@@ -88,9 +88,8 @@ void enter_idle(void)
 
 static void __exit_idle(void)
 {
-       if (read_pda(isidle) == 0)
+       if (test_and_clear_bit_pda(0, isidle) == 0)
                return;
-       write_pda(isidle, 0);
        atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL);
 }
 
@@ -145,7 +144,7 @@ static void poll_idle (void)
 void cpu_idle_wait(void)
 {
        unsigned int cpu, this_cpu = get_cpu();
-       cpumask_t map;
+       cpumask_t map, tmp = current->cpus_allowed;
 
        set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
        put_cpu();
@@ -168,6 +167,8 @@ void cpu_idle_wait(void)
                }
                cpus_and(map, map, cpu_online_map);
        } while (!cpus_empty(map));
+
+       set_cpus_allowed(current, tmp);
 }
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
index 4f67697f5036faf1f37222ced236c0b3a04626c7..9f74c883568c419909b6542449161d5b109f6b51 100644 (file)
@@ -376,9 +376,8 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info,
        /* prevent preemption and reschedule on another processor */
        int me = get_cpu();
        if (cpu == me) {
-               WARN_ON(1);
                put_cpu();
-               return -EBUSY;
+               return 0;
        }
        spin_lock_bh(&call_lock);
        __smp_call_function_single(cpu, func, info, nonatomic, wait);
index 88722f11ca132595cf11704e8e65cdb47e2790f9..e3ef544d2cfb514f1894c232c0e8d38e456a49f7 100644 (file)
@@ -876,15 +876,6 @@ static struct irqaction irq0 = {
        timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL
 };
 
-static int __cpuinit
-time_cpu_notifier(struct notifier_block *nb, unsigned long action, void *hcpu)
-{
-       unsigned cpu = (unsigned long) hcpu;
-       if (action == CPU_ONLINE)
-               vsyscall_set_cpu(cpu);
-       return NOTIFY_DONE;
-}
-
 void __init time_init(void)
 {
        if (nohpet)
@@ -925,8 +916,6 @@ void __init time_init(void)
        vxtime.last_tsc = get_cycles_sync();
        set_cyc2ns_scale(cpu_khz);
        setup_irq(0, &irq0);
-       hotcpu_notifier(time_cpu_notifier, 0);
-       time_cpu_notifier(NULL, CPU_ONLINE, (void *)(long)smp_processor_id());
 
 #ifndef CONFIG_SMP
        time_init_gtod();
index 7819022a8db5986e29bf36247be94cab99cb7f06..a153d0a01b72152fa34b5fc22cfeec9a2c6ffda3 100644 (file)
@@ -290,6 +290,12 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s
                if (tsk && tsk != current)
                        stack = (unsigned long *)tsk->thread.rsp;
        }
+       /*
+        * Align the stack pointer on word boundary, later loops
+        * rely on that (and corruption / debug info bugs can cause
+        * unaligned values here):
+        */
+       stack = (unsigned long *)((unsigned long)stack & ~(sizeof(long)-1));
 
        /*
         * Print function call entries within a stack. 'cond' is the
index a98b460af6a1f600ebc2153490ecd4706700d08e..92546c1526f1fece35fb8ed07bfeefc7b3414c0d 100644 (file)
@@ -27,6 +27,9 @@
 #include <linux/jiffies.h>
 #include <linux/sysctl.h>
 #include <linux/getcpu.h>
+#include <linux/cpu.h>
+#include <linux/smp.h>
+#include <linux/notifier.h>
 
 #include <asm/vsyscall.h>
 #include <asm/pgtable.h>
@@ -243,32 +246,17 @@ static ctl_table kernel_root_table2[] = {
 
 #endif
 
-static void __cpuinit write_rdtscp_cb(void *info)
-{
-       write_rdtscp_aux((unsigned long)info);
-}
-
-void __cpuinit vsyscall_set_cpu(int cpu)
+/* Assume __initcall executes before all user space. Hopefully kmod
+   doesn't violate that. We'll find out if it does. */
+static void __cpuinit vsyscall_set_cpu(int cpu)
 {
        unsigned long *d;
        unsigned long node = 0;
 #ifdef CONFIG_NUMA
        node = cpu_to_node[cpu];
 #endif
-       if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) {
-               void *info = (void *)((node << 12) | cpu);
-               /* Can happen on preemptive kernel */
-               if (get_cpu() == cpu)
-                       write_rdtscp_cb(info);
-#ifdef CONFIG_SMP
-               else {
-                       /* the notifier is unfortunately not executed on the
-                          target CPU */
-                       smp_call_function_single(cpu,write_rdtscp_cb,info,0,1);
-               }
-#endif
-               put_cpu();
-       }
+       if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP))
+               write_rdtscp_aux((node << 12) | cpu);
 
        /* Store cpu number in limit so that it can be loaded quickly
           in user space in vgetcpu.
@@ -280,6 +268,23 @@ void __cpuinit vsyscall_set_cpu(int cpu)
        *d |= (node >> 4) << 48;
 }
 
+static void __cpuinit cpu_vsyscall_init(void *arg)
+{
+       /* preemption should be already off */
+       vsyscall_set_cpu(raw_smp_processor_id());
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+static int __cpuinit
+cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg)
+{
+       long cpu = (long)arg;
+       if (action == CPU_ONLINE)
+               smp_call_function_single(cpu, cpu_vsyscall_init, NULL, 0, 1);
+       return NOTIFY_DONE;
+}
+#endif
+
 static void __init map_vsyscall(void)
 {
        extern char __vsyscall_0;
@@ -299,6 +304,8 @@ static int __init vsyscall_init(void)
 #ifdef CONFIG_SYSCTL
        register_sysctl_table(kernel_root_table2, 0);
 #endif
+       on_each_cpu(cpu_vsyscall_init, NULL, 0, 1);
+       hotcpu_notifier(cpu_vsyscall_notifier, 0);
        return 0;
 }
 
index 971dc1181e69ace1620338b845a5f4e5869dee30..4c0c00ef3ca769c027591b4d5b6483e9b13b9228 100644 (file)
@@ -496,7 +496,7 @@ int remove_memory(u64 start, u64 size)
 }
 EXPORT_SYMBOL_GPL(remove_memory);
 
-#ifndef CONFIG_ACPI_NUMA
+#if !defined(CONFIG_ACPI_NUMA) && defined(CONFIG_NUMA)
 int memory_add_physaddr_to_nid(u64 start)
 {
        return 0;
@@ -504,13 +504,6 @@ int memory_add_physaddr_to_nid(u64 start)
 EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
 #endif
 
-#ifndef CONFIG_ACPI_NUMA
-int memory_add_physaddr_to_nid(u64 start)
-{
-       return 0;
-}
-#endif
-
 #endif /* CONFIG_MEMORY_HOTPLUG */
 
 #ifdef CONFIG_MEMORY_HOTPLUG_RESERVE
@@ -655,9 +648,22 @@ void free_initrd_mem(unsigned long start, unsigned long end)
 
 void __init reserve_bootmem_generic(unsigned long phys, unsigned len) 
 { 
-       /* Should check here against the e820 map to avoid double free */ 
 #ifdef CONFIG_NUMA
        int nid = phys_to_nid(phys);
+#endif
+       unsigned long pfn = phys >> PAGE_SHIFT;
+       if (pfn >= end_pfn) {
+               /* This can happen with kdump kernels when accessing firmware
+                  tables. */
+               if (pfn < end_pfn_map)
+                       return;
+               printk(KERN_ERR "reserve_bootmem: illegal reserve %lx %u\n",
+                               phys, len);
+               return;
+       }
+
+       /* Should check here against the e820 map to avoid double free */
+#ifdef CONFIG_NUMA
        reserve_bootmem_node(NODE_DATA(nid), phys, len);
 #else                  
        reserve_bootmem(phys, len);    
index e61093b34c268ea77590a0f3545458f5def50674..f8b6b2800a62c86641d94badfc5b1201951b2578 100644 (file)
@@ -163,37 +163,6 @@ static __init void unreachable_devices(void)
        }
 }
 
-static __init void pci_mmcfg_insert_resources(void)
-{
-#define PCI_MMCFG_RESOURCE_NAME_LEN 19
-       int i;
-       struct resource *res;
-       char *names;
-       unsigned num_buses;
-
-       res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res),
-                       pci_mmcfg_config_num, GFP_KERNEL);
-
-       if (!res) {
-               printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n");
-               return;
-       }
-
-       names = (void *)&res[pci_mmcfg_config_num];
-       for (i = 0; i < pci_mmcfg_config_num; i++, res++) {
-               num_buses = pci_mmcfg_config[i].end_bus_number -
-                   pci_mmcfg_config[i].start_bus_number + 1;
-               res->name = names;
-               snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u",
-                       pci_mmcfg_config[i].pci_segment_group_number);
-               res->start = pci_mmcfg_config[i].base_address;
-               res->end = res->start + (num_buses << 20) - 1;
-               res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-               insert_resource(&iomem_resource, res);
-               names += PCI_MMCFG_RESOURCE_NAME_LEN;
-       }
-}
-
 void __init pci_mmcfg_init(int type)
 {
        int i;
@@ -237,7 +206,6 @@ void __init pci_mmcfg_init(int type)
        }
 
        unreachable_devices();
-       pci_mmcfg_insert_resources();
 
        raw_pci_ops = &pci_mmcfg;
        pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
index a19338e6215da1b20a48c4861453ac8230b01536..e55a756214375577ffa942dbc239fe79e87985fe 100644 (file)
@@ -286,9 +286,8 @@ static int sg_io(struct file *file, request_queue_t *q,
         * fill in request structure
         */
        rq->cmd_len = hdr->cmd_len;
+       memset(rq->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
        memcpy(rq->cmd, cmd, hdr->cmd_len);
-       if (sizeof(rq->cmd) != hdr->cmd_len)
-               memset(rq->cmd + hdr->cmd_len, 0, sizeof(rq->cmd) - hdr->cmd_len);
 
        memset(sense, 0, sizeof(sense));
        rq->sense = sense;
index c84286cbbe2571e3c5b4fb62bf60b93942ff941a..068fe4f100b0f8e609cd73576f53930c66bdbb4c 100644 (file)
@@ -73,7 +73,6 @@ static unsigned int acpi_irq_irq;
 static acpi_osd_handler acpi_irq_handler;
 static void *acpi_irq_context;
 static struct workqueue_struct *kacpid_wq;
-static struct workqueue_struct *kacpi_notify_wq;
 
 acpi_status acpi_os_initialize(void)
 {
@@ -92,9 +91,8 @@ acpi_status acpi_os_initialize1(void)
                return AE_NULL_ENTRY;
        }
        kacpid_wq = create_singlethread_workqueue("kacpid");
-       kacpi_notify_wq = create_singlethread_workqueue("kacpi_notify");
        BUG_ON(!kacpid_wq);
-       BUG_ON(!kacpi_notify_wq);
+
        return AE_OK;
 }
 
@@ -106,7 +104,6 @@ acpi_status acpi_os_terminate(void)
        }
 
        destroy_workqueue(kacpid_wq);
-       destroy_workqueue(kacpi_notify_wq);
 
        return AE_OK;
 }
@@ -569,7 +566,10 @@ void acpi_os_derive_pci_id(acpi_handle rhandle,    /* upper bound  */
 
 static void acpi_os_execute_deferred(void *context)
 {
-       struct acpi_os_dpc *dpc = (struct acpi_os_dpc *)context;
+       struct acpi_os_dpc *dpc = NULL;
+
+
+       dpc = (struct acpi_os_dpc *)context;
        if (!dpc) {
                printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
                return;
@@ -604,12 +604,14 @@ acpi_status acpi_os_execute(acpi_execute_type type,
        struct acpi_os_dpc *dpc;
        struct work_struct *task;
 
+       ACPI_FUNCTION_TRACE("os_queue_for_execution");
+
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
                          "Scheduling function [%p(%p)] for deferred execution.\n",
                          function, context));
 
        if (!function)
-               return AE_BAD_PARAMETER;
+               return_ACPI_STATUS(AE_BAD_PARAMETER);
 
        /*
         * Allocate/initialize DPC structure.  Note that this memory will be
@@ -622,20 +624,26 @@ acpi_status acpi_os_execute(acpi_execute_type type,
         * from the same memory.
         */
 
-       dpc = kmalloc(sizeof(struct acpi_os_dpc) +
-                       sizeof(struct work_struct), GFP_ATOMIC);
+       dpc =
+           kmalloc(sizeof(struct acpi_os_dpc) + sizeof(struct work_struct),
+                   GFP_ATOMIC);
        if (!dpc)
-               return AE_NO_MEMORY;
+               return_ACPI_STATUS(AE_NO_MEMORY);
+
        dpc->function = function;
        dpc->context = context;
+
        task = (void *)(dpc + 1);
        INIT_WORK(task, acpi_os_execute_deferred, (void *)dpc);
-       if (!queue_work((type == OSL_NOTIFY_HANDLER)?
-                       kacpi_notify_wq : kacpid_wq, task)) {
-               status = AE_ERROR;
+
+       if (!queue_work(kacpid_wq, task)) {
+               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+                                 "Call to queue_work() failed.\n"));
                kfree(dpc);
+               status = AE_ERROR;
        }
-       return status;
+
+       return_ACPI_STATUS(status);
 }
 
 EXPORT_SYMBOL(acpi_os_execute);
index a8fd0c3e59b30a5a816d5cbb32a354b055b98920..915a55a6cc14ea8dc230cefb31f15f8b9c48dc04 100644 (file)
@@ -5957,7 +5957,7 @@ static void __exit ata_exit(void)
        destroy_workqueue(ata_aux_wq);
 }
 
-module_init(ata_init);
+subsys_initcall(ata_init);
 module_exit(ata_exit);
 
 static unsigned long ratelimit_time;
index 7af2a4ba49905e068d7eb38c4ad0f778ccc3702e..5c1fc467fc7fd0ed25172def2417f6c420993cf3 100644 (file)
@@ -1612,9 +1612,9 @@ early_finish:
 
 err_did:
        ata_qc_free(qc);
-err_mem:
        cmd->result = (DID_ERROR << 16);
        done(cmd);
+err_mem:
        DPRINTK("EXIT - internal\n");
        return 0;
 
index 690828eb5226e8d48a3c7f59cb39ab48ba4ae968..96a098020a8f743a6206370c74af03897ce54f36 100644 (file)
@@ -92,7 +92,7 @@ static int artop6260_pre_reset(struct ata_port *ap)
                return -ENOENT;
 
        pci_read_config_byte(pdev, 0x49, &tmp);
-       if (tmp & (1 >> ap->port_no))
+       if (tmp & (1 << ap->port_no))
                ap->cbl = ATA_CBL_PATA40;
        else
                ap->cbl = ATA_CBL_PATA80;
index 7350443948c177e337583966d6eff3c460db7eca..fce3fcdc7e791d51c10569c9290a08eeb767a781 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "pata_hpt37x"
-#define DRV_VERSION    "0.5"
+#define DRV_VERSION    "0.5.1"
 
 struct hpt_clock {
        u8      xfer_speed;
@@ -453,7 +453,13 @@ static int hpt37x_pre_reset(struct ata_port *ap)
 {
        u8 scr2, ata66;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-
+       static const struct pci_bits hpt37x_enable_bits[] = {
+               { 0x50, 1, 0x04, 0x04 },
+               { 0x54, 1, 0x04, 0x04 }
+       };
+       if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no]))
+               return -ENOENT;
+               
        pci_read_config_byte(pdev, 0x5B, &scr2);
        pci_write_config_byte(pdev, 0x5B, scr2 & ~0x01);
        /* Cable register now active */
@@ -488,10 +494,17 @@ static void hpt37x_error_handler(struct ata_port *ap)
 
 static int hpt374_pre_reset(struct ata_port *ap)
 {
+       static const struct pci_bits hpt37x_enable_bits[] = {
+               { 0x50, 1, 0x04, 0x04 },
+               { 0x54, 1, 0x04, 0x04 }
+       };
        u16 mcr3, mcr6;
        u8 ata66;
-
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+
+       if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no]))
+               return -ENOENT;
+               
        /* Do the extra channel work */
        pci_read_config_word(pdev, 0x52, &mcr3);
        pci_read_config_word(pdev, 0x56, &mcr6);
index d433f27e0ce2529c1617a6584e42abe55be62d36..aa25f8b09fe3092fc93093a29c8757c6229f6563 100644 (file)
@@ -68,6 +68,7 @@ static struct attribute *aoe_attrs[] = {
        &disk_attr_mac.attr,
        &disk_attr_netif.attr,
        &disk_attr_fwver.attr,
+       NULL
 };
 
 static const struct attribute_group attr_group = {
index 6ffe2b2bdacce4f283d628088264593fa2b6c1d1..4105c3bf34764da399d29e638294ead0e07a3973 100644 (file)
@@ -1300,6 +1300,12 @@ static void cciss_softirq_done(struct request *rq)
 
        complete_buffers(rq->bio, rq->errors);
 
+       if (blk_fs_request(rq)) {
+               const int rw = rq_data_dir(rq);
+
+               disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors);
+       }
+
 #ifdef CCISS_DEBUG
        printk("Done with %p\n", rq);
 #endif                         /* CCISS_DEBUG */
index 570d2f0493233a5c6c9c2a1a47783765334eeef8..d5f519ebbc0842d4b6eb194bc18a83f4ec8d020b 100644 (file)
@@ -998,6 +998,7 @@ static inline void complete_buffers(struct bio *bio, int ok)
  */
 static inline void complete_command(cmdlist_t *cmd, int timeout)
 {
+       struct request *rq = cmd->rq;
        int ok=1;
        int i, ddir;
 
@@ -1029,12 +1030,18 @@ static inline void complete_command(cmdlist_t *cmd, int timeout)
                 pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr,
                                cmd->req.sg[i].size, ddir);
 
-       complete_buffers(cmd->rq->bio, ok);
+       complete_buffers(rq->bio, ok);
 
-       add_disk_randomness(cmd->rq->rq_disk);
+       if (blk_fs_request(rq)) {
+               const int rw = rq_data_dir(rq);
 
-        DBGPX(printk("Done with %p\n", cmd->rq););
-       end_that_request_last(cmd->rq, ok ? 1 : -EIO);
+               disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors);
+       }
+
+       add_disk_randomness(rq->rq_disk);
+
+       DBGPX(printk("Done with %p\n", rq););
+       end_that_request_last(rq, ok ? 1 : -EIO);
 }
 
 /*
index da06f138334ecdb58bbd823021cc84c7022c36a0..7ebce2ec78972383ec227d519ec1aa5998a28318 100644 (file)
@@ -85,7 +85,7 @@ int zft_vmalloc_once(void *new, size_t size)
                peak_memory = used_memory;
        }
        TRACE_ABORT(0, ft_t_noise,
-                   "allocated buffer @ %p, %d bytes", *(void **)new, size);
+                   "allocated buffer @ %p, %zd bytes", *(void **)new, size);
 }
 int zft_vmalloc_always(void *new, size_t size)
 {
@@ -101,7 +101,7 @@ void zft_vfree(void *old, size_t size)
        if (*(void **)old) {
                vfree(*(void **)old);
                used_memory -= size;
-               TRACE(ft_t_noise, "released buffer @ %p, %d bytes",
+               TRACE(ft_t_noise, "released buffer @ %p, %zd bytes",
                      *(void **)old, size);
                *(void **)old = NULL;
        }
index a41b8df240730f8a2fd89219fcc6b3c6100119b1..c47add8e47df3009aaf25d6dffe4ded0b64f0773 100644 (file)
@@ -2118,7 +2118,7 @@ static int ipmi_bmc_register(ipmi_smi_t intf)
                dev_set_drvdata(&bmc->dev->dev, bmc);
                kref_init(&bmc->refcount);
 
-               rv = platform_device_register(bmc->dev);
+               rv = platform_device_add(bmc->dev);
                mutex_unlock(&ipmidriver_mutex);
                if (rv) {
                        printk(KERN_ERR
index abc5149e30e820c6e41c6c3477c2071f946e777c..bb1fac104fda63470bae62d5c068263c00a5f8e6 100644 (file)
@@ -2346,7 +2346,7 @@ static int try_smi_init(struct smi_info *new_smi)
                new_smi->dev = &new_smi->pdev->dev;
                new_smi->dev->driver = &ipmi_driver;
 
-               rv = platform_device_register(new_smi->pdev);
+               rv = platform_device_add(new_smi->pdev);
                if (rv) {
                        printk(KERN_ERR
                               "ipmi_si_intf:"
index e9e9bf31c369ef9b8b96cd3f65ac463647b7af69..58c955e390b3cf652ab6271f1184ca0d286de3dc 100644 (file)
@@ -1062,11 +1062,12 @@ static void isicom_shutdown_port(struct isi_port *port)
 static void isicom_close(struct tty_struct *tty, struct file *filp)
 {
        struct isi_port *port = tty->driver_data;
-       struct isi_board *card = port->card;
+       struct isi_board *card;
        unsigned long flags;
 
        if (!port)
                return;
+       card = port->card;
        if (isicom_paranoia_check(port, tty->name, "isicom_close"))
                return;
 
index 08b16179844308ab80b4406638ff43927156cf3d..fc702e40bd431c2cfdd715beacd636fb3d886c49 100644 (file)
@@ -705,17 +705,16 @@ static struct bin_attribute rbu_packet_size_attr = {
 
 static int __init dcdrbu_init(void)
 {
-       int rc = 0;
+       int rc;
        spin_lock_init(&rbu_data.lock);
 
        init_packet_head();
-       rbu_device =
-               platform_device_register_simple("dell_rbu", -1, NULL, 0);
-       if (!rbu_device) {
+       rbu_device = platform_device_register_simple("dell_rbu", -1, NULL, 0);
+       if (IS_ERR(rbu_device)) {
                printk(KERN_ERR
                        "dell_rbu:%s:platform_device_register_simple "
                        "failed\n", __FUNCTION__);
-               return -EIO;
+               return PTR_ERR(rbu_device);
        }
 
        rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
index 1ce01fb0ac09f1139d04480fb9824f738e44f81f..05fffb9415a2d9566afe73ae930be4267ec735d1 100644 (file)
@@ -137,7 +137,8 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev)
        gpio_line_set(gpio->scl_pin, 0);
        gpio_line_set(gpio->sda_pin, 0);
 
-       if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) {
+       err = i2c_bit_add_bus(&drv_data->adapter);
+       if (err != 0)
                printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id);
 
                kfree(drv_data);
index 32aab0d34ee930eb3b9a6f0a95fa752c7f32b7d9..714bae780953c821792ec410597411f722c7df87 100644 (file)
@@ -494,11 +494,12 @@ static __init int scx200_create_pci(const char *text, struct pci_dev *pdev,
        iface->pdev = pdev;
        iface->bar = bar;
 
-       pci_enable_device_bars(iface->pdev, 1 << iface->bar);
+       rc = pci_enable_device_bars(iface->pdev, 1 << iface->bar);
+       if (rc)
+               goto errout_free;
 
        rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name);
-
-       if (rc != 0) {
+       if (rc) {
                printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n",
                                iface->bar);
                goto errout_free;
index b1d5291531b7af2d8153c35e79e0ae0b9a3edf6b..45ed03591cd88df752caeb58bea03379f6367cd8 100644 (file)
@@ -459,7 +459,7 @@ ok_to_read:
 #ifdef DEBUG
        printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n",
                req->rq_disk->disk_name, req->sector, req->nr_sectors,
-               req->buffer+512));
+               req->buffer+512);
 #endif
        if (req->current_nr_sectors <= 0)
                end_request(req, 1);
index 574a678e7fdd0a24199de80f9aab33bda82837a4..5ca471ac6542a269d516e89dc3cd7c24b5e275cc 100644 (file)
@@ -1,6 +1,6 @@
 config INFINIBAND_IPATH
        tristate "QLogic InfiniPath Driver"
-       depends on PCI_MSI && 64BIT && INFINIBAND
+       depends on (PCI_MSI || HT_IRQ) && 64BIT && INFINIBAND
        ---help---
        This is a driver for QLogic InfiniPath host channel adapters,
        including InfiniBand verbs support.  This driver allows these
index 5e29cb0095e568eefd85578eac42a71dbfe34b2d..7dc10551cf1857eda301afda1905e2def5a63f1a 100644 (file)
@@ -10,8 +10,6 @@ ib_ipath-y := \
        ipath_eeprom.o \
        ipath_file_ops.o \
        ipath_fs.o \
-       ipath_iba6110.o \
-       ipath_iba6120.o \
        ipath_init_chip.o \
        ipath_intr.o \
        ipath_keys.o \
@@ -31,5 +29,8 @@ ib_ipath-y := \
        ipath_verbs_mcast.o \
        ipath_verbs.o
 
+ib_ipath-$(CONFIG_HT_IRQ) += ipath_iba6110.o
+ib_ipath-$(CONFIG_PCI_MSI) += ipath_iba6120.o
+
 ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o
 ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o
index 09a13c1fc46aa75c56955afaeccfb2e9358821d6..1aeddb48e355651a2a18843989bb49b81a8e7390 100644 (file)
@@ -390,12 +390,16 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
 
        /* setup the chip-specific functions, as early as possible. */
        switch (ent->device) {
+#ifdef CONFIG_HT_IRQ
        case PCI_DEVICE_ID_INFINIPATH_HT:
                ipath_init_iba6110_funcs(dd);
                break;
+#endif
+#ifdef CONFIG_PCI_MSI
        case PCI_DEVICE_ID_INFINIPATH_PE800:
                ipath_init_iba6120_funcs(dd);
                break;
+#endif
        default:
                ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, "
                              "failing\n", ent->device);
index 708d5a1bc3d28466e8fcb93c7d357cdc1222d36b..979b93e33da7a9e0461594887267d17c8e3891a0 100644 (file)
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Should you need to contact me, the author, you can do so either by
- * email or by paper mail:
- * Jan-Benedict Glaw, Lilienstraße 16, 33790 Hörste (near Halle/Westf.),
- * Germany.
  */
 
 #include <linux/delay.h>
index eb57a988e0488aac6d5a7f13c48cda909923111c..cfd2718a490d35ed710f595976d6ba72eea1b97b 100644 (file)
@@ -344,7 +344,7 @@ config HISAX_HFC_SX
 
 config HISAX_ENTERNOW_PCI
        bool "Formula-n enter:now PCI card"
-       depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV))
+       depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || FRV))
        help
          This enables HiSax support for the Formula-n enter:now PCI
          ISDN card.
index fa4b13f89369031de1984f5c9be6d3875212df06..b3fbb45bc90acbdd586d790140dee5b063690476 100644 (file)
@@ -685,6 +685,17 @@ static int __init wf_pm112_init(void)
                ++nr_cores;
 
        printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n");
+
+#ifdef MODULE
+       request_module("windfarm_smu_controls");
+       request_module("windfarm_smu_sensors");
+       request_module("windfarm_smu_sat");
+       request_module("windfarm_lm75_sensor");
+       request_module("windfarm_max6690_sensor");
+       request_module("windfarm_cpufreq_clamp");
+
+#endif /* MODULE */
+
        platform_driver_register(&wf_pm112_driver);
        return 0;
 }
index 2a944851b8e10193090f85f4db01c03f820e2207..f24fa734046a253d30a7a198c325e6538cc91539 100644 (file)
@@ -788,6 +788,7 @@ static int __init wf_smu_init(void)
                request_module("windfarm_smu_controls");
                request_module("windfarm_smu_sensors");
                request_module("windfarm_lm75_sensor");
+               request_module("windfarm_cpufreq_clamp");
 
 #endif /* MODULE */
                platform_driver_register(&wf_smu_driver);
index 9961a67b4f851333b9c00f952ed60c2e8f881642..26eee69ebe6deb7dbf1088bc5b9b3377a439379a 100644 (file)
@@ -719,6 +719,7 @@ static int __init wf_smu_init(void)
                request_module("windfarm_smu_controls");
                request_module("windfarm_smu_sensors");
                request_module("windfarm_lm75_sensor");
+               request_module("windfarm_cpufreq_clamp");
 
 #endif /* MODULE */
                platform_driver_register(&wf_smu_driver);
index ee8863c123e37881e0f35ee658a15fd5e925ad31..766bc54406e5864111ded440d722eb694bd03d3d 100644 (file)
@@ -475,7 +475,7 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr)
        if (bit) {
                bit -= 1;
 
-               ocr = 3 << bit;
+               ocr &= 3 << bit;
 
                host->ios.vdd = bit;
                mmc_set_ios(host);
@@ -1178,14 +1178,29 @@ static void mmc_rescan(void *data)
 {
        struct mmc_host *host = data;
        struct list_head *l, *n;
+       unsigned char power_mode;
 
        mmc_claim_host(host);
 
-       if (host->ios.power_mode == MMC_POWER_ON)
+       /*
+        * Check for removed cards and newly inserted ones. We check for
+        * removed cards first so we can intelligently re-select the VDD.
+        */
+       power_mode = host->ios.power_mode;
+       if (power_mode == MMC_POWER_ON)
                mmc_check_cards(host);
 
        mmc_setup(host);
 
+       /*
+        * Some broken cards process CMD1 even in stand-by state. There is
+        * no reply, but an ILLEGAL_COMMAND error is cached and returned
+        * after next command. We poll for card status here to clear any
+        * possibly pending error.
+        */
+       if (power_mode == MMC_POWER_ON)
+               mmc_check_cards(host);
+
        if (!list_empty(&host->cards)) {
                /*
                 * (Re-)calculate the fastest clock rate which the
index 06e4f77b0988c465356e365e5d1f0fd9ae8b4476..1dbdd6bb587ba11d68c3e4ac53f763edf45ea5c8 100644 (file)
@@ -68,8 +68,8 @@
 
 #define DRV_MODULE_NAME                "tg3"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "3.68"
-#define DRV_MODULE_RELDATE     "November 02, 2006"
+#define DRV_MODULE_VERSION     "3.69"
+#define DRV_MODULE_RELDATE     "November 15, 2006"
 
 #define TG3_DEF_MAC_MODE       0
 #define TG3_DEF_RX_MODE                0
@@ -4728,10 +4728,11 @@ static int tg3_poll_fw(struct tg3 *tp)
        u32 val;
 
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
-               for (i = 0; i < 400; i++) {
+               /* Wait up to 20ms for init done. */
+               for (i = 0; i < 200; i++) {
                        if (tr32(VCPU_STATUS) & VCPU_STATUS_INIT_DONE)
                                return 0;
-                       udelay(10);
+                       udelay(100);
                }
                return -ENODEV;
        }
@@ -10365,7 +10366,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
        u32 pci_state_reg, grc_misc_cfg;
        u32 val;
        u16 pci_cmd;
-       int err;
+       int err, pcie_cap;
 
        /* Force memory write invalidate off.  If we leave it on,
         * then on 5700_BX chips we have to enable a workaround.
@@ -10540,8 +10541,19 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
            GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906)
                tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE;
 
-       if (pci_find_capability(tp->pdev, PCI_CAP_ID_EXP) != 0)
+       pcie_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_EXP);
+       if (pcie_cap != 0) {
                tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS;
+               if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
+                       u16 lnkctl;
+
+                       pci_read_config_word(tp->pdev,
+                                            pcie_cap + PCI_EXP_LNKCTL,
+                                            &lnkctl);
+                       if (lnkctl & PCI_EXP_LNKCTL_CLKREQ_EN)
+                               tp->tg3_flags2 &= ~TG3_FLG2_HW_TSO_2;
+               }
+       }
 
        /* If we have an AMD 762 or VIA K8T800 chipset, write
         * reordering to the mailbox registers done by the host
@@ -11808,6 +11820,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
        else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 ||
            GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 ||
            tp->pci_chip_rev_id == CHIPREV_ID_5705_A0 ||
+           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 ||
            (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) {
                tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE;
        } else {
index e3e19277030a9517e4766bf0d351ef01dbd44720..ec44efdbb84e15d519b5f9553c6a5b07665de4a0 100644 (file)
@@ -780,7 +780,7 @@ static irqreturn_t parport_ip32_interrupt(int irq, void *dev_id)
        enum parport_ip32_irq_mode irq_mode = priv->irq_mode;
        switch (irq_mode) {
        case PARPORT_IP32_IRQ_FWD:
-               parport_generic_irq(irq, p, regs);
+               parport_generic_irq(irq, p);
                break;
        case PARPORT_IP32_IRQ_HERE:
                parport_ip32_wakeup(p);
index 204b1c8e972bcaa06c43b6900ecebb7a9a99bde3..5b448381169193239d48ee89d6deab5827480d35 100644 (file)
@@ -1460,33 +1460,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,     0x2609, quirk_intel_pcie_pm);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x260a, quirk_intel_pcie_pm);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   0x260b, quirk_intel_pcie_pm);
 
-/*
- * Fixup the cardbus bridges on the IBM Dock II docking station
- */
-static void __devinit quirk_ibm_dock2_cardbus(struct pci_dev *dev)
-{
-       u32 val;
-
-       /*
-        * tie the 2 interrupt pins to INTA, and configure the
-        * multifunction routing register to handle this.
-        */
-       if ((dev->subsystem_vendor == PCI_VENDOR_ID_IBM) &&
-               (dev->subsystem_device == 0x0148)) {
-               printk(KERN_INFO "PCI: Found IBM Dock II Cardbus Bridge "
-                       "applying quirk\n");
-               pci_read_config_dword(dev, 0x8c, &val);
-               val = ((val & 0xffffff00) | 0x1002);
-               pci_write_config_dword(dev, 0x8c, val);
-               pci_read_config_dword(dev, 0x80, &val);
-               val = ((val & 0x00ffff00) | 0x2864c077);
-               pci_write_config_dword(dev, 0x80, val);
-       }
-}
-
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420,
-                               quirk_ibm_dock2_cardbus);
-
 static void __devinit quirk_netmos(struct pci_dev *dev)
 {
        unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
index 0f701921c13e6e9a781844597380416d19c87c26..a20d84d707d9bff7a264fa4646fa31aa4cb31cc7 100644 (file)
@@ -1271,6 +1271,9 @@ static void pcmcia_bus_remove_socket(struct class_device *class_dev,
        socket->pcmcia_state.dead = 1;
        pccard_register_pcmcia(socket, NULL);
 
+       /* unregister any unbound devices */
+       pcmcia_card_remove(socket, NULL);
+
        pcmcia_put_socket(socket);
 
        return;
index 5f8c26cd66ca77c130b2cfc9c26ed1c1cacdf0df..b091a0fc4eb09fba778206bb9fa53890c524f54f 100644 (file)
@@ -66,6 +66,9 @@
    2.26.02.006 - Fix 9550SX pchip reset timeout.
                  Add big endian support.
    2.26.02.007 - Disable local interrupts during kmap/unmap_atomic().
+   2.26.02.008 - Free irq handler in __twa_shutdown().
+                 Serialize reset code.
+                 Add support for 9650SE controllers.
 */
 
 #include <linux/module.h>
@@ -89,7 +92,7 @@
 #include "3w-9xxx.h"
 
 /* Globals */
-#define TW_DRIVER_VERSION "2.26.02.007"
+#define TW_DRIVER_VERSION "2.26.02.008"
 static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
 static unsigned int twa_device_extension_count;
 static int twa_major = -1;
@@ -566,9 +569,9 @@ static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
                goto out;
        }
 
-       tw_dev->working_srl = fw_on_ctlr_srl;
-       tw_dev->working_branch = fw_on_ctlr_branch;
-       tw_dev->working_build = fw_on_ctlr_build;
+       tw_dev->tw_compat_info.working_srl = fw_on_ctlr_srl;
+       tw_dev->tw_compat_info.working_branch = fw_on_ctlr_branch;
+       tw_dev->tw_compat_info.working_build = fw_on_ctlr_build;
 
        /* Try base mode compatibility */
        if (!(init_connect_result & TW_CTLR_FW_COMPATIBLE)) {
@@ -590,10 +593,23 @@ static int twa_check_srl(TW_Device_Extension *tw_dev, int *flashed)
                        }
                        goto out;
                }
-               tw_dev->working_srl = TW_BASE_FW_SRL;
-               tw_dev->working_branch = TW_BASE_FW_BRANCH;
-               tw_dev->working_build = TW_BASE_FW_BUILD;
-       }
+               tw_dev->tw_compat_info.working_srl = TW_BASE_FW_SRL;
+               tw_dev->tw_compat_info.working_branch = TW_BASE_FW_BRANCH;
+               tw_dev->tw_compat_info.working_build = TW_BASE_FW_BUILD;
+       }
+
+       /* Load rest of compatibility struct */
+       strncpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
+       tw_dev->tw_compat_info.driver_srl_high = TW_CURRENT_DRIVER_SRL;
+       tw_dev->tw_compat_info.driver_branch_high = TW_CURRENT_DRIVER_BRANCH;
+       tw_dev->tw_compat_info.driver_build_high = TW_CURRENT_DRIVER_BUILD;
+       tw_dev->tw_compat_info.driver_srl_low = TW_BASE_FW_SRL;
+       tw_dev->tw_compat_info.driver_branch_low = TW_BASE_FW_BRANCH;
+       tw_dev->tw_compat_info.driver_build_low = TW_BASE_FW_BUILD;
+       tw_dev->tw_compat_info.fw_on_ctlr_srl = fw_on_ctlr_srl;
+       tw_dev->tw_compat_info.fw_on_ctlr_branch = fw_on_ctlr_branch;
+       tw_dev->tw_compat_info.fw_on_ctlr_build = fw_on_ctlr_build;
+
        retval = 0;
 out:
        return retval;
@@ -631,7 +647,7 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
                goto out2;
 
        /* Check data buffer size */
-       if (driver_command.buffer_length > TW_MAX_SECTORS * 512) {
+       if (driver_command.buffer_length > TW_MAX_SECTORS * 2048) {
                retval = TW_IOCTL_ERROR_OS_EINVAL;
                goto out2;
        }
@@ -680,13 +696,6 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
                /* Now wait for command to complete */
                timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout);
 
-               /* See if we reset while waiting for the ioctl to complete */
-               if (test_bit(TW_IN_RESET, &tw_dev->flags)) {
-                       clear_bit(TW_IN_RESET, &tw_dev->flags);
-                       retval = TW_IOCTL_ERROR_OS_ERESTARTSYS;
-                       goto out3;
-               }
-
                /* We timed out, and didn't get an interrupt */
                if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) {
                        /* Now we need to reset the board */
@@ -694,11 +703,6 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
                               tw_dev->host->host_no, TW_DRIVER, 0xc,
                               cmd);
                        retval = TW_IOCTL_ERROR_OS_EIO;
-                       spin_lock_irqsave(tw_dev->host->host_lock, flags);
-                       tw_dev->state[request_id] = TW_S_COMPLETED;
-                       twa_free_request_id(tw_dev, request_id);
-                       tw_dev->posted_request_count--;
-                       spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
                        twa_reset_device_extension(tw_dev, 1);
                        goto out3;
                }
@@ -717,16 +721,7 @@ static int twa_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
                tw_ioctl->driver_command.status = 0;
                /* Copy compatiblity struct into ioctl data buffer */
                tw_compat_info = (TW_Compatibility_Info *)tw_ioctl->data_buffer;
-               strncpy(tw_compat_info->driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION));
-               tw_compat_info->working_srl = tw_dev->working_srl;
-               tw_compat_info->working_branch = tw_dev->working_branch;
-               tw_compat_info->working_build = tw_dev->working_build;
-               tw_compat_info->driver_srl_high = TW_CURRENT_DRIVER_SRL;
-               tw_compat_info->driver_branch_high = TW_CURRENT_DRIVER_BRANCH;
-               tw_compat_info->driver_build_high = TW_CURRENT_DRIVER_BUILD;
-               tw_compat_info->driver_srl_low = TW_BASE_FW_SRL;
-               tw_compat_info->driver_branch_low = TW_BASE_FW_BRANCH;
-               tw_compat_info->driver_build_low = TW_BASE_FW_BUILD;
+               memcpy(tw_compat_info, &tw_dev->tw_compat_info, sizeof(TW_Compatibility_Info));
                break;
        case TW_IOCTL_GET_LAST_EVENT:
                if (tw_dev->event_queue_wrapped) {
@@ -895,7 +890,8 @@ static int twa_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value)
        }
 
        if (status_reg_value & TW_STATUS_QUEUE_ERROR) {
-               TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Controller Queue Error: clearing");
+               if ((tw_dev->tw_pci_dev->device != PCI_DEVICE_ID_3WARE_9650SE) || (!test_bit(TW_IN_RESET, &tw_dev->flags)))
+                       TW_PRINTK(tw_dev->host, TW_DRIVER, 0xe, "Controller Queue Error: clearing");
                writel(TW_CONTROL_CLEAR_QUEUE_ERROR, TW_CONTROL_REG_ADDR(tw_dev));
        }
 
@@ -939,10 +935,12 @@ static int twa_empty_response_queue_large(TW_Device_Extension *tw_dev)
        unsigned long before;
        int retval = 1;
 
-       if (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9550SX) {
+       if ((tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9550SX) ||
+           (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9650SE)) {
                before = jiffies;
                while ((response_que_value & TW_9550SX_DRAIN_COMPLETED) != TW_9550SX_DRAIN_COMPLETED) {
                        response_que_value = readl(TW_RESPONSE_QUEUE_REG_ADDR_LARGE(tw_dev));
+                       msleep(1);
                        if (time_after(jiffies, before + HZ * 30))
                                goto out;
                }
@@ -1214,6 +1212,10 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)
 
        handled = 1;
 
+       /* If we are resetting, bail */
+       if (test_bit(TW_IN_RESET, &tw_dev->flags))
+               goto twa_interrupt_bail;
+
        /* Check controller for errors */
        if (twa_check_bits(status_reg_value)) {
                if (twa_decode_bits(tw_dev, status_reg_value)) {
@@ -1355,8 +1357,8 @@ static void twa_load_sgl(TW_Command_Full *full_command_packet, int request_id, d
 
        if (TW_OP_OUT(full_command_packet->command.newcommand.opcode__reserved) == TW_OP_EXECUTE_SCSI) {
                newcommand = &full_command_packet->command.newcommand;
-               newcommand->request_id__lunl = 
-                       TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id);
+               newcommand->request_id__lunl =
+                       cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id));
                newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
                newcommand->sg_list[0].length = cpu_to_le32(length);
                newcommand->sgl_entries__lunh =
@@ -1531,6 +1533,13 @@ static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id,
        int retval = 1;
 
        command_que_value = tw_dev->command_packet_phys[request_id];
+
+       /* For 9650SE write low 4 bytes first */
+       if (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9650SE) {
+               command_que_value += TW_COMMAND_OFFSET;
+               writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR_LARGE(tw_dev));
+       }
+
        status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
 
        if (twa_check_bits(status_reg_value))
@@ -1557,13 +1566,17 @@ static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id,
                TW_UNMASK_COMMAND_INTERRUPT(tw_dev);
                goto out;
        } else {
-               /* We successfully posted the command packet */
-               if (sizeof(dma_addr_t) > 4) {
-                       command_que_value += TW_COMMAND_OFFSET;
-                       writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
-                       writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR(tw_dev) + 0x4);
+               if (tw_dev->tw_pci_dev->device == PCI_DEVICE_ID_3WARE_9650SE) {
+                       /* Now write upper 4 bytes */
+                       writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR_LARGE(tw_dev) + 0x4);
                } else {
-                       writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
+                       if (sizeof(dma_addr_t) > 4) {
+                               command_que_value += TW_COMMAND_OFFSET;
+                               writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
+                               writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR(tw_dev) + 0x4);
+                       } else {
+                               writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev));
+                       }
                }
                tw_dev->state[request_id] = TW_S_POSTED;
                tw_dev->posted_request_count++;
@@ -1620,14 +1633,9 @@ static int twa_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res
                goto out;
 
        TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
+       clear_bit(TW_IN_RESET, &tw_dev->flags);
+       tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
 
-       /* Wake up any ioctl that was pending before the reset */
-       if ((tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE) || (ioctl_reset)) {
-               clear_bit(TW_IN_RESET, &tw_dev->flags);
-       } else {
-               tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
-               wake_up(&tw_dev->ioctl_wqueue);
-       }
        retval = 0;
 out:
        return retval;
@@ -1736,6 +1744,9 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt)
                "WARNING: (0x%02X:0x%04X): Command (0x%x) timed out, resetting card.\n",
                TW_DRIVER, 0x2c, SCpnt->cmnd[0]);
 
+       /* Make sure we are not issuing an ioctl or resetting from ioctl */
+       mutex_lock(&tw_dev->ioctl_lock);
+
        /* Now reset the card and some of the device extension data */
        if (twa_reset_device_extension(tw_dev, 0)) {
                TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2b, "Controller reset failed during scsi host reset");
@@ -1744,6 +1755,7 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt)
 
        retval = SUCCESS;
 out:
+       mutex_unlock(&tw_dev->ioctl_lock);
        return retval;
 } /* End twa_scsi_eh_reset() */
 
@@ -1753,8 +1765,14 @@ static int twa_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd
        int request_id, retval;
        TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
 
+       /* If we are resetting due to timed out ioctl, report as busy */
+       if (test_bit(TW_IN_RESET, &tw_dev->flags)) {
+               retval = SCSI_MLQUEUE_HOST_BUSY;
+               goto out;
+       }
+
        /* Check if this FW supports luns */
-       if ((SCpnt->device->lun != 0) && (tw_dev->working_srl < TW_FW_SRL_LUNS_SUPPORTED)) {
+       if ((SCpnt->device->lun != 0) && (tw_dev->tw_compat_info.working_srl < TW_FW_SRL_LUNS_SUPPORTED)) {
                SCpnt->result = (DID_BAD_TARGET << 16);
                done(SCpnt);
                retval = 0;
@@ -1960,6 +1978,9 @@ static void __twa_shutdown(TW_Device_Extension *tw_dev)
        /* Disable interrupts */
        TW_DISABLE_INTERRUPTS(tw_dev);
 
+       /* Free up the IRQ */
+       free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
+
        printk(KERN_WARNING "3w-9xxx: Shutting down host %d.\n", tw_dev->host->host_no);
 
        /* Tell the card we are shutting down */
@@ -2091,21 +2112,25 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
 
        /* Initialize the card */
        if (twa_reset_sequence(tw_dev, 0))
-               goto out_release_mem_region;
+               goto out_iounmap;
 
        /* Set host specific parameters */
-       host->max_id = TW_MAX_UNITS;
+       if (pdev->device == PCI_DEVICE_ID_3WARE_9650SE)
+               host->max_id = TW_MAX_UNITS_9650SE;
+       else
+               host->max_id = TW_MAX_UNITS;
+
        host->max_cmd_len = TW_MAX_CDB_LEN;
 
        /* Channels aren't supported by adapter */
-       host->max_lun = TW_MAX_LUNS(tw_dev->working_srl);
+       host->max_lun = TW_MAX_LUNS(tw_dev->tw_compat_info.working_srl);
        host->max_channel = 0;
 
        /* Register the card with the kernel SCSI layer */
        retval = scsi_add_host(host, &pdev->dev);
        if (retval) {
                TW_PRINTK(tw_dev->host, TW_DRIVER, 0x27, "scsi add host failed");
-               goto out_release_mem_region;
+               goto out_iounmap;
        }
 
        pci_set_drvdata(pdev, host);
@@ -2145,6 +2170,8 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
 
 out_remove_host:
        scsi_remove_host(host);
+out_iounmap:
+       iounmap(tw_dev->base_addr);
 out_release_mem_region:
        pci_release_regions(pdev);
 out_free_device_extension:
@@ -2170,12 +2197,12 @@ static void twa_remove(struct pci_dev *pdev)
                twa_major = -1;
        }
 
-       /* Free up the IRQ */
-       free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
-
        /* Shutdown the card */
        __twa_shutdown(tw_dev);
 
+       /* Free IO remapping */
+       iounmap(tw_dev->base_addr);
+
        /* Free up the mem region */
        pci_release_regions(pdev);
 
@@ -2193,6 +2220,8 @@ static struct pci_device_id twa_pci_tbl[] __devinitdata = {
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9550SX,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       { PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_9650SE,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { }
 };
 MODULE_DEVICE_TABLE(pci, twa_pci_tbl);
index e5685be96f4536ddbb8b41ff3eca1e60181f4a92..7901517d4513db19bad2ed487cb8a648d92a4a08 100644 (file)
@@ -289,7 +289,6 @@ static twa_message_type twa_error_table[] = {
 #define TW_STATUS_VALID_INTERRUPT              0x00DF0000
 
 /* PCI related defines */
-#define TW_NUMDEVICES 1
 #define TW_PCI_CLEAR_PARITY_ERRORS 0xc100
 #define TW_PCI_CLEAR_PCI_ABORT     0x2000
 
@@ -335,6 +334,7 @@ static twa_message_type twa_error_table[] = {
 #define TW_ALIGNMENT_9000                     4  /* 4 bytes */
 #define TW_ALIGNMENT_9000_SGL                 0x3
 #define TW_MAX_UNITS                         16
+#define TW_MAX_UNITS_9650SE                  32
 #define TW_INIT_MESSAGE_CREDITS                      0x100
 #define TW_INIT_COMMAND_PACKET_SIZE          0x3
 #define TW_INIT_COMMAND_PACKET_SIZE_EXTENDED  0x6
@@ -354,7 +354,6 @@ static twa_message_type twa_error_table[] = {
 #define TW_MAX_RESPONSE_DRAIN                256
 #define TW_MAX_AEN_DRAIN                     40
 #define TW_IN_RESET                           2
-#define TW_IN_CHRDEV_IOCTL                    3
 #define TW_IN_ATTENTION_LOOP                 4
 #define TW_MAX_SECTORS                        256
 #define TW_AEN_WAIT_TIME                      1000
@@ -417,6 +416,9 @@ static twa_message_type twa_error_table[] = {
 #ifndef PCI_DEVICE_ID_3WARE_9550SX
 #define PCI_DEVICE_ID_3WARE_9550SX 0x1003
 #endif
+#ifndef PCI_DEVICE_ID_3WARE_9650SE
+#define PCI_DEVICE_ID_3WARE_9650SE 0x1004
+#endif
 
 /* Bitmask macros to eliminate bitfields */
 
@@ -442,6 +444,7 @@ static twa_message_type twa_error_table[] = {
 #define TW_CONTROL_REG_ADDR(x) (x->base_addr)
 #define TW_STATUS_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x4)
 #define TW_COMMAND_QUEUE_REG_ADDR(x) (sizeof(dma_addr_t) > 4 ? ((unsigned char __iomem *)x->base_addr + 0x20) : ((unsigned char __iomem *)x->base_addr + 0x8))
+#define TW_COMMAND_QUEUE_REG_ADDR_LARGE(x) ((unsigned char __iomem *)x->base_addr + 0x20)
 #define TW_RESPONSE_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0xC)
 #define TW_RESPONSE_QUEUE_REG_ADDR_LARGE(x) ((unsigned char __iomem *)x->base_addr + 0x30)
 #define TW_CLEAR_ALL_INTERRUPTS(x) (writel(TW_STATUS_VALID_INTERRUPT, TW_CONTROL_REG_ADDR(x)))
@@ -626,6 +629,9 @@ typedef struct TAG_TW_Compatibility_Info
        unsigned short driver_srl_low;
        unsigned short driver_branch_low;
        unsigned short driver_build_low;
+       unsigned short fw_on_ctlr_srl;
+       unsigned short fw_on_ctlr_branch;
+       unsigned short fw_on_ctlr_build;
 } TW_Compatibility_Info;
 
 #pragma pack()
@@ -668,9 +674,7 @@ typedef struct TAG_TW_Device_Extension {
        wait_queue_head_t       ioctl_wqueue;
        struct mutex            ioctl_lock;
        char                    aen_clobber;
-       unsigned short          working_srl;
-       unsigned short          working_branch;
-       unsigned short          working_build;
+       TW_Compatibility_Info   tw_compat_info;
 } TW_Device_Extension;
 
 #endif /* _3W_9XXX_H */
index 3c2d7a379931af09bb9925eef434a81c96607265..af7e011343643fab6b8404d2a04f419707eb2018 100644 (file)
@@ -112,6 +112,21 @@ static int asd_init_phy(struct asd_phy *phy)
        return 0;
 }
 
+static void asd_init_ports(struct asd_ha_struct *asd_ha)
+{
+       int i;
+
+       spin_lock_init(&asd_ha->asd_ports_lock);
+       for (i = 0; i < ASD_MAX_PHYS; i++) {
+               struct asd_port *asd_port = &asd_ha->asd_ports[i];
+
+               memset(asd_port->sas_addr, 0, SAS_ADDR_SIZE);
+               memset(asd_port->attached_sas_addr, 0, SAS_ADDR_SIZE);
+               asd_port->phy_mask = 0;
+               asd_port->num_phys = 0;
+       }
+}
+
 static int asd_init_phys(struct asd_ha_struct *asd_ha)
 {
        u8 i;
@@ -121,6 +136,7 @@ static int asd_init_phys(struct asd_ha_struct *asd_ha)
                struct asd_phy *phy = &asd_ha->phys[i];
 
                phy->phy_desc = &asd_ha->hw_prof.phy_desc[i];
+               phy->asd_port = NULL;
 
                phy->sas_phy.enabled = 0;
                phy->sas_phy.id = i;
@@ -658,6 +674,8 @@ int asd_init_hw(struct asd_ha_struct *asd_ha)
                goto Out;
        }
 
+       asd_init_ports(asd_ha);
+
        err = asd_init_scbs(asd_ha);
        if (err) {
                asd_printk("couldn't initialize scbs for %s\n",
index 7b6aca02cf701f916b44a25c3c621e2db9f115cb..c6c3d18222fabea78ad3f6cfb3627ea97897bf20 100644 (file)
@@ -193,6 +193,16 @@ struct asd_seq_data {
        struct asd_ascb **escb_arr; /* array of pointers to escbs */
 };
 
+/* This is an internal port structure. These are used to get accurate
+ * phy_mask for updating DDB 0.
+ */
+struct asd_port {
+       u8  sas_addr[SAS_ADDR_SIZE];
+       u8  attached_sas_addr[SAS_ADDR_SIZE];
+       u32 phy_mask;
+       int num_phys;
+};
+
 /* This is the Host Adapter structure.  It describes the hardware
  * SAS adapter.
  */
@@ -211,6 +221,8 @@ struct asd_ha_struct {
        struct hw_profile hw_prof;
 
        struct asd_phy    phys[ASD_MAX_PHYS];
+       spinlock_t        asd_ports_lock;
+       struct asd_port   asd_ports[ASD_MAX_PHYS];
        struct asd_sas_port   ports[ASD_MAX_PHYS];
 
        struct dma_pool  *scb_pool;
index a4cc432bbdabe3839edd794fb7c76b05aa881a84..57c5ba4043f29f99c9410ce039114bc2edc94134 100644 (file)
@@ -786,8 +786,6 @@ static void asd_remove_driver_attrs(struct device_driver *driver)
 }
 
 static struct sas_domain_function_template aic94xx_transport_functions = {
-       .lldd_port_formed       = asd_update_port_links,
-
        .lldd_dev_found         = asd_dev_found,
        .lldd_dev_gone          = asd_dev_gone,
 
index 64d231712345127095cc377777c0324b644b9531..9050e93bfd5e9be8bf9dbe49843b71315058c1d3 100644 (file)
@@ -733,6 +733,7 @@ struct asd_phy {
 
        struct sas_identify_frame *identify_frame;
        struct asd_dma_tok  *id_frm_tok;
+       struct asd_port     *asd_port;
 
        u8         frame_rcvd[ASD_EDB_SIZE];
 };
index 7ee49b51b724152c98419f52783aed21f9b54b52..b15caf1c8fa21c2ffed74c9b1d2ed73259133ae3 100644 (file)
@@ -168,6 +168,70 @@ static inline void asd_get_attached_sas_addr(struct asd_phy *phy, u8 *sas_addr)
        }
 }
 
+static void asd_form_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
+{
+       int i;
+       struct asd_port *free_port = NULL;
+       struct asd_port *port;
+       struct asd_sas_phy *sas_phy = &phy->sas_phy;
+       unsigned long flags;
+
+       spin_lock_irqsave(&asd_ha->asd_ports_lock, flags);
+       if (!phy->asd_port) {
+               for (i = 0; i < ASD_MAX_PHYS; i++) {
+                       port = &asd_ha->asd_ports[i];
+
+                       /* Check for wide port */
+                       if (port->num_phys > 0 &&
+                           memcmp(port->sas_addr, sas_phy->sas_addr,
+                                  SAS_ADDR_SIZE) == 0 &&
+                           memcmp(port->attached_sas_addr,
+                                  sas_phy->attached_sas_addr,
+                                  SAS_ADDR_SIZE) == 0) {
+                               break;
+                       }
+
+                       /* Find a free port */
+                       if (port->num_phys == 0 && free_port == NULL) {
+                               free_port = port;
+                       }
+               }
+
+               /* Use a free port if this doesn't form a wide port */
+               if (i >= ASD_MAX_PHYS) {
+                       port = free_port;
+                       BUG_ON(!port);
+                       memcpy(port->sas_addr, sas_phy->sas_addr,
+                              SAS_ADDR_SIZE);
+                       memcpy(port->attached_sas_addr,
+                              sas_phy->attached_sas_addr,
+                              SAS_ADDR_SIZE);
+               }
+               port->num_phys++;
+               port->phy_mask |= (1U << sas_phy->id);
+               phy->asd_port = port;
+       }
+       ASD_DPRINTK("%s: updating phy_mask 0x%x for phy%d\n",
+                   __FUNCTION__, phy->asd_port->phy_mask, sas_phy->id);
+       asd_update_port_links(asd_ha, phy);
+       spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags);
+}
+
+static void asd_deform_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
+{
+       struct asd_port *port = phy->asd_port;
+       struct asd_sas_phy *sas_phy = &phy->sas_phy;
+       unsigned long flags;
+
+       spin_lock_irqsave(&asd_ha->asd_ports_lock, flags);
+       if (port) {
+               port->num_phys--;
+               port->phy_mask &= ~(1U << sas_phy->id);
+               phy->asd_port = NULL;
+       }
+       spin_unlock_irqrestore(&asd_ha->asd_ports_lock, flags);
+}
+
 static inline void asd_bytes_dmaed_tasklet(struct asd_ascb *ascb,
                                           struct done_list_struct *dl,
                                           int edb_id, int phy_id)
@@ -187,6 +251,7 @@ static inline void asd_bytes_dmaed_tasklet(struct asd_ascb *ascb,
        asd_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr);
        spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags);
        asd_dump_frame_rcvd(phy, dl);
+       asd_form_port(ascb->ha, phy);
        sas_ha->notify_port_event(&phy->sas_phy, PORTE_BYTES_DMAED);
 }
 
@@ -197,6 +262,7 @@ static inline void asd_link_reset_err_tasklet(struct asd_ascb *ascb,
        struct asd_ha_struct *asd_ha = ascb->ha;
        struct sas_ha_struct *sas_ha = &asd_ha->sas_ha;
        struct asd_sas_phy *sas_phy = sas_ha->sas_phy[phy_id];
+       struct asd_phy *phy = &asd_ha->phys[phy_id];
        u8 lr_error = dl->status_block[1];
        u8 retries_left = dl->status_block[2];
 
@@ -221,6 +287,7 @@ static inline void asd_link_reset_err_tasklet(struct asd_ascb *ascb,
 
        asd_turn_led(asd_ha, phy_id, 0);
        sas_phy_disconnected(sas_phy);
+       asd_deform_port(asd_ha, phy);
        sas_ha->notify_port_event(sas_phy, PORTE_LINK_RESET_ERR);
 
        if (retries_left == 0) {
@@ -248,6 +315,8 @@ static inline void asd_primitive_rcvd_tasklet(struct asd_ascb *ascb,
        unsigned long flags;
        struct sas_ha_struct *sas_ha = &ascb->ha->sas_ha;
        struct asd_sas_phy *sas_phy = sas_ha->sas_phy[phy_id];
+       struct asd_ha_struct *asd_ha = ascb->ha;
+       struct asd_phy *phy = &asd_ha->phys[phy_id];
        u8  reg  = dl->status_block[1];
        u32 cont = dl->status_block[2] << ((reg & 3)*8);
 
@@ -284,6 +353,7 @@ static inline void asd_primitive_rcvd_tasklet(struct asd_ascb *ascb,
                                    phy_id);
                        /* The sequencer disables all phys on that port.
                         * We have to re-enable the phys ourselves. */
+                       asd_deform_port(asd_ha, phy);
                        sas_ha->notify_port_event(sas_phy, PORTE_HARD_RESET);
                        break;
 
@@ -351,6 +421,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
        u8  sb_opcode = dl->status_block[0];
        int phy_id = sb_opcode & DL_PHY_MASK;
        struct asd_sas_phy *sas_phy = sas_ha->sas_phy[phy_id];
+       struct asd_phy *phy = &asd_ha->phys[phy_id];
 
        if (edb > 6 || edb < 0) {
                ASD_DPRINTK("edb is 0x%x! dl->opcode is 0x%x\n",
@@ -395,6 +466,7 @@ static void escb_tasklet_complete(struct asd_ascb *ascb,
                asd_turn_led(asd_ha, phy_id, 0);
                /* the device is gone */
                sas_phy_disconnected(sas_phy);
+               asd_deform_port(asd_ha, phy);
                sas_ha->notify_port_event(sas_phy, PORTE_TIMER_EVENT);
                break;
        case REQ_TASK_ABORT:
index 56e4b3ba6a08a79710ac5190bccc41fe099e0905..845112539d05bd02617e3abae81e83a80ab75a35 100644 (file)
@@ -1369,10 +1369,9 @@ int asd_start_seqs(struct asd_ha_struct *asd_ha)
  * port_map_by_links is also used as the conn_mask byte in the
  * initiator/target port DDB.
  */
-void asd_update_port_links(struct asd_sas_phy *sas_phy)
+void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
 {
-       struct asd_ha_struct *asd_ha = sas_phy->ha->lldd_ha;
-       const u8 phy_mask = (u8) sas_phy->port->phy_mask;
+       const u8 phy_mask = (u8) phy->asd_port->phy_mask;
        u8  phy_is_up;
        u8  mask;
        int i, err;
index 42281c36153bb8643ea68692016eebf5db8b269a..9e715e5496af93b4a585b9764a645d7dcbd2db86 100644 (file)
@@ -64,7 +64,7 @@ int asd_unpause_lseq(struct asd_ha_struct *asd_ha, u8 lseq_mask);
 int asd_init_seqs(struct asd_ha_struct *asd_ha);
 int asd_start_seqs(struct asd_ha_struct *asd_ha);
 
-void asd_update_port_links(struct asd_sas_phy *phy);
+void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy);
 #endif
 
 #endif
index 4bc14ad92e2264f0828043414890544756f2eb93..4c698a71f66ff0b54c6dda5c3859f3b96ff04331 100644 (file)
@@ -3531,7 +3531,7 @@ static irqreturn_t gdth_interrupt(int irq,void *dev_id)
                 IStatus &= ~0x80;
 #ifdef INT_COAL
                 if (coalesced)
-                    ha->status = pcs->ext_status && 0xffff;
+                    ha->status = pcs->ext_status & 0xffff;
                 else 
 #endif
                     ha->status = gdth_readw(&dp6m_ptr->i960r.status);
@@ -3543,7 +3543,7 @@ static irqreturn_t gdth_interrupt(int irq,void *dev_id)
             if (coalesced) {    
                 ha->info = pcs->info0;
                 ha->info2 = pcs->info1;
-                ha->service = (pcs->ext_status >> 16) && 0xffff;
+                ha->service = (pcs->ext_status >> 16) & 0xffff;
             } else
 #endif
             {
index 0a9dbc59663fc723ef839193292a157580227d98..d0b139cccbbc388371f45005e6ae51d00f9e55c5 100644 (file)
@@ -415,8 +415,8 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask)
        iscsi_solicit_data_init(conn, ctask, r2t);
 
        tcp_ctask->exp_r2tsn = r2tsn + 1;
-       tcp_ctask->xmstate |= XMSTATE_SOL_HDR;
        __kfifo_put(tcp_ctask->r2tqueue, (void*)&r2t, sizeof(void*));
+       tcp_ctask->xmstate |= XMSTATE_SOL_HDR;
        list_move_tail(&ctask->running, &conn->xmitqueue);
 
        scsi_queue_work(session->host, &conn->xmitwork);
@@ -1627,9 +1627,12 @@ static int iscsi_send_sol_pdu(struct iscsi_conn *conn,
        if (tcp_ctask->xmstate & XMSTATE_SOL_HDR) {
                tcp_ctask->xmstate &= ~XMSTATE_SOL_HDR;
                tcp_ctask->xmstate |= XMSTATE_SOL_DATA;
-               if (!tcp_ctask->r2t)
+               if (!tcp_ctask->r2t) {
+                       spin_lock_bh(&session->lock);
                        __kfifo_get(tcp_ctask->r2tqueue, (void*)&tcp_ctask->r2t,
                                    sizeof(void*));
+                       spin_unlock_bh(&session->lock);
+               }
 send_hdr:
                r2t = tcp_ctask->r2t;
                dtask = &r2t->dtask;
@@ -1816,21 +1819,14 @@ iscsi_tcp_conn_destroy(struct iscsi_cls_conn *cls_conn)
 {
        struct iscsi_conn *conn = cls_conn->dd_data;
        struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
-       int digest = 0;
-
-       if (conn->hdrdgst_en || conn->datadgst_en)
-               digest = 1;
 
        iscsi_tcp_release_conn(conn);
        iscsi_conn_teardown(cls_conn);
 
-       /* now free tcp_conn */
-       if (digest) {
-               if (tcp_conn->tx_hash.tfm)
-                       crypto_free_hash(tcp_conn->tx_hash.tfm);
-               if (tcp_conn->rx_hash.tfm)
-                       crypto_free_hash(tcp_conn->rx_hash.tfm);
-       }
+       if (tcp_conn->tx_hash.tfm)
+               crypto_free_hash(tcp_conn->tx_hash.tfm);
+       if (tcp_conn->rx_hash.tfm)
+               crypto_free_hash(tcp_conn->rx_hash.tfm);
 
        kfree(tcp_conn);
 }
index 2865ebd557ef9d17f57dd2df72f54b2e1246658f..5d88621894858e7d69fe534f50ea6faf532866b7 100644 (file)
@@ -975,13 +975,13 @@ int iscsi_eh_host_reset(struct scsi_cmnd *sc)
        if (session->state == ISCSI_STATE_TERMINATE) {
 failed:
                debug_scsi("failing host reset: session terminated "
-                          "[CID %d age %d]", conn->id, session->age);
+                          "[CID %d age %d]\n", conn->id, session->age);
                spin_unlock_bh(&session->lock);
                return FAILED;
        }
 
        if (sc->SCp.phase == session->age) {
-               debug_scsi("failing connection CID %d due to SCSI host reset",
+               debug_scsi("failing connection CID %d due to SCSI host reset\n",
                           conn->id);
                fail_session = 1;
        }
@@ -1054,7 +1054,8 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
                                     NULL, 0);
        if (rc) {
                iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
-               debug_scsi("abort sent failure [itt 0x%x] %d", ctask->itt, rc);
+               debug_scsi("abort sent failure [itt 0x%x] %d\n", ctask->itt,
+                          rc);
                return rc;
        }
 
@@ -1071,7 +1072,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
                conn->tmabort_timer.function = iscsi_tmabort_timedout;
                conn->tmabort_timer.data = (unsigned long)ctask;
                add_timer(&conn->tmabort_timer);
-               debug_scsi("abort set timeout [itt 0x%x]", ctask->itt);
+               debug_scsi("abort set timeout [itt 0x%x]\n", ctask->itt);
        }
        spin_unlock_bh(&session->lock);
        mutex_unlock(&conn->xmitmutex);
index 30b8014bcc7a57f30dc3ccefc13bec5a3eed4144..e34a934354978ba4541e97e0d8739c402ea1f1e7 100644 (file)
@@ -71,55 +71,65 @@ static void smp_task_done(struct sas_task *task)
 static int smp_execute_task(struct domain_device *dev, void *req, int req_size,
                            void *resp, int resp_size)
 {
-       int res;
-       struct sas_task *task = sas_alloc_task(GFP_KERNEL);
+       int res, retry;
+       struct sas_task *task = NULL;
        struct sas_internal *i =
                to_sas_internal(dev->port->ha->core.shost->transportt);
 
-       if (!task)
-               return -ENOMEM;
-
-       task->dev = dev;
-       task->task_proto = dev->tproto;
-       sg_init_one(&task->smp_task.smp_req, req, req_size);
-       sg_init_one(&task->smp_task.smp_resp, resp, resp_size);
+       for (retry = 0; retry < 3; retry++) {
+               task = sas_alloc_task(GFP_KERNEL);
+               if (!task)
+                       return -ENOMEM;
 
-       task->task_done = smp_task_done;
+               task->dev = dev;
+               task->task_proto = dev->tproto;
+               sg_init_one(&task->smp_task.smp_req, req, req_size);
+               sg_init_one(&task->smp_task.smp_resp, resp, resp_size);
 
-       task->timer.data = (unsigned long) task;
-       task->timer.function = smp_task_timedout;
-       task->timer.expires = jiffies + SMP_TIMEOUT*HZ;
-       add_timer(&task->timer);
+               task->task_done = smp_task_done;
 
-       res = i->dft->lldd_execute_task(task, 1, GFP_KERNEL);
+               task->timer.data = (unsigned long) task;
+               task->timer.function = smp_task_timedout;
+               task->timer.expires = jiffies + SMP_TIMEOUT*HZ;
+               add_timer(&task->timer);
 
-       if (res) {
-               del_timer(&task->timer);
-               SAS_DPRINTK("executing SMP task failed:%d\n", res);
-               goto ex_err;
-       }
+               res = i->dft->lldd_execute_task(task, 1, GFP_KERNEL);
 
-       wait_for_completion(&task->completion);
-       res = -ETASK;
-       if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
-               SAS_DPRINTK("smp task timed out or aborted\n");
-               i->dft->lldd_abort_task(task);
-               if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {
-                       SAS_DPRINTK("SMP task aborted and not done\n");
+               if (res) {
+                       del_timer(&task->timer);
+                       SAS_DPRINTK("executing SMP task failed:%d\n", res);
                        goto ex_err;
                }
+
+               wait_for_completion(&task->completion);
+               res = -ETASK;
+               if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
+                       SAS_DPRINTK("smp task timed out or aborted\n");
+                       i->dft->lldd_abort_task(task);
+                       if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {
+                               SAS_DPRINTK("SMP task aborted and not done\n");
+                               goto ex_err;
+                       }
+               }
+               if (task->task_status.resp == SAS_TASK_COMPLETE &&
+                   task->task_status.stat == SAM_GOOD) {
+                       res = 0;
+                       break;
+               } else {
+                       SAS_DPRINTK("%s: task to dev %016llx response: 0x%x "
+                                   "status 0x%x\n", __FUNCTION__,
+                                   SAS_ADDR(dev->sas_addr),
+                                   task->task_status.resp,
+                                   task->task_status.stat);
+                       sas_free_task(task);
+                       task = NULL;
+               }
        }
-       if (task->task_status.resp == SAS_TASK_COMPLETE &&
-           task->task_status.stat == SAM_GOOD)
-               res = 0;
-       else
-               SAS_DPRINTK("%s: task to dev %016llx response: 0x%x "
-                           "status 0x%x\n", __FUNCTION__,
-                           SAS_ADDR(dev->sas_addr),
-                           task->task_status.resp,
-                           task->task_status.stat);
 ex_err:
-       sas_free_task(task);
+       BUG_ON(retry == 3 && task != NULL);
+       if (task != NULL) {
+               sas_free_task(task);
+       }
        return res;
 }
 
index ac0419e2714ae2df0edee98aa45a2915b84c08da..899e89d6fe678d4d35927448a7628e0a477aa430 100644 (file)
@@ -328,7 +328,7 @@ static void Irq_Handler (int irq, void *dev_id)
                                pinquiryData->AdditionalLength = 35 - 4;
 
                                // Fill in vendor identification fields.
-                               for ( z = 0;  z < 20;  z += 2 )
+                               for ( z = 0;  z < 8;  z += 2 )
                                        {
                                        pinquiryData->VendorId[z]         = ((UCHAR *)identifyData.ModelNumber)[z + 1];
                                        pinquiryData->VendorId[z + 1] = ((UCHAR *)identifyData.ModelNumber)[z];
index d2c02df12fdcb8b6b072a7a7e57500b21263a3d6..3ac4890ce086cfab2ff6519c1f9858760b764de5 100644 (file)
@@ -410,6 +410,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
                goto free_req;
 
        req->cmd_len = cmd_len;
+       memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
        memcpy(req->cmd, cmd, req->cmd_len);
        req->sense = sioc->sense;
        req->sense_len = 0;
index 2d3baa99ca25d2352332945044e83c88ad477b10..9b25124a989e8cf134721292a5231eb6421b25f7 100644 (file)
@@ -33,7 +33,7 @@
 #define ISCSI_SESSION_ATTRS 11
 #define ISCSI_CONN_ATTRS 11
 #define ISCSI_HOST_ATTRS 0
-#define ISCSI_TRANSPORT_VERSION "2.0-685"
+#define ISCSI_TRANSPORT_VERSION "2.0-724"
 
 struct iscsi_internal {
        int daemon_pid;
index 3f8b93188567909201b12d209030990495405804..81e3bc7b02a1bd29a5302a66aa49d5662a6fa5f3 100644 (file)
@@ -60,7 +60,7 @@ static int sg_version_num = 30534;    /* 2 digits for each component */
 
 #ifdef CONFIG_SCSI_PROC_FS
 #include <linux/proc_fs.h>
-static char *sg_version_date = "20060920";
+static char *sg_version_date = "20061027";
 
 static int sg_proc_init(void);
 static void sg_proc_cleanup(void);
@@ -710,12 +710,12 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
                          (int) cmnd[0], (int) hp->cmd_len));
 
        if ((k = sg_start_req(srp))) {
-               SCSI_LOG_TIMEOUT(1, printk("sg_write: start_req err=%d\n", k));
+               SCSI_LOG_TIMEOUT(1, printk("sg_common_write: start_req err=%d\n", k));
                sg_finish_rem_req(srp);
                return k;       /* probably out of space --> ENOMEM */
        }
        if ((k = sg_write_xfer(srp))) {
-               SCSI_LOG_TIMEOUT(1, printk("sg_write: write_xfer, bad address\n"));
+               SCSI_LOG_TIMEOUT(1, printk("sg_common_write: write_xfer, bad address\n"));
                sg_finish_rem_req(srp);
                return k;
        }
@@ -746,7 +746,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
                                hp->dxfer_len, srp->data.k_use_sg, timeout,
                                SG_DEFAULT_RETRIES, srp, sg_cmd_done,
                                GFP_ATOMIC)) {
-               SCSI_LOG_TIMEOUT(1, printk("sg_write: scsi_execute_async failed\n"));
+               SCSI_LOG_TIMEOUT(1, printk("sg_common_write: scsi_execute_async failed\n"));
                /*
                 * most likely out of mem, but could also be a bad map
                 */
@@ -1283,7 +1283,7 @@ sg_cmd_done(void *data, char *sense, int result, int resid)
                sg_finish_rem_req(srp);
                srp = NULL;
                if (NULL == sfp->headrp) {
-                       SCSI_LOG_TIMEOUT(1, printk("sg...bh: already closed, final cleanup\n"));
+                       SCSI_LOG_TIMEOUT(1, printk("sg_cmd_done: already closed, final cleanup\n"));
                        if (0 == sg_remove_sfp(sdp, sfp)) {     /* device still present */
                                scsi_device_put(sdp->device);
                        }
@@ -1512,12 +1512,12 @@ sg_remove(struct class_device *cl_dev, struct class_interface *cl_intf)
                                                    POLL_HUP);
                                }
                        }
-                       SCSI_LOG_TIMEOUT(3, printk("sg_detach: dev=%d, dirty\n", k));
+                       SCSI_LOG_TIMEOUT(3, printk("sg_remove: dev=%d, dirty\n", k));
                        if (NULL == sdp->headfp) {
                                sg_dev_arr[k] = NULL;
                        }
                } else {        /* nothing active, simple case */
-                       SCSI_LOG_TIMEOUT(3, printk("sg_detach: dev=%d\n", k));
+                       SCSI_LOG_TIMEOUT(3, printk("sg_remove: dev=%d\n", k));
                        sg_dev_arr[k] = NULL;
                }
                sg_nr_dev--;
@@ -1876,14 +1876,15 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
                        }
                }
                sg->page = p;
-               sg->length = ret_sz;
+               sg->length = (ret_sz > num) ? num : ret_sz;
 
-               SCSI_LOG_TIMEOUT(5, printk("sg_build_build: k=%d, a=0x%p, len=%d\n",
-                                 k, p, ret_sz));
+               SCSI_LOG_TIMEOUT(5, printk("sg_build_indirect: k=%d, num=%d, "
+                                "ret_sz=%d\n", k, num, ret_sz));
        }               /* end of for loop */
 
        schp->k_use_sg = k;
-       SCSI_LOG_TIMEOUT(5, printk("sg_build_indirect: k_use_sg=%d, rem_sz=%d\n", k, rem_sz));
+       SCSI_LOG_TIMEOUT(5, printk("sg_build_indirect: k_use_sg=%d, "
+                        "rem_sz=%d\n", k, rem_sz));
 
        schp->bufflen = blk_size;
        if (rem_sz > 0) /* must have failed */
@@ -2014,7 +2015,7 @@ sg_remove_scat(Sg_scatter_hold * schp)
                        for (k = 0; (k < schp->k_use_sg) && sg->page;
                             ++k, ++sg) {
                                SCSI_LOG_TIMEOUT(5, printk(
-                                   "sg_remove_scat: k=%d, a=0x%p, len=%d\n",
+                                   "sg_remove_scat: k=%d, pg=0x%p, len=%d\n",
                                    k, sg->page, sg->length));
                                sg_page_free(sg->page, sg->length);
                        }
index fccd1952bad3f41dd37ffc5af913f3c94966e643..7729c074488606ab8e926dfd95611b7606005ed9 100644 (file)
@@ -828,10 +828,7 @@ char *usb_cache_string(struct usb_device *udev, int index)
  * Context: !in_interrupt ()
  *
  * Updates the copy of the device descriptor stored in the device structure,
- * which dedicates space for this purpose.  Note that several fields are
- * converted to the host CPU's byte order:  the USB version (bcdUSB), and
- * vendors product and version fields (idVendor, idProduct, and bcdDevice).
- * That lets device drivers compare against non-byteswapped constants.
+ * which dedicates space for this purpose.
  *
  * Not exported, only for use by the core.  If drivers really want to read
  * the device descriptor directly, they can call usb_get_descriptor() with
index 9be6b303e7846a5ff2e5e21919b385b158543ddb..ea4714e557e465ca2eb6df2ff1dcb3a7f06d7e0c 100644 (file)
@@ -715,13 +715,6 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
                return IRQ_NOTMINE;
        }
 
-       if (ints & OHCI_INTR_RHSC) {
-               ohci_vdbg (ohci, "rhsc\n");
-               ohci->next_statechange = jiffies + STATECHANGE_DELAY;
-               ohci_writel (ohci, OHCI_INTR_RHSC, &regs->intrstatus);
-               usb_hcd_poll_rh_status(hcd);
-       }
-
        if (ints & OHCI_INTR_UE) {
                disable (ohci);
                ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n");
@@ -731,9 +724,21 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
                ohci_usb_reset (ohci);
        }
 
-       if (ints & OHCI_INTR_RD) {
-               ohci_vdbg (ohci, "resume detect\n");
-               ohci_writel (ohci, OHCI_INTR_RD, &regs->intrstatus);
+       if (ints & OHCI_INTR_RHSC) {
+               ohci_vdbg(ohci, "rhsc\n");
+               ohci->next_statechange = jiffies + STATECHANGE_DELAY;
+               ohci_writel(ohci, OHCI_INTR_RD | OHCI_INTR_RHSC,
+                               &regs->intrstatus);
+               usb_hcd_poll_rh_status(hcd);
+       }
+
+       /* For connect and disconnect events, we expect the controller
+        * to turn on RHSC along with RD.  But for remote wakeup events
+        * this might not happen.
+        */
+       else if (ints & OHCI_INTR_RD) {
+               ohci_vdbg(ohci, "resume detect\n");
+               ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
                hcd->poll_rh = 1;
                if (ohci->autostop) {
                        spin_lock (&ohci->lock);
index 6f113596af66c1660ecc2548f6b8c40b5c26d4e5..6995ea36f2e874499ae407e9b699931ceba117bd 100644 (file)
@@ -169,7 +169,8 @@ __acquires(ohci->lock)
                break;
        case OHCI_USB_RESUME:
                /* HCFS changes sometime after INTR_RD */
-               ohci_info (ohci, "wakeup\n");
+               ohci_info(ohci, "%swakeup\n",
+                               autostopped ? "auto-" : "");
                break;
        case OHCI_USB_OPER:
                /* this can happen after resuming a swsusp snapshot */
@@ -422,7 +423,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
                                ohci->autostop = 0;
                                ohci->next_statechange = jiffies +
                                                STATECHANGE_DELAY;
-                       } else if (time_after_eq (jiffies,
+                       } else if (device_may_wakeup(&hcd->self.root_hub->dev)
+                                       && time_after_eq(jiffies,
                                                ohci->next_statechange)
                                        && !ohci->ed_rm_list
                                        && !(ohci->hc_control &
index 6daf85c6eeee216f18a6c01f1df24e1a922601b2..6d08a3bcc952bab49b17d6169925a6e5d283070d 100644 (file)
@@ -1797,11 +1797,12 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
-       { USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN },
+       { USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
        { USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN },
-       { USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN },
+       { USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
        { USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
+       { USB_VENDOR_ID_APPLE, 0x021B, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
 
index 9a808a3b4d3750e1a6e4a93a3c9cac1b98c1a667..68e7ebb978a9721c0eb13ce6d0d4710c00d78c42 100644 (file)
@@ -121,6 +121,12 @@ static struct hidinput_key_translation powerbook_numlock_keys[] = {
        { }
 };
 
+static struct hidinput_key_translation powerbook_iso_keyboard[] = {
+       { KEY_GRAVE,    KEY_102ND },
+       { KEY_102ND,    KEY_GRAVE },
+       { }
+};
+
 static int usbhid_pb_fnmode = 1;
 module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644);
 MODULE_PARM_DESC(pb_fnmode,
@@ -195,6 +201,14 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
                }
        }
 
+       if (hid->quirks & HID_QUIRK_POWERBOOK_ISO_KEYBOARD) {
+               trans = find_translation(powerbook_iso_keyboard, usage->code);
+               if (trans) {
+                       input_event(input, usage->type, trans->to, value);
+                       return 1;
+               }
+       }
+
        return 0;
 }
 
@@ -210,6 +224,9 @@ static void hidinput_pb_setup(struct input_dev *input)
 
        for (trans = powerbook_numlock_keys; trans->from; trans++)
                set_bit(trans->to, input->keybit);
+
+       for (trans = powerbook_iso_keyboard; trans->from; trans++)
+               set_bit(trans->to, input->keybit);
 }
 #else
 static inline int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
index 9b50effef75817af9c00b3d459bf481c1c5e1d9d..0e76e6dcac37bd7886cdea390707d1934e7fd9e8 100644 (file)
@@ -260,6 +260,7 @@ struct hid_item {
 #define HID_QUIRK_POWERBOOK_HAS_FN             0x00001000
 #define HID_QUIRK_POWERBOOK_FN_ON              0x00002000
 #define HID_QUIRK_INVERT_HWHEEL                        0x00004000
+#define HID_QUIRK_POWERBOOK_ISO_KEYBOARD       0x00008000
 
 /*
  * This is the global environment of the parser. This information is
index 0be9d62d62aeda0d096456a88fa5aa09557af0b6..e4971d6aaafb323d5d931c99fe0f25c10d072906 100644 (file)
@@ -780,7 +780,7 @@ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned
 
 bl_fail:/* not enough memory. Free allocated elements */
         dbg ("auerbuf_setup: no more memory");
-       kfree(bep);
+       auerbuf_free(bep);
         auerbuf_free_buffers (bcp);
         return -ENOMEM;
 }
index bd76b4c11fcc1dc12c3a8515002d7847f179d91e..c186b4e73c72ec2bb371582d0af38b8bc841512d 100644 (file)
@@ -311,6 +311,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_ACTZWAVE_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_IPLUS_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_DMX4ALL) },
        { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
@@ -511,6 +512,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13M_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13S_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13U_PID) },
+       { USB_DEVICE(ELEKTOR_VID, ELEKTOR_FT323R_PID) },
        { },                                    /* Optional parameter entry */
        { }                                     /* Terminating entry */
 };
index f0edb87d2dd51c7831fa661be827758fffe6999e..bae117d359af1ba1d38f8e62471111828e11a104 100644 (file)
@@ -55,6 +55,9 @@
 /* iPlus device */
 #define FTDI_IPLUS_PID 0xD070 /* Product Id */
 
+/* DMX4ALL DMX Interfaces */
+#define FTDI_DMX4ALL 0xC850
+
 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
 #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
  */
 #define FTDI_ASK_RDR400_PID    0xC991  /* ASK RDR 400 series card reader */
 
+/*
+ * FTDI USB UART chips used in construction projects from the
+ * Elektor Electronics magazine (http://elektor-electronics.co.uk)
+ */
+#define ELEKTOR_VID            0x0C7D
+#define ELEKTOR_FT323R_PID     0x0005  /* RFID-Reader, issue 09-2006 */
+
 /*
  * DSS-20 Sync Station for Sony Ericsson P800
  */
 #define FTDI_DSS20_PID          0xFC82  
 
 /*
index 6238aff1e772c71bf81deb62298be7d79ce770d0..d72cf8bc7f76be74678eccdc4df280aabfff57c5 100644 (file)
@@ -320,6 +320,7 @@ static struct usb_device_id ipaq_id_table [] = {
        { USB_DEVICE(0x0B05, 0x9200) }, /* ASUS USB Sync */
        { USB_DEVICE(0x0B05, 0x9202) }, /* ASUS USB Sync */
        { USB_DEVICE(0x0BB4, 0x00CE) }, /* HTC USB Sync */
+       { USB_DEVICE(0x0BB4, 0x00CF) }, /* HTC USB Modem */
        { USB_DEVICE(0x0BB4, 0x0A01) }, /* PocketPC USB Sync */
        { USB_DEVICE(0x0BB4, 0x0A02) }, /* PocketPC USB Sync */
        { USB_DEVICE(0x0BB4, 0x0A03) }, /* PocketPC USB Sync */
index bc1ac07bf6ce8620f3a8d979dd162e16066c78dc..efb047f431e8eeda1d7bad6bf00242ae271d1005 100644 (file)
@@ -1306,25 +1306,13 @@ UNUSUAL_DEV(  0x0fce, 0xe030, 0x0000, 0x0000,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
-/* Reported by Jan Mate <mate@fiit.stuba.sk> */
-UNUSUAL_DEV(  0x0fce, 0xe030, 0x0000, 0x0000,
-               "Sony Ericsson",
-               "P990i",
-               US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_FIX_CAPACITY ),
-
-/* Reported by Jan Mate <mate@fiit.stuba.sk> */
-UNUSUAL_DEV(  0x0fce, 0xe030, 0x0000, 0x0000,
-               "Sony Ericsson",
-               "P990i",
-               US_SC_DEVICE, US_PR_DEVICE, NULL,
-               US_FL_FIX_CAPACITY ),
-
 /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
  * Tested on hardware version 1.10.
  * Entry is needed only for the initializer function override.
+ * Devices with bcd > 110 seem to not need it while those
+ * with bcd < 110 appear to need it.
  */
-UNUSUAL_DEV(  0x1019, 0x0c55, 0x0110, 0x0110,
+UNUSUAL_DEV(  0x1019, 0x0c55, 0x0000, 0x0110,
                "Desknote",
                "UCR-61S2B",
                US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init,
index b77b30923928bd0cc3d9916927a32b7f91191b5f..e815b354c09df1f57ba5fa83bab29706ff6029f9 100644 (file)
@@ -406,7 +406,7 @@ static struct {
        { PCI_CHIP_MACH64LB, "3D RAGE LT PRO (Mach64 LB, AGP)", 236, 75, 100, 135, ATI_CHIP_264LTPRO },
        { PCI_CHIP_MACH64LD, "3D RAGE LT PRO (Mach64 LD, AGP)", 230, 100, 100, 135, ATI_CHIP_264LTPRO },
        { PCI_CHIP_MACH64LI, "3D RAGE LT PRO (Mach64 LI, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO | M64F_G3_PB_1_1 | M64F_G3_PB_1024x768 },
-       { PCI_CHIP_MACH64LP, "3D RAGE LT PRO (Mach64 LP, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO },
+       { PCI_CHIP_MACH64LP, "3D RAGE LT PRO (Mach64 LP, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO | M64F_G3_PB_1024x768 },
        { PCI_CHIP_MACH64LQ, "3D RAGE LT PRO (Mach64 LQ, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO },
 
        { PCI_CHIP_MACH64GM, "3D RAGE XL (Mach64 GM, AGP 2x)", 230, 83, 63, 135, ATI_CHIP_264XL },
index 676754520099ca8e1ad53f52940b0ba0895c23b2..869725a13c21f6d4430a9a07c9bd152c82ead9a2 100644 (file)
@@ -139,7 +139,13 @@ void radeon_delete_i2c_busses(struct radeonfb_info *rinfo)
 int radeon_probe_i2c_connector(struct radeonfb_info *rinfo, int conn,
                               u8 **out_edid)
 {
-       u8 *edid = fb_ddc_read(&rinfo->i2c[conn-1].adapter);
+       u32 reg = rinfo->i2c[conn-1].ddc_reg;
+       u8 *edid;
+
+       OUTREG(reg, INREG(reg) &
+                       ~(VGA_DDC_DATA_OUTPUT | VGA_DDC_CLK_OUTPUT));
+
+       edid = fb_ddc_read(&rinfo->i2c[conn-1].adapter);
 
        if (out_edid)
                *out_edid = edid;
index 3aa6ebf68f178d5bea7b8f3fa34a38f3fd6a5d11..f836137a0edac366b1d814c4230d7517e88a6b9d 100644 (file)
 static unsigned char *fb_do_probe_ddc_edid(struct i2c_adapter *adapter)
 {
        unsigned char start = 0x0;
+       unsigned char *buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
        struct i2c_msg msgs[] = {
                {
                        .addr   = DDC_ADDR,
+                       .flags  = 0,
                        .len    = 1,
                        .buf    = &start,
                }, {
                        .addr   = DDC_ADDR,
                        .flags  = I2C_M_RD,
                        .len    = EDID_LENGTH,
+                       .buf    = buf,
                }
        };
-       unsigned char *buf;
 
-       buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
        if (!buf) {
                dev_warn(&adapter->dev, "unable to allocate memory for EDID "
                         "block.\n");
                return NULL;
        }
-       msgs[1].buf = buf;
 
        if (i2c_transfer(adapter, msgs, 2) == 2)
                return buf;
index 61dc46fecf2bab1ad060fa8e392278678ac3bee3..eab3e282a4de17f6bb736f64d3aa3aa78104a11c 100644 (file)
@@ -262,7 +262,7 @@ static void nv10GetConfig(struct nvidia_par *par)
 #endif
 
        dev = pci_find_slot(0, 1);
-       if ((par->Chipset && 0xffff) == 0x01a0) {
+       if ((par->Chipset & 0xffff) == 0x01a0) {
                int amt = 0;
 
                pci_read_config_dword(dev, 0x7c, &amt);
index 7d9453c91a4283d5dd24153b48ac99ce290266ef..f29e66e2d774976de39115a49e0d5e2fce9e2414 100644 (file)
@@ -154,7 +154,8 @@ static int __devinit rgbfb_probe(struct platform_device *pdev)
                        goto err1;
        }
 
-       if (!fb_get_options("pnxrgbfb", &option) && !strcmp(option, "nocursor"))
+       if (!fb_get_options("pnxrgbfb", &option) && option &&
+                       !strcmp(option, "nocursor"))
                rgbfb_ops.fb_cursor = no_cursor;
 
        info->node = -1;
@@ -191,7 +192,7 @@ err:
 
 static struct platform_driver rgbfb_driver = {
        .driver = {
-               .name = "rgbfb",
+               .name = "pnx4008-rgbfb",
        },
        .probe = rgbfb_probe,
        .remove = rgbfb_remove,
index 51f0ecc2a511d3e546794355958deb58ca855d91..d23bf0d659b63c97b12be85f8b805c8de81cd31d 100644 (file)
@@ -848,7 +848,7 @@ static int sdum_remove(struct platform_device *pdev)
 
 static struct platform_driver sdum_driver = {
        .driver = {
-               .name = "sdum",
+               .name = "pnx4008-sdum",
        },
        .probe = sdum_probe,
        .remove = sdum_remove,
index 2788b8ca9bb1e882b127e23ec9550e2d6f76fe7f..6f9d880ab2e9e0d9f3a0bff4c4d90ab668ff39e8 100644 (file)
@@ -215,6 +215,8 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi
        return 0;
 
 err_out_free_device:
+       if (dev->virt_addr)
+               iounmap(dev->virt_addr);
        kfree(dev);
 
        return err;
index 133dcc8a4150fbaa6ceb432939fb2c4c9e9910a7..7b1511d50b05a29df371a547a1d4db5fc756d2b7 100644 (file)
@@ -2060,8 +2060,7 @@ config CODA_FS_OLD_API
          For most cases you probably want to say N.
 
 config AFS_FS
-# for fs/nls/Config.in
-       tristate "Andrew File System support (AFS) (Experimental)"
+       tristate "Andrew File System support (AFS) (EXPERIMENTAL)"
        depends on INET && EXPERIMENTAL
        select RXRPC
        help
index 54c518c89e4cf86a8fec90124f21d7ca2e776169..38ede5c9d6fd412c8cddfed701afae9ae46cfa14 100644 (file)
@@ -25,6 +25,14 @@ void autofs_kill_sb(struct super_block *sb)
        struct autofs_sb_info *sbi = autofs_sbi(sb);
        unsigned int n;
 
+       /*
+        * In the event of a failure in get_sb_nodev the superblock
+        * info is not present so nothing else has been setup, so
+        * just exit when we are called from deactivate_super.
+        */
+       if (!sbi)
+               return;
+
        if ( !sbi->catatonic )
                autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */
 
@@ -136,7 +144,8 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
 
        s->s_fs_info = sbi;
        sbi->magic = AUTOFS_SBI_MAGIC;
-       sbi->catatonic = 0;
+       sbi->pipe = NULL;
+       sbi->catatonic = 1;
        sbi->exp_timeout = 0;
        sbi->oz_pgrp = process_group(current);
        autofs_initialize_hash(&sbi->dirhash);
@@ -180,6 +189,7 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
        if ( !pipe->f_op || !pipe->f_op->write )
                goto fail_fput;
        sbi->pipe = pipe;
+       sbi->catatonic = 0;
 
        /*
         * Success! Install the root dentry now to indicate completion.
@@ -198,6 +208,8 @@ fail_iput:
        iput(root_inode);
 fail_free:
        kfree(sbi);
+       s->s_fs_info = NULL;
+       kill_anon_super(s);
 fail_unlock:
        return -EINVAL;
 }
index 633f628005b4a773b3e9326263b6892cdbce6b92..19a9cafb5ddf169ae44183171dfde5db3d243581 100644 (file)
@@ -41,6 +41,7 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi)
                wq = nwq;
        }
        fput(sbi->pipe);        /* Close the pipe */
+       sbi->pipe = NULL;
        autofs_hash_dputall(&sbi->dirhash); /* Remove all dentry pointers */
 }
 
index 51fd8595bf85197d252ce3414b73539dd0b9eae8..ce7c0f1dd529211b2f4e5eca8feba0c87428c33f 100644 (file)
@@ -99,6 +99,9 @@ static void autofs4_force_release(struct autofs_sb_info *sbi)
        struct dentry *this_parent = sbi->sb->s_root;
        struct list_head *next;
 
+       if (!sbi->sb->s_root)
+               return;
+
        spin_lock(&dcache_lock);
 repeat:
        next = this_parent->d_subdirs.next;
@@ -146,6 +149,14 @@ void autofs4_kill_sb(struct super_block *sb)
 {
        struct autofs_sb_info *sbi = autofs4_sbi(sb);
 
+       /*
+        * In the event of a failure in get_sb_nodev the superblock
+        * info is not present so nothing else has been setup, so
+        * just exit when we are called from deactivate_super.
+        */
+       if (!sbi)
+               return;
+
        sb->s_fs_info = NULL;
 
        if ( !sbi->catatonic )
@@ -310,7 +321,8 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
        s->s_fs_info = sbi;
        sbi->magic = AUTOFS_SBI_MAGIC;
        sbi->pipefd = -1;
-       sbi->catatonic = 0;
+       sbi->pipe = NULL;
+       sbi->catatonic = 1;
        sbi->exp_timeout = 0;
        sbi->oz_pgrp = process_group(current);
        sbi->sb = s;
@@ -388,6 +400,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
                goto fail_fput;
        sbi->pipe = pipe;
        sbi->pipefd = pipefd;
+       sbi->catatonic = 0;
 
        /*
         * Success! Install the root dentry now to indicate completion.
@@ -412,6 +425,8 @@ fail_ino:
        kfree(ino);
 fail_free:
        kfree(sbi);
+       s->s_fs_info = NULL;
+       kill_anon_super(s);
 fail_unlock:
        return -EINVAL;
 }
index c0a6c8d445c7b7cffc8a7c5163bd32d7ba6bdbd7..1e4a539f4417c3c94a38c844c6a419dea606d709 100644 (file)
@@ -41,10 +41,8 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
                wake_up_interruptible(&wq->queue);
                wq = nwq;
        }
-       if (sbi->pipe) {
-               fput(sbi->pipe);        /* Close the pipe */
-               sbi->pipe = NULL;
-       }
+       fput(sbi->pipe);        /* Close the pipe */
+       sbi->pipe = NULL;
 }
 
 static int autofs4_write(struct file *file, const void *addr, int bytes)
index e77676df6713de8ab4016d89688b2405ba89e63b..a736d44989c4612e193a6ba6ad74a8b861d8383b 100644 (file)
@@ -147,13 +147,13 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
        *dentry = NULL;
        mutex_lock(&parent->d_inode->i_mutex);
        *dentry = lookup_one_len(name, parent, strlen(name));
-       if (!IS_ERR(dentry)) {
+       if (!IS_ERR(*dentry)) {
                if ((mode & S_IFMT) == S_IFDIR)
                        error = debugfs_mkdir(parent->d_inode, *dentry, mode);
                else 
                        error = debugfs_create(parent->d_inode, *dentry, mode);
        } else
-               error = PTR_ERR(dentry);
+               error = PTR_ERR(*dentry);
        mutex_unlock(&parent->d_inode->i_mutex);
 
        return error;
index 0b9992ab990f4cab4983a89aa4eb4f4026a1820b..52d1e36dc746a54182c2a68bf8aad19b1e1b0dbc 100644 (file)
@@ -57,6 +57,12 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
        rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd);
        nd->dentry = dentry_save;
        nd->mnt = vfsmount_save;
+       if (dentry->d_inode) {
+               struct inode *lower_inode =
+                       ecryptfs_inode_to_lower(dentry->d_inode);
+
+               ecryptfs_copy_attr_all(dentry->d_inode, lower_inode);
+       }
 out:
        return rc;
 }
index ff4865d24f0f1061dcc7dbd47fd169330f136869..dfcc68484f47068ccb3d256283cfea67857518f6 100644 (file)
@@ -470,6 +470,7 @@ out_lock:
        unlock_dir(lower_dir_dentry);
        dput(lower_new_dentry);
        dput(lower_old_dentry);
+       d_drop(lower_old_dentry);
        d_drop(new_dentry);
        d_drop(old_dentry);
        return rc;
@@ -484,7 +485,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry)
        lock_parent(lower_dentry);
        rc = vfs_unlink(lower_dir_inode, lower_dentry);
        if (rc) {
-               ecryptfs_printk(KERN_ERR, "Error in vfs_unlink\n");
+               printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
                goto out_unlock;
        }
        ecryptfs_copy_attr_times(dir, lower_dir_inode);
@@ -630,6 +631,8 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                ecryptfs_copy_attr_all(old_dir, lower_old_dir_dentry->d_inode);
 out_lock:
        unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
+       dput(lower_new_dentry->d_parent);
+       dput(lower_old_dentry->d_parent);
        dput(lower_new_dentry);
        dput(lower_old_dentry);
        return rc;
index 8337451e7897abc70d00752795fade9816aee985..0aa813d944a67fec2e7955eadeb3e781b66915c9 100644 (file)
@@ -303,7 +303,17 @@ void fat_truncate(struct inode *inode)
        fat_flush_inodes(inode->i_sb, inode, NULL);
 }
 
+int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+{
+       struct inode *inode = dentry->d_inode;
+       generic_fillattr(inode, stat);
+       stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size;
+       return 0;
+}
+EXPORT_SYMBOL_GPL(fat_getattr);
+
 struct inode_operations fat_file_inode_operations = {
        .truncate       = fat_truncate,
        .setattr        = fat_notify_change,
+       .getattr        = fat_getattr,
 };
index d43b4fcc8ad3967d08d353547af2d1f138e3e282..85b17b3fa4a0f768e8f6155800b582243a74f965 100644 (file)
@@ -390,11 +390,13 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
                hfs_find_exit(&fd);
                goto bail_no_root;
        }
+       res = -EINVAL;
        root_inode = hfs_iget(sb, &fd.search_key->cat, &rec);
        hfs_find_exit(&fd);
        if (!root_inode)
                goto bail_no_root;
 
+       res = -ENOMEM;
        sb->s_root = d_alloc_root(root_inode);
        if (!sb->s_root)
                goto bail_iput;
index 0bea6a619e100e0baa4eee8bc689c935b88ff2cc..7f4756963d05e067464dcb9570db9ebba54b1170 100644 (file)
@@ -62,24 +62,19 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
        loff_t len, vma_len;
        int ret;
 
-       if (vma->vm_pgoff & (HPAGE_SIZE / PAGE_SIZE - 1))
-               return -EINVAL;
-
-       if (vma->vm_start & ~HPAGE_MASK)
-               return -EINVAL;
-
-       if (vma->vm_end & ~HPAGE_MASK)
-               return -EINVAL;
-
-       if (vma->vm_end - vma->vm_start < HPAGE_SIZE)
-               return -EINVAL;
+       /*
+        * vma alignment has already been checked by prepare_hugepage_range.
+        * If you add any error returns here, do so after setting VM_HUGETLB,
+        * so is_vm_hugetlb_page tests below unmap_region go the right way
+        * when do_mmap_pgoff unwinds (may be important on powerpc and ia64).
+        */
+       vma->vm_flags |= VM_HUGETLB | VM_RESERVED;
+       vma->vm_ops = &hugetlb_vm_ops;
 
        vma_len = (loff_t)(vma->vm_end - vma->vm_start);
 
        mutex_lock(&inode->i_mutex);
        file_accessed(file);
-       vma->vm_flags |= VM_HUGETLB | VM_RESERVED;
-       vma->vm_ops = &hugetlb_vm_ops;
 
        ret = -ENOMEM;
        len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
index b0f01b3b0536de2dbe775a2d2d2988d255f7fba5..452461955cbdced2ba1c4df8d936966fbb08e848 100644 (file)
@@ -654,6 +654,7 @@ static struct inode_operations msdos_dir_inode_operations = {
        .rmdir          = msdos_rmdir,
        .rename         = msdos_rename,
        .setattr        = fat_notify_change,
+       .getattr        = fat_getattr,
 };
 
 static int msdos_fill_super(struct super_block *sb, void *data, int silent)
index edb711ff7b05781b624b310dcf7b360f2c683745..0afd745a37cd7aeacef9c64d8470af619c77189a 100644 (file)
@@ -1004,6 +1004,7 @@ static struct inode_operations vfat_dir_inode_operations = {
        .rmdir          = vfat_rmdir,
        .rename         = vfat_rename,
        .setattr        = fat_notify_change,
+       .getattr        = fat_getattr,
 };
 
 static int vfat_fill_super(struct super_block *sb, void *data, int silent)
index 6016632d032f745106ec8cf08ab99ff0a3c90559..c80b3a94511a32c1799d020b02b9f0b428996192 100644 (file)
@@ -132,6 +132,7 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
 
 #ifdef CONFIG_X86_IO_APIC
 extern int acpi_skip_timer_override;
+extern int acpi_use_timer_override;
 #endif
 
 static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
diff --git a/include/asm-m68knommu/irq_regs.h b/include/asm-m68knommu/irq_regs.h
new file mode 100644 (file)
index 0000000..3dd9c0b
--- /dev/null
@@ -0,0 +1 @@
+#include <asm-generic/irq_regs.h>
index a2503dfc554c59dbc60cbed803d1f464062463de..6132a9858b5236f312bcc91a69222008d3be0e84 100644 (file)
@@ -8,7 +8,7 @@
  * interrupt source (if it supports chaining).
  */
 typedef struct irq_node {
-       irqreturn_t     (*handler)(int, void *, struct pt_regs *);
+       irq_handler_t   handler;
        unsigned long   flags;
        void            *dev_id;
        const char      *devname;
@@ -18,12 +18,12 @@ typedef struct irq_node {
 /*
  * This structure has only 4 elements for speed reasons
  */
-typedef struct irq_handler {
-       irqreturn_t     (*handler)(int, void *, struct pt_regs *);
+struct irq_entry {
+       irq_handler_t   handler;
        unsigned long   flags;
        void            *dev_id;
        const char      *devname;
-} irq_handler_t;
+};
 
 /* count of spurious interrupts */
 extern volatile unsigned int num_spurious;
index 27c90afd3339cfc29054635bcf301dfe180e259e..6ce28f8e0eadd4b7d0a154547922b557cc31a4ee 100644 (file)
@@ -18,7 +18,7 @@ extern int (*mach_kbdrate) (struct kbd_repeat *);
 extern void (*mach_kbd_leds) (unsigned int);
 /* machine dependent irq functions */
 extern void (*mach_init_IRQ) (void);
-extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
+extern irq_handler_t mach_default_handler;
 extern int (*mach_request_irq) (unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
                                 unsigned long flags, const char *devname, void *dev_id);
 extern void (*mach_free_irq) (unsigned int irq, void *dev_id);
index c6a03187f9326839616bd7e0f8dc5dcae0b65f6c..97b4354841774c1b8700252800b49154fcb47723 100644 (file)
@@ -304,3 +304,4 @@ SYSCALL_SPU(fchmodat)
 SYSCALL_SPU(faccessat)
 COMPAT_SYS_SPU(get_robust_list)
 COMPAT_SYS_SPU(set_robust_list)
+COMPAT_SYS(move_pages)
index 8f7ee16781a4d6497c7fb0b8b79993768f67efc2..9fe7894ee035648f9c1678b496f4dfa723a63b5a 100644 (file)
@@ -96,7 +96,13 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
 
 #ifdef CONFIG_SMP
 #include <asm/cputable.h>
-#define smt_capable()          (cpu_has_feature(CPU_FTR_SMT))
+#define smt_capable()          (cpu_has_feature(CPU_FTR_SMT))
+
+#ifdef CONFIG_PPC64
+#include <asm/smp.h>
+
+#define topology_thread_siblings(cpu)  (cpu_sibling_map[cpu])
+#endif
 #endif
 
 #endif /* __KERNEL__ */
index b5fe93291c969e8ef79c249f353f65222649ba9c..0e4ea37f646602f0ca1908ecd2109d1ffae53fb3 100644 (file)
 #define __NR_faccessat         298
 #define __NR_get_robust_list   299
 #define __NR_set_robust_list   300
+#define __NR_move_pages                301
 
 #ifdef __KERNEL__
 
-#define __NR_syscalls          301
+#define __NR_syscalls          302
 
 #define __NR__exit __NR_exit
 #define NR_syscalls    __NR_syscalls
index ed59aa4c6ff9c194f0b8a8ca66118d096876090a..9d1916e59c04f22eeff10646d39ca4b879bd9117 100644 (file)
@@ -163,6 +163,7 @@ extern u8 x86_acpiid_to_apicid[];
 #define ARCH_HAS_POWER_INIT 1
 
 extern int acpi_skip_timer_override;
+extern int acpi_use_timer_override;
 
 #endif /*__KERNEL__*/
 
index 14996d962bac782bb67c809a571647d16e5b16cb..5642634843c472921ec08802fda4f36ca6a0ce1b 100644 (file)
@@ -109,6 +109,15 @@ extern struct x8664_pda _proxy_pda;
 #define sub_pda(field,val) pda_to_op("sub",field,val)
 #define or_pda(field,val) pda_to_op("or",field,val)
 
+/* This is not atomic against other CPUs -- CPU preemption needs to be off */
+#define test_and_clear_bit_pda(bit,field) ({           \
+       int old__;                                              \
+       asm volatile("btr %2,%%gs:%c3\n\tsbbl %0,%0"            \
+           : "=r" (old__), "+m" (_proxy_pda.field)             \
+           : "dIr" (bit), "i" (pda_offset(field)) : "memory"); \
+       old__;                                                  \
+})
+
 #endif
 
 #define PDA_STACKOFFSET (5*8)
index fd452fc2c037d7b08765905161ede0df52ccdef9..01d1c17e2849abb50a2bf4bffb4185a726d886f5 100644 (file)
@@ -59,8 +59,6 @@ extern seqlock_t xtime_lock;
 
 extern int sysctl_vsyscall;
 
-extern void vsyscall_set_cpu(int cpu);
-
 #define ARCH_HAVE_XTIME_LOCK 1
 
 #endif /* __KERNEL__ */
index 8f2ffa4caabfa1c0a425e54fa0c0185eb0fddf3d..6485e9716b36abbc9e0998a95eb35d3b313d41ae 100644 (file)
@@ -245,7 +245,7 @@ int crypto_alg_available(const char *name, u32 flags)
        __deprecated_for_modules;
 int crypto_has_alg(const char *name, u32 type, u32 mask);
 #else
-static int crypto_alg_available(const char *name, u32 flags);
+static int crypto_alg_available(const char *name, u32 flags)
        __deprecated_for_modules;
 static inline int crypto_alg_available(const char *name, u32 flags)
 {
index 5081d27bfa27ac22979dd4a2ad7a865b81701893..ace64e57e17f4291a813c7a9f61d1779fb560d43 100644 (file)
@@ -60,8 +60,11 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
  * If the arch doesn't supply something else, assume that hugepage
  * size aligned regions are ok without further preparation.
  */
-static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
+static inline int prepare_hugepage_range(unsigned long addr, unsigned long len,
+                                               pgoff_t pgoff)
 {
+       if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
+               return -EINVAL;
        if (len & ~HPAGE_MASK)
                return -EINVAL;
        if (addr & ~HPAGE_MASK)
@@ -69,7 +72,8 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
        return 0;
 }
 #else
-int prepare_hugepage_range(unsigned long addr, unsigned long len);
+int prepare_hugepage_range(unsigned long addr, unsigned long len,
+                                               pgoff_t pgoff);
 #endif
 
 #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE
@@ -107,7 +111,7 @@ static inline unsigned long hugetlb_total_pages(void)
 #define hugetlb_report_meminfo(buf)            0
 #define hugetlb_report_node_meminfo(n, buf)    0
 #define follow_huge_pmd(mm, addr, pmd, write)  NULL
-#define prepare_hugepage_range(addr, len)      (-EINVAL)
+#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL)
 #define pmd_huge(x)    0
 #define is_hugepage_only_range(mm, addr, len)  0
 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
index 9be6a4756f0b39fc6cb22b7c80e3da310b52f77f..f28621f638e0ce1727ed25f6271ca95482b5dc4a 100644 (file)
@@ -225,7 +225,7 @@ struct in6_flowlabel_req
 #endif
 
 /*
- * Netfilter
+ * Netfilter (1)
  *
  * Following socket options are used in ip6_tables;
  * see include/linux/netfilter_ipv6/ip6_tables.h.
@@ -240,4 +240,14 @@ struct in6_flowlabel_req
 #define IPV6_RECVTCLASS                66
 #define IPV6_TCLASS            67
 
+/*
+ * Netfilter (2)
+ *
+ * Following socket options are used in ip6_tables;
+ * see include/linux/netfilter_ipv6/ip6_tables.h.
+ *
+ * IP6T_SO_GET_REVISION_MATCH  68
+ * IP6T_SO_GET_REVISION_TARGET 69
+ */
+
 #endif
index ce6c85815cbd17be44e95f9244c84bbc7c5f3b4b..24a9ef1506b612c4e98d55522ce8140a5d3825a5 100644 (file)
@@ -402,6 +402,8 @@ extern const struct file_operations fat_file_operations;
 extern struct inode_operations fat_file_inode_operations;
 extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
 extern void fat_truncate(struct inode *inode);
+extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
+                      struct kstat *stat);
 
 /* fat/inode.c */
 extern void fat_attach(struct inode *inode, loff_t i_pos);
index 04319a76103aca92fa0092b6d152a61bb0d1b514..022edfa97ed977dfe6fd8f74b28472804067d5a8 100644 (file)
@@ -96,22 +96,6 @@ struct _xt_align
 /* Error verdict. */
 #define XT_ERROR_TARGET "ERROR"
 
-/*
- * New IP firewall options for [gs]etsockopt at the RAW IP level.
- * Unlike BSD Linux inherits IP options so you don't have to use a raw
- * socket for this. Instead we check rights in the calls. */
-#define XT_BASE_CTL            64      /* base for firewall socket options */
-
-#define XT_SO_SET_REPLACE      (XT_BASE_CTL)
-#define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1)
-#define XT_SO_SET_MAX          XT_SO_SET_ADD_COUNTERS
-
-#define XT_SO_GET_INFO                 (XT_BASE_CTL)
-#define XT_SO_GET_ENTRIES              (XT_BASE_CTL + 1)
-#define XT_SO_GET_REVISION_MATCH       (XT_BASE_CTL + 2)
-#define XT_SO_GET_REVISION_TARGET      (XT_BASE_CTL + 3)
-#define XT_SO_GET_MAX                  XT_SO_GET_REVISION_TARGET
-
 #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
 #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
 
index 44e39b61d9e7e3b11e4b3e863204b4a89bb8cd1b..0be235418a2f490b2b56f1942e05e6110fd767e0 100644 (file)
@@ -112,19 +112,20 @@ struct arpt_entry
  * New IP firewall options for [gs]etsockopt at the RAW IP level.
  * Unlike BSD Linux inherits IP options so you don't have to use a raw
  * socket for this. Instead we check rights in the calls.
+ *
+ * ATTENTION: check linux/in.h before adding new number here.
  */
-#define ARPT_CTL_OFFSET                32
-#define ARPT_BASE_CTL          (XT_BASE_CTL+ARPT_CTL_OFFSET)
-
-#define ARPT_SO_SET_REPLACE            (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET)
-#define ARPT_SO_SET_ADD_COUNTERS       (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET)
-#define ARPT_SO_SET_MAX                        (XT_SO_SET_MAX+ARPT_CTL_OFFSET)
-
-#define ARPT_SO_GET_INFO               (XT_SO_GET_INFO+ARPT_CTL_OFFSET)
-#define ARPT_SO_GET_ENTRIES            (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET)
-/* #define ARPT_SO_GET_REVISION_MATCH  XT_SO_GET_REVISION_MATCH  */
-#define ARPT_SO_GET_REVISION_TARGET    (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
-#define ARPT_SO_GET_MAX                        (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
+#define ARPT_BASE_CTL          96
+
+#define ARPT_SO_SET_REPLACE            (ARPT_BASE_CTL)
+#define ARPT_SO_SET_ADD_COUNTERS       (ARPT_BASE_CTL + 1)
+#define ARPT_SO_SET_MAX                        ARPT_SO_SET_ADD_COUNTERS
+
+#define ARPT_SO_GET_INFO               (ARPT_BASE_CTL)
+#define ARPT_SO_GET_ENTRIES            (ARPT_BASE_CTL + 1)
+/* #define ARPT_SO_GET_REVISION_MATCH  (APRT_BASE_CTL + 2) */
+#define ARPT_SO_GET_REVISION_TARGET    (ARPT_BASE_CTL + 3)
+#define ARPT_SO_GET_MAX                        (ARPT_SO_GET_REVISION_TARGET)
 
 /* CONTINUE verdict for targets */
 #define ARPT_CONTINUE XT_CONTINUE
index a536bbdef14554ba9732e3a7b67c14e8ae6c2825..4f06dad0bde90d5f6de514adb2d2825e3c4ad861 100644 (file)
@@ -101,18 +101,21 @@ struct ipt_entry
 /*
  * New IP firewall options for [gs]etsockopt at the RAW IP level.
  * Unlike BSD Linux inherits IP options so you don't have to use a raw
- * socket for this. Instead we check rights in the calls. */
-#define IPT_BASE_CTL           XT_BASE_CTL
-
-#define IPT_SO_SET_REPLACE     XT_SO_SET_REPLACE
-#define IPT_SO_SET_ADD_COUNTERS        XT_SO_SET_ADD_COUNTERS
-#define IPT_SO_SET_MAX         XT_SO_SET_MAX
-
-#define IPT_SO_GET_INFO                        XT_SO_GET_INFO
-#define IPT_SO_GET_ENTRIES             XT_SO_GET_ENTRIES
-#define IPT_SO_GET_REVISION_MATCH      XT_SO_GET_REVISION_MATCH
-#define IPT_SO_GET_REVISION_TARGET     XT_SO_GET_REVISION_TARGET
-#define IPT_SO_GET_MAX                 XT_SO_GET_REVISION_TARGET
+ * socket for this. Instead we check rights in the calls.
+ *
+ * ATTENTION: check linux/in.h before adding new number here.
+ */
+#define IPT_BASE_CTL           64
+
+#define IPT_SO_SET_REPLACE     (IPT_BASE_CTL)
+#define IPT_SO_SET_ADD_COUNTERS        (IPT_BASE_CTL + 1)
+#define IPT_SO_SET_MAX         IPT_SO_SET_ADD_COUNTERS
+
+#define IPT_SO_GET_INFO                        (IPT_BASE_CTL)
+#define IPT_SO_GET_ENTRIES             (IPT_BASE_CTL + 1)
+#define IPT_SO_GET_REVISION_MATCH      (IPT_BASE_CTL + 2)
+#define IPT_SO_GET_REVISION_TARGET     (IPT_BASE_CTL + 3)
+#define IPT_SO_GET_MAX                 IPT_SO_GET_REVISION_TARGET
 
 #define IPT_CONTINUE XT_CONTINUE
 #define IPT_RETURN XT_RETURN
index d7a8e9c0dad06ec657e324e6136b34921397b36e..4aed340401dbca0368049dff8fdbddf4f5a399ad 100644 (file)
@@ -107,18 +107,21 @@ struct ip6t_entry
 /*
  * New IP firewall options for [gs]etsockopt at the RAW IP level.
  * Unlike BSD Linux inherits IP options so you don't have to use
- * a raw socket for this. Instead we check rights in the calls. */
-#define IP6T_BASE_CTL                  XT_BASE_CTL
-
-#define IP6T_SO_SET_REPLACE            XT_SO_SET_REPLACE
-#define IP6T_SO_SET_ADD_COUNTERS       XT_SO_SET_ADD_COUNTERS
-#define IP6T_SO_SET_MAX                        XT_SO_SET_MAX
-
-#define IP6T_SO_GET_INFO               XT_SO_GET_INFO
-#define IP6T_SO_GET_ENTRIES            XT_SO_GET_ENTRIES
-#define        IP6T_SO_GET_REVISION_MATCH      XT_SO_GET_REVISION_MATCH
-#define        IP6T_SO_GET_REVISION_TARGET     XT_SO_GET_REVISION_TARGET
-#define IP6T_SO_GET_MAX                        XT_SO_GET_REVISION_TARGET
+ * a raw socket for this. Instead we check rights in the calls.
+ *
+ * ATTENTION: check linux/in6.h before adding new number here.
+ */
+#define IP6T_BASE_CTL                  64
+
+#define IP6T_SO_SET_REPLACE            (IP6T_BASE_CTL)
+#define IP6T_SO_SET_ADD_COUNTERS       (IP6T_BASE_CTL + 1)
+#define IP6T_SO_SET_MAX                        IP6T_SO_SET_ADD_COUNTERS
+
+#define IP6T_SO_GET_INFO               (IP6T_BASE_CTL)
+#define IP6T_SO_GET_ENTRIES            (IP6T_BASE_CTL + 1)
+#define IP6T_SO_GET_REVISION_MATCH     (IP6T_BASE_CTL + 4)
+#define IP6T_SO_GET_REVISION_TARGET    (IP6T_BASE_CTL + 5)
+#define IP6T_SO_GET_MAX                        IP6T_SO_GET_REVISION_TARGET
 
 /* CONTINUE verdict for targets */
 #define IP6T_CONTINUE XT_CONTINUE
index c312a12ad2d6729757892be98a20f194bac2c9a3..c321316f1bc7e5cd50bfe41f557ef01b18e76f4f 100644 (file)
 #define  PCI_EXP_DEVSTA_TRPND  0x20    /* Transactions Pending */
 #define PCI_EXP_LNKCAP         12      /* Link Capabilities */
 #define PCI_EXP_LNKCTL         16      /* Link Control */
+#define  PCI_EXP_LNKCTL_CLKREQ_EN 0x100        /* Enable clkreq */
 #define PCI_EXP_LNKSTA         18      /* Link Status */
 #define PCI_EXP_SLTCAP         20      /* Slot Capabilities */
 #define PCI_EXP_SLTCTL         24      /* Slot Control */
index 4b4eab2a316136fc3bd44bdb7e55eeee509b1030..3da978eec791216dd796cd704aed67b263713fa1 100644 (file)
@@ -687,7 +687,6 @@ static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp)
                 * the latest pointer.
                 */
                spin_lock(&oldf->file_lock);
-               open_files = count_open_files(old_fdt);
                old_fdt = files_fdtable(oldf);
        }
 
index 2d0dc3efe8137452f2ebfa194e84ff157573e66d..ebfd24a41858fd0c9751bfa356a9e85248e57c95 100644 (file)
@@ -233,6 +233,8 @@ void irq_chip_set_defaults(struct irq_chip *chip)
                chip->shutdown = chip->disable;
        if (!chip->name)
                chip->name = chip->typename;
+       if (!chip->end)
+               chip->end = dummy_irq_chip.end;
 }
 
 static inline void mask_ack_irq(struct irq_desc *desc, int irq)
index 6879202afe9a3c2d49b5b81ee187a151ce4f7e55..b385878c6e807924efbf432644f506297d28097a 100644 (file)
@@ -216,6 +216,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
 {
        struct irq_desc *desc = irq_desc + irq;
        struct irqaction *old, **p;
+       const char *old_name = NULL;
        unsigned long flags;
        int shared = 0;
 
@@ -255,8 +256,10 @@ int setup_irq(unsigned int irq, struct irqaction *new)
                 * set the trigger type must match.
                 */
                if (!((old->flags & new->flags) & IRQF_SHARED) ||
-                   ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK))
+                   ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
+                       old_name = old->name;
                        goto mismatch;
+               }
 
 #if defined(CONFIG_IRQ_PER_CPU)
                /* All handlers must agree on per-cpuness */
@@ -322,11 +325,13 @@ int setup_irq(unsigned int irq, struct irqaction *new)
        return 0;
 
 mismatch:
-       spin_unlock_irqrestore(&desc->lock, flags);
        if (!(new->flags & IRQF_PROBE_SHARED)) {
                printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq);
+               if (old_name)
+                       printk(KERN_ERR "current handler: %s\n", old_name);
                dump_stack();
        }
+       spin_unlock_irqrestore(&desc->lock, flags);
        return -EBUSY;
 }
 
index b739be2a6dc9adff9eb6a471a0044bbeedb54976..c9fefdb1a7db45df9658dd32d963e7f28bbdfdf4 100644 (file)
@@ -1081,7 +1081,8 @@ static int static_obj(void *obj)
         */
        for_each_possible_cpu(i) {
                start = (unsigned long) &__per_cpu_start + per_cpu_offset(i);
-               end   = (unsigned long) &__per_cpu_end   + per_cpu_offset(i);
+               end   = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM
+                                       + per_cpu_offset(i);
 
                if ((addr >= start) && (addr < end))
                        return 1;
index 497e502dfd6b6e54fc2bf902ea55fac36e70ac72..7b40abd7cba26aeb49595af3f2ec15099e11e5ee 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1379,7 +1379,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
                 * Check if the given range is hugepage aligned, and
                 * can be made suitable for hugepages.
                 */
-               ret = prepare_hugepage_range(addr, len);
+               ret = prepare_hugepage_range(addr, len, pgoff);
        } else {
                /*
                 * Ensure that a normal request is not falling in a
@@ -1880,6 +1880,9 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
        if ((addr + len) > TASK_SIZE || (addr + len) < addr)
                return -EINVAL;
 
+       if (is_hugepage_only_range(mm, addr, len))
+               return -EINVAL;
+
        flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
 
        error = arch_mmap_check(addr, len, flags);
index 7dc6aa745166cf680092103195e725619c4ce633..86897ee792d6b4a2f8e00a94cf4b12e2c1d6f075 100644 (file)
@@ -181,14 +181,13 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long fl
        }
        addr = ALIGN(start, align);
        size = PAGE_ALIGN(size);
+       if (unlikely(!size))
+               return NULL;
 
        area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node);
        if (unlikely(!area))
                return NULL;
 
-       if (unlikely(!size))
-               return NULL;
-
        /*
         * We always allocate a guard page.
         */
index 7edad790478a36f66688bc9d36ab1c3a2d9277d7..97556cc2e4e0cfc969bd6a4dc6429b061c4d45f2 100644 (file)
@@ -351,9 +351,10 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
        if (v->data_len < sizeof(*user_iph))
                return 0;
        diff = v->data_len - e->skb->len;
-       if (diff < 0)
-               skb_trim(e->skb, v->data_len);
-       else if (diff > 0) {
+       if (diff < 0) {
+               if (pskb_trim(e->skb, v->data_len))
+                       return -ENOMEM;
+       } else if (diff > 0) {
                if (v->data_len > 0xFFFF)
                        return -EINVAL;
                if (diff > skb_tailroom(e->skb)) {
index 4322318ab332138ffadd1a9ecfb587ba666efd25..c05e8edaf5443645209d3515c7e328989c44ae47 100644 (file)
@@ -2316,9 +2316,10 @@ void __init tcp_init(void)
                sysctl_max_syn_backlog = 128;
        }
 
-       sysctl_tcp_mem[0] =  768 << order;
-       sysctl_tcp_mem[1] = 1024 << order;
-       sysctl_tcp_mem[2] = 1536 << order;
+       /* Allow no more than 3/4 kernel memory (usually less) allocated to TCP */
+       sysctl_tcp_mem[0] = (1536 / sizeof (struct inet_bind_hashbucket)) << order;
+       sysctl_tcp_mem[1] = sysctl_tcp_mem[0] * 4 / 3;
+       sysctl_tcp_mem[2] = sysctl_tcp_mem[0] * 2;
 
        limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
        max_share = min(4UL*1024*1024, limit);
index 9510c24ca8d225a04e42d74d4a131fe555da28b5..9fec832ee08b00057a68afc375c323fe7d42842e 100644 (file)
@@ -349,9 +349,10 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
        if (v->data_len < sizeof(*user_iph))
                return 0;
        diff = v->data_len - e->skb->len;
-       if (diff < 0)
-               skb_trim(e->skb, v->data_len);
-       else if (diff > 0) {
+       if (diff < 0) {
+               if (pskb_trim(e->skb, v->data_len))
+                       return -ENOMEM;
+       } else if (diff > 0) {
                if (v->data_len > 0xFFFF)
                        return -EINVAL;
                if (diff > skb_tailroom(e->skb)) {
index 167c2ea88f6be997807cd6fe81e2a0d1c47f3934..204e02162d494ab24c0a1663d2e359db471f89e3 100644 (file)
@@ -1494,7 +1494,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
                        if (_frag_off) {
                                if (target < 0 &&
                                    ((!ipv6_ext_hdr(hp->nexthdr)) ||
-                                    nexthdr == NEXTHDR_NONE)) {
+                                    hp->nexthdr == NEXTHDR_NONE)) {
                                        if (fragoff)
                                                *fragoff = _frag_off;
                                        return hp->nexthdr;
index b2bf8f2e01da5cb32bcb7ebb0d2dde47eb877bd9..1e5207b80fe54413cc3bd802574b16daafa55ffc 100644 (file)
@@ -544,7 +544,7 @@ __build_packet_message(struct nfulnl_instance *inst,
        }
        /* global sequence number */
        if (inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) {
-               tmp_uint = atomic_inc_return(&global_seq);
+               tmp_uint = htonl(atomic_inc_return(&global_seq));
                NFA_PUT(inst->skb, NFULA_SEQ_GLOBAL, sizeof(tmp_uint), &tmp_uint);
        }
 
index 6e4ada3c1844dde85e8ef81cbe1c00a4cd834f29..e815a9aa6e95dfbffd7b04a28bd944d0cd27101b 100644 (file)
@@ -622,9 +622,10 @@ nfqnl_mangle(void *data, int data_len, struct nfqnl_queue_entry *e)
        int diff;
 
        diff = data_len - e->skb->len;
-       if (diff < 0)
-               skb_trim(e->skb, data_len);
-       else if (diff > 0) {
+       if (diff < 0) {
+               if (pskb_trim(e->skb, data_len))
+                       return -ENOMEM;
+       } else if (diff > 0) {
                if (data_len > 0xFFFF)
                        return -EINVAL;
                if (diff > skb_tailroom(e->skb)) {
index 0e292dc4fd872ca72a064d1ff3cd03377f3743d2..e35cfd326df28b0048483813037dfa0384dfbe6a 100644 (file)
@@ -55,7 +55,7 @@ static char *model;
 static int position_fix;
 static int probe_mask = -1;
 static int single_cmd;
-static int disable_msi;
+static int enable_msi;
 
 module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
@@ -69,8 +69,8 @@ module_param(probe_mask, int, 0444);
 MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1).");
 module_param(single_cmd, bool, 0444);
 MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only).");
-module_param(disable_msi, int, 0);
-MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
+module_param(enable_msi, int, 0);
+MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)");
 
 
 /* just for backward compatibility */
@@ -1531,7 +1531,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
        chip->pci = pci;
        chip->irq = -1;
        chip->driver_type = driver_type;
-       chip->msi = !disable_msi;
+       chip->msi = enable_msi;
 
        chip->position_fix = position_fix;
        chip->single_cmd = single_cmd;