]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Dec 2012 20:00:02 +0000 (12:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Dec 2012 20:00:02 +0000 (12:00 -0800)
Pull trivial branch from Jiri Kosina:
 "Usual stuff -- comment/printk typo fixes, documentation updates, dead
  code elimination."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  HOWTO: fix double words typo
  x86 mtrr: fix comment typo in mtrr_bp_init
  propagate name change to comments in kernel source
  doc: Update the name of profiling based on sysfs
  treewide: Fix typos in various drivers
  treewide: Fix typos in various Kconfig
  wireless: mwifiex: Fix typo in wireless/mwifiex driver
  messages: i2o: Fix typo in messages/i2o
  scripts/kernel-doc: check that non-void fcts describe their return value
  Kernel-doc: Convention: Use a "Return" section to describe return values
  radeon: Fix typo and copy/paste error in comments
  doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
  various: Fix spelling of "asynchronous" in comments.
  Fix misspellings of "whether" in comments.
  eisa: Fix spelling of "asynchronous".
  various: Fix spelling of "registered" in comments.
  doc: fix quite a few typos within Documentation
  target: iscsi: fix comment typos in target/iscsi drivers
  treewide: fix typo of "suport" in various comments and Kconfig
  treewide: fix typo of "suppport" in various comments
  ...

54 files changed:
1  2 
Documentation/ABI/testing/sysfs-devices-power
MAINTAINERS
arch/arm/mach-tegra/Kconfig
arch/arm/plat-s3c24xx/dma.c
arch/openrisc/Kconfig
arch/x86/kernel/cpu/mtrr/main.c
drivers/acpi/acpica/dsopcode.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/firewire/ohci.c
drivers/gpio/Kconfig
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/si.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/md/md.c
drivers/md/raid5.c
drivers/mmc/host/Kconfig
drivers/net/bonding/bonding.h
drivers/net/ethernet/8390/ax88796.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
drivers/net/ethernet/micrel/ksz884x.c
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/staging/comedi/drivers/usbdux.c
drivers/target/iscsi/iscsi_target_util.c
drivers/thermal/Kconfig
drivers/tty/hvc/hvc_opal.c
drivers/tty/hvc/hvc_vio.c
drivers/tty/serial/bfin_uart.c
drivers/tty/serial/icom.c
drivers/usb/core/driver.c
drivers/usb/gadget/at91_udc.c
drivers/usb/storage/realtek_cr.c
drivers/vhost/tcm_vhost.c
fs/hugetlbfs/inode.c
fs/jbd/transaction.c
include/linux/netdevice.h
include/linux/stmmac.h
include/net/sock.h
kernel/trace/ftrace.c
kernel/trace/trace.c
kernel/trace/trace_functions.c
kernel/trace/trace_irqsoff.c
kernel/trace/trace_sched_wakeup.c
lib/Kconfig.debug
mm/hugetlb.c
mm/memory_hotplug.c
mm/page_alloc.c
net/ipv4/tcp_cong.c
net/mac80211/driver-ops.h
net/sctp/endpointola.c
net/sctp/sm_statefuns.c
sound/pci/es1968.c
sound/pci/ice1712/delta.c
sound/pci/sis7019.c

index 7fc2997b23a6e25e1690249b3161a29f6b950596,f76a0447da74e8fd95e8a4e16e1134673e7365b4..9d43e76708413bdf6b3d25a0b1179714b06680ba
@@@ -164,7 -164,7 +164,7 @@@ Contact:   Rafael J. Wysocki <rjw@sisk.pl
  Description:
                The /sys/devices/.../wakeup_prevent_sleep_time_ms attribute
                contains the total time the device has been preventing
-               opportunistic transitions to sleep states from occuring.
+               opportunistic transitions to sleep states from occurring.
                This attribute is read-only.  If the device is not enabled to
                wake up the system from sleep states, this attribute is not
                present.
@@@ -204,34 -204,3 +204,34 @@@ Description
  
                This attribute has no effect on system-wide suspend/resume and
                hibernation.
 +
 +What:         /sys/devices/.../power/pm_qos_no_power_off
 +Date:         September 2012
 +Contact:      Rafael J. Wysocki <rjw@sisk.pl>
 +Description:
 +              The /sys/devices/.../power/pm_qos_no_power_off attribute
 +              is used for manipulating the PM QoS "no power off" flag.  If
 +              set, this flag indicates to the kernel that power should not
 +              be removed entirely from the device.
 +
 +              Not all drivers support this attribute.  If it isn't supported,
 +              it is not present.
 +
 +              This attribute has no effect on system-wide suspend/resume and
 +              hibernation.
 +
 +What:         /sys/devices/.../power/pm_qos_remote_wakeup
 +Date:         September 2012
 +Contact:      Rafael J. Wysocki <rjw@sisk.pl>
 +Description:
 +              The /sys/devices/.../power/pm_qos_remote_wakeup attribute
 +              is used for manipulating the PM QoS "remote wakeup required"
 +              flag.  If set, this flag indicates to the kernel that the
 +              device is a source of user events that have to be signaled from
 +              its low-power states.
 +
 +              Not all drivers support this attribute.  If it isn't supported,
 +              it is not present.
 +
 +              This attribute has no effect on system-wide suspend/resume and
 +              hibernation.
diff --combined MAINTAINERS
index 0bc485c4a88e8c81bb10bba3f04f48aeb5071127,e16a3f5a1b796144fc0cb59a5942fd8aa0a6d935..b0b880da6e5c0e57c932c21f72e0025f2bc6435b
@@@ -503,7 -503,7 +503,7 @@@ F: include/linux/altera_uart.
  F:    include/linux/altera_jtaguart.h
  
  AMD FAM15H PROCESSOR POWER MONITORING DRIVER
 -M:    Andreas Herrmann <andreas.herrmann3@amd.com>
 +M:    Andreas Herrmann <herrmann.der.user@googlemail.com>
  L:    lm-sensors@lm-sensors.org
  S:    Maintained
  F:    Documentation/hwmon/fam15h_power
@@@ -526,17 -526,17 +526,17 @@@ F:      drivers/video/geode
  F:    arch/x86/include/asm/geode.h
  
  AMD IOMMU (AMD-VI)
 -M:    Joerg Roedel <joerg.roedel@amd.com>
 +M:    Joerg Roedel <joro@8bytes.org>
  L:    iommu@lists.linux-foundation.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
 -S:    Supported
 +S:    Maintained
  F:    drivers/iommu/amd_iommu*.[ch]
  F:    include/linux/amd-iommu.h
  
  AMD MICROCODE UPDATE SUPPORT
 -M:    Andreas Herrmann <andreas.herrmann3@amd.com>
 +M:    Andreas Herrmann <herrmann.der.user@googlemail.com>
  L:    amd64-microcode@amd64.org
 -S:    Supported
 +S:    Maintained
  F:    arch/x86/kernel/microcode_amd.c
  
  AMS (Apple Motion Sensor) DRIVER
@@@ -637,13 -637,6 +637,13 @@@ W:       http://www.arm.linux.org.uk
  S:    Maintained
  F:    arch/arm/
  
 +ARM SUB-ARCHITECTURES
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    MAINTAINED
 +F:    arch/arm/mach-*/
 +F:    arch/arm/plat-*/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git
 +
  ARM PRIMECELL AACI PL041 DRIVER
  M:    Russell King <linux@arm.linux.org.uk>
  S:    Maintained
@@@ -685,12 -678,6 +685,12 @@@ M:       Lennert Buytenhek <kernel@wantstofly
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  
 +ARM/Allwinner A1X SoC support
 +M:    Maxime Ripard <maxime.ripard@free-electrons.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/mach-sunxi/
 +
  ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES
  M:    Andrew Victor <linux@maxim.org.za>
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
@@@ -713,12 -700,6 +713,12 @@@ S:       Maintaine
  F:    arch/arm/mach-cns3xxx/
  T:    git git://git.infradead.org/users/cbou/linux-cns3xxx.git
  
 +ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE
 +M:    Alexander Shiyan <shc_work@mail.ru>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Odd Fixes
 +F:    arch/arm/mach-clps711x/
 +
  ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE
  M:    Hartley Sweeten <hsweeten@visionengravers.com>
  M:    Ryan Mallon <rmallon@gmail.com>
@@@ -809,6 -790,7 +809,6 @@@ L: linux-arm-kernel@lists.infradead.or
  S:    Maintained
  T:    git git://git.pengutronix.de/git/imx/linux-2.6.git
  F:    arch/arm/mach-imx/
 -F:    arch/arm/plat-mxc/
  F:    arch/arm/configs/imx*_defconfig
  
  ARM/FREESCALE IMX6
@@@ -852,14 -834,6 +852,14 @@@ T:       git git://git.kernel.org/pub/scm/lin
  F:    arch/arm/mach-sa1100/jornada720.c
  F:    arch/arm/mach-sa1100/include/mach/jornada720.h
  
 +ARM/IGEP MACHINE SUPPORT
 +M:    Enric Balletbo i Serra <eballetbo@gmail.com>
 +M:    Javier Martinez Canillas <javier@dowhile0.org>
 +L:    linux-omap@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/mach-omap2/board-igep0020.c
 +
  ARM/INCOME PXA270 SUPPORT
  M:    Marek Vasut <marek.vasut@gmail.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1141,12 -1115,12 +1141,12 @@@ S:   Maintaine
  F:    drivers/media/platform/s5p-tv/
  
  ARM/SHMOBILE ARM ARCHITECTURE
 -M:    Paul Mundt <lethal@linux-sh.org>
 +M:    Simon Horman <horms@verge.net.au>
  M:    Magnus Damm <magnus.damm@gmail.com>
  L:    linux-sh@vger.kernel.org
  W:    http://oss.renesas.com
  Q:    http://patchwork.kernel.org/project/linux-sh/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git rmobile-latest
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
  S:    Supported
  F:    arch/arm/mach-shmobile/
  F:    drivers/sh/
@@@ -1248,7 -1222,6 +1248,7 @@@ F:      drivers/video/wm8505fb
  F:    drivers/video/wmt_ge_rops.*
  F:    drivers/tty/serial/vt8500_serial.c
  F:    drivers/rtc/rtc-vt8500-c
 +F:    drivers/mmc/host/wmt-sdmmc.c
  
  ARM/ZIPIT Z2 SUPPORT
  M:    Marek Vasut <marek.vasut@gmail.com>
@@@ -1259,11 -1232,9 +1259,11 @@@ F:    arch/arm/mach-pxa/include/mach/z2.
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <catalin.marinas@arm.com>
 +M:    Will Deacon <will.deacon@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm64/
 +F:    Documentation/arm64/
  
  ASC7621 HARDWARE MONITOR DRIVER
  M:    George Joseph <george.joseph@fairview5.com>
@@@ -1382,6 -1353,14 +1382,6 @@@ S:     Maintaine
  F:    drivers/atm/
  F:    include/linux/atm*
  
 -ATMEL AT91 MCI DRIVER
 -M:    Ludovic Desroches <ludovic.desroches@atmel.com>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -W:    http://www.atmel.com/products/AT91/
 -W:    http://www.at91.com/
 -S:    Maintained
 -F:    drivers/mmc/host/at91_mci.c
 -
  ATMEL AT91 / AT32 MCI DRIVER
  M:    Ludovic Desroches <ludovic.desroches@atmel.com>
  S:    Maintained
@@@ -1680,9 -1659,10 +1680,9 @@@ F:     drivers/net/ethernet/broadcom/tg3.
  
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
  M:    Brett Rudley <brudley@broadcom.com>
 -M:    Roland Vossen <rvossen@broadcom.com>
  M:    Arend van Spriel <arend@broadcom.com>
  M:    Franky (Zhenhui) Lin <frankyl@broadcom.com>
 -M:    Kan Yan <kanyan@broadcom.com>
 +M:    Hante Meuleman <meuleman@broadcom.com>
  L:    linux-wireless@vger.kernel.org
  L:    brcm80211-dev-list@broadcom.com
  S:    Supported
@@@ -1999,6 -1979,7 +1999,6 @@@ F:      fs/coda
  F:    include/linux/coda*.h
  
  COMMON CLK FRAMEWORK
 -M:    Mike Turquette <mturquette@ti.com>
  M:    Mike Turquette <mturquette@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (same as CLK API & CLKDEV)
  T:    git git://git.linaro.org/people/mturquette/linux.git
@@@ -2519,7 -2500,6 +2519,7 @@@ M:      Joonyoung Shim <jy0922.shim@samsung.
  M:    Seung-Woo Kim <sw0312.kim@samsung.com>
  M:    Kyungmin Park <kyungmin.park@samsung.com>
  L:    dri-devel@lists.freedesktop.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
  S:    Supported
  F:    drivers/gpu/drm/exynos
  F:    include/drm/exynos*
@@@ -2720,10 -2700,10 +2720,10 @@@ F:   include/linux/edac.
  
  EDAC-AMD64
  M:    Doug Thompson <dougthompson@xmission.com>
 -M:    Borislav Petkov <borislav.petkov@amd.com>
 +M:    Borislav Petkov <bp@alien8.de>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
 -S:    Supported
 +S:    Maintained
  F:    drivers/edac/amd64_edac*
  
  EDAC-E752X
@@@ -3596,7 -3576,7 +3596,7 @@@ S:      Maintaine
  F:    drivers/input/touchscreen/htcpen.c
  
  HUGETLB FILESYSTEM
- M:    William Irwin <wli@holomorphy.com>
+ M:    Nadia Yvette Chambers <nyc@holomorphy.com>
  S:    Maintained
  F:    fs/hugetlbfs/
  
@@@ -3608,49 -3588,7 +3608,49 @@@ S:    Maintaine
  F:    drivers/hv/
  F:    drivers/hid/hid-hyperv.c
  F:    drivers/net/hyperv/
 -F:    drivers/staging/hv/
 +
 +I2C OVER PARALLEL PORT
 +M:    Jean Delvare <khali@linux-fr.org>
 +L:    linux-i2c@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/i2c/busses/i2c-parport
 +F:    Documentation/i2c/busses/i2c-parport-light
 +F:    drivers/i2c/busses/i2c-parport.c
 +F:    drivers/i2c/busses/i2c-parport-light.c
 +
 +I2C/SMBUS CONTROLLER DRIVERS FOR PC
 +M:    Jean Delvare <khali@linux-fr.org>
 +L:    linux-i2c@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/i2c/busses/i2c-ali1535
 +F:    Documentation/i2c/busses/i2c-ali1563
 +F:    Documentation/i2c/busses/i2c-ali15x3
 +F:    Documentation/i2c/busses/i2c-amd756
 +F:    Documentation/i2c/busses/i2c-amd8111
 +F:    Documentation/i2c/busses/i2c-i801
 +F:    Documentation/i2c/busses/i2c-nforce2
 +F:    Documentation/i2c/busses/i2c-piix4
 +F:    Documentation/i2c/busses/i2c-sis5595
 +F:    Documentation/i2c/busses/i2c-sis630
 +F:    Documentation/i2c/busses/i2c-sis96x
 +F:    Documentation/i2c/busses/i2c-via
 +F:    Documentation/i2c/busses/i2c-viapro
 +F:    drivers/i2c/busses/i2c-ali1535.c
 +F:    drivers/i2c/busses/i2c-ali1563.c
 +F:    drivers/i2c/busses/i2c-ali15x3.c
 +F:    drivers/i2c/busses/i2c-amd756.c
 +F:    drivers/i2c/busses/i2c-amd756-s4882.c
 +F:    drivers/i2c/busses/i2c-amd8111.c
 +F:    drivers/i2c/busses/i2c-i801.c
 +F:    drivers/i2c/busses/i2c-isch.c
 +F:    drivers/i2c/busses/i2c-nforce2.c
 +F:    drivers/i2c/busses/i2c-nforce2-s4985.c
 +F:    drivers/i2c/busses/i2c-piix4.c
 +F:    drivers/i2c/busses/i2c-sis5595.c
 +F:    drivers/i2c/busses/i2c-sis630.c
 +F:    drivers/i2c/busses/i2c-sis96x.c
 +F:    drivers/i2c/busses/i2c-via.c
 +F:    drivers/i2c/busses/i2c-viapro.c
  
  I2C/SMBUS STUB DRIVER
  M:    "Mark M. Hoffman" <mhoffman@lightlink.com>
@@@ -3659,8 -3597,9 +3659,8 @@@ S:      Maintaine
  F:    drivers/i2c/busses/i2c-stub.c
  
  I2C SUBSYSTEM
 -M:    "Jean Delvare (PC drivers, core)" <khali@linux-fr.org>
 +M:    Wolfram Sang <w.sang@pengutronix.de>
  M:    "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
 -M:    "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
  L:    linux-i2c@vger.kernel.org
  W:    http://i2c.wiki.kernel.org/
  T:    quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/
@@@ -3671,13 -3610,6 +3671,13 @@@ F:    drivers/i2c
  F:    include/linux/i2c.h
  F:    include/linux/i2c-*.h
  
 +I2C-TAOS-EVM DRIVER
 +M:    Jean Delvare <khali@linux-fr.org>
 +L:    linux-i2c@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/i2c/busses/i2c-taos-evm
 +F:    drivers/i2c/busses/i2c-taos-evm.c
 +
  I2C-TINY-USB DRIVER
  M:    Till Harbaum <till@harbaum.org>
  L:    linux-i2c@vger.kernel.org
@@@ -3764,7 -3696,7 +3764,7 @@@ S:      Maintaine
  F:    drivers/platform/x86/ideapad-laptop.c
  
  IDE/ATAPI DRIVERS
 -M:    Borislav Petkov <petkovbb@gmail.com>
 +M:    Borislav Petkov <bp@alien8.de>
  L:    linux-ide@vger.kernel.org
  S:    Maintained
  F:    Documentation/cdrom/ide-cd
@@@ -3800,15 -3732,6 +3800,15 @@@ M:    Stanislaw Gruszka <stf_xl@wp.pl
  S:    Maintained
  F:    drivers/usb/atm/ueagle-atm.c
  
 +INDUSTRY PACK SUBSYSTEM (IPACK)
 +M:    Samuel Iglesias Gonsalvez <siglesias@igalia.com>
 +M:    Jens Taprogge <jens.taprogge@taprogge.org>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +L:    industrypack-devel@lists.sourceforge.net
 +W:    http://industrypack.sourceforge.net
 +S:    Maintained
 +F:    drivers/ipack/
 +
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
  M:    Mimi Zohar <zohar@us.ibm.com>
  S:    Supported
@@@ -3948,9 -3871,7 +3948,9 @@@ M:      Greg Rose <gregory.v.rose@intel.com
  M:    Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
  M:    Alex Duyck <alexander.h.duyck@intel.com>
  M:    John Ronciak <john.ronciak@intel.com>
 +M:    Tushar Dave <tushar.n.dave@intel.com>
  L:    e1000-devel@lists.sourceforge.net
 +W:    http://www.intel.com/support/feedback.htm
  W:    http://e1000.sourceforge.net/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next.git
@@@ -4302,8 -4223,8 +4302,8 @@@ F:      include/linux/lockd
  F:    include/linux/sunrpc/
  
  KERNEL VIRTUAL MACHINE (KVM)
 -M:    Avi Kivity <avi@redhat.com>
  M:    Marcelo Tosatti <mtosatti@redhat.com>
 +M:    Gleb Natapov <gleb@redhat.com>
  L:    kvm@vger.kernel.org
  W:    http://kvm.qumranet.com
  S:    Supported
@@@ -4834,14 -4755,6 +4834,14 @@@ F:    Documentation/scsi/megaraid.tx
  F:    drivers/scsi/megaraid.*
  F:    drivers/scsi/megaraid/
  
 +MELLANOX ETHERNET DRIVER (mlx4_en)
 +M:    Amir Vadai <amirv@mellanox.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +W:    http://www.mellanox.com
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/mellanox/mlx4/en_*
 +
  MEMORY MANAGEMENT
  L:    linux-mm@kvack.org
  W:    http://www.linux-mm.org
@@@ -5084,7 -4997,7 +5084,7 @@@ NETWORKING [GENERAL
  M:    "David S. Miller" <davem@davemloft.net>
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
 -W:    http://patchwork.ozlabs.org/project/netdev/list/
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
  S:    Maintained
@@@ -5144,7 -5057,6 +5144,7 @@@ F:      drivers/net/wireless
  NETWORKING DRIVERS
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
  S:    Odd Fixes
@@@ -5177,7 -5089,6 +5177,7 @@@ F:      net/nfc
  F:    include/linux/nfc.h
  F:    include/net/nfc/
  F:    drivers/nfc/
 +F:    include/linux/platform_data/pn544.h
  
  NFS, SUNRPC, AND LOCKD CLIENTS
  M:    Trond Myklebust <Trond.Myklebust@netapp.com>
@@@ -5445,7 -5356,7 +5445,7 @@@ S:      Maintaine
  F:    sound/drivers/opl4/
  
  OPROFILE
 -M:    Robert Richter <robert.richter@amd.com>
 +M:    Robert Richter <rric@kernel.org>
  L:    oprofile-list@lists.sf.net
  S:    Maintained
  F:    arch/*/include/asm/oprofile*.h
@@@ -5720,12 -5631,6 +5720,12 @@@ S:    Maintaine
  F:    drivers/pinctrl/
  F:    include/linux/pinctrl/
  
 +PIN CONTROLLER - ATMEL AT91
 +M:    Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/pinctrl/pinctrl-at91.c
 +
  PIN CONTROLLER - ST SPEAR
  M:    Viresh Kumar <viresh.linux@gmail.com>
  L:    spear-devel@list.st.com
@@@ -5735,7 -5640,7 +5735,7 @@@ S:      Maintaine
  F:    drivers/pinctrl/spear/
  
  PKTCDVD DRIVER
 -M:    Peter Osterlund <petero2@telia.com>
 +M:    Jiri Kosina <jkosina@suse.cz>
  S:    Maintained
  F:    drivers/block/pktcdvd.c
  F:    include/linux/pktcdvd.h
@@@ -6453,7 -6358,6 +6453,7 @@@ F:      drivers/scsi/st
  SCTP PROTOCOL
  M:    Vlad Yasevich <vyasevich@gmail.com>
  M:    Sridhar Samudrala <sri@us.ibm.com>
 +M:    Neil Horman <nhorman@tuxdriver.com>
  L:    linux-sctp@vger.kernel.org
  W:    http://lksctp.sourceforge.net
  S:    Maintained
@@@ -7298,14 -7202,6 +7298,14 @@@ L:    linux-xtensa@linux-xtensa.or
  S:    Maintained
  F:    arch/xtensa/
  
 +THERMAL
 +M:      Zhang Rui <rui.zhang@intel.com>
 +L:      linux-pm@vger.kernel.org
 +T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
 +S:      Supported
 +F:      drivers/thermal/
 +F:      include/linux/thermal.h
 +
  THINKPAD ACPI EXTRAS DRIVER
  M:    Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
  L:    ibm-acpi-devel@lists.sourceforge.net
@@@ -7455,7 -7351,6 +7455,7 @@@ K:      ^Subject:.*(?i)trivia
  
  TTY LAYER
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +M:    Jiri Slaby <jslaby@suse.cz>
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
  F:    drivers/tty/
@@@ -7481,7 -7376,8 +7481,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/dec/tulip/
  
  TUN/TAP driver
 -M:    Maxim Krasnyansky <maxk@qualcomm.com>
 -L:    vtun@office.satix.net
 +M:    Maxim Krasnyansky <maxk@qti.qualcomm.com>
  W:    http://vtun.sourceforge.net/tun
  S:    Maintained
  F:    Documentation/networking/tuntap.txt
@@@ -7603,12 -7499,6 +7603,12 @@@ S:    Maintaine
  F:    Documentation/usb/acm.txt
  F:    drivers/usb/class/cdc-acm.*
  
 +USB AR5523 WIRELESS DRIVER
 +M:    Pontus Fuchs <pontus.fuchs@gmail.com>
 +L:    linux-wireless@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/wireless/ath/ar5523/
 +
  USB ATTACHED SCSI
  M:    Matthew Wilcox <willy@linux.intel.com>
  M:    Sarah Sharp <sarah.a.sharp@linux.intel.com>
@@@ -7617,6 -7507,12 +7617,6 @@@ L:     linux-scsi@vger.kernel.or
  S:    Supported
  F:    drivers/usb/storage/uas.c
  
 -USB BLOCK DRIVER (UB ub)
 -M:    Pete Zaitcev <zaitcev@redhat.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Supported
 -F:    drivers/block/ub.c
 -
  USB CDC ETHERNET DRIVER
  M:    Oliver Neukum <oliver@neukum.org>
  L:    linux-usb@vger.kernel.org
@@@ -7983,6 -7879,13 +7983,6 @@@ M:     Roger Luethi <rl@hellgate.ch
  S:    Maintained
  F:    drivers/net/ethernet/via/via-rhine.c
  
 -VIAPRO SMBUS DRIVER
 -M:    Jean Delvare <khali@linux-fr.org>
 -L:    linux-i2c@vger.kernel.org
 -S:    Maintained
 -F:    Documentation/i2c/busses/i2c-viapro
 -F:    drivers/i2c/busses/i2c-viapro.c
 -
  VIA SD/MMC CARD CONTROLLER DRIVER
  M:    Bruce Chang <brucechang@via.com.tw>
  M:    Harald Welte <HaraldWelte@viatech.com>
@@@ -8237,7 -8140,7 +8237,7 @@@ F:      drivers/platform/x8
  
  X86 MCE INFRASTRUCTURE
  M:    Tony Luck <tony.luck@intel.com>
 -M:    Borislav Petkov <bp@amd64.org>
 +M:    Borislav Petkov <bp@alien8.de>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    arch/x86/kernel/cpu/mcheck/*
index e426d1b7747e8c5f8ab417de2a4e515e6631e9b0,dd1ae0183ff2a7d0540d18cec6cade84b887fa2e..b442f15fd01a8b7d49b14337c68896486da66cce
@@@ -55,8 -55,59 +55,8 @@@ config TEGRA_AH
        help
          Adds AHB configuration functionality for NVIDIA Tegra SoCs,
          which controls AHB bus master arbitration and some
-         perfomance parameters(priority, prefech size).
+         performance parameters(priority, prefech size).
  
 -choice
 -        prompt "Default low-level debug console UART"
 -        default TEGRA_DEBUG_UART_NONE
 -
 -config TEGRA_DEBUG_UART_NONE
 -        bool "None"
 -
 -config TEGRA_DEBUG_UARTA
 -        bool "UART-A"
 -
 -config TEGRA_DEBUG_UARTB
 -        bool "UART-B"
 -
 -config TEGRA_DEBUG_UARTC
 -        bool "UART-C"
 -
 -config TEGRA_DEBUG_UARTD
 -        bool "UART-D"
 -
 -config TEGRA_DEBUG_UARTE
 -        bool "UART-E"
 -
 -endchoice
 -
 -choice
 -      prompt "Automatic low-level debug console UART"
 -      default TEGRA_DEBUG_UART_AUTO_NONE
 -
 -config TEGRA_DEBUG_UART_AUTO_NONE
 -      bool "None"
 -
 -config TEGRA_DEBUG_UART_AUTO_ODMDATA
 -      bool "Via ODMDATA"
 -      help
 -        Automatically determines which UART to use for low-level debug based
 -        on the ODMDATA value. This value is part of the BCT, and is written
 -        to the boot memory device using nvflash, or other flashing tool.
 -        When bits 19:18 are 3, then bits 17:15 indicate which UART to use;
 -        0/1/2/3/4 are UART A/B/C/D/E.
 -
 -config TEGRA_DEBUG_UART_AUTO_SCRATCH
 -      bool "Via UART scratch register"
 -      help
 -        Automatically determines which UART to use for low-level debug based
 -        on the UART scratch register value. Some bootloaders put ASCII 'D'
 -        in this register when they initialize their own console UART output.
 -        Using this option allows the kernel to automatically pick the same
 -        UART.
 -
 -endchoice
 -
  config TEGRA_EMC_SCALING_ENABLE
        bool "Enable scaling the memory frequency"
  
index 0abd1c4698875f4edbb5be3cd506206c676019b6,3eb5139656af499c5fc3a3d7549a64076fbdcd40..ba3e76c9550489d18a50c8b9d4931c225c5edb73
@@@ -325,7 -325,7 +325,7 @@@ static int s3c2410_dma_start(struct s3c
  
        chan->state = S3C2410_DMA_RUNNING;
  
-       /* check wether there is anything to load, and if not, see
+       /* check whether there is anything to load, and if not, see
         * if we can find anything to load
         */
  
@@@ -473,13 -473,12 +473,13 @@@ int s3c2410_dma_enqueue(enum dma_ch cha
                pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n",
                         chan->number, __func__, buf);
  
 -              if (chan->end == NULL)
 +              if (chan->end == NULL) {
                        pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n",
                                 chan->number, __func__, chan);
 -
 -              chan->end->next = buf;
 -              chan->end = buf;
 +              } else {
 +                      chan->end->next = buf;
 +                      chan->end = buf;
 +              }
        }
  
        /* if necessary, update the next buffer field */
diff --combined arch/openrisc/Kconfig
index e7f1a2993f780ab89795a73c8b2e9bd71bdd2ed6,0ac66f67521f243024a40c850ec3c4da9995a724..ec37e185d20d82333c7e4f46cce5d721b99d98c2
@@@ -22,8 -22,6 +22,8 @@@ config OPENRIS
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select MODULES_USE_ELF_RELA
 +      select GENERIC_KERNEL_THREAD
 +      select GENERIC_KERNEL_EXECVE
  
  config MMU
        def_bool y
@@@ -146,7 -144,7 +146,7 @@@ config DEBUG_STACKOVERFLO
        help
          Make extra checks for space available on stack in some
            critical functions. This will cause kernel to run a bit slower,
-         but will catch most of kernel stack overruns and exit gracefuly.
+         but will catch most of kernel stack overruns and exit gracefully.
  
          Say Y if you are unsure.
  
index e4c1a41845317b1f91a72774474d9c2a4dac9293,b5a0fd891d73c0efe26dee87482bde21dda0185b..726bf963c2276569c39c67377b64fd7a74fb539e
@@@ -606,7 -606,7 +606,7 @@@ void __init mtrr_bp_init(void
  
                /*
                 * This is an AMD specific MSR, but we assume(hope?) that
-                * Intel will implement it to when they extend the address
+                * Intel will implement it too when they extend the address
                 * bus of the Xeon.
                 */
                if (cpuid_eax(0x80000000) >= 0x80000008) {
@@@ -695,16 -695,11 +695,16 @@@ void mtrr_ap_init(void
  }
  
  /**
 - * Save current fixed-range MTRR state of the BSP
 + * Save current fixed-range MTRR state of the first cpu in cpu_online_mask.
   */
  void mtrr_save_state(void)
  {
 -      smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1);
 +      int first_cpu;
 +
 +      get_online_cpus();
 +      first_cpu = cpumask_first(cpu_online_mask);
 +      smp_call_function_single(first_cpu, mtrr_save_fixed_ranges, NULL, 1);
 +      put_online_cpus();
  }
  
  void set_mtrr_aps_delayed_init(void)
index 0df024e5fb63fe75ba828fd3d4a847beb22ecb32,4fbb45fadb1eb8826b2e74fc0a96c8ddec587376..d09c6b4bab2c9632cf2bfa88ea5fb8ed196e10d4
@@@ -1,6 -1,6 +1,6 @@@
  /******************************************************************************
   *
-  * Module Name: dsopcode - Dispatcher suport for regions and fields
+  * Module Name: dsopcode - Dispatcher support for regions and fields
   *
   *****************************************************************************/
  
@@@ -649,8 -649,7 +649,8 @@@ acpi_ds_eval_data_object_operands(struc
                    ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) &&
                     (op->common.parent->common.aml_opcode !=
                      AML_VAR_PACKAGE_OP)
 -                   && (op->common.parent->common.aml_opcode != AML_NAME_OP))) {
 +                   && (op->common.parent->common.aml_opcode !=
 +                       AML_NAME_OP))) {
                        walk_state->result_obj = obj_desc;
                }
        }
index 20ab5b3a89150954cab2ec442b4f8b4ce93234a9,c9c3501784e0775f6b810e2e49bb6e7e5b5efc67..cfdfecd5bc763026762bd9e26b08e4e3c15e7b67
@@@ -155,7 -155,7 +155,7 @@@ enum si_stat_indexes 
        /* Number of watchdog pretimeouts. */
        SI_STAT_watchdog_pretimeouts,
  
-       /* Number of asyncronous messages received. */
+       /* Number of asynchronous messages received. */
        SI_STAT_incoming_messages,
  
  
@@@ -1836,7 -1836,7 +1836,7 @@@ static int hotmod_handler(const char *v
        return rv;
  }
  
 -static int __devinit hardcode_find_bmc(void)
 +static int hardcode_find_bmc(void)
  {
        int ret = -ENODEV;
        int             i;
@@@ -2023,7 -2023,7 +2023,7 @@@ struct SPMITable 
        s8      spmi_id[1]; /* A '\0' terminated array starts here. */
  };
  
 -static int __devinit try_init_spmi(struct SPMITable *spmi)
 +static int try_init_spmi(struct SPMITable *spmi)
  {
        struct smi_info  *info;
  
        return 0;
  }
  
 -static void __devinit spmi_find_bmc(void)
 +static void spmi_find_bmc(void)
  {
        acpi_status      status;
        struct SPMITable *spmi;
        }
  }
  
 -static int __devinit ipmi_pnp_probe(struct pnp_dev *dev,
 +static int ipmi_pnp_probe(struct pnp_dev *dev,
                                    const struct pnp_device_id *dev_id)
  {
        struct acpi_device *acpi_dev;
@@@ -2228,7 -2228,7 +2228,7 @@@ err_free
        return -EINVAL;
  }
  
 -static void __devexit ipmi_pnp_remove(struct pnp_dev *dev)
 +static void ipmi_pnp_remove(struct pnp_dev *dev)
  {
        struct smi_info *info = pnp_get_drvdata(dev);
  
@@@ -2258,7 -2258,7 +2258,7 @@@ struct dmi_ipmi_data 
        u8              slave_addr;
  };
  
 -static int __devinit decode_dmi(const struct dmi_header *dm,
 +static int decode_dmi(const struct dmi_header *dm,
                                struct dmi_ipmi_data *dmi)
  {
        const u8        *data = (const u8 *)dm;
        return 0;
  }
  
 -static void __devinit try_init_dmi(struct dmi_ipmi_data *ipmi_data)
 +static void try_init_dmi(struct dmi_ipmi_data *ipmi_data)
  {
        struct smi_info *info;
  
                kfree(info);
  }
  
 -static void __devinit dmi_find_bmc(void)
 +static void dmi_find_bmc(void)
  {
        const struct dmi_device *dev = NULL;
        struct dmi_ipmi_data data;
@@@ -2424,7 -2424,7 +2424,7 @@@ static void ipmi_pci_cleanup(struct smi
        pci_disable_device(pdev);
  }
  
 -static int __devinit ipmi_pci_probe_regspacing(struct smi_info *info)
 +static int ipmi_pci_probe_regspacing(struct smi_info *info)
  {
        if (info->si_type == SI_KCS) {
                unsigned char   status;
        return DEFAULT_REGSPACING;
  }
  
 -static int __devinit ipmi_pci_probe(struct pci_dev *pdev,
 +static int ipmi_pci_probe(struct pci_dev *pdev,
                                    const struct pci_device_id *ent)
  {
        int rv;
        return 0;
  }
  
 -static void __devexit ipmi_pci_remove(struct pci_dev *pdev)
 +static void ipmi_pci_remove(struct pci_dev *pdev)
  {
        struct smi_info *info = pci_get_drvdata(pdev);
        cleanup_one_si(info);
@@@ -2551,7 -2551,7 +2551,7 @@@ static struct pci_driver ipmi_pci_drive
  #endif /* CONFIG_PCI */
  
  static struct of_device_id ipmi_match[];
 -static int __devinit ipmi_probe(struct platform_device *dev)
 +static int ipmi_probe(struct platform_device *dev)
  {
  #ifdef CONFIG_OF
        const struct of_device_id *match;
        return 0;
  }
  
 -static int __devexit ipmi_remove(struct platform_device *dev)
 +static int ipmi_remove(struct platform_device *dev)
  {
  #ifdef CONFIG_OF
        cleanup_one_si(dev_get_drvdata(&dev->dev));
@@@ -3047,7 -3047,7 +3047,7 @@@ static inline void wait_for_timer_and_t
        }
  }
  
 -static __devinitdata struct ipmi_default_vals
 +static struct ipmi_default_vals
  {
        int type;
        int port;
        { .port = 0 }
  };
  
 -static void __devinit default_find_bmc(void)
 +static void default_find_bmc(void)
  {
        struct smi_info *info;
        int             i;
@@@ -3359,7 -3359,7 +3359,7 @@@ static int try_smi_init(struct smi_inf
        return rv;
  }
  
 -static int __devinit init_ipmi_si(void)
 +static int init_ipmi_si(void)
  {
        int  i;
        char *str;
diff --combined drivers/firewire/ohci.c
index f25610bb31489a2ded669112c2b2915f826c4de6,961e4398664bb73743146f5910396639d2dc813a..6ce6e07c38c1b3ba038ee816e26225e8b5f9ee4a
@@@ -1281,7 -1281,7 +1281,7 @@@ static int at_context_queue_packet(stru
        d[0].res_count = cpu_to_le16(packet->timestamp);
  
        /*
-        * The DMA format for asyncronous link packets is different
+        * The DMA format for asynchronous link packets is different
         * from the IEEE1394 layout, so shift the fields around
         * accordingly.
         */
@@@ -3537,7 -3537,7 +3537,7 @@@ static inline void pmac_ohci_on(struct 
  static inline void pmac_ohci_off(struct pci_dev *dev) {}
  #endif /* CONFIG_PPC_PMAC */
  
 -static int __devinit pci_probe(struct pci_dev *dev,
 +static int pci_probe(struct pci_dev *dev,
                               const struct pci_device_id *ent)
  {
        struct fw_ohci *ohci;
diff --combined drivers/gpio/Kconfig
index a5cbeec6f6db47f84aa5b74d1aad0f88f1aef42f,be117c386de54e25c9dd2c5d1a7b1163200e81b6..bf892bd68c1769fa35de808fcaf54e739fb142bc
@@@ -47,11 -47,7 +47,11 @@@ if GPIOLI
  
  config OF_GPIO
        def_bool y
 -      depends on OF && !SPARC
 +      depends on OF
 +
 +config GPIO_ACPI
 +      def_bool y
 +      depends on ACPI
  
  config DEBUG_GPIO
        bool "Debug GPIO calls"
@@@ -90,26 -86,11 +90,26 @@@ config GPIO_DA905
        help
          Say yes here to enable the GPIO driver for the DA9052 chip.
  
 +config GPIO_DA9055
 +      tristate "Dialog Semiconductor DA9055 GPIO"
 +      depends on MFD_DA9055
 +      help
 +        Say yes here to enable the GPIO driver for the DA9055 chip.
 +
 +        The Dialog DA9055 PMIC chip has 3 GPIO pins that can be
 +        be controller by this driver.
 +
 +        If driver is built as a module it will be called gpio-da9055.
 +
  config GPIO_MAX730X
        tristate
  
  comment "Memory mapped GPIO drivers:"
  
 +config GPIO_CLPS711X
 +      def_bool y
 +      depends on ARCH_CLPS711X
 +
  config GPIO_GENERIC_PLATFORM
        tristate "Generic memory-mapped GPIO controller support (MMIO platform device)"
        select GPIO_GENERIC
@@@ -171,7 -152,7 +171,7 @@@ config GPIO_MSM_V
  
  config GPIO_MVEBU
        def_bool y
 -      depends on ARCH_MVEBU
 +      depends on PLAT_ORION
        select GPIO_GENERIC
        select GENERIC_IRQ_CHIP
  
@@@ -189,7 -170,7 +189,7 @@@ config GPIO_MX
  
  config GPIO_PL061
        bool "PrimeCell PL061 GPIO support"
 -      depends on ARM_AMBA
 +      depends on ARM && ARM_AMBA
        select GENERIC_IRQ_CHIP
        help
          Say yes here to support the PrimeCell PL061 GPIO device
@@@ -200,13 -181,6 +200,13 @@@ config GPIO_PX
        help
          Say yes here to support the PXA GPIO device
  
 +config GPIO_SPEAR_SPICS
 +      bool "ST SPEAr13xx SPI Chip Select as GPIO support"
 +      depends on PLAT_SPEAR
 +      select GENERIC_IRQ_CHIP
 +      help
 +        Say yes here to support ST SPEAr SPI Chip Select as GPIO device
 +
  config GPIO_STA2X11
        bool "STA2x11/ConneXt GPIO support"
        depends on MFD_STA2X11
          Say yes here to support the STA2x11/ConneXt GPIO device.
          The GPIO module has 128 GPIO pins with alternate functions.
  
 +config GPIO_TS5500
 +      tristate "TS-5500 DIO blocks and compatibles"
 +      help
 +        This driver supports Digital I/O exposed by pin blocks found on some
 +        Technologic Systems platforms. It includes, but is not limited to, 3
 +        blocks of the TS-5500: DIO1, DIO2 and the LCD port, and the TS-5600
 +        LCD port.
 +
  config GPIO_VT8500
        bool "VIA/Wondermedia SoC GPIO Support"
        depends on ARCH_VT8500
@@@ -500,11 -466,11 +500,11 @@@ config GPIO_ADP5588_IR
  
  config GPIO_ADNP
        tristate "Avionic Design N-bit GPIO expander"
 -      depends on I2C && OF
 +      depends on I2C && OF_GPIO
        help
          This option enables support for N GPIOs found on Avionic Design
          I2C GPIO expanders. The register space will be extended by powers
-         of two, so the controller will need to accomodate for that. For
+         of two, so the controller will need to accommodate for that. For
          example: if a controller provides 48 pins, 6 registers will be
          enough to represent all pins, but the driver will assume a
          register layout for 64 pins (8 registers).
index 219942c660d7d2129e7c21ac375761dcd5309c9f,42509492717e4d7ed677ba9ae4f4960e92e00129..5d1d21a6dcdd11b20bb57637a333e83d2382bbbb
@@@ -1330,8 -1330,6 +1330,8 @@@ void evergreen_mc_stop(struct radeon_de
                                        break;
                                udelay(1);
                        }
 +              } else {
 +                      save->crtc_enabled[i] = false;
                }
        }
  
@@@ -1374,7 -1372,7 +1374,7 @@@ void evergreen_mc_resume(struct radeon_
        WREG32(BIF_FB_EN, FB_READ_EN | FB_WRITE_EN);
  
        for (i = 0; i < rdev->num_crtc; i++) {
 -              if (save->crtc_enabled) {
 +              if (save->crtc_enabled[i]) {
                        if (ASIC_IS_DCE6(rdev)) {
                                tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]);
                                tmp |= EVERGREEN_CRTC_BLANK_DATA_EN;
@@@ -1650,7 -1648,7 +1650,7 @@@ static int evergreen_cp_resume(struct r
        ring->wptr = 0;
        WREG32(CP_RB_WPTR, ring->wptr);
  
-       /* set the wb address wether it's enabled or not */
+       /* set the wb address whether it's enabled or not */
        WREG32(CP_RB_RPTR_ADDR,
               ((rdev->wb.gpu_addr + RADEON_WB_CP_RPTR_OFFSET) & 0xFFFFFFFC));
        WREG32(CP_RB_RPTR_ADDR_HI, upper_32_bits(rdev->wb.gpu_addr + RADEON_WB_CP_RPTR_OFFSET) & 0xFF);
index 4422d630b33bc4052ddfdc311ea37944f9d87051,ea4691f79ccdd1b260bcc357f1f3204dc6942767..010156dd949f392c9732f7a1b63ef0f67de26bd2
@@@ -2007,7 -2007,7 +2007,7 @@@ static int si_cp_resume(struct radeon_d
        ring->wptr = 0;
        WREG32(CP_RB0_WPTR, ring->wptr);
  
-       /* set the wb address wether it's enabled or not */
+       /* set the wb address whether it's enabled or not */
        WREG32(CP_RB0_RPTR_ADDR, (rdev->wb.gpu_addr + RADEON_WB_CP_RPTR_OFFSET) & 0xFFFFFFFC);
        WREG32(CP_RB0_RPTR_ADDR_HI, upper_32_bits(rdev->wb.gpu_addr + RADEON_WB_CP_RPTR_OFFSET) & 0xFF);
  
        ring->wptr = 0;
        WREG32(CP_RB1_WPTR, ring->wptr);
  
-       /* set the wb address wether it's enabled or not */
+       /* set the wb address whether it's enabled or not */
        WREG32(CP_RB1_RPTR_ADDR, (rdev->wb.gpu_addr + RADEON_WB_CP1_RPTR_OFFSET) & 0xFFFFFFFC);
        WREG32(CP_RB1_RPTR_ADDR_HI, upper_32_bits(rdev->wb.gpu_addr + RADEON_WB_CP1_RPTR_OFFSET) & 0xFF);
  
        ring->wptr = 0;
        WREG32(CP_RB2_WPTR, ring->wptr);
  
-       /* set the wb address wether it's enabled or not */
+       /* set the wb address whether it's enabled or not */
        WREG32(CP_RB2_RPTR_ADDR, (rdev->wb.gpu_addr + RADEON_WB_CP2_RPTR_OFFSET) & 0xFFFFFFFC);
        WREG32(CP_RB2_RPTR_ADDR_HI, upper_32_bits(rdev->wb.gpu_addr + RADEON_WB_CP2_RPTR_OFFSET) & 0xFF);
  
@@@ -2474,7 -2474,6 +2474,7 @@@ static bool si_vm_reg_valid(u32 reg
        /* check config regs */
        switch (reg) {
        case GRBM_GFX_INDEX:
 +      case CP_STRMOUT_CNTL:
        case VGT_VTX_VECT_EJECT_REG:
        case VGT_CACHE_INVALIDATION:
        case VGT_ESGS_RING_SIZE:
index 9d902725bac94f28c91aa26ec57615988cd96e77,de9e1fa0aa0e90af32f0d3c231056b43a46dc167..b33d95ebc890aa9667d64f01a66fb961244fbe88
@@@ -208,7 -208,7 +208,7 @@@ static void s3c24xx_i2c_message_start(s
        if (msg->flags & I2C_M_REV_DIR_ADDR)
                addr ^= 1;
  
-       /* todo - check for wether ack wanted or not */
+       /* todo - check for whether ack wanted or not */
        s3c24xx_i2c_enable_ack(i2c);
  
        iiccon = readl(i2c->regs + S3C2410_IICCON);
@@@ -397,7 -397,7 +397,7 @@@ static int i2c_s3c_irq_nextbyte(struct 
  
        case STATE_READ:
                /* we have a byte of data in the data register, do
-                * something with it, and then work out wether we are
+                * something with it, and then work out whether we are
                 * going to do any more read/write
                 */
  
@@@ -806,7 -806,6 +806,7 @@@ static int s3c24xx_i2c_parse_dt_gpio(st
                        dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio);
                        goto free_gpio;
                }
 +              i2c->gpios[idx] = gpio;
  
                ret = gpio_request(gpio, "i2c-bus");
                if (ret) {
diff --combined drivers/md/md.c
index 61200717687b85b3fed040f9599ffd1987b8842d,7511ce3cd4ddeb3472528d01ee4ff5059ce2877f..bd8bf0953fe38db2d071cd6ef0110f6b03271e0b
@@@ -1817,10 -1817,10 +1817,10 @@@ retry
                        memset(bbp, 0xff, PAGE_SIZE);
  
                        for (i = 0 ; i < bb->count ; i++) {
 -                              u64 internal_bb = *p++;
 +                              u64 internal_bb = p[i];
                                u64 store_bb = ((BB_OFFSET(internal_bb) << 10)
                                                | BB_LEN(internal_bb));
 -                              *bbp++ = cpu_to_le64(store_bb);
 +                              bbp[i] = cpu_to_le64(store_bb);
                        }
                        bb->changed = 0;
                        if (read_seqretry(&bb->lock, seq))
@@@ -4124,7 -4124,7 +4124,7 @@@ static struct md_sysfs_entry md_size 
  __ATTR(component_size, S_IRUGO|S_IWUSR, size_show, size_store);
  
  
- /* Metdata version.
+ /* Metadata version.
   * This is one of
   *   'none' for arrays with no metadata (good luck...)
   *   'external' for arrays with externally managed metadata,
@@@ -5294,7 -5294,7 +5294,7 @@@ void md_stop_writes(struct mddev *mddev
  }
  EXPORT_SYMBOL_GPL(md_stop_writes);
  
 -void md_stop(struct mddev *mddev)
 +static void __md_stop(struct mddev *mddev)
  {
        mddev->ready = 0;
        mddev->pers->stop(mddev);
        mddev->pers = NULL;
        clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
  }
 +
 +void md_stop(struct mddev *mddev)
 +{
 +      /* stop the array and free an attached data structures.
 +       * This is called from dm-raid
 +       */
 +      __md_stop(mddev);
 +      bitmap_destroy(mddev);
 +      if (mddev->bio_set)
 +              bioset_free(mddev->bio_set);
 +}
 +
  EXPORT_SYMBOL_GPL(md_stop);
  
  static int md_set_readonly(struct mddev *mddev, struct block_device *bdev)
@@@ -5376,7 -5364,7 +5376,7 @@@ static int do_md_stop(struct mddev * md
                        set_disk_ro(disk, 0);
  
                __md_stop_writes(mddev);
 -              md_stop(mddev);
 +              __md_stop(mddev);
                mddev->queue->merge_bvec_fn = NULL;
                mddev->queue->backing_dev_info.congested_fn = NULL;
  
@@@ -7948,9 -7936,9 +7948,9 @@@ int md_is_badblock(struct badblocks *bb
                   sector_t *first_bad, int *bad_sectors)
  {
        int hi;
 -      int lo = 0;
 +      int lo;
        u64 *p = bb->page;
 -      int rv = 0;
 +      int rv;
        sector_t target = s + sectors;
        unsigned seq;
  
  
  retry:
        seq = read_seqbegin(&bb->lock);
 -
 +      lo = 0;
 +      rv = 0;
        hi = bb->count;
  
        /* Binary search between lo and hi for 'target'
diff --combined drivers/md/raid5.c
index a4502686e7a8763fb5aeded988f026b2a9dd1c99,1fe7c2205353fd9d8a6056a8c5caed3313383461..3380372c0393e7262b95a611c92aa7da659d997b
@@@ -1576,7 -1576,7 +1576,7 @@@ static int resize_stripes(struct r5con
         * This happens in stages:
         * 1/ create a new kmem_cache and allocate the required number of
         *    stripe_heads.
-        * 2/ gather all the old stripe_heads and tranfer the pages across
+        * 2/ gather all the old stripe_heads and transfer the pages across
         *    to the new stripe_heads.  This will have the side effect of
         *    freezing the array as once all stripe_heads have been collected,
         *    no IO will be possible.  Old stripe heads are freed once their
@@@ -2774,12 -2774,10 +2774,12 @@@ static void handle_stripe_clean_event(s
                        dev = &sh->dev[i];
                        if (!test_bit(R5_LOCKED, &dev->flags) &&
                            (test_bit(R5_UPTODATE, &dev->flags) ||
 -                           test_and_clear_bit(R5_Discard, &dev->flags))) {
 +                           test_bit(R5_Discard, &dev->flags))) {
                                /* We can return any write requests */
                                struct bio *wbi, *wbi2;
                                pr_debug("Return write for disc %d\n", i);
 +                              if (test_and_clear_bit(R5_Discard, &dev->flags))
 +                                      clear_bit(R5_UPTODATE, &dev->flags);
                                wbi = dev->written;
                                dev->written = NULL;
                                while (wbi && wbi->bi_sector <
                                         !test_bit(STRIPE_DEGRADED, &sh->state),
                                                0);
                        }
 -              }
 +              } else if (test_bit(R5_Discard, &sh->dev[i].flags))
 +                      clear_bit(R5_Discard, &sh->dev[i].flags);
  
        if (test_and_clear_bit(STRIPE_FULL_WRITE, &sh->state))
                if (atomic_dec_and_test(&conf->pending_full_writes))
@@@ -3493,6 -3490,40 +3493,6 @@@ static void handle_stripe(struct stripe
                        handle_failed_sync(conf, sh, &s);
        }
  
 -      /*
 -       * might be able to return some write requests if the parity blocks
 -       * are safe, or on a failed drive
 -       */
 -      pdev = &sh->dev[sh->pd_idx];
 -      s.p_failed = (s.failed >= 1 && s.failed_num[0] == sh->pd_idx)
 -              || (s.failed >= 2 && s.failed_num[1] == sh->pd_idx);
 -      qdev = &sh->dev[sh->qd_idx];
 -      s.q_failed = (s.failed >= 1 && s.failed_num[0] == sh->qd_idx)
 -              || (s.failed >= 2 && s.failed_num[1] == sh->qd_idx)
 -              || conf->level < 6;
 -
 -      if (s.written &&
 -          (s.p_failed || ((test_bit(R5_Insync, &pdev->flags)
 -                           && !test_bit(R5_LOCKED, &pdev->flags)
 -                           && (test_bit(R5_UPTODATE, &pdev->flags) ||
 -                               test_bit(R5_Discard, &pdev->flags))))) &&
 -          (s.q_failed || ((test_bit(R5_Insync, &qdev->flags)
 -                           && !test_bit(R5_LOCKED, &qdev->flags)
 -                           && (test_bit(R5_UPTODATE, &qdev->flags) ||
 -                               test_bit(R5_Discard, &qdev->flags))))))
 -              handle_stripe_clean_event(conf, sh, disks, &s.return_bi);
 -
 -      /* Now we might consider reading some blocks, either to check/generate
 -       * parity, or to satisfy requests
 -       * or to load a block that is being partially written.
 -       */
 -      if (s.to_read || s.non_overwrite
 -          || (conf->level == 6 && s.to_write && s.failed)
 -          || (s.syncing && (s.uptodate + s.compute < disks))
 -          || s.replacing
 -          || s.expanding)
 -              handle_stripe_fill(sh, &s, disks);
 -
        /* Now we check to see if any write operations have recently
         * completed
         */
                        s.dec_preread_active = 1;
        }
  
 +      /*
 +       * might be able to return some write requests if the parity blocks
 +       * are safe, or on a failed drive
 +       */
 +      pdev = &sh->dev[sh->pd_idx];
 +      s.p_failed = (s.failed >= 1 && s.failed_num[0] == sh->pd_idx)
 +              || (s.failed >= 2 && s.failed_num[1] == sh->pd_idx);
 +      qdev = &sh->dev[sh->qd_idx];
 +      s.q_failed = (s.failed >= 1 && s.failed_num[0] == sh->qd_idx)
 +              || (s.failed >= 2 && s.failed_num[1] == sh->qd_idx)
 +              || conf->level < 6;
 +
 +      if (s.written &&
 +          (s.p_failed || ((test_bit(R5_Insync, &pdev->flags)
 +                           && !test_bit(R5_LOCKED, &pdev->flags)
 +                           && (test_bit(R5_UPTODATE, &pdev->flags) ||
 +                               test_bit(R5_Discard, &pdev->flags))))) &&
 +          (s.q_failed || ((test_bit(R5_Insync, &qdev->flags)
 +                           && !test_bit(R5_LOCKED, &qdev->flags)
 +                           && (test_bit(R5_UPTODATE, &qdev->flags) ||
 +                               test_bit(R5_Discard, &qdev->flags))))))
 +              handle_stripe_clean_event(conf, sh, disks, &s.return_bi);
 +
 +      /* Now we might consider reading some blocks, either to check/generate
 +       * parity, or to satisfy requests
 +       * or to load a block that is being partially written.
 +       */
 +      if (s.to_read || s.non_overwrite
 +          || (conf->level == 6 && s.to_write && s.failed)
 +          || (s.syncing && (s.uptodate + s.compute < disks))
 +          || s.replacing
 +          || s.expanding)
 +              handle_stripe_fill(sh, &s, disks);
 +
        /* Now to consider new write requests and what else, if anything
         * should be read.  We do not handle new writes when:
         * 1/ A 'write' operation (copy+xor) is already in flight.
@@@ -5532,10 -5529,6 +5532,10 @@@ static int run(struct mddev *mddev
                 * discard data disk but write parity disk
                 */
                stripe = stripe * PAGE_SIZE;
 +              /* Round up to power of 2, as discard handling
 +               * currently assumes that */
 +              while ((stripe-1) & stripe)
 +                      stripe = (stripe | (stripe-1)) + 1;
                mddev->queue->limits.discard_alignment = stripe;
                mddev->queue->limits.discard_granularity = stripe;
                /*
diff --combined drivers/mmc/host/Kconfig
index 737e4edc241bcf3d17db3f2cb21866b76504f072,49057954600aada769aee0ea36e35ba509ee1581..8d13c6594520094c82f054628b1086bfe5cc7bec
@@@ -81,18 -81,6 +81,18 @@@ config MMC_RICOH_MM
  
          If unsure, say Y.
  
 +config MMC_SDHCI_ACPI
 +      tristate "SDHCI support for ACPI enumerated SDHCI controllers"
 +      depends on MMC_SDHCI && ACPI
 +      help
 +        This selects support for ACPI enumerated SDHCI controllers,
 +        identified by ACPI Compatibility ID PNP0D40 or specific
 +        ACPI Hardware IDs.
 +
 +        If you have a controller with this interface, say Y or M here.
 +
 +        If unsure, say N.
 +
  config MMC_SDHCI_PLTFM
        tristate "SDHCI platform and OF driver helper"
        depends on MMC_SDHCI
@@@ -282,8 -270,26 +282,8 @@@ config MMC_AU1
  
          If unsure, say N.
  
 -choice
 -      prompt "Atmel SD/MMC Driver"
 -      depends on AVR32 || ARCH_AT91
 -      default MMC_ATMELMCI if AVR32
 -      help
 -        Choose which driver to use for the Atmel MCI Silicon
 -
 -config MMC_AT91
 -      tristate "AT91 SD/MMC Card Interface support (DEPRECATED)"
 -      depends on ARCH_AT91
 -      help
 -        This selects the AT91 MCI controller. This driver will
 -        be removed soon (for more information have a look to
 -        Documentation/feature-removal-schedule.txt). Please use
 -        MMC_ATMEL_MCI.
 -
 -        If unsure, say N.
 -
  config MMC_ATMELMCI
 -      tristate "Atmel Multimedia Card Interface support"
 +      tristate "Atmel SD/MMC Driver (Multimedia Card Interface)"
        depends on AVR32 || ARCH_AT91
        help
          This selects the Atmel Multimedia Card Interface driver. If
  
          If unsure, say N.
  
 -endchoice
 -
  config MMC_ATMELMCI_DMA
        bool "Atmel MCI DMA support"
        depends on MMC_ATMELMCI && (AVR32 || ARCH_AT91SAM9G45) && DMA_ENGINE
@@@ -533,7 -541,7 +533,7 @@@ config MMC_DW_PLTF
          If unsure, say Y.
  
  config MMC_DW_EXYNOS
-       tristate "Exynos specific extentions for Synopsys DW Memory Card Interface"
+       tristate "Exynos specific extensions for Synopsys DW Memory Card Interface"
        depends on MMC_DW
        select MMC_DW_PLTFM
        help
@@@ -613,21 -621,3 +613,21 @@@ config MMC_USH
  
          Note: These controllers only support SDIO cards and do not
          support MMC or SD memory cards.
 +
 +config MMC_WMT
 +      tristate "Wondermedia SD/MMC Host Controller support"
 +      depends on ARCH_VT8500
 +      default y
 +      help
 +        This selects support for the SD/MMC Host Controller on
 +        Wondermedia WM8505/WM8650 based SoCs.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called wmt-sdmmc.
 +
 +config MMC_REALTEK_PCI
 +      tristate "Realtek PCI-E SD/MMC Card Interface Driver"
 +      depends on MFD_RTSX_PCI
 +      help
 +        Say Y here to include driver code to support SD/MMC card interface
 +        of Realtek PCI-E card reader
index 6dded569b111d07fee6bb49088847f633f628852,486b1cbd8da88f6dfbc9a081533c846510cf2c55..21b68e5c14fd24c49d606289220f51a2a9902e65
@@@ -22,7 -22,6 +22,7 @@@
  #include <linux/in6.h>
  #include <linux/netpoll.h>
  #include <linux/inetdevice.h>
 +#include <linux/etherdevice.h>
  #include "bond_3ad.h"
  #include "bond_alb.h"
  
@@@ -245,7 -244,7 +245,7 @@@ struct bonding 
        struct   delayed_work ad_work;
        struct   delayed_work mcast_work;
  #ifdef CONFIG_DEBUG_FS
-       /* debugging suport via debugfs */
+       /* debugging support via debugfs */
        struct   dentry *debug_dir;
  #endif /* CONFIG_DEBUG_FS */
  };
@@@ -451,18 -450,6 +451,18 @@@ static inline void bond_destroy_proc_di
  }
  #endif
  
 +static inline struct slave *bond_slave_has_mac(struct bonding *bond,
 +                                             const u8 *mac)
 +{
 +      int i = 0;
 +      struct slave *tmp;
 +
 +      bond_for_each_slave(bond, tmp, i)
 +              if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
 +                      return tmp;
 +
 +      return NULL;
 +}
  
  /* exported from bond_main.c */
  extern int bond_net_id;
index 0338352bc0369cc4d7f1836ec2395b6bf2383e28,846381c3118513578081bdee276086c31e4be026..70dba5d01ad3cc8178318f9976a5922894a86859
@@@ -109,7 -109,7 +109,7 @@@ static inline struct ax_device *to_ax_d
  /*
   * ax_initial_check
   *
-  * do an initial probe for the card to check wether it exists
+  * do an initial probe for the card to check whether it exists
   * and is functional
   */
  static int ax_initial_check(struct net_device *dev)
@@@ -191,11 -191,11 +191,11 @@@ static void ax_get_8390_hdr(struct net_
        ei_outb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
  
        if (ei_local->word16)
 -              readsw(nic_base + NE_DATAPORT, hdr,
 -                     sizeof(struct e8390_pkt_hdr) >> 1);
 +              ioread16_rep(nic_base + NE_DATAPORT, hdr,
 +                           sizeof(struct e8390_pkt_hdr) >> 1);
        else
 -              readsb(nic_base + NE_DATAPORT, hdr,
 -                     sizeof(struct e8390_pkt_hdr));
 +              ioread8_rep(nic_base + NE_DATAPORT, hdr,
 +                          sizeof(struct e8390_pkt_hdr));
  
        ei_outb(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */
        ei_local->dmaing &= ~0x01;
@@@ -237,12 -237,12 +237,12 @@@ static void ax_block_input(struct net_d
        ei_outb(E8390_RREAD+E8390_START, nic_base + NE_CMD);
  
        if (ei_local->word16) {
 -              readsw(nic_base + NE_DATAPORT, buf, count >> 1);
 +              ioread16_rep(nic_base + NE_DATAPORT, buf, count >> 1);
                if (count & 0x01)
                        buf[count-1] = ei_inb(nic_base + NE_DATAPORT);
  
        } else {
 -              readsb(nic_base + NE_DATAPORT, buf, count);
 +              ioread8_rep(nic_base + NE_DATAPORT, buf, count);
        }
  
        ei_local->dmaing &= ~1;
@@@ -286,9 -286,9 +286,9 @@@ static void ax_block_output(struct net_
  
        ei_outb(E8390_RWRITE+E8390_START, nic_base + NE_CMD);
        if (ei_local->word16)
 -              writesw(nic_base + NE_DATAPORT, buf, count >> 1);
 +              iowrite16_rep(nic_base + NE_DATAPORT, buf, count >> 1);
        else
 -              writesb(nic_base + NE_DATAPORT, buf, count);
 +              iowrite8_rep(nic_base + NE_DATAPORT, buf, count);
  
        dma_start = jiffies;
  
index b8b4b749daab7d8f5a954c679422035182c0df30,a4fb5c0207be992f8d7e63822514d00346f830f3..09b625e0fdaa999260daaca271adac8b67112108
@@@ -4318,7 -4318,7 +4318,7 @@@ static int bnx2x_queue_comp_cmd(struct 
  
        if (o->next_tx_only >= o->max_cos)
                /* >= becuase tx only must always be smaller than cos since the
-                * primary connection suports COS 0
+                * primary connection supports COS 0
                 */
                BNX2X_ERR("illegal value for next tx_only: %d. max cos was %d",
                           o->next_tx_only, o->max_cos);
@@@ -5350,24 -5350,12 +5350,24 @@@ static int bnx2x_func_chk_transition(st
                else if ((cmd == BNX2X_F_CMD_AFEX_VIFLISTS) &&
                         (!test_bit(BNX2X_F_CMD_STOP, &o->pending)))
                        next_state = BNX2X_F_STATE_STARTED;
 +
 +              /* Switch_update ramrod can be sent in either started or
 +               * tx_stopped state, and it doesn't change the state.
 +               */
 +              else if ((cmd == BNX2X_F_CMD_SWITCH_UPDATE) &&
 +                       (!test_bit(BNX2X_F_CMD_STOP, &o->pending)))
 +                      next_state = BNX2X_F_STATE_STARTED;
 +
                else if (cmd == BNX2X_F_CMD_TX_STOP)
                        next_state = BNX2X_F_STATE_TX_STOPPED;
  
                break;
        case BNX2X_F_STATE_TX_STOPPED:
 -              if (cmd == BNX2X_F_CMD_TX_START)
 +              if ((cmd == BNX2X_F_CMD_SWITCH_UPDATE) &&
 +                  (!test_bit(BNX2X_F_CMD_STOP, &o->pending)))
 +                      next_state = BNX2X_F_STATE_TX_STOPPED;
 +
 +              else if (cmd == BNX2X_F_CMD_TX_START)
                        next_state = BNX2X_F_STATE_STARTED;
  
                break;
@@@ -5649,28 -5637,6 +5649,28 @@@ static inline int bnx2x_func_send_start
                             U64_LO(data_mapping), NONE_CONNECTION_TYPE);
  }
  
 +static inline int bnx2x_func_send_switch_update(struct bnx2x *bp,
 +                                      struct bnx2x_func_state_params *params)
 +{
 +      struct bnx2x_func_sp_obj *o = params->f_obj;
 +      struct function_update_data *rdata =
 +              (struct function_update_data *)o->rdata;
 +      dma_addr_t data_mapping = o->rdata_mapping;
 +      struct bnx2x_func_switch_update_params *switch_update_params =
 +              &params->params.switch_update;
 +
 +      memset(rdata, 0, sizeof(*rdata));
 +
 +      /* Fill the ramrod data with provided parameters */
 +      rdata->tx_switch_suspend_change_flg = 1;
 +      rdata->tx_switch_suspend = switch_update_params->suspend;
 +      rdata->echo = SWITCH_UPDATE;
 +
 +      return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0,
 +                           U64_HI(data_mapping),
 +                           U64_LO(data_mapping), NONE_CONNECTION_TYPE);
 +}
 +
  static inline int bnx2x_func_send_afex_update(struct bnx2x *bp,
                                         struct bnx2x_func_state_params *params)
  {
                cpu_to_le16(afex_update_params->afex_default_vlan);
        rdata->allowed_priorities_change_flg = 1;
        rdata->allowed_priorities = afex_update_params->allowed_priorities;
 +      rdata->echo = AFEX_UPDATE;
  
        /*  No need for an explicit memory barrier here as long we would
         *  need to ensure the ordering of writing to the SPQ element
@@@ -5808,8 -5773,6 +5808,8 @@@ static int bnx2x_func_send_cmd(struct b
                return bnx2x_func_send_tx_stop(bp, params);
        case BNX2X_F_CMD_TX_START:
                return bnx2x_func_send_tx_start(bp, params);
 +      case BNX2X_F_CMD_SWITCH_UPDATE:
 +              return bnx2x_func_send_switch_update(bp, params);
        default:
                BNX2X_ERR("Unknown command: %d\n", params->cmd);
                return -EINVAL;
@@@ -5855,30 -5818,16 +5855,30 @@@ int bnx2x_func_state_change(struct bnx2
                            struct bnx2x_func_state_params *params)
  {
        struct bnx2x_func_sp_obj *o = params->f_obj;
 -      int rc;
 +      int rc, cnt = 300;
        enum bnx2x_func_cmd cmd = params->cmd;
        unsigned long *pending = &o->pending;
  
        mutex_lock(&o->one_pending_mutex);
  
        /* Check that the requested transition is legal */
 -      if (o->check_transition(bp, o, params)) {
 +      rc = o->check_transition(bp, o, params);
 +      if ((rc == -EBUSY) &&
 +          (test_bit(RAMROD_RETRY, &params->ramrod_flags))) {
 +              while ((rc == -EBUSY) && (--cnt > 0)) {
 +                      mutex_unlock(&o->one_pending_mutex);
 +                      msleep(10);
 +                      mutex_lock(&o->one_pending_mutex);
 +                      rc = o->check_transition(bp, o, params);
 +              }
 +              if (rc == -EBUSY) {
 +                      mutex_unlock(&o->one_pending_mutex);
 +                      BNX2X_ERR("timeout waiting for previous ramrod completion\n");
 +                      return rc;
 +              }
 +      } else if (rc) {
                mutex_unlock(&o->one_pending_mutex);
 -              return -EINVAL;
 +              return rc;
        }
  
        /* Set "pending" bit */
index 093d594435e136db52fff20587d64f23e92df569,693a88dddb4831296b1e4e276a0e6225e9e4496a..83f0ea929d3d90971aa9aea7ad5730778ab1276d
@@@ -1487,7 -1487,7 +1487,7 @@@ struct dev_priv 
  #define DRV_VERSION           "1.0.0"
  #define DRV_RELDATE           "Feb 8, 2010"
  
 -static char version[] __devinitdata =
 +static char version[] =
        "Micrel " DEVICE_NAME " " DRV_VERSION " (" DRV_RELDATE ")";
  
  static u8 DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x88, 0x42, 0x01 };
@@@ -5407,8 -5407,8 +5407,8 @@@ static int netdev_close(struct net_devi
                /* Delay for receive task to stop scheduling itself. */
                msleep(2000 / HZ);
  
 -              tasklet_disable(&hw_priv->rx_tasklet);
 -              tasklet_disable(&hw_priv->tx_tasklet);
 +              tasklet_kill(&hw_priv->rx_tasklet);
 +              tasklet_kill(&hw_priv->tx_tasklet);
                free_irq(dev->irq, hw_priv->dev);
  
                transmit_cleanup(hw_priv, 0);
@@@ -5459,10 -5459,8 +5459,10 @@@ static int prepare_hardware(struct net_
        rc = request_irq(dev->irq, netdev_intr, IRQF_SHARED, dev->name, dev);
        if (rc)
                return rc;
 -      tasklet_enable(&hw_priv->rx_tasklet);
 -      tasklet_enable(&hw_priv->tx_tasklet);
 +      tasklet_init(&hw_priv->rx_tasklet, rx_proc_task,
 +                   (unsigned long) hw_priv);
 +      tasklet_init(&hw_priv->tx_tasklet, tx_proc_task,
 +                   (unsigned long) hw_priv);
  
        hw->promiscuous = 0;
        hw->all_multi = 0;
@@@ -6769,7 -6767,7 +6769,7 @@@ static int stp
  /*
   * This enables fast aging in the KSZ8842 switch.  Not sure what situation
   * needs that.  However, fast aging is used to flush the dynamic MAC table when
-  * STP suport is enabled.
+  * STP support is enabled.
   */
  static int fast_aging;
  
@@@ -6919,7 -6917,8 +6919,7 @@@ static void read_other_addr(struct ksz_
  #define PCI_VENDOR_ID_MICREL_KS               0x16c6
  #endif
  
 -static int __devinit pcidev_init(struct pci_dev *pdev,
 -      const struct pci_device_id *id)
 +static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)
  {
        struct net_device *dev;
        struct dev_priv *priv;
        spin_lock_init(&hw_priv->hwlock);
        mutex_init(&hw_priv->lock);
  
 -      /* tasklet is enabled. */
 -      tasklet_init(&hw_priv->rx_tasklet, rx_proc_task,
 -              (unsigned long) hw_priv);
 -      tasklet_init(&hw_priv->tx_tasklet, tx_proc_task,
 -              (unsigned long) hw_priv);
 -
 -      /* tasklet_enable will decrement the atomic counter. */
 -      tasklet_disable(&hw_priv->rx_tasklet);
 -      tasklet_disable(&hw_priv->tx_tasklet);
 -
        for (i = 0; i < TOTAL_PORT_NUM; i++)
                init_waitqueue_head(&hw_priv->counter[i].counter);
  
@@@ -7242,7 -7251,18 +7242,7 @@@ static struct pci_driver pci_device_dri
        .remove         = pcidev_exit
  };
  
 -static int __init ksz884x_init_module(void)
 -{
 -      return pci_register_driver(&pci_device_driver);
 -}
 -
 -static void __exit ksz884x_cleanup_module(void)
 -{
 -      pci_unregister_driver(&pci_device_driver);
 -}
 -
 -module_init(ksz884x_init_module);
 -module_exit(ksz884x_cleanup_module);
 +module_pci_driver(pci_device_driver);
  
  MODULE_DESCRIPTION("KSZ8841/2 PCI network driver");
  MODULE_AUTHOR("Tristram Ha <Tristram.Ha@micrel.com>");
index 62aa5584f64478d286e373414dd8b119315a5204,5b496d0a6310e9eb65040a44200cbc995eb16500..b49d21779a2433ea653ccc6c40fde97527ee1289
@@@ -73,7 -73,7 +73,7 @@@ enum fcp_resp_rsp_codes 
  #define FCP_PTA_SIMPLE      0   /* simple task attribute */
  #define FCP_PTA_HEADQ       1   /* head of queue task attribute */
  #define FCP_PTA_ORDERED     2   /* ordered task attribute */
- #define FCP_PTA_ACA         4   /* auto. contigent allegiance */
+ #define FCP_PTA_ACA         4   /* auto. contingent allegiance */
  #define FCP_PTA_MASK        7   /* mask for task attribute field */
  #define FCP_PRI_SHIFT       3   /* priority field starts in bit 3 */
  #define FCP_PRI_RESVD_MASK  0x80        /* reserved bits in priority field */
@@@ -557,7 -557,6 +557,7 @@@ static bool qlt_check_fcport_exist(stru
        int pmap_len;
        fc_port_t *fcport;
        int global_resets;
 +      unsigned long flags;
  
  retry:
        global_resets = atomic_read(&ha->tgt.qla_tgt->tgt_global_resets_count);
            sess->s_id.b.area, sess->loop_id, fcport->d_id.b.domain,
            fcport->d_id.b.al_pa, fcport->d_id.b.area, fcport->loop_id);
  
 -      sess->s_id = fcport->d_id;
 -      sess->loop_id = fcport->loop_id;
 -      sess->conf_compl_supported = !!(fcport->flags &
 -          FCF_CONF_COMP_SUPPORTED);
 +      spin_lock_irqsave(&ha->hardware_lock, flags);
 +      ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id,
 +                              (fcport->flags & FCF_CONF_COMP_SUPPORTED));
 +      spin_unlock_irqrestore(&ha->hardware_lock, flags);
  
        res = true;
  
@@@ -741,9 -740,10 +741,9 @@@ static struct qla_tgt_sess *qlt_create_
                                qlt_undelete_sess(sess);
  
                        kref_get(&sess->se_sess->sess_kref);
 -                      sess->s_id = fcport->d_id;
 -                      sess->loop_id = fcport->loop_id;
 -                      sess->conf_compl_supported = !!(fcport->flags &
 -                          FCF_CONF_COMP_SUPPORTED);
 +                      ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id,
 +                                              (fcport->flags & FCF_CONF_COMP_SUPPORTED));
 +
                        if (sess->local && !local)
                                sess->local = 0;
                        spin_unlock_irqrestore(&ha->hardware_lock, flags);
         */
        kref_get(&sess->se_sess->sess_kref);
  
 -      sess->conf_compl_supported = !!(fcport->flags &
 -          FCF_CONF_COMP_SUPPORTED);
 +      sess->conf_compl_supported = (fcport->flags & FCF_CONF_COMP_SUPPORTED);
        BUILD_BUG_ON(sizeof(sess->port_name) != sizeof(fcport->port_name));
        memcpy(sess->port_name, fcport->port_name, sizeof(sess->port_name));
  
@@@ -868,8 -869,10 +868,8 @@@ void qlt_fc_port_added(struct scsi_qla_
                        ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007,
                            "Reappeared sess %p\n", sess);
                }
 -              sess->s_id = fcport->d_id;
 -              sess->loop_id = fcport->loop_id;
 -              sess->conf_compl_supported = !!(fcport->flags &
 -                  FCF_CONF_COMP_SUPPORTED);
 +              ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, fcport->loop_id,
 +                                      (fcport->flags & FCF_CONF_COMP_SUPPORTED));
        }
  
        if (sess && sess->local) {
@@@ -3980,7 -3983,7 +3980,7 @@@ void qlt_async_event(uint16_t code, str
        case MBA_RSP_TRANSFER_ERR:      /* Response Transfer Error */
                ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03a,
                    "qla_target(%d): System error async event %#x "
-                   "occured", vha->vp_idx, code);
+                   "occurred", vha->vp_idx, code);
                break;
        case MBA_WAKEUP_THRES:          /* Request Queue Wake-up. */
                set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
        case MBA_LOOP_UP:
        {
                ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b,
-                   "qla_target(%d): Async LOOP_UP occured "
+                   "qla_target(%d): Async LOOP_UP occurred "
                    "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx,
                    le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
                    le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
        case MBA_LIP_RESET:
        case MBA_RSCN_UPDATE:
                ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c,
-                   "qla_target(%d): Async event %#x occured "
+                   "qla_target(%d): Async event %#x occurred "
                    "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code,
                    le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
                    le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
        case MBA_PORT_UPDATE:
                ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d,
                    "qla_target(%d): Port update async event %#x "
-                   "occured: updating the ports database (m[0]=%x, m[1]=%x, "
+                   "occurred: updating the ports database (m[0]=%x, m[1]=%x, "
                    "m[2]=%x, m[3]=%x)", vha->vp_idx, code,
                    le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
                    le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
  
        default:
                ql_dbg(ql_dbg_tgt_mgt, vha, 0xf040,
-                   "qla_target(%d): Async event %#x occured: "
+                   "qla_target(%d): Async event %#x occurred: "
                    "ignore (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx,
                    code, le16_to_cpu(mailbox[0]), le16_to_cpu(mailbox[1]),
                    le16_to_cpu(mailbox[2]), le16_to_cpu(mailbox[3]));
index 3d74f2f39ae18954ac825f4599b689d770f494cf,c0b682c75ee1f2dcae7ff4d3bcd8a107134d1f3b..4372e32bc95f71bfde3adf95d5c5ebdfbbfc8c9b
@@@ -237,7 -237,7 +237,7 @@@ static char *tcm_qla2xxx_get_fabric_wwn
                                struct tcm_qla2xxx_tpg, se_tpg);
        struct tcm_qla2xxx_lport *lport = tpg->lport;
  
 -      return &lport->lport_name[0];
 +      return lport->lport_naa_name;
  }
  
  static char *tcm_qla2xxx_npiv_get_fabric_wwn(struct se_portal_group *se_tpg)
@@@ -367,7 -367,7 +367,7 @@@ static struct se_node_acl *tcm_qla2xxx_
  
        nacl = kzalloc(sizeof(struct tcm_qla2xxx_nacl), GFP_KERNEL);
        if (!nacl) {
-               pr_err("Unable to alocate struct tcm_qla2xxx_nacl\n");
+               pr_err("Unable to allocate struct tcm_qla2xxx_nacl\n");
                return NULL;
        }
  
@@@ -1457,78 -1457,6 +1457,78 @@@ static int tcm_qla2xxx_check_initiator_
        return 0;
  }
  
 +static void tcm_qla2xxx_update_sess(struct qla_tgt_sess *sess, port_id_t s_id,
 +                                  uint16_t loop_id, bool conf_compl_supported)
 +{
 +      struct qla_tgt *tgt = sess->tgt;
 +      struct qla_hw_data *ha = tgt->ha;
 +      struct tcm_qla2xxx_lport *lport = ha->tgt.target_lport_ptr;
 +      struct se_node_acl *se_nacl = sess->se_sess->se_node_acl;
 +      struct tcm_qla2xxx_nacl *nacl = container_of(se_nacl,
 +                      struct tcm_qla2xxx_nacl, se_node_acl);
 +      u32 key;
 +
 +
 +      if (sess->loop_id != loop_id || sess->s_id.b24 != s_id.b24)
 +              pr_info("Updating session %p from port %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x loop_id %d -> %d s_id %x:%x:%x -> %x:%x:%x\n",
 +                      sess,
 +                      sess->port_name[0], sess->port_name[1],
 +                      sess->port_name[2], sess->port_name[3],
 +                      sess->port_name[4], sess->port_name[5],
 +                      sess->port_name[6], sess->port_name[7],
 +                      sess->loop_id, loop_id,
 +                      sess->s_id.b.domain, sess->s_id.b.area, sess->s_id.b.al_pa,
 +                      s_id.b.domain, s_id.b.area, s_id.b.al_pa);
 +
 +      if (sess->loop_id != loop_id) {
 +              /*
 +               * Because we can shuffle loop IDs around and we
 +               * update different sessions non-atomically, we might
 +               * have overwritten this session's old loop ID
 +               * already, and we might end up overwriting some other
 +               * session that will be updated later.  So we have to
 +               * be extra careful and we can't warn about those things...
 +               */
 +              if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl)
 +                      lport->lport_loopid_map[sess->loop_id].se_nacl = NULL;
 +
 +              lport->lport_loopid_map[loop_id].se_nacl = se_nacl;
 +
 +              sess->loop_id = loop_id;
 +      }
 +
 +      if (sess->s_id.b24 != s_id.b24) {
 +              key = (((u32) sess->s_id.b.domain << 16) |
 +                     ((u32) sess->s_id.b.area   <<  8) |
 +                     ((u32) sess->s_id.b.al_pa));
 +
 +              if (btree_lookup32(&lport->lport_fcport_map, key))
 +                      WARN(btree_remove32(&lport->lport_fcport_map, key) != se_nacl,
 +                           "Found wrong se_nacl when updating s_id %x:%x:%x\n",
 +                           sess->s_id.b.domain, sess->s_id.b.area, sess->s_id.b.al_pa);
 +              else
 +                      WARN(1, "No lport_fcport_map entry for s_id %x:%x:%x\n",
 +                           sess->s_id.b.domain, sess->s_id.b.area, sess->s_id.b.al_pa);
 +
 +              key = (((u32) s_id.b.domain << 16) |
 +                     ((u32) s_id.b.area   <<  8) |
 +                     ((u32) s_id.b.al_pa));
 +
 +              if (btree_lookup32(&lport->lport_fcport_map, key)) {
 +                      WARN(1, "Already have lport_fcport_map entry for s_id %x:%x:%x\n",
 +                           s_id.b.domain, s_id.b.area, s_id.b.al_pa);
 +                      btree_update32(&lport->lport_fcport_map, key, se_nacl);
 +              } else {
 +                      btree_insert32(&lport->lport_fcport_map, key, se_nacl, GFP_ATOMIC);
 +              }
 +
 +              sess->s_id = s_id;
 +              nacl->nport_id = key;
 +      }
 +
 +      sess->conf_compl_supported = conf_compl_supported;
 +}
 +
  /*
   * Calls into tcm_qla2xxx used by qla2xxx LLD I/O path.
   */
@@@ -1539,7 -1467,6 +1539,7 @@@ static struct qla_tgt_func_tmpl tcm_qla
        .free_cmd               = tcm_qla2xxx_free_cmd,
        .free_mcmd              = tcm_qla2xxx_free_mcmd,
        .free_session           = tcm_qla2xxx_free_session,
 +      .update_sess            = tcm_qla2xxx_update_sess,
        .check_initiator_node_acl = tcm_qla2xxx_check_initiator_node_acl,
        .find_sess_by_s_id      = tcm_qla2xxx_find_sess_by_s_id,
        .find_sess_by_loop_id   = tcm_qla2xxx_find_sess_by_loop_id,
@@@ -1607,7 -1534,6 +1607,7 @@@ static struct se_wwn *tcm_qla2xxx_make_
        lport->lport_wwpn = wwpn;
        tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN,
                                wwpn);
 +      sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn);
  
        ret = tcm_qla2xxx_init_lport(lport);
        if (ret != 0)
@@@ -1675,7 -1601,6 +1675,7 @@@ static struct se_wwn *tcm_qla2xxx_npiv_
        lport->lport_npiv_wwnn = npiv_wwnn;
        tcm_qla2xxx_npiv_format_wwn(&lport->lport_npiv_name[0],
                        TCM_QLA2XXX_NAMELEN, npiv_wwpn, npiv_wwnn);
 +      sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn);
  
  /* FIXME: tcm_qla2xxx_npiv_make_lport */
        ret = -ENOSYS;
index 78f3a2e013c4c3881894749f259e89c5ecd109cc,c484a7352940ed2397e75900cb1cb2f9e8097d2f..17b45ebb0553aeabb4ac0facf47d7a4b029719e4
@@@ -73,7 -73,7 +73,7 @@@ sampling rate. If you sample two channe
   *       And loads of cleaning up, in particular streamlining the
   *       bulk transfers.
   * 1.1:  moved EP4 transfers to EP1 to make space for a PWM output on EP4
-  * 1.2:  added PWM suport via EP4
+  * 1.2:  added PWM support via EP4
   * 2.0:  PWM seems to be stable and is not interfering with the other functions
   * 2.1:  changed PWM API
   * 2.2:  added firmware kernel request to fix an udev problem
@@@ -938,6 -938,9 +938,6 @@@ static int usbdux_ai_cmdtest(struct com
        if (!(this_usbduxsub->probed))
                return -ENODEV;
  
 -      dev_dbg(&this_usbduxsub->interface->dev,
 -              "comedi%d: usbdux_ai_cmdtest\n", dev->minor);
 -
        /* Step 1 : check if triggers are trivially valid */
  
        err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_INT);
        if (err)
                return 2;
  
 -      /* step 3: make sure arguments are trivially compatible */
 -      if (cmd->start_arg != 0) {
 -              cmd->start_arg = 0;
 -              err++;
 -      }
 +      /* Step 3: check if arguments are trivially valid */
  
 -      if (cmd->scan_begin_src == TRIG_FOLLOW) {
 -              /* internal trigger */
 -              if (cmd->scan_begin_arg != 0) {
 -                      cmd->scan_begin_arg = 0;
 -                      err++;
 -              }
 -      }
 +      err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
 +
 +      if (cmd->scan_begin_src == TRIG_FOLLOW) /* internal trigger */
 +              err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
  
        if (cmd->scan_begin_src == TRIG_TIMER) {
                if (this_usbduxsub->high_speed) {
                        while (i < (cmd->chanlist_len))
                                i = i * 2;
  
 -                      if (cmd->scan_begin_arg < (1000000 / 8 * i)) {
 -                              cmd->scan_begin_arg = 1000000 / 8 * i;
 -                              err++;
 -                      }
 +                      err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg,
 +                                                       1000000 / 8 * i);
                        /* now calc the real sampling rate with all the
                         * rounding errors */
                        tmpTimer =
                            ((unsigned int)(cmd->scan_begin_arg / 125000)) *
                            125000;
 -                      if (cmd->scan_begin_arg != tmpTimer) {
 -                              cmd->scan_begin_arg = tmpTimer;
 -                              err++;
 -                      }
                } else {
                        /* full speed */
                        /* 1kHz scans every USB frame */
 -                      if (cmd->scan_begin_arg < 1000000) {
 -                              cmd->scan_begin_arg = 1000000;
 -                              err++;
 -                      }
 +                      err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg,
 +                                                       1000000);
                        /*
                         * calc the real sampling rate with the rounding errors
                         */
                        tmpTimer = ((unsigned int)(cmd->scan_begin_arg /
                                                   1000000)) * 1000000;
 -                      if (cmd->scan_begin_arg != tmpTimer) {
 -                              cmd->scan_begin_arg = tmpTimer;
 -                              err++;
 -                      }
                }
 -      }
 -      /* the same argument */
 -      if (cmd->scan_end_arg != cmd->chanlist_len) {
 -              cmd->scan_end_arg = cmd->chanlist_len;
 -              err++;
 +              err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg,
 +                                              tmpTimer);
        }
  
 +      err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);
 +
        if (cmd->stop_src == TRIG_COUNT) {
                /* any count is allowed */
        } else {
                /* TRIG_NONE */
 -              if (cmd->stop_arg != 0) {
 -                      cmd->stop_arg = 0;
 -                      err++;
 -              }
 +              err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
        }
  
        if (err)
@@@ -1446,6 -1472,9 +1446,6 @@@ static int usbdux_ao_cmdtest(struct com
        if (!(this_usbduxsub->probed))
                return -ENODEV;
  
 -      dev_dbg(&this_usbduxsub->interface->dev,
 -              "comedi%d: usbdux_ao_cmdtest\n", dev->minor);
 -
        /* Step 1 : check if triggers are trivially valid */
  
        err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_INT);
        if (err)
                return 2;
  
 -      /* step 3: make sure arguments are trivially compatible */
 +      /* Step 3: check if arguments are trivially valid */
  
 -      if (cmd->start_arg != 0) {
 -              cmd->start_arg = 0;
 -              err++;
 -      }
 +      err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
  
 -      if (cmd->scan_begin_src == TRIG_FOLLOW) {
 -              /* internal trigger */
 -              if (cmd->scan_begin_arg != 0) {
 -                      cmd->scan_begin_arg = 0;
 -                      err++;
 -              }
 -      }
 +      if (cmd->scan_begin_src == TRIG_FOLLOW) /* internal trigger */
 +              err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
 +
 +      if (cmd->scan_begin_src == TRIG_TIMER)
 +              err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg,
 +                                               1000000);
  
 -      if (cmd->scan_begin_src == TRIG_TIMER) {
 -              /* timer */
 -              if (cmd->scan_begin_arg < 1000000) {
 -                      cmd->scan_begin_arg = 1000000;
 -                      err++;
 -              }
 -      }
        /* not used now, is for later use */
 -      if (cmd->convert_src == TRIG_TIMER) {
 -              if (cmd->convert_arg < 125000) {
 -                      cmd->convert_arg = 125000;
 -                      err++;
 -              }
 -      }
 +      if (cmd->convert_src == TRIG_TIMER)
 +              err |= cfc_check_trigger_arg_min(&cmd->convert_arg, 125000);
  
 -      /* the same argument */
 -      if (cmd->scan_end_arg != cmd->chanlist_len) {
 -              cmd->scan_end_arg = cmd->chanlist_len;
 -              err++;
 -      }
 +      err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);
  
        if (cmd->stop_src == TRIG_COUNT) {
                /* any count is allowed */
        } else {
                /* TRIG_NONE */
 -              if (cmd->stop_arg != 0) {
 -                      cmd->stop_arg = 0;
 -                      err++;
 -              }
 +              err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
        }
  
 -      dev_dbg(&this_usbduxsub->interface->dev, "comedi%d: err=%d, "
 -              "scan_begin_src=%d, scan_begin_arg=%d, convert_src=%d, "
 -              "convert_arg=%d\n", dev->minor, err, cmd->scan_begin_src,
 -              cmd->scan_begin_arg, cmd->convert_src, cmd->convert_arg);
 -
        if (err)
                return 3;
  
@@@ -2319,10 -2375,9 +2319,10 @@@ static int usbdux_attach_common(struct 
        return 0;
  }
  
 -static int usbdux_attach_usb(struct comedi_device *dev,
 -                           struct usb_interface *uinterf)
 +static int usbdux_auto_attach(struct comedi_device *dev,
 +                            unsigned long context_unused)
  {
 +      struct usb_interface *uinterf = comedi_to_usb_interface(dev);
        int ret;
        struct usbduxsub *this_usbduxsub;
  
        down(&start_stop_sem);
        this_usbduxsub = usb_get_intfdata(uinterf);
        if (!this_usbduxsub || !this_usbduxsub->probed) {
 -              printk(KERN_ERR
 -                     "comedi%d: usbdux: error: attach_usb failed, not connected\n",
 -                     dev->minor);
 +              dev_err(dev->class_dev,
 +                      "usbdux: error: auto_attach failed, not connected\n");
                ret = -ENODEV;
        } else if (this_usbduxsub->attached) {
 -              printk(KERN_ERR
 -                     "comedi%d: usbdux: error: attach_usb failed, already attached\n",
 -                     dev->minor);
 +              dev_err(dev->class_dev,
 +                      "error: auto_attach failed, already attached\n");
                ret = -ENODEV;
        } else
                ret = usbdux_attach_common(dev, this_usbduxsub);
@@@ -2360,7 -2417,7 +2360,7 @@@ static void usbdux_detach(struct comedi
  static struct comedi_driver usbdux_driver = {
        .driver_name    = "usbdux",
        .module         = THIS_MODULE,
 -      .attach_usb     = usbdux_attach_usb,
 +      .auto_attach    = usbdux_auto_attach,
        .detach         = usbdux_detach,
  };
  
index 1a91195ab619a9ebbfa503cf7851c3cb8ca02b49,c8dab6c7b5dcf371c07647cd2366a54d4badb4c1..69e0cfd988704a9f18143d3231d9c2fb79daaf29
@@@ -488,7 -488,7 +488,7 @@@ void iscsit_add_cmd_to_immediate_queue
        atomic_set(&conn->check_immediate_queue, 1);
        spin_unlock_bh(&conn->immed_queue_lock);
  
 -      wake_up_process(conn->thread_set->tx_thread);
 +      wake_up(&conn->queues_wq);
  }
  
  struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsi_conn *conn)
@@@ -562,7 -562,7 +562,7 @@@ void iscsit_add_cmd_to_response_queue
        atomic_inc(&cmd->response_queue_count);
        spin_unlock_bh(&conn->response_queue_lock);
  
 -      wake_up_process(conn->thread_set->tx_thread);
 +      wake_up(&conn->queues_wq);
  }
  
  struct iscsi_queue_req *iscsit_get_cmd_from_response_queue(struct iscsi_conn *conn)
@@@ -616,24 -616,6 +616,24 @@@ static void iscsit_remove_cmd_from_resp
        }
  }
  
 +bool iscsit_conn_all_queues_empty(struct iscsi_conn *conn)
 +{
 +      bool empty;
 +
 +      spin_lock_bh(&conn->immed_queue_lock);
 +      empty = list_empty(&conn->immed_queue_list);
 +      spin_unlock_bh(&conn->immed_queue_lock);
 +
 +      if (!empty)
 +              return empty;
 +
 +      spin_lock_bh(&conn->response_queue_lock);
 +      empty = list_empty(&conn->response_queue_list);
 +      spin_unlock_bh(&conn->response_queue_lock);
 +
 +      return empty;
 +}
 +
  void iscsit_free_queue_reqs_for_conn(struct iscsi_conn *conn)
  {
        struct iscsi_queue_req *qr, *qr_tmp;
@@@ -684,7 -666,7 +684,7 @@@ void iscsit_release_cmd(struct iscsi_cm
  void iscsit_free_cmd(struct iscsi_cmd *cmd)
  {
        /*
-        * Determine if a struct se_cmd is assoicated with
+        * Determine if a struct se_cmd is associated with
         * this struct iscsi_cmd.
         */
        switch (cmd->iscsi_opcode) {
diff --combined drivers/thermal/Kconfig
index 8636fae1f7ecfa88909b5b4aa7eb39b71722933f,d673ffca87c96722e692ab6042e44ad6f75edd76..c2c77d1ac499d3ccb4d4c141d66986e88e980bf6
@@@ -13,62 -13,15 +13,62 @@@ menuconfig THERMA
          All platforms with ACPI thermal support can use this driver.
          If you want this support, you should say Y or M here.
  
 +if THERMAL
 +
  config THERMAL_HWMON
        bool
 -      depends on THERMAL
        depends on HWMON=y || HWMON=THERMAL
        default y
  
 +choice
 +      prompt "Default Thermal governor"
 +      default THERMAL_DEFAULT_GOV_STEP_WISE
 +      help
 +        This option sets which thermal governor shall be loaded at
 +        startup. If in doubt, select 'step_wise'.
 +
 +config THERMAL_DEFAULT_GOV_STEP_WISE
 +      bool "step_wise"
 +      select STEP_WISE
 +      help
 +        Use the step_wise governor as default. This throttles the
 +        devices one step at a time.
 +
 +config THERMAL_DEFAULT_GOV_FAIR_SHARE
 +      bool "fair_share"
 +      select FAIR_SHARE
 +      help
 +        Use the fair_share governor as default. This throttles the
 +        devices based on their 'contribution' to a zone. The
 +        contribution should be provided through platform data.
 +
 +config THERMAL_DEFAULT_GOV_USER_SPACE
 +      bool "user_space"
 +      select USER_SPACE
 +      help
 +        Select this if you want to let the user space manage the
 +        lpatform thermals.
 +
 +endchoice
 +
 +config FAIR_SHARE
 +      bool "Fair-share thermal governor"
 +      help
 +        Enable this to manage platform thermals using fair-share governor.
 +
 +config STEP_WISE
 +      bool "Step_wise thermal governor"
 +      help
 +        Enable this to manage platform thermals using a simple linear
 +
 +config USER_SPACE
 +      bool "User_space thermal governor"
 +      help
 +        Enable this to let the user space manage the platform thermals.
 +
  config CPU_THERMAL
 -      bool "generic cpu cooling support"
 -      depends on THERMAL && CPU_FREQ
 +      tristate "generic cpu cooling support"
 +      depends on CPU_FREQ
        select CPU_FREQ_TABLE
        help
          This implements the generic cpu cooling mechanism through frequency
@@@ -80,6 -33,7 +80,6 @@@
  
  config SPEAR_THERMAL
        bool "SPEAr thermal sensor driver"
 -      depends on THERMAL
        depends on PLAT_SPEAR
        depends on OF
        help
@@@ -88,6 -42,7 +88,6 @@@
  
  config RCAR_THERMAL
        tristate "Renesas R-Car thermal driver"
 -      depends on THERMAL
        depends on ARCH_SHMOBILE
        help
          Enable this to plug the R-Car thermal sensor driver into the Linux
  
  config EXYNOS_THERMAL
        tristate "Temperature sensor on Samsung EXYNOS"
 -      depends on (ARCH_EXYNOS4 || ARCH_EXYNOS5) && THERMAL
 -      select CPU_FREQ_TABLE
 +      depends on (ARCH_EXYNOS4 || ARCH_EXYNOS5)
 +      depends on CPU_THERMAL
        help
-         If you say yes here you get support for TMU (Thermal Managment
+         If you say yes here you get support for TMU (Thermal Management
          Unit) on SAMSUNG EXYNOS series of SoC.
 +
 +config DB8500_THERMAL
 +      bool "DB8500 thermal management"
 +      depends on ARCH_U8500
 +      default y
 +      help
 +        Adds DB8500 thermal management implementation according to the thermal
 +        management framework. A thermal zone with several trip points will be
 +        created. Cooling devices can be bound to the trip points to cool this
 +        thermal zone if trip points reached.
 +
 +config DB8500_CPUFREQ_COOLING
 +      tristate "DB8500 cpufreq cooling"
 +      depends on ARCH_U8500
 +      depends on CPU_THERMAL
 +      default y
 +      help
 +        Adds DB8500 cpufreq cooling devices, and these cooling devices can be
 +        bound to thermal zone trip points. When a trip point reached, the
 +        bound cpufreq cooling device turns active to set CPU frequency low to
 +        cool down the CPU.
 +
 +endif
index be1a9a1e749e6761678fe1c135a1a64ff25160e7,a4f488fa95790edaca0ec41d160568d8b6bca51c..cd69b48f6dfd390a8231f689b35f5d2588c16772
@@@ -41,7 -41,7 +41,7 @@@
  
  static const char hvc_opal_name[] = "hvc_opal";
  
 -static struct of_device_id hvc_opal_match[] __devinitdata = {
 +static struct of_device_id hvc_opal_match[] = {
        { .name = "serial", .compatible = "ibm,opal-console-raw" },
        { .name = "serial", .compatible = "ibm,opal-console-hvsi" },
        { },
@@@ -161,7 -161,7 +161,7 @@@ static const struct hv_ops hvc_opal_hvs
        .tiocmset = hvc_opal_hvsi_tiocmset,
  };
  
 -static int __devinit hvc_opal_probe(struct platform_device *dev)
 +static int hvc_opal_probe(struct platform_device *dev)
  {
        const struct hv_ops *ops;
        struct hvc_struct *hp;
                proto = HV_PROTOCOL_HVSI;
                ops = &hvc_opal_hvsi_ops;
        } else {
-               pr_err("hvc_opal: Unkown protocol for %s\n",
+               pr_err("hvc_opal: Unknown protocol for %s\n",
                       dev->dev.of_node->full_name);
                return -ENXIO;
        }
        return 0;
  }
  
 -static int __devexit hvc_opal_remove(struct platform_device *dev)
 +static int hvc_opal_remove(struct platform_device *dev)
  {
        struct hvc_struct *hp = dev_get_drvdata(&dev->dev);
        int rc, termno;
  
  static struct platform_driver hvc_opal_driver = {
        .probe          = hvc_opal_probe,
 -      .remove         = __devexit_p(hvc_opal_remove),
 +      .remove         = hvc_opal_remove,
        .driver         = {
                .name   = hvc_opal_name,
                .owner  = THIS_MODULE,
index ed6f5f1f5a552e461af7ddb2941774194ea2c558,1a5894c6dfa4b5096f84f99657995f9d0983afab..0c629807610e6576ff822f2b958d8894e4182dc7
@@@ -53,7 -53,7 +53,7 @@@
  
  static const char hvc_driver_name[] = "hvc_console";
  
 -static struct vio_device_id hvc_driver_table[] __devinitdata = {
 +static struct vio_device_id hvc_driver_table[] = {
        {"serial", "hvterm1"},
  #ifndef HVC_OLD_HVSI
        {"serial", "hvterm-protocol"},
@@@ -293,7 -293,7 +293,7 @@@ static int udbg_hvc_getc(void
        }
  }
  
 -static int __devinit hvc_vio_probe(struct vio_dev *vdev,
 +static int hvc_vio_probe(struct vio_dev *vdev,
                                   const struct vio_device_id *id)
  {
        const struct hv_ops *ops;
                proto = HV_PROTOCOL_HVSI;
                ops = &hvterm_hvsi_ops;
        } else {
-               pr_err("hvc_vio: Unkown protocol for %s\n", vdev->dev.of_node->full_name);
+               pr_err("hvc_vio: Unknown protocol for %s\n", vdev->dev.of_node->full_name);
                return -ENXIO;
        }
  
        return 0;
  }
  
 -static int __devexit hvc_vio_remove(struct vio_dev *vdev)
 +static int hvc_vio_remove(struct vio_dev *vdev)
  {
        struct hvc_struct *hp = dev_get_drvdata(&vdev->dev);
        int rc, termno;
index e6a008f4939f47ac6aac0129ef0f1cf5b90c3998,9b11c3f23eae98fcfad2c97f9983ef5b91928ac1..2e2b2c1cb72252d607dd747305cb354c68dd2cb7
@@@ -477,9 -477,9 +477,9 @@@ static void bfin_serial_dma_rx_chars(st
  void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
  {
        int x_pos, pos;
 +      unsigned long flags;
  
 -      dma_disable_irq_nosync(uart->rx_dma_channel);
 -      spin_lock_bh(&uart->rx_lock);
 +      spin_lock_irqsave(&uart->rx_lock, flags);
  
        /* 2D DMA RX buffer ring is used. Because curr_y_count and
         * curr_x_count can't be read as an atomic operation,
                uart->rx_dma_buf.tail = uart->rx_dma_buf.head;
        }
  
 -      spin_unlock_bh(&uart->rx_lock);
 -      dma_enable_irq(uart->rx_dma_channel);
 +      spin_unlock_irqrestore(&uart->rx_lock, flags);
  
        mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES);
  }
@@@ -799,7 -800,6 +799,7 @@@ bfin_serial_set_termios(struct uart_por
        unsigned long flags;
        unsigned int baud, quot;
        unsigned int ier, lcr = 0;
 +      unsigned long timeout;
  
        switch (termios->c_cflag & CSIZE) {
        case CS8:
                lcr = WLS(5);
                break;
        default:
-               printk(KERN_ERR "%s: word lengh not supported\n",
+               printk(KERN_ERR "%s: word length not supported\n",
                        __func__);
        }
  
  
        UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
  
 +      /* Wait till the transfer buffer is empty */
 +      timeout = jiffies + msecs_to_jiffies(10);
 +      while (UART_GET_GCTL(uart) & UCEN && !(UART_GET_LSR(uart) & TEMT))
 +              if (time_after(jiffies, timeout)) {
 +                      dev_warn(port->dev, "timeout waiting for TX buffer empty\n");
 +                      break;
 +              }
 +
        /* Disable UART */
        ier = UART_GET_IER(uart);
        UART_PUT_GCTL(uart, UART_GET_GCTL(uart) & ~UCEN);
@@@ -1398,7 -1390,7 +1398,7 @@@ out_error_free_mem
        return ret;
  }
  
 -static int __devexit bfin_serial_remove(struct platform_device *pdev)
 +static int bfin_serial_remove(struct platform_device *pdev)
  {
        struct bfin_serial_port *uart = platform_get_drvdata(pdev);
  
  
  static struct platform_driver bfin_serial_driver = {
        .probe          = bfin_serial_probe,
 -      .remove         = __devexit_p(bfin_serial_remove),
 +      .remove         = bfin_serial_remove,
        .suspend        = bfin_serial_suspend,
        .resume         = bfin_serial_resume,
        .driver         = {
index 6197a69adb4d407e3011c37625cbca8faae66eb1,613151677df01835c87eac86a6e282d8b98d99d8..72b6334bcf1aacae37068258ec9d4cbd46e6bf3d
@@@ -175,7 -175,7 +175,7 @@@ static void free_port_memory(struct ico
        }
  }
  
 -static int __devinit get_port_memory(struct icom_port *icom_port)
 +static int get_port_memory(struct icom_port *icom_port)
  {
        int index;
        unsigned long stgAddr;
@@@ -505,7 -505,7 +505,7 @@@ static void load_code(struct icom_port 
                /* Stop processor */
                stop_processor(icom_port);
  
-               dev_err(&icom_port->adapter->pci_dev->dev,"Port not opertional\n");
+               dev_err(&icom_port->adapter->pci_dev->dev,"Port not operational\n");
        }
  
        if (new_page != NULL)
@@@ -1314,7 -1314,7 +1314,7 @@@ static struct uart_driver icom_uart_dri
        .cons = ICOM_CONSOLE,
  };
  
 -static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
 +static int icom_init_ports(struct icom_adapter *icom_adapter)
  {
        u32 subsystem_id = icom_adapter->subsystem_id;
        int i;
@@@ -1381,7 -1381,7 +1381,7 @@@ static void icom_port_active(struct ico
                            0x8024 + 2 - 2 * (icom_port->port - 2);
        }
  }
 -static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
 +static int icom_load_ports(struct icom_adapter *icom_adapter)
  {
        struct icom_port *icom_port;
        int port_num;
        return 0;
  }
  
 -static int __devinit icom_alloc_adapter(struct icom_adapter
 +static int icom_alloc_adapter(struct icom_adapter
                                        **icom_adapter_ref)
  {
        int adapter_count = 0;
@@@ -1487,7 -1487,7 +1487,7 @@@ static void icom_kref_release(struct kr
        icom_remove_adapter(icom_adapter);
  }
  
 -static int __devinit icom_probe(struct pci_dev *dev,
 +static int icom_probe(struct pci_dev *dev,
                                const struct pci_device_id *ent)
  {
        int index;
@@@ -1596,7 -1596,7 +1596,7 @@@ probe_exit0
        return retval;
  }
  
 -static void __devexit icom_remove(struct pci_dev *dev)
 +static void icom_remove(struct pci_dev *dev)
  {
        struct icom_adapter *icom_adapter;
        struct list_head *tmp;
@@@ -1617,7 -1617,7 +1617,7 @@@ static struct pci_driver icom_pci_drive
        .name = ICOM_DRIVER_NAME,
        .id_table = icom_pci_table,
        .probe = icom_probe,
 -      .remove = __devexit_p(icom_remove),
 +      .remove = icom_remove,
  };
  
  static int __init icom_init(void)
index 88dde95b6795fcc66cf7016cc2ff1559b633d0f1,263c5035eabfd942ab2d4907d8547a61e425695e..d938b2b99e31fcee332a2f83ae46e4998907190a
@@@ -32,6 -32,8 +32,6 @@@
  #include "usb.h"
  
  
 -#ifdef CONFIG_HOTPLUG
 -
  /*
   * Adds a new dynamic USBdevice ID to this driver,
   * and cause the driver to probe for all devices again.
@@@ -192,6 -194,20 +192,6 @@@ static void usb_free_dynids(struct usb_
        }
        spin_unlock(&usb_drv->dynids.lock);
  }
 -#else
 -static inline int usb_create_newid_files(struct usb_driver *usb_drv)
 -{
 -      return 0;
 -}
 -
 -static void usb_remove_newid_files(struct usb_driver *usb_drv)
 -{
 -}
 -
 -static inline void usb_free_dynids(struct usb_driver *usb_drv)
 -{
 -}
 -#endif
  
  static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf,
                                                        struct usb_driver *drv)
@@@ -222,7 -238,7 +222,7 @@@ static int usb_probe_device(struct devi
        /* TODO: Add real matching code */
  
        /* The device should always appear to be in use
-        * unless the driver suports autosuspend.
+        * unless the driver supports autosuspend.
         */
        if (!udriver->supports_autosuspend)
                error = usb_autoresume_device(udev);
@@@ -774,6 -790,7 +774,6 @@@ static int usb_device_match(struct devi
        return 0;
  }
  
 -#ifdef        CONFIG_HOTPLUG
  static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
  {
        struct usb_device *usb_dev;
        return 0;
  }
  
 -#else
 -
 -static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
 -{
 -      return -ENODEV;
 -}
 -#endif        /* CONFIG_HOTPLUG */
 -
  /**
   * usb_register_device_driver - register a USB device (not interface) driver
   * @new_udriver: USB operations for the device driver
index 59dcea2f69574f9d62747b315c141201e130de1f,6992d35c5e396d234cf24827ffd879290cc44bb1..f4a21f6f081f280ea117860a46e0ec0bf13f573a
@@@ -31,7 -31,6 +31,7 @@@
  #include <linux/usb/gadget.h>
  #include <linux/of.h>
  #include <linux/of_gpio.h>
 +#include <linux/platform_data/atmel.h>
  
  #include <asm/byteorder.h>
  #include <mach/hardware.h>
@@@ -39,6 -38,7 +39,6 @@@
  #include <asm/irq.h>
  #include <asm/gpio.h>
  
 -#include <mach/board.h>
  #include <mach/cpu.h>
  #include <mach/at91sam9261_matrix.h>
  #include <mach/at91_matrix.h>
@@@ -51,7 -51,7 +51,7 @@@
   * full speed USB controllers, including the at91rm9200 (arm920T, with MMU),
   * at91sam926x (arm926ejs, with MMU), and several no-mmu versions.
   *
-  * This driver expects the board has been wired with two GPIOs suppporting
+  * This driver expects the board has been wired with two GPIOs supporting
   * a VBUS sensing IRQ, and a D+ pullup.  (They may be omitted, but the
   * testing hasn't covered such cases.)
   *
@@@ -1673,7 -1673,7 +1673,7 @@@ static void at91udc_shutdown(struct pla
        spin_unlock_irqrestore(&udc->lock, flags);
  }
  
 -static void __devinit at91udc_of_init(struct at91_udc *udc,
 +static void at91udc_of_init(struct at91_udc *udc,
                                     struct device_node *np)
  {
        struct at91_udc_data *board = &udc->board;
        board->pullup_active_low = (flags & OF_GPIO_ACTIVE_LOW) ? 1 : 0;
  }
  
 -static int __devinit at91udc_probe(struct platform_device *pdev)
 +static int at91udc_probe(struct platform_device *pdev)
  {
        struct device   *dev = &pdev->dev;
        struct at91_udc *udc;
index ea5f2586fbdd3f9b8279c2d7230a2dbe5f067334,73c93cf364c89a80b5d0826e71dd32c51ef4ee96..6c3586a4c95635780cc4adf7a8f14ed62cda6b24
@@@ -455,7 -455,7 +455,7 @@@ static int rts51x_check_status(struct u
        u8 buf[16];
  
        retval = rts51x_read_status(us, lun, buf, 16, &(chip->status_len));
 -      if (retval < 0)
 +      if (retval != STATUS_SUCCESS)
                return -EIO;
  
        US_DEBUGP("chip->status_len = %d\n", chip->status_len);
@@@ -883,7 -883,7 +883,7 @@@ static void rts51x_invoke_transport(str
                } else {
                        US_DEBUGP("%s: NOT working scsi, not SS\n", __func__);
                        chip->proto_handler_backup(srb, us);
-                       /* Check wether card is plugged in */
+                       /* Check whether card is plugged in */
                        if (srb->cmnd[0] == TEST_UNIT_READY) {
                                if (srb->result == SAM_STAT_GOOD) {
                                        SET_LUN_READY(chip, srb->device->lun);
index 79e7e4d45eb242b42aeb20ab14dfe73aaabfa565,509ed1ab03eff55109294e1acbfe036653c9a043..d670130ee687e803407a10075608bb883ab70451
@@@ -34,6 -34,7 +34,6 @@@
  #include <linux/ctype.h>
  #include <linux/compat.h>
  #include <linux/eventfd.h>
 -#include <linux/vhost.h>
  #include <linux/fs.h>
  #include <linux/miscdevice.h>
  #include <asm/unaligned.h>
@@@ -230,7 -231,7 +230,7 @@@ static struct se_node_acl *tcm_vhost_al
  
        nacl = kzalloc(sizeof(struct tcm_vhost_nacl), GFP_KERNEL);
        if (!nacl) {
-               pr_err("Unable to alocate struct tcm_vhost_nacl\n");
+               pr_err("Unable to allocate struct tcm_vhost_nacl\n");
                return NULL;
        }
  
@@@ -414,12 -415,14 +414,12 @@@ static struct tcm_vhost_cmd *vhost_scsi
  {
        struct tcm_vhost_cmd *tv_cmd;
        struct tcm_vhost_nexus *tv_nexus;
 -      struct se_session *se_sess;
  
        tv_nexus = tv_tpg->tpg_nexus;
        if (!tv_nexus) {
                pr_err("Unable to locate active struct tcm_vhost_nexus\n");
                return ERR_PTR(-EIO);
        }
 -      se_sess = tv_nexus->tvn_se_sess;
  
        tv_cmd = kzalloc(sizeof(struct tcm_vhost_cmd), GFP_ATOMIC);
        if (!tv_cmd) {
@@@ -892,7 -895,6 +892,7 @@@ static int vhost_scsi_release(struct in
                vhost_scsi_clear_endpoint(s, &backend);
        }
  
 +      vhost_dev_stop(&s->dev);
        vhost_dev_cleanup(&s->dev, false);
        kfree(s);
        return 0;
@@@ -968,10 -970,7 +968,10 @@@ static long vhost_scsi_ioctl(struct fil
                return vhost_scsi_set_features(vs, features);
        default:
                mutex_lock(&vs->dev.mutex);
 -              r = vhost_dev_ioctl(&vs->dev, ioctl, arg);
 +              r = vhost_dev_ioctl(&vs->dev, ioctl, argp);
 +              /* TODO: flush backend after dev ioctl. */
 +              if (r == -ENOIOCTLCMD)
 +                      r = vhost_vring_ioctl(&vs->dev, ioctl, argp);
                mutex_unlock(&vs->dev.mutex);
                return r;
        }
diff --combined fs/hugetlbfs/inode.c
index 4a55f35a6cedb81cb0f7ce81893d57fa10d0a4b8,c98d0665fa5c979ac26ed0c979c770cd2a68a99b..78bde32ea9518d3fffe72d24864b6959bb369781
@@@ -1,7 -1,7 +1,7 @@@
  /*
   * hugetlbpage-backed filesystem.  Based on ramfs.
   *
-  * William Irwin, 2002
+  * Nadia Yvette Chambers, 2002
   *
   * Copyright (C) 2002 Linus Torvalds.
   */
@@@ -151,8 -151,8 +151,8 @@@ hugetlb_get_unmapped_area(struct file *
  {
        struct mm_struct *mm = current->mm;
        struct vm_area_struct *vma;
 -      unsigned long start_addr;
        struct hstate *h = hstate_file(file);
 +      struct vm_unmapped_area_info info;
  
        if (len & ~huge_page_mask(h))
                return -EINVAL;
                        return addr;
        }
  
 -      if (len > mm->cached_hole_size)
 -              start_addr = mm->free_area_cache;
 -      else {
 -              start_addr = TASK_UNMAPPED_BASE;
 -              mm->cached_hole_size = 0;
 -      }
 -
 -full_search:
 -      addr = ALIGN(start_addr, huge_page_size(h));
 -
 -      for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
 -              /* At this point:  (!vma || addr < vma->vm_end). */
 -              if (TASK_SIZE - len < addr) {
 -                      /*
 -                       * Start a new search - just in case we missed
 -                       * some holes.
 -                       */
 -                      if (start_addr != TASK_UNMAPPED_BASE) {
 -                              start_addr = TASK_UNMAPPED_BASE;
 -                              mm->cached_hole_size = 0;
 -                              goto full_search;
 -                      }
 -                      return -ENOMEM;
 -              }
 -
 -              if (!vma || addr + len <= vma->vm_start) {
 -                      mm->free_area_cache = addr + len;
 -                      return addr;
 -              }
 -              if (addr + mm->cached_hole_size < vma->vm_start)
 -                      mm->cached_hole_size = vma->vm_start - addr;
 -              addr = ALIGN(vma->vm_end, huge_page_size(h));
 -      }
 +      info.flags = 0;
 +      info.length = len;
 +      info.low_limit = TASK_UNMAPPED_BASE;
 +      info.high_limit = TASK_SIZE;
 +      info.align_mask = PAGE_MASK & ~huge_page_mask(h);
 +      info.align_offset = 0;
 +      return vm_unmapped_area(&info);
  }
  #endif
  
@@@ -582,11 -608,11 +582,11 @@@ static int hugetlbfs_migrate_page(struc
        int rc;
  
        rc = migrate_huge_page_move_mapping(mapping, newpage, page);
 -      if (rc)
 +      if (rc != MIGRATEPAGE_SUCCESS)
                return rc;
        migrate_page_copy(newpage, page);
  
 -      return 0;
 +      return MIGRATEPAGE_SUCCESS;
  }
  
  static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf)
@@@ -897,7 -923,7 +897,7 @@@ static struct file_system_type hugetlbf
        .kill_sb        = kill_litter_super,
  };
  
 -static struct vfsmount *hugetlbfs_vfsmount;
 +static struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
  
  static int can_do_hugetlb_shm(void)
  {
        return capable(CAP_IPC_LOCK) || in_group_p(shm_group);
  }
  
 +static int get_hstate_idx(int page_size_log)
 +{
 +      struct hstate *h;
 +
 +      if (!page_size_log)
 +              return default_hstate_idx;
 +      h = size_to_hstate(1 << page_size_log);
 +      if (!h)
 +              return -1;
 +      return h - hstates;
 +}
 +
  struct file *hugetlb_file_setup(const char *name, unsigned long addr,
                                size_t size, vm_flags_t acctflag,
 -                              struct user_struct **user, int creat_flags)
 +                              struct user_struct **user,
 +                              int creat_flags, int page_size_log)
  {
        int error = -ENOMEM;
        struct file *file;
        struct qstr quick_string;
        struct hstate *hstate;
        unsigned long num_pages;
 +      int hstate_idx;
 +
 +      hstate_idx = get_hstate_idx(page_size_log);
 +      if (hstate_idx < 0)
 +              return ERR_PTR(-ENODEV);
  
        *user = NULL;
 -      if (!hugetlbfs_vfsmount)
 +      if (!hugetlbfs_vfsmount[hstate_idx])
                return ERR_PTR(-ENOENT);
  
        if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
                }
        }
  
 -      root = hugetlbfs_vfsmount->mnt_root;
 +      root = hugetlbfs_vfsmount[hstate_idx]->mnt_root;
        quick_string.name = name;
        quick_string.len = strlen(quick_string.name);
        quick_string.hash = 0;
        if (!path.dentry)
                goto out_shm_unlock;
  
 -      path.mnt = mntget(hugetlbfs_vfsmount);
 +      path.mnt = mntget(hugetlbfs_vfsmount[hstate_idx]);
        error = -ENOSPC;
        inode = hugetlbfs_get_inode(root->d_sb, NULL, S_IFREG | S_IRWXUGO, 0);
        if (!inode)
@@@ -1003,9 -1011,8 +1003,9 @@@ out_shm_unlock
  
  static int __init init_hugetlbfs_fs(void)
  {
 +      struct hstate *h;
        int error;
 -      struct vfsmount *vfsmount;
 +      int i;
  
        error = bdi_init(&hugetlbfs_backing_dev_info);
        if (error)
        if (error)
                goto out;
  
 -      vfsmount = kern_mount(&hugetlbfs_fs_type);
 +      i = 0;
 +      for_each_hstate(h) {
 +              char buf[50];
 +              unsigned ps_kb = 1U << (h->order + PAGE_SHIFT - 10);
  
 -      if (!IS_ERR(vfsmount)) {
 -              hugetlbfs_vfsmount = vfsmount;
 -              return 0;
 -      }
 +              snprintf(buf, sizeof(buf), "pagesize=%uK", ps_kb);
 +              hugetlbfs_vfsmount[i] = kern_mount_data(&hugetlbfs_fs_type,
 +                                                      buf);
  
 -      error = PTR_ERR(vfsmount);
 +              if (IS_ERR(hugetlbfs_vfsmount[i])) {
 +                      pr_err("hugetlb: Cannot mount internal hugetlbfs for "
 +                              "page size %uK", ps_kb);
 +                      error = PTR_ERR(hugetlbfs_vfsmount[i]);
 +                      hugetlbfs_vfsmount[i] = NULL;
 +              }
 +              i++;
 +      }
 +      /* Non default hstates are optional */
 +      if (!IS_ERR_OR_NULL(hugetlbfs_vfsmount[default_hstate_idx]))
 +              return 0;
  
   out:
        kmem_cache_destroy(hugetlbfs_inode_cachep);
  
  static void __exit exit_hugetlbfs_fs(void)
  {
 +      struct hstate *h;
 +      int i;
 +
 +
        /*
         * Make sure all delayed rcu free inodes are flushed before we
         * destroy cache.
         */
        rcu_barrier();
        kmem_cache_destroy(hugetlbfs_inode_cachep);
 -      kern_unmount(hugetlbfs_vfsmount);
 +      i = 0;
 +      for_each_hstate(h)
 +              kern_unmount(hugetlbfs_vfsmount[i++]);
        unregister_filesystem(&hugetlbfs_fs_type);
        bdi_destroy(&hugetlbfs_backing_dev_info);
  }
diff --combined fs/jbd/transaction.c
index 7f5120bf0ec29cff214cc8ccb2a23bfb02ad3419,8b472c8bbf7ae1bf307878e555f54267285b72eb..071d6905f0dd92c57dc2a8e6a5e62f81993ca5e8
@@@ -1259,7 -1259,7 +1259,7 @@@ int journal_forget (handle_t *handle, s
                goto not_jbd;
        }
  
-       /* keep track of wether or not this transaction modified us */
+       /* keep track of whether or not this transaction modified us */
        was_modified = jh->b_modified;
  
        /*
@@@ -1961,9 -1961,7 +1961,9 @@@ retry
                        spin_unlock(&journal->j_list_lock);
                        jbd_unlock_bh_state(bh);
                        spin_unlock(&journal->j_state_lock);
 +                      unlock_buffer(bh);
                        log_wait_commit(journal, tid);
 +                      lock_buffer(bh);
                        goto retry;
                }
                /*
index ef9336c9d4648c00ade2eee1c423cd46bfc8b02b,b2056e6e2acc67888b660bae5ad05036c32bd653..02e0f6b156c3f2dc7c2cae5c663cbdbfd6341484
@@@ -369,7 -369,7 +369,7 @@@ typedef enum gro_result gro_result_t
   *
   * If the rx_handler consider the skb should be ignored, it should return
   * RX_HANDLER_EXACT. The skb will only be delivered to protocol handlers that
-  * are registred on exact device (ptype->dev == skb->dev).
+  * are registered on exact device (ptype->dev == skb->dev).
   *
   * If the rx_handler didn't changed skb->dev, but want the skb to be normally
   * delivered, it should return RX_HANDLER_PASS.
@@@ -887,10 -887,6 +887,10 @@@ struct netdev_fcoe_hbainfo 
   *                   struct net_device *dev, int idx)
   *    Used to add FDB entries to dump requests. Implementers should add
   *    entries to skb and update idx with the number of entries.
 + *
 + * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh)
 + * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq,
 + *                         struct net_device *dev)
   */
  struct net_device_ops {
        int                     (*ndo_init)(struct net_device *dev);
                                                struct netlink_callback *cb,
                                                struct net_device *dev,
                                                int idx);
 +
 +      int                     (*ndo_bridge_setlink)(struct net_device *dev,
 +                                                    struct nlmsghdr *nlh);
 +      int                     (*ndo_bridge_getlink)(struct sk_buff *skb,
 +                                                    u32 pid, u32 seq,
 +                                                    struct net_device *dev);
  };
  
  /*
@@@ -1063,12 -1053,6 +1063,12 @@@ struct net_device 
        netdev_features_t       wanted_features;
        /* mask of features inheritable by VLAN devices */
        netdev_features_t       vlan_features;
 +      /* mask of features inherited by encapsulating devices
 +       * This field indicates what encapsulation offloads
 +       * the hardware is capable of doing, and drivers will
 +       * need to set them appropriately.
 +       */
 +      netdev_features_t       hw_enc_features;
  
        /* Interface index. Unique device identifier    */
        int                     ifindex;
@@@ -1504,9 -1488,6 +1504,9 @@@ struct napi_gro_cb 
  
        /* Used in ipv6_gro_receive() */
        int     proto;
 +
 +      /* used in skb_gro_receive() slow path */
 +      struct sk_buff *last;
  };
  
  #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
@@@ -1518,25 -1499,16 +1518,25 @@@ struct packet_type 
                                         struct net_device *,
                                         struct packet_type *,
                                         struct net_device *);
 +      bool                    (*id_match)(struct packet_type *ptype,
 +                                          struct sock *sk);
 +      void                    *af_packet_priv;
 +      struct list_head        list;
 +};
 +
 +struct offload_callbacks {
        struct sk_buff          *(*gso_segment)(struct sk_buff *skb,
                                                netdev_features_t features);
        int                     (*gso_send_check)(struct sk_buff *skb);
        struct sk_buff          **(*gro_receive)(struct sk_buff **head,
                                               struct sk_buff *skb);
        int                     (*gro_complete)(struct sk_buff *skb);
 -      bool                    (*id_match)(struct packet_type *ptype,
 -                                          struct sock *sk);
 -      void                    *af_packet_priv;
 -      struct list_head        list;
 +};
 +
 +struct packet_offload {
 +      __be16                   type;  /* This is really htons(ether_type). */
 +      struct offload_callbacks callbacks;
 +      struct list_head         list;
  };
  
  #include <linux/notifier.h>
@@@ -1576,8 -1548,6 +1576,8 @@@ extern int call_netdevice_notifiers(uns
  
  extern rwlock_t                               dev_base_lock;          /* Device list lock */
  
 +extern seqlock_t      devnet_rename_seq;      /* Device rename lock */
 +
  
  #define for_each_netdev(net, d)               \
                list_for_each_entry(d, &(net)->dev_base_head, dev_list)
@@@ -1635,9 -1605,6 +1635,9 @@@ extern struct net_device *__dev_getfirs
  extern void           dev_add_pack(struct packet_type *pt);
  extern void           dev_remove_pack(struct packet_type *pt);
  extern void           __dev_remove_pack(struct packet_type *pt);
 +extern void           dev_add_offload(struct packet_offload *po);
 +extern void           dev_remove_offload(struct packet_offload *po);
 +extern void           __dev_remove_offload(struct packet_offload *po);
  
  extern struct net_device      *dev_get_by_flags_rcu(struct net *net, unsigned short flags,
                                                      unsigned short mask);
@@@ -2162,10 -2129,16 +2162,10 @@@ extern void dev_kfree_skb_any(struct sk
  extern int            netif_rx(struct sk_buff *skb);
  extern int            netif_rx_ni(struct sk_buff *skb);
  extern int            netif_receive_skb(struct sk_buff *skb);
 -extern gro_result_t   dev_gro_receive(struct napi_struct *napi,
 -                                      struct sk_buff *skb);
 -extern gro_result_t   napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
  extern gro_result_t   napi_gro_receive(struct napi_struct *napi,
                                         struct sk_buff *skb);
  extern void           napi_gro_flush(struct napi_struct *napi, bool flush_old);
  extern struct sk_buff *       napi_get_frags(struct napi_struct *napi);
 -extern gro_result_t   napi_frags_finish(struct napi_struct *napi,
 -                                        struct sk_buff *skb,
 -                                        gro_result_t ret);
  extern gro_result_t   napi_gro_frags(struct napi_struct *napi);
  
  static inline void napi_free_frags(struct napi_struct *napi)
diff --combined include/linux/stmmac.h
index de5b2f8176ce27d5c1dad489129585e3296d0d0a,a619f7025cc94cb69ecaa86b99c55f0e2711a134..c1b3ed3fb78715fbe868ab531d07e20b00fc05cd
@@@ -61,7 -61,7 +61,7 @@@
  #define STMMAC_CSR_I_16               0xE     /* clk_csr_i/16 */
  #define STMMAC_CSR_I_18               0xF     /* clk_csr_i/18 */
  
- /* AXI DMA Burst length suported */
+ /* AXI DMA Burst length supported */
  #define DMA_AXI_BLEN_4                (1 << 1)
  #define DMA_AXI_BLEN_8                (1 << 2)
  #define DMA_AXI_BLEN_16               (1 << 3)
@@@ -104,7 -104,6 +104,7 @@@ struct plat_stmmacenet_data 
        int bugged_jumbo;
        int pmt;
        int force_sf_dma_mode;
 +      int riwt_off;
        void (*fix_mac_speed)(void *priv, unsigned int speed);
        void (*bus_setup)(void __iomem *ioaddr);
        int (*init)(struct platform_device *pdev);
diff --combined include/net/sock.h
index 0a9a01a5b0d7bf9e2f88b3614165dbdcd1920a8c,a95e0756e56e8e8aada329adffebcdf89bb75527..93a6745bfdb2bb14933018a9bbc497e6b1c0cde7
@@@ -126,17 -126,12 +126,17 @@@ struct sock
  struct proto;
  struct net;
  
 +typedef __u32 __bitwise __portpair;
 +typedef __u64 __bitwise __addrpair;
 +
  /**
   *    struct sock_common - minimal network layer representation of sockets
   *    @skc_daddr: Foreign IPv4 addr
   *    @skc_rcv_saddr: Bound local IPv4 addr
   *    @skc_hash: hash value used with various protocol lookup tables
   *    @skc_u16hashes: two u16 hash values used by UDP lookup tables
 + *    @skc_dport: placeholder for inet_dport/tw_dport
 + *    @skc_num: placeholder for inet_num/tw_num
   *    @skc_family: network address family
   *    @skc_state: Connection state
   *    @skc_reuse: %SO_REUSEADDR setting
   *    for struct sock and struct inet_timewait_sock.
   */
  struct sock_common {
 -      /* skc_daddr and skc_rcv_saddr must be grouped :
 -       * cf INET_MATCH() and INET_TW_MATCH()
 +      /* skc_daddr and skc_rcv_saddr must be grouped on a 8 bytes aligned
 +       * address on 64bit arches : cf INET_MATCH() and INET_TW_MATCH()
         */
 -      __be32                  skc_daddr;
 -      __be32                  skc_rcv_saddr;
 -
 +      union {
 +              __addrpair      skc_addrpair;
 +              struct {
 +                      __be32  skc_daddr;
 +                      __be32  skc_rcv_saddr;
 +              };
 +      };
        union  {
                unsigned int    skc_hash;
                __u16           skc_u16hashes[2];
        };
 +      /* skc_dport && skc_num must be grouped as well */
 +      union {
 +              __portpair      skc_portpair;
 +              struct {
 +                      __be16  skc_dport;
 +                      __u16   skc_num;
 +              };
 +      };
 +
        unsigned short          skc_family;
        volatile unsigned char  skc_state;
        unsigned char           skc_reuse;
@@@ -231,7 -213,7 +231,7 @@@ struct cg_proto
    *   @sk_sndbuf: size of send buffer in bytes
    *   @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE,
    *              %SO_OOBINLINE settings, %SO_TIMESTAMPING settings
-   *   @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets
+   *   @sk_no_check: %SO_NO_CHECK setting, whether or not checkup packets
    *   @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO)
    *   @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK)
    *   @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4)
diff --combined kernel/trace/ftrace.c
index 7693aaf324c655d325b1739014c032aba76856b4,b1a817c14ed54bb03f28f59fcfe14136c4667cde..afd092de45b71c45a9b3be6b70ed8dc0db085a0a
@@@ -10,7 -10,7 +10,7 @@@
   * Based on code in the latency_tracer, that is:
   *
   *  Copyright (C) 2004-2006 Ingo Molnar
-  *  Copyright (C) 2004 William Lee Irwin III
+  *  Copyright (C) 2004 Nadia Yvette Chambers
   */
  
  #include <linux/stop_machine.h>
@@@ -2437,7 -2437,7 +2437,7 @@@ static void reset_iter_read(struct ftra
  {
        iter->pos = 0;
        iter->func_pos = 0;
 -      iter->flags &= ~(FTRACE_ITER_PRINTALL & FTRACE_ITER_HASH);
 +      iter->flags &= ~(FTRACE_ITER_PRINTALL | FTRACE_ITER_HASH);
  }
  
  static void *t_start(struct seq_file *m, loff_t *pos)
@@@ -2868,7 -2868,7 +2868,7 @@@ static int __init ftrace_mod_cmd_init(v
  {
        return register_ftrace_command(&ftrace_mod_cmd);
  }
 -device_initcall(ftrace_mod_cmd_init);
 +core_initcall(ftrace_mod_cmd_init);
  
  static void function_trace_probe_call(unsigned long ip, unsigned long parent_ip,
                                      struct ftrace_ops *op, struct pt_regs *pt_regs)
@@@ -4055,7 -4055,7 +4055,7 @@@ static int __init ftrace_nodyn_init(voi
        ftrace_enabled = 1;
        return 0;
  }
 -device_initcall(ftrace_nodyn_init);
 +core_initcall(ftrace_nodyn_init);
  
  static inline int ftrace_init_dyn_debugfs(struct dentry *d_tracer) { return 0; }
  static inline void ftrace_startup_enable(int command) { }
@@@ -4381,7 -4381,7 +4381,7 @@@ ftrace_pid_write(struct file *filp, con
        if (strlen(tmp) == 0)
                return 1;
  
 -      ret = strict_strtol(tmp, 10, &val);
 +      ret = kstrtol(tmp, 10, &val);
        if (ret < 0)
                return ret;
  
diff --combined kernel/trace/trace.c
index b69cc380322dbfe17983e582a9537d6e53e1ce7b,3cff052715fe79571620de4aace9c2295d7c318b..61e081b4ba1199c7c7da9f44c6b7f9fa9e87eeb2
@@@ -9,7 -9,7 +9,7 @@@
   *
   * Based on code from the latency_tracer, that is:
   *  Copyright (C) 2004-2006 Ingo Molnar
-  *  Copyright (C) 2004 William Lee Irwin III
+  *  Copyright (C) 2004 Nadia Yvette Chambers
   */
  #include <linux/ring_buffer.h>
  #include <generated/utsrelease.h>
@@@ -19,7 -19,6 +19,7 @@@
  #include <linux/seq_file.h>
  #include <linux/notifier.h>
  #include <linux/irqflags.h>
 +#include <linux/irq_work.h>
  #include <linux/debugfs.h>
  #include <linux/pagemap.h>
  #include <linux/hardirq.h>
@@@ -78,21 -77,6 +78,21 @@@ static int dummy_set_flag(u32 old_flags
        return 0;
  }
  
 +/*
 + * To prevent the comm cache from being overwritten when no
 + * tracing is active, only save the comm when a trace event
 + * occurred.
 + */
 +static DEFINE_PER_CPU(bool, trace_cmdline_save);
 +
 +/*
 + * When a reader is waiting for data, then this variable is
 + * set to true.
 + */
 +static bool trace_wakeup_needed;
 +
 +static struct irq_work trace_work_wakeup;
 +
  /*
   * Kill all tracing for good (never come back).
   * It is initialized to 1 but will turn to zero if the initialization
@@@ -155,18 -139,6 +155,18 @@@ static int __init set_ftrace_dump_on_oo
  }
  __setup("ftrace_dump_on_oops", set_ftrace_dump_on_oops);
  
 +
 +static char trace_boot_options_buf[MAX_TRACER_SIZE] __initdata;
 +static char *trace_boot_options __initdata;
 +
 +static int __init set_trace_boot_options(char *str)
 +{
 +      strncpy(trace_boot_options_buf, str, MAX_TRACER_SIZE);
 +      trace_boot_options = trace_boot_options_buf;
 +      return 0;
 +}
 +__setup("trace_options=", set_trace_boot_options);
 +
  unsigned long long ns2usecs(cycle_t nsec)
  {
        nsec += 500;
@@@ -226,9 -198,20 +226,9 @@@ static struct trace_array max_tr
  
  static DEFINE_PER_CPU(struct trace_array_cpu, max_tr_data);
  
 -/* tracer_enabled is used to toggle activation of a tracer */
 -static int                    tracer_enabled = 1;
 -
 -/**
 - * tracing_is_enabled - return tracer_enabled status
 - *
 - * This function is used by other tracers to know the status
 - * of the tracer_enabled flag.  Tracers may use this function
 - * to know if it should enable their features when starting
 - * up. See irqsoff tracer for an example (start_irqsoff_tracer).
 - */
  int tracing_is_enabled(void)
  {
 -      return tracer_enabled;
 +      return tracing_is_on();
  }
  
  /*
@@@ -350,18 -333,12 +350,18 @@@ unsigned long trace_flags = TRACE_ITER_
  static int trace_stop_count;
  static DEFINE_RAW_SPINLOCK(tracing_start_lock);
  
 -static void wakeup_work_handler(struct work_struct *work)
 +/**
 + * trace_wake_up - wake up tasks waiting for trace input
 + *
 + * Schedules a delayed work to wake up any task that is blocked on the
 + * trace_wait queue. These is used with trace_poll for tasks polling the
 + * trace.
 + */
 +static void trace_wake_up(struct irq_work *work)
  {
 -      wake_up(&trace_wait);
 -}
 +      wake_up_all(&trace_wait);
  
 -static DECLARE_DELAYED_WORK(wakeup_work, wakeup_work_handler);
 +}
  
  /**
   * tracing_on - enable tracing buffers
@@@ -416,6 -393,22 +416,6 @@@ int tracing_is_on(void
  }
  EXPORT_SYMBOL_GPL(tracing_is_on);
  
 -/**
 - * trace_wake_up - wake up tasks waiting for trace input
 - *
 - * Schedules a delayed work to wake up any task that is blocked on the
 - * trace_wait queue. These is used with trace_poll for tasks polling the
 - * trace.
 - */
 -void trace_wake_up(void)
 -{
 -      const unsigned long delay = msecs_to_jiffies(2);
 -
 -      if (trace_flags & TRACE_ITER_BLOCK)
 -              return;
 -      schedule_delayed_work(&wakeup_work, delay);
 -}
 -
  static int __init set_buf_size(char *str)
  {
        unsigned long buf_size;
@@@ -438,7 -431,7 +438,7 @@@ static int __init set_tracing_thresh(ch
  
        if (!str)
                return 0;
 -      ret = strict_strtoul(str, 0, &threshold);
 +      ret = kstrtoul(str, 0, &threshold);
        if (ret < 0)
                return 0;
        tracing_thresh = threshold * 1000;
@@@ -484,12 -477,10 +484,12 @@@ static const char *trace_options[] = 
  static struct {
        u64 (*func)(void);
        const char *name;
 +      int in_ns;              /* is this clock in nanoseconds? */
  } trace_clocks[] = {
 -      { trace_clock_local,    "local" },
 -      { trace_clock_global,   "global" },
 -      { trace_clock_counter,  "counter" },
 +      { trace_clock_local,    "local",        1 },
 +      { trace_clock_global,   "global",       1 },
 +      { trace_clock_counter,  "counter",      0 },
 +      ARCH_TRACE_CLOCKS
  };
  
  int trace_clock_id;
@@@ -766,40 -757,6 +766,40 @@@ update_max_tr_single(struct trace_arra
  }
  #endif /* CONFIG_TRACER_MAX_TRACE */
  
 +static void default_wait_pipe(struct trace_iterator *iter)
 +{
 +      DEFINE_WAIT(wait);
 +
 +      prepare_to_wait(&trace_wait, &wait, TASK_INTERRUPTIBLE);
 +
 +      /*
 +       * The events can happen in critical sections where
 +       * checking a work queue can cause deadlocks.
 +       * After adding a task to the queue, this flag is set
 +       * only to notify events to try to wake up the queue
 +       * using irq_work.
 +       *
 +       * We don't clear it even if the buffer is no longer
 +       * empty. The flag only causes the next event to run
 +       * irq_work to do the work queue wake up. The worse
 +       * that can happen if we race with !trace_empty() is that
 +       * an event will cause an irq_work to try to wake up
 +       * an empty queue.
 +       *
 +       * There's no reason to protect this flag either, as
 +       * the work queue and irq_work logic will do the necessary
 +       * synchronization for the wake ups. The only thing
 +       * that is necessary is that the wake up happens after
 +       * a task has been queued. It's OK for spurious wake ups.
 +       */
 +      trace_wakeup_needed = true;
 +
 +      if (trace_empty(iter))
 +              schedule();
 +
 +      finish_wait(&trace_wait, &wait);
 +}
 +
  /**
   * register_tracer - register a tracer with the ftrace system.
   * @type - the plugin for the tracer
@@@ -918,6 -875,32 +918,6 @@@ int register_tracer(struct tracer *type
        return ret;
  }
  
 -void unregister_tracer(struct tracer *type)
 -{
 -      struct tracer **t;
 -
 -      mutex_lock(&trace_types_lock);
 -      for (t = &trace_types; *t; t = &(*t)->next) {
 -              if (*t == type)
 -                      goto found;
 -      }
 -      pr_info("Tracer %s not registered\n", type->name);
 -      goto out;
 -
 - found:
 -      *t = (*t)->next;
 -
 -      if (type == current_trace && tracer_enabled) {
 -              tracer_enabled = 0;
 -              tracing_stop();
 -              if (current_trace->stop)
 -                      current_trace->stop(&global_trace);
 -              current_trace = &nop_trace;
 -      }
 -out:
 -      mutex_unlock(&trace_types_lock);
 -}
 -
  void tracing_reset(struct trace_array *tr, int cpu)
  {
        struct ring_buffer *buffer = tr->buffer;
@@@ -1148,14 -1131,10 +1148,14 @@@ void trace_find_cmdline(int pid, char c
  
  void tracing_record_cmdline(struct task_struct *tsk)
  {
 -      if (atomic_read(&trace_record_cmdline_disabled) || !tracer_enabled ||
 -          !tracing_is_on())
 +      if (atomic_read(&trace_record_cmdline_disabled) || !tracing_is_on())
                return;
  
 +      if (!__this_cpu_read(trace_cmdline_save))
 +              return;
 +
 +      __this_cpu_write(trace_cmdline_save, false);
 +
        trace_save_cmdline(tsk);
  }
  
@@@ -1199,36 -1178,27 +1199,36 @@@ trace_buffer_lock_reserve(struct ring_b
        return event;
  }
  
 +void
 +__buffer_unlock_commit(struct ring_buffer *buffer, struct ring_buffer_event *event)
 +{
 +      __this_cpu_write(trace_cmdline_save, true);
 +      if (trace_wakeup_needed) {
 +              trace_wakeup_needed = false;
 +              /* irq_work_queue() supplies it's own memory barriers */
 +              irq_work_queue(&trace_work_wakeup);
 +      }
 +      ring_buffer_unlock_commit(buffer, event);
 +}
 +
  static inline void
  __trace_buffer_unlock_commit(struct ring_buffer *buffer,
                             struct ring_buffer_event *event,
 -                           unsigned long flags, int pc,
 -                           int wake)
 +                           unsigned long flags, int pc)
  {
 -      ring_buffer_unlock_commit(buffer, event);
 +      __buffer_unlock_commit(buffer, event);
  
        ftrace_trace_stack(buffer, flags, 6, pc);
        ftrace_trace_userstack(buffer, flags, pc);
 -
 -      if (wake)
 -              trace_wake_up();
  }
  
  void trace_buffer_unlock_commit(struct ring_buffer *buffer,
                                struct ring_buffer_event *event,
                                unsigned long flags, int pc)
  {
 -      __trace_buffer_unlock_commit(buffer, event, flags, pc, 1);
 +      __trace_buffer_unlock_commit(buffer, event, flags, pc);
  }
 +EXPORT_SYMBOL_GPL(trace_buffer_unlock_commit);
  
  struct ring_buffer_event *
  trace_current_buffer_lock_reserve(struct ring_buffer **current_rb,
@@@ -1245,21 -1215,29 +1245,21 @@@ void trace_current_buffer_unlock_commit
                                        struct ring_buffer_event *event,
                                        unsigned long flags, int pc)
  {
 -      __trace_buffer_unlock_commit(buffer, event, flags, pc, 1);
 +      __trace_buffer_unlock_commit(buffer, event, flags, pc);
  }
  EXPORT_SYMBOL_GPL(trace_current_buffer_unlock_commit);
  
 -void trace_nowake_buffer_unlock_commit(struct ring_buffer *buffer,
 -                                     struct ring_buffer_event *event,
 -                                     unsigned long flags, int pc)
 +void trace_buffer_unlock_commit_regs(struct ring_buffer *buffer,
 +                                   struct ring_buffer_event *event,
 +                                   unsigned long flags, int pc,
 +                                   struct pt_regs *regs)
  {
 -      __trace_buffer_unlock_commit(buffer, event, flags, pc, 0);
 -}
 -EXPORT_SYMBOL_GPL(trace_nowake_buffer_unlock_commit);
 -
 -void trace_nowake_buffer_unlock_commit_regs(struct ring_buffer *buffer,
 -                                          struct ring_buffer_event *event,
 -                                          unsigned long flags, int pc,
 -                                          struct pt_regs *regs)
 -{
 -      ring_buffer_unlock_commit(buffer, event);
 +      __buffer_unlock_commit(buffer, event);
  
        ftrace_trace_stack_regs(buffer, flags, 0, pc, regs);
        ftrace_trace_userstack(buffer, flags, pc);
  }
 -EXPORT_SYMBOL_GPL(trace_nowake_buffer_unlock_commit_regs);
 +EXPORT_SYMBOL_GPL(trace_buffer_unlock_commit_regs);
  
  void trace_current_buffer_discard_commit(struct ring_buffer *buffer,
                                         struct ring_buffer_event *event)
@@@ -1291,7 -1269,7 +1291,7 @@@ trace_function(struct trace_array *tr
        entry->parent_ip                = parent_ip;
  
        if (!filter_check_discard(call, entry, buffer, event))
 -              ring_buffer_unlock_commit(buffer, event);
 +              __buffer_unlock_commit(buffer, event);
  }
  
  void
@@@ -1384,7 -1362,7 +1384,7 @@@ static void __ftrace_trace_stack(struc
        entry->size = trace.nr_entries;
  
        if (!filter_check_discard(call, entry, buffer, event))
 -              ring_buffer_unlock_commit(buffer, event);
 +              __buffer_unlock_commit(buffer, event);
  
   out:
        /* Again, don't let gcc optimize things here */
@@@ -1480,7 -1458,7 +1480,7 @@@ ftrace_trace_userstack(struct ring_buff
  
        save_stack_trace_user(&trace);
        if (!filter_check_discard(call, entry, buffer, event))
 -              ring_buffer_unlock_commit(buffer, event);
 +              __buffer_unlock_commit(buffer, event);
  
   out_drop_count:
        __this_cpu_dec(user_stack_count);
@@@ -1581,10 -1559,10 +1581,10 @@@ static int alloc_percpu_trace_buffer(vo
        return -ENOMEM;
  }
  
 +static int buffers_allocated;
 +
  void trace_printk_init_buffers(void)
  {
 -      static int buffers_allocated;
 -
        if (buffers_allocated)
                return;
  
  
        pr_info("ftrace: Allocated trace_printk buffers\n");
  
 +      /* Expand the buffers to set size */
 +      tracing_update_buffers();
 +
        buffers_allocated = 1;
 +
 +      /*
 +       * trace_printk_init_buffers() can be called by modules.
 +       * If that happens, then we need to start cmdline recording
 +       * directly here. If the global_trace.buffer is already
 +       * allocated here, then this was called by module code.
 +       */
 +      if (global_trace.buffer)
 +              tracing_start_cmdline_record();
 +}
 +
 +void trace_printk_start_comm(void)
 +{
 +      /* Start tracing comms if trace printk is set */
 +      if (!buffers_allocated)
 +              return;
 +      tracing_start_cmdline_record();
 +}
 +
 +static void trace_printk_start_stop_comm(int enabled)
 +{
 +      if (!buffers_allocated)
 +              return;
 +
 +      if (enabled)
 +              tracing_start_cmdline_record();
 +      else
 +              tracing_stop_cmdline_record();
  }
  
  /**
@@@ -1675,7 -1622,7 +1675,7 @@@ int trace_vbprintk(unsigned long ip, co
  
        memcpy(entry->buf, tbuffer, sizeof(u32) * len);
        if (!filter_check_discard(call, entry, buffer, event)) {
 -              ring_buffer_unlock_commit(buffer, event);
 +              __buffer_unlock_commit(buffer, event);
                ftrace_trace_stack(buffer, flags, 6, pc);
        }
  
@@@ -1746,7 -1693,7 +1746,7 @@@ int trace_array_vprintk(struct trace_ar
        memcpy(&entry->buf, tbuffer, len);
        entry->buf[len] = '\0';
        if (!filter_check_discard(call, entry, buffer, event)) {
 -              ring_buffer_unlock_commit(buffer, event);
 +              __buffer_unlock_commit(buffer, event);
                ftrace_trace_stack(buffer, flags, 6, pc);
        }
   out:
@@@ -2479,10 -2426,6 +2479,10 @@@ __tracing_open(struct inode *inode, str
        if (ring_buffer_overruns(iter->tr->buffer))
                iter->iter_flags |= TRACE_FILE_ANNOTATE;
  
 +      /* Output in nanoseconds only if we are using a clock in nanoseconds. */
 +      if (trace_clocks[trace_clock_id].in_ns)
 +              iter->iter_flags |= TRACE_FILE_TIME_IN_NS;
 +
        /* stop the trace while dumping */
        tracing_stop();
  
@@@ -2851,19 -2794,26 +2851,19 @@@ static void set_tracer_flags(unsigned i
  
        if (mask == TRACE_ITER_OVERWRITE)
                ring_buffer_change_overwrite(global_trace.buffer, enabled);
 +
 +      if (mask == TRACE_ITER_PRINTK)
 +              trace_printk_start_stop_comm(enabled);
  }
  
 -static ssize_t
 -tracing_trace_options_write(struct file *filp, const char __user *ubuf,
 -                      size_t cnt, loff_t *ppos)
 +static int trace_set_options(char *option)
  {
 -      char buf[64];
        char *cmp;
        int neg = 0;
 -      int ret;
 +      int ret = 0;
        int i;
  
 -      if (cnt >= sizeof(buf))
 -              return -EINVAL;
 -
 -      if (copy_from_user(&buf, ubuf, cnt))
 -              return -EFAULT;
 -
 -      buf[cnt] = 0;
 -      cmp = strstrip(buf);
 +      cmp = strstrip(option);
  
        if (strncmp(cmp, "no", 2) == 0) {
                neg = 1;
                mutex_lock(&trace_types_lock);
                ret = set_tracer_option(current_trace, cmp, neg);
                mutex_unlock(&trace_types_lock);
 -              if (ret)
 -                      return ret;
        }
  
 +      return ret;
 +}
 +
 +static ssize_t
 +tracing_trace_options_write(struct file *filp, const char __user *ubuf,
 +                      size_t cnt, loff_t *ppos)
 +{
 +      char buf[64];
 +
 +      if (cnt >= sizeof(buf))
 +              return -EINVAL;
 +
 +      if (copy_from_user(&buf, ubuf, cnt))
 +              return -EFAULT;
 +
 +      trace_set_options(buf);
 +
        *ppos += cnt;
  
        return cnt;
@@@ -3004,6 -2939,56 +3004,6 @@@ static const struct file_operations tra
      .llseek   = generic_file_llseek,
  };
  
 -static ssize_t
 -tracing_ctrl_read(struct file *filp, char __user *ubuf,
 -                size_t cnt, loff_t *ppos)
 -{
 -      char buf[64];
 -      int r;
 -
 -      r = sprintf(buf, "%u\n", tracer_enabled);
 -      return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
 -}
 -
 -static ssize_t
 -tracing_ctrl_write(struct file *filp, const char __user *ubuf,
 -                 size_t cnt, loff_t *ppos)
 -{
 -      struct trace_array *tr = filp->private_data;
 -      unsigned long val;
 -      int ret;
 -
 -      ret = kstrtoul_from_user(ubuf, cnt, 10, &val);
 -      if (ret)
 -              return ret;
 -
 -      val = !!val;
 -
 -      mutex_lock(&trace_types_lock);
 -      if (tracer_enabled ^ val) {
 -
 -              /* Only need to warn if this is used to change the state */
 -              WARN_ONCE(1, "tracing_enabled is deprecated. Use tracing_on");
 -
 -              if (val) {
 -                      tracer_enabled = 1;
 -                      if (current_trace->start)
 -                              current_trace->start(tr);
 -                      tracing_start();
 -              } else {
 -                      tracer_enabled = 0;
 -                      tracing_stop();
 -                      if (current_trace->stop)
 -                              current_trace->stop(tr);
 -              }
 -      }
 -      mutex_unlock(&trace_types_lock);
 -
 -      *ppos += cnt;
 -
 -      return cnt;
 -}
 -
  static ssize_t
  tracing_set_trace_read(struct file *filp, char __user *ubuf,
                       size_t cnt, loff_t *ppos)
@@@ -3045,10 -3030,6 +3045,10 @@@ static int __tracing_resize_ring_buffer
         */
        ring_buffer_expanded = 1;
  
 +      /* May be called before buffers are initialized */
 +      if (!global_trace.buffer)
 +              return 0;
 +
        ret = ring_buffer_resize(global_trace.buffer, size, cpu);
        if (ret < 0)
                return ret;
@@@ -3344,10 -3325,6 +3344,10 @@@ static int tracing_open_pipe(struct ino
        if (trace_flags & TRACE_ITER_LATENCY_FMT)
                iter->iter_flags |= TRACE_FILE_LAT_FMT;
  
 +      /* Output in nanoseconds only if we are using a clock in nanoseconds. */
 +      if (trace_clocks[trace_clock_id].in_ns)
 +              iter->iter_flags |= TRACE_FILE_TIME_IN_NS;
 +
        iter->cpu_file = cpu_file;
        iter->tr = &global_trace;
        mutex_init(&iter->mutex);
@@@ -3408,6 -3385,19 +3408,6 @@@ tracing_poll_pipe(struct file *filp, po
        }
  }
  
 -
 -void default_wait_pipe(struct trace_iterator *iter)
 -{
 -      DEFINE_WAIT(wait);
 -
 -      prepare_to_wait(&trace_wait, &wait, TASK_INTERRUPTIBLE);
 -
 -      if (trace_empty(iter))
 -              schedule();
 -
 -      finish_wait(&trace_wait, &wait);
 -}
 -
  /*
   * This is a make-shift waitqueue.
   * A tracer might use this callback on some rare cases:
@@@ -3448,7 -3438,7 +3448,7 @@@ static int tracing_wait_pipe(struct fil
                        return -EINTR;
  
                /*
 -               * We block until we read something and tracing is disabled.
 +               * We block until we read something and tracing is enabled.
                 * We still block if tracing is disabled, but we have never
                 * read anything. This allows a user to cat this file, and
                 * then enable tracing. But after we have read something,
                 *
                 * iter->pos will be 0 if we haven't read anything.
                 */
 -              if (!tracer_enabled && iter->pos)
 +              if (tracing_is_enabled() && iter->pos)
                        break;
        }
  
@@@ -3965,7 -3955,7 +3965,7 @@@ tracing_mark_write(struct file *filp, c
        } else
                entry->buf[cnt] = '\0';
  
 -      ring_buffer_unlock_commit(buffer, event);
 +      __buffer_unlock_commit(buffer, event);
  
        written = cnt;
  
@@@ -4026,14 -4016,6 +4026,14 @@@ static ssize_t tracing_clock_write(stru
        if (max_tr.buffer)
                ring_buffer_set_clock(max_tr.buffer, trace_clocks[i].func);
  
 +      /*
 +       * New clock may not be consistent with the previous clock.
 +       * Reset the buffer so that it doesn't have incomparable timestamps.
 +       */
 +      tracing_reset_online_cpus(&global_trace);
 +      if (max_tr.buffer)
 +              tracing_reset_online_cpus(&max_tr);
 +
        mutex_unlock(&trace_types_lock);
  
        *fpos += cnt;
@@@ -4055,6 -4037,13 +4055,6 @@@ static const struct file_operations tra
        .llseek         = generic_file_llseek,
  };
  
 -static const struct file_operations tracing_ctrl_fops = {
 -      .open           = tracing_open_generic,
 -      .read           = tracing_ctrl_read,
 -      .write          = tracing_ctrl_write,
 -      .llseek         = generic_file_llseek,
 -};
 -
  static const struct file_operations set_tracer_fops = {
        .open           = tracing_open_generic,
        .read           = tracing_set_trace_read,
@@@ -4388,27 -4377,13 +4388,27 @@@ tracing_stats_read(struct file *filp, c
        cnt = ring_buffer_bytes_cpu(tr->buffer, cpu);
        trace_seq_printf(s, "bytes: %ld\n", cnt);
  
 -      t = ns2usecs(ring_buffer_oldest_event_ts(tr->buffer, cpu));
 -      usec_rem = do_div(t, USEC_PER_SEC);
 -      trace_seq_printf(s, "oldest event ts: %5llu.%06lu\n", t, usec_rem);
 +      if (trace_clocks[trace_clock_id].in_ns) {
 +              /* local or global for trace_clock */
 +              t = ns2usecs(ring_buffer_oldest_event_ts(tr->buffer, cpu));
 +              usec_rem = do_div(t, USEC_PER_SEC);
 +              trace_seq_printf(s, "oldest event ts: %5llu.%06lu\n",
 +                                                              t, usec_rem);
 +
 +              t = ns2usecs(ring_buffer_time_stamp(tr->buffer, cpu));
 +              usec_rem = do_div(t, USEC_PER_SEC);
 +              trace_seq_printf(s, "now ts: %5llu.%06lu\n", t, usec_rem);
 +      } else {
 +              /* counter or tsc mode for trace_clock */
 +              trace_seq_printf(s, "oldest event ts: %llu\n",
 +                              ring_buffer_oldest_event_ts(tr->buffer, cpu));
 +
 +              trace_seq_printf(s, "now ts: %llu\n",
 +                              ring_buffer_time_stamp(tr->buffer, cpu));
 +      }
  
 -      t = ns2usecs(ring_buffer_time_stamp(tr->buffer, cpu));
 -      usec_rem = do_div(t, USEC_PER_SEC);
 -      trace_seq_printf(s, "now ts: %5llu.%06lu\n", t, usec_rem);
 +      cnt = ring_buffer_dropped_events_cpu(tr->buffer, cpu);
 +      trace_seq_printf(s, "dropped events: %ld\n", cnt);
  
        count = simple_read_from_buffer(ubuf, count, ppos, s->buffer, s->len);
  
@@@ -4840,6 -4815,9 +4840,6 @@@ static __init int tracer_init_debugfs(v
  
        d_tracer = tracing_init_dentry();
  
 -      trace_create_file("tracing_enabled", 0644, d_tracer,
 -                      &global_trace, &tracing_ctrl_fops);
 -
        trace_create_file("trace_options", 0644, d_tracer,
                        NULL, &tracing_iter_fops);
  
@@@ -5111,7 -5089,6 +5111,7 @@@ __init static int tracer_alloc_buffers(
  
        /* Only allocate trace_printk buffers if a trace_printk exists */
        if (__stop___trace_bprintk_fmt != __start___trace_bprintk_fmt)
 +              /* Must be called before global_trace.buffer is allocated */
                trace_printk_init_buffers();
  
        /* To save memory, keep the ring buffer size to its minimum */
  #endif
  
        trace_init_cmdlines();
 +      init_irq_work(&trace_work_wakeup, trace_wake_up);
  
        register_tracer(&nop_trace);
        current_trace = &nop_trace;
  
        register_die_notifier(&trace_die_notifier);
  
 +      while (trace_boot_options) {
 +              char *option;
 +
 +              option = strsep(&trace_boot_options, ",");
 +              trace_set_options(option);
 +      }
 +
        return 0;
  
  out_free_cpumask:
index bb227e380cb574f9eb629b5ac162fcab8b34b1b3,c7b83d03ff681ed74418c007e1a680f7636b3c69..8e3ad8082ab7074fde4ea9da403961afd2eadc45
@@@ -7,7 -7,7 +7,7 @@@
   * Based on code from the latency_tracer, that is:
   *
   *  Copyright (C) 2004-2006 Ingo Molnar
-  *  Copyright (C) 2004 William Lee Irwin III
+  *  Copyright (C) 2004 Nadia Yvette Chambers
   */
  #include <linux/ring_buffer.h>
  #include <linux/debugfs.h>
@@@ -366,7 -366,7 +366,7 @@@ ftrace_trace_onoff_callback(struct ftra
         * We use the callback data field (which is a pointer)
         * as our counter.
         */
 -      ret = strict_strtoul(number, 0, (unsigned long *)&count);
 +      ret = kstrtoul(number, 0, (unsigned long *)&count);
        if (ret)
                return ret;
  
@@@ -411,4 -411,5 +411,4 @@@ static __init int init_function_trace(v
        init_func_cmd_traceon();
        return register_tracer(&function_trace);
  }
 -device_initcall(init_function_trace);
 -
 +core_initcall(init_function_trace);
index 5ffce7b0f33c71d5fae15d8ead377aded9d0fd88,cddb3b40bf7b0b9d0ef0cb3b48e3f3b29048f0a4..713a2cac48816461c0c0a5b11d5a854ea5c4b3d3
@@@ -7,7 -7,7 +7,7 @@@
   * From code in the latency_tracer, that is:
   *
   *  Copyright (C) 2004-2006 Ingo Molnar
-  *  Copyright (C) 2004 William Lee Irwin III
+  *  Copyright (C) 2004 Nadia Yvette Chambers
   */
  #include <linux/kallsyms.h>
  #include <linux/debugfs.h>
@@@ -604,7 -604,7 +604,7 @@@ static struct tracer irqsoff_tracer __r
        .reset          = irqsoff_tracer_reset,
        .start          = irqsoff_tracer_start,
        .stop           = irqsoff_tracer_stop,
 -      .print_max      = 1,
 +      .print_max      = true,
        .print_header   = irqsoff_print_header,
        .print_line     = irqsoff_print_line,
        .flags          = &tracer_flags,
  #endif
        .open           = irqsoff_trace_open,
        .close          = irqsoff_trace_close,
 -      .use_max_tr     = 1,
 +      .use_max_tr     = true,
  };
  # define register_irqsoff(trace) register_tracer(&trace)
  #else
@@@ -637,7 -637,7 +637,7 @@@ static struct tracer preemptoff_tracer 
        .reset          = irqsoff_tracer_reset,
        .start          = irqsoff_tracer_start,
        .stop           = irqsoff_tracer_stop,
 -      .print_max      = 1,
 +      .print_max      = true,
        .print_header   = irqsoff_print_header,
        .print_line     = irqsoff_print_line,
        .flags          = &tracer_flags,
  #endif
        .open           = irqsoff_trace_open,
        .close          = irqsoff_trace_close,
 -      .use_max_tr     = 1,
 +      .use_max_tr     = true,
  };
  # define register_preemptoff(trace) register_tracer(&trace)
  #else
@@@ -672,7 -672,7 +672,7 @@@ static struct tracer preemptirqsoff_tra
        .reset          = irqsoff_tracer_reset,
        .start          = irqsoff_tracer_start,
        .stop           = irqsoff_tracer_stop,
 -      .print_max      = 1,
 +      .print_max      = true,
        .print_header   = irqsoff_print_header,
        .print_line     = irqsoff_print_line,
        .flags          = &tracer_flags,
  #endif
        .open           = irqsoff_trace_open,
        .close          = irqsoff_trace_close,
 -      .use_max_tr     = 1,
 +      .use_max_tr     = true,
  };
  
  # define register_preemptirqsoff(trace) register_tracer(&trace)
@@@ -698,4 -698,4 +698,4 @@@ __init static int init_irqsoff_tracer(v
  
        return 0;
  }
 -device_initcall(init_irqsoff_tracer);
 +core_initcall(init_irqsoff_tracer);
index bc64fc1375542415bb258f635226b76e056f1909,45464947a5ffad5b2c9a23d4734c4f37a9cab29e..9fe45fcefca084b804b37d8a4f782fdafa87f1bb
@@@ -7,7 -7,7 +7,7 @@@
   * Based on code from the latency_tracer, that is:
   *
   *  Copyright (C) 2004-2006 Ingo Molnar
-  *  Copyright (C) 2004 William Lee Irwin III
+  *  Copyright (C) 2004 Nadia Yvette Chambers
   */
  #include <linux/module.h>
  #include <linux/fs.h>
@@@ -589,7 -589,7 +589,7 @@@ static struct tracer wakeup_tracer __re
        .reset          = wakeup_tracer_reset,
        .start          = wakeup_tracer_start,
        .stop           = wakeup_tracer_stop,
 -      .print_max      = 1,
 +      .print_max      = true,
        .print_header   = wakeup_print_header,
        .print_line     = wakeup_print_line,
        .flags          = &tracer_flags,
  #endif
        .open           = wakeup_trace_open,
        .close          = wakeup_trace_close,
 -      .use_max_tr     = 1,
 +      .use_max_tr     = true,
  };
  
  static struct tracer wakeup_rt_tracer __read_mostly =
        .start          = wakeup_tracer_start,
        .stop           = wakeup_tracer_stop,
        .wait_pipe      = poll_wait_pipe,
 -      .print_max      = 1,
 +      .print_max      = true,
        .print_header   = wakeup_print_header,
        .print_line     = wakeup_print_line,
        .flags          = &tracer_flags,
  #endif
        .open           = wakeup_trace_open,
        .close          = wakeup_trace_close,
 -      .use_max_tr     = 1,
 +      .use_max_tr     = true,
  };
  
  __init static int init_wakeup_tracer(void)
  
        return 0;
  }
 -device_initcall(init_wakeup_tracer);
 +core_initcall(init_wakeup_tracer);
diff --combined lib/Kconfig.debug
index 41faf0b8df1df9f2f5d9cb12eb01980526025ec4,cba01d71db8621d64c75213e0b792f36c9fb40ff..e458782f3c52ac69f88d05d10233fd32b330a7fb
@@@ -972,7 -972,7 +972,7 @@@ config RCU_CPU_STALL_TIMEOU
        int "RCU CPU stall timeout in seconds"
        depends on TREE_RCU || TREE_PREEMPT_RCU
        range 3 300
 -      default 60
 +      default 21
        help
          If a given RCU grace period extends more than the specified
          number of seconds, a CPU stall warning is printed.  If the
@@@ -1115,7 -1115,7 +1115,7 @@@ config NOTIFIER_ERROR_INJECTIO
        depends on DEBUG_KERNEL
        select DEBUG_FS
        help
-         This option provides the ability to inject artifical errors to
+         This option provides the ability to inject artificial errors to
          specified notifier chain callbacks. It is useful to test the error
          handling of notifier call chain failures.
  
@@@ -1126,7 -1126,7 +1126,7 @@@ config CPU_NOTIFIER_ERROR_INJEC
        depends on HOTPLUG_CPU && NOTIFIER_ERROR_INJECTION
        help
          This option provides a kernel module that can be used to test
-         the error handling of the cpu notifiers by injecting artifical
+         the error handling of the cpu notifiers by injecting artificial
          errors to CPU notifier chain callbacks.  It is controlled through
          debugfs interface under /sys/kernel/debug/notifier-error-inject/cpu
  
@@@ -1150,7 -1150,7 +1150,7 @@@ config PM_NOTIFIER_ERROR_INJEC
        depends on PM && NOTIFIER_ERROR_INJECTION
        default m if PM_DEBUG
        help
-         This option provides the ability to inject artifical errors to
+         This option provides the ability to inject artificial errors to
          PM notifier chain callbacks.  It is controlled through debugfs
          interface /sys/kernel/debug/notifier-error-inject/pm
  
@@@ -1173,7 -1173,7 +1173,7 @@@ config MEMORY_NOTIFIER_ERROR_INJEC
        tristate "Memory hotplug notifier error injection module"
        depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
        help
-         This option provides the ability to inject artifical errors to
+         This option provides the ability to inject artificial errors to
          memory hotplug notifier chain callbacks.  It is controlled through
          debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
  
@@@ -1196,7 -1196,7 +1196,7 @@@ config PSERIES_RECONFIG_NOTIFIER_ERROR_
        tristate "pSeries reconfig notifier error injection module"
        depends on PPC_PSERIES && NOTIFIER_ERROR_INJECTION
        help
-         This option provides the ability to inject artifical errors to
+         This option provides the ability to inject artificial errors to
          pSeries reconfig notifier chain callbacks.  It is controlled
          through debugfs interface under
          /sys/kernel/debug/notifier-error-inject/pSeries-reconfig/
diff --combined mm/hugetlb.c
index 1ef2cd4ae3c98229ffe9a244985c4c49da3fbb00,3b7a20ea3808fa04f2104e517cfb9f355e3c1e02..34f372ad89d0b1269e7fab6f3e900cb5c77d78bf
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * Generic hugetlb support.
-  * (C) William Irwin, April 2004
+  * (C) Nadia Yvette Chambers, April 2004
   */
  #include <linux/list.h>
  #include <linux/init.h>
@@@ -1800,7 -1800,7 +1800,7 @@@ static void hugetlb_unregister_all_node
         * remove hstate attributes from any nodes that have them.
         */
        for (nid = 0; nid < nr_node_ids; nid++)
 -              hugetlb_unregister_node(&node_devices[nid]);
 +              hugetlb_unregister_node(node_devices[nid]);
  }
  
  /*
@@@ -1845,7 -1845,7 +1845,7 @@@ static void hugetlb_register_all_nodes(
        int nid;
  
        for_each_node_state(nid, N_HIGH_MEMORY) {
 -              struct node *node = &node_devices[nid];
 +              struct node *node = node_devices[nid];
                if (node->dev.id == nid)
                        hugetlb_register_node(node);
        }
diff --combined mm/memory_hotplug.c
index de9cb14ae753ee2cfe7854201aa1bfb3d2e1f480,bb81b7f417a86d15fb3d0f06107bf6c03190c5a1..c3e66ae411fd079bbcf98bda257b2247125a85e6
@@@ -106,6 -106,7 +106,6 @@@ static void get_page_bootmem(unsigned l
  void __ref put_page_bootmem(struct page *page)
  {
        unsigned long type;
 -      struct zone *zone;
  
        type = (unsigned long) page->lru.next;
        BUG_ON(type < MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE ||
                set_page_private(page, 0);
                INIT_LIST_HEAD(&page->lru);
                __free_pages_bootmem(page, 0);
 -
 -              zone = page_zone(page);
 -              zone_span_writelock(zone);
 -              zone->present_pages++;
 -              zone_span_writeunlock(zone);
 -              totalram_pages++;
        }
  
  }
@@@ -205,7 -212,7 +205,7 @@@ static void grow_zone_span(struct zone 
        zone_span_writelock(zone);
  
        old_zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages;
 -      if (start_pfn < zone->zone_start_pfn)
 +      if (!zone->spanned_pages || start_pfn < zone->zone_start_pfn)
                zone->zone_start_pfn = start_pfn;
  
        zone->spanned_pages = max(old_zone_end_pfn, end_pfn) -
        zone_span_writeunlock(zone);
  }
  
 +static void resize_zone(struct zone *zone, unsigned long start_pfn,
 +              unsigned long end_pfn)
 +{
 +      zone_span_writelock(zone);
 +
 +      if (end_pfn - start_pfn) {
 +              zone->zone_start_pfn = start_pfn;
 +              zone->spanned_pages = end_pfn - start_pfn;
 +      } else {
 +              /*
 +               * make it consist as free_area_init_core(),
 +               * if spanned_pages = 0, then keep start_pfn = 0
 +               */
 +              zone->zone_start_pfn = 0;
 +              zone->spanned_pages = 0;
 +      }
 +
 +      zone_span_writeunlock(zone);
 +}
 +
 +static void fix_zone_id(struct zone *zone, unsigned long start_pfn,
 +              unsigned long end_pfn)
 +{
 +      enum zone_type zid = zone_idx(zone);
 +      int nid = zone->zone_pgdat->node_id;
 +      unsigned long pfn;
 +
 +      for (pfn = start_pfn; pfn < end_pfn; pfn++)
 +              set_page_links(pfn_to_page(pfn), zid, nid, pfn);
 +}
 +
 +static int __meminit move_pfn_range_left(struct zone *z1, struct zone *z2,
 +              unsigned long start_pfn, unsigned long end_pfn)
 +{
 +      int ret;
 +      unsigned long flags;
 +      unsigned long z1_start_pfn;
 +
 +      if (!z1->wait_table) {
 +              ret = init_currently_empty_zone(z1, start_pfn,
 +                      end_pfn - start_pfn, MEMMAP_HOTPLUG);
 +              if (ret)
 +                      return ret;
 +      }
 +
 +      pgdat_resize_lock(z1->zone_pgdat, &flags);
 +
 +      /* can't move pfns which are higher than @z2 */
 +      if (end_pfn > z2->zone_start_pfn + z2->spanned_pages)
 +              goto out_fail;
 +      /* the move out part mast at the left most of @z2 */
 +      if (start_pfn > z2->zone_start_pfn)
 +              goto out_fail;
 +      /* must included/overlap */
 +      if (end_pfn <= z2->zone_start_pfn)
 +              goto out_fail;
 +
 +      /* use start_pfn for z1's start_pfn if z1 is empty */
 +      if (z1->spanned_pages)
 +              z1_start_pfn = z1->zone_start_pfn;
 +      else
 +              z1_start_pfn = start_pfn;
 +
 +      resize_zone(z1, z1_start_pfn, end_pfn);
 +      resize_zone(z2, end_pfn, z2->zone_start_pfn + z2->spanned_pages);
 +
 +      pgdat_resize_unlock(z1->zone_pgdat, &flags);
 +
 +      fix_zone_id(z1, start_pfn, end_pfn);
 +
 +      return 0;
 +out_fail:
 +      pgdat_resize_unlock(z1->zone_pgdat, &flags);
 +      return -1;
 +}
 +
 +static int __meminit move_pfn_range_right(struct zone *z1, struct zone *z2,
 +              unsigned long start_pfn, unsigned long end_pfn)
 +{
 +      int ret;
 +      unsigned long flags;
 +      unsigned long z2_end_pfn;
 +
 +      if (!z2->wait_table) {
 +              ret = init_currently_empty_zone(z2, start_pfn,
 +                      end_pfn - start_pfn, MEMMAP_HOTPLUG);
 +              if (ret)
 +                      return ret;
 +      }
 +
 +      pgdat_resize_lock(z1->zone_pgdat, &flags);
 +
 +      /* can't move pfns which are lower than @z1 */
 +      if (z1->zone_start_pfn > start_pfn)
 +              goto out_fail;
 +      /* the move out part mast at the right most of @z1 */
 +      if (z1->zone_start_pfn + z1->spanned_pages >  end_pfn)
 +              goto out_fail;
 +      /* must included/overlap */
 +      if (start_pfn >= z1->zone_start_pfn + z1->spanned_pages)
 +              goto out_fail;
 +
 +      /* use end_pfn for z2's end_pfn if z2 is empty */
 +      if (z2->spanned_pages)
 +              z2_end_pfn = z2->zone_start_pfn + z2->spanned_pages;
 +      else
 +              z2_end_pfn = end_pfn;
 +
 +      resize_zone(z1, z1->zone_start_pfn, start_pfn);
 +      resize_zone(z2, start_pfn, z2_end_pfn);
 +
 +      pgdat_resize_unlock(z1->zone_pgdat, &flags);
 +
 +      fix_zone_id(z2, start_pfn, end_pfn);
 +
 +      return 0;
 +out_fail:
 +      pgdat_resize_unlock(z1->zone_pgdat, &flags);
 +      return -1;
 +}
 +
  static void grow_pgdat_span(struct pglist_data *pgdat, unsigned long start_pfn,
                            unsigned long end_pfn)
  {
        unsigned long old_pgdat_end_pfn =
                pgdat->node_start_pfn + pgdat->node_spanned_pages;
  
 -      if (start_pfn < pgdat->node_start_pfn)
 +      if (!pgdat->node_spanned_pages || start_pfn < pgdat->node_start_pfn)
                pgdat->node_start_pfn = start_pfn;
  
        pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) -
@@@ -581,61 -467,8 +581,61 @@@ static int online_pages_range(unsigned 
        return 0;
  }
  
 +/* ensure every online node has NORMAL memory */
 +static bool can_online_high_movable(struct zone *zone)
 +{
 +      return node_state(zone_to_nid(zone), N_NORMAL_MEMORY);
 +}
 +
 +/* check which state of node_states will be changed when online memory */
 +static void node_states_check_changes_online(unsigned long nr_pages,
 +      struct zone *zone, struct memory_notify *arg)
 +{
 +      int nid = zone_to_nid(zone);
 +      enum zone_type zone_last = ZONE_NORMAL;
 +
 +      /*
 +       * If we have HIGHMEM, node_states[N_NORMAL_MEMORY] contains nodes
 +       * which have 0...ZONE_NORMAL, set zone_last to ZONE_NORMAL.
 +       *
 +       * If we don't have HIGHMEM, node_states[N_NORMAL_MEMORY] contains nodes
 +       * which have 0...ZONE_MOVABLE, set zone_last to ZONE_MOVABLE.
 +       */
 +      if (N_HIGH_MEMORY == N_NORMAL_MEMORY)
 +              zone_last = ZONE_MOVABLE;
 +
 +      /*
 +       * if the memory to be online is in a zone of 0...zone_last, and
 +       * the zones of 0...zone_last don't have memory before online, we will
 +       * need to set the node to node_states[N_NORMAL_MEMORY] after
 +       * the memory is online.
 +       */
 +      if (zone_idx(zone) <= zone_last && !node_state(nid, N_NORMAL_MEMORY))
 +              arg->status_change_nid_normal = nid;
 +      else
 +              arg->status_change_nid_normal = -1;
 +
 +      /*
 +       * if the node don't have memory befor online, we will need to
 +       * set the node to node_states[N_HIGH_MEMORY] after the memory
 +       * is online.
 +       */
 +      if (!node_state(nid, N_HIGH_MEMORY))
 +              arg->status_change_nid = nid;
 +      else
 +              arg->status_change_nid = -1;
 +}
  
 -int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
 +static void node_states_set_node(int node, struct memory_notify *arg)
 +{
 +      if (arg->status_change_nid_normal >= 0)
 +              node_set_state(node, N_NORMAL_MEMORY);
 +
 +      node_set_state(node, N_HIGH_MEMORY);
 +}
 +
 +
 +int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_type)
  {
        unsigned long onlined_pages = 0;
        struct zone *zone;
        struct memory_notify arg;
  
        lock_memory_hotplug();
 +      /*
 +       * This doesn't need a lock to do pfn_to_page().
 +       * The section can't be removed here because of the
 +       * memory_block->state_mutex.
 +       */
 +      zone = page_zone(pfn_to_page(pfn));
 +
 +      if ((zone_idx(zone) > ZONE_NORMAL || online_type == ONLINE_MOVABLE) &&
 +          !can_online_high_movable(zone)) {
 +              unlock_memory_hotplug();
 +              return -1;
 +      }
 +
 +      if (online_type == ONLINE_KERNEL && zone_idx(zone) == ZONE_MOVABLE) {
 +              if (move_pfn_range_left(zone - 1, zone, pfn, pfn + nr_pages)) {
 +                      unlock_memory_hotplug();
 +                      return -1;
 +              }
 +      }
 +      if (online_type == ONLINE_MOVABLE && zone_idx(zone) == ZONE_MOVABLE - 1) {
 +              if (move_pfn_range_right(zone, zone + 1, pfn, pfn + nr_pages)) {
 +                      unlock_memory_hotplug();
 +                      return -1;
 +              }
 +      }
 +
 +      /* Previous code may changed the zone of the pfn range */
 +      zone = page_zone(pfn_to_page(pfn));
 +
        arg.start_pfn = pfn;
        arg.nr_pages = nr_pages;
 -      arg.status_change_nid = -1;
 +      node_states_check_changes_online(nr_pages, zone, &arg);
  
        nid = page_to_nid(pfn_to_page(pfn));
 -      if (node_present_pages(nid) == 0)
 -              arg.status_change_nid = nid;
  
        ret = memory_notify(MEM_GOING_ONLINE, &arg);
        ret = notifier_to_errno(ret);
                unlock_memory_hotplug();
                return ret;
        }
 -      /*
 -       * This doesn't need a lock to do pfn_to_page().
 -       * The section can't be removed here because of the
 -       * memory_block->state_mutex.
 -       */
 -      zone = page_zone(pfn_to_page(pfn));
        /*
         * If this zone is not populated, then it is not in zonelist.
         * This means the page allocator ignores this zone.
         * So, zonelist must be updated after online.
         */
        mutex_lock(&zonelists_mutex);
 -      if (!populated_zone(zone))
 +      if (!populated_zone(zone)) {
                need_zonelists_rebuild = 1;
 +              build_all_zonelists(NULL, zone);
 +      }
  
        ret = walk_system_ram_range(pfn, nr_pages, &onlined_pages,
                online_pages_range);
        if (ret) {
 +              if (need_zonelists_rebuild)
 +                      zone_pcp_reset(zone);
                mutex_unlock(&zonelists_mutex);
                printk(KERN_DEBUG "online_pages [mem %#010llx-%#010llx] failed\n",
                       (unsigned long long) pfn << PAGE_SHIFT,
        zone->present_pages += onlined_pages;
        zone->zone_pgdat->node_present_pages += onlined_pages;
        if (onlined_pages) {
 -              node_set_state(zone_to_nid(zone), N_HIGH_MEMORY);
 +              node_states_set_node(zone_to_nid(zone), &arg);
                if (need_zonelists_rebuild)
 -                      build_all_zonelists(NULL, zone);
 +                      build_all_zonelists(NULL, NULL);
                else
                        zone_pcp_update(zone);
        }
@@@ -1046,7 -854,7 +1046,7 @@@ check_pages_isolated_cb(unsigned long s
  {
        int ret;
        long offlined = *(long *)data;
 -      ret = test_pages_isolated(start_pfn, start_pfn + nr_pages);
 +      ret = test_pages_isolated(start_pfn, start_pfn + nr_pages, true);
        offlined = nr_pages;
        if (!ret)
                *(long *)data += offlined;
@@@ -1066,91 -874,6 +1066,91 @@@ check_pages_isolated(unsigned long star
        return offlined;
  }
  
 +/* ensure the node has NORMAL memory if it is still online */
 +static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
 +{
 +      struct pglist_data *pgdat = zone->zone_pgdat;
 +      unsigned long present_pages = 0;
 +      enum zone_type zt;
 +
 +      for (zt = 0; zt <= ZONE_NORMAL; zt++)
 +              present_pages += pgdat->node_zones[zt].present_pages;
 +
 +      if (present_pages > nr_pages)
 +              return true;
 +
 +      present_pages = 0;
 +      for (; zt <= ZONE_MOVABLE; zt++)
 +              present_pages += pgdat->node_zones[zt].present_pages;
 +
 +      /*
 +       * we can't offline the last normal memory until all
 +       * higher memory is offlined.
 +       */
 +      return present_pages == 0;
 +}
 +
 +/* check which state of node_states will be changed when offline memory */
 +static void node_states_check_changes_offline(unsigned long nr_pages,
 +              struct zone *zone, struct memory_notify *arg)
 +{
 +      struct pglist_data *pgdat = zone->zone_pgdat;
 +      unsigned long present_pages = 0;
 +      enum zone_type zt, zone_last = ZONE_NORMAL;
 +
 +      /*
 +       * If we have HIGHMEM, node_states[N_NORMAL_MEMORY] contains nodes
 +       * which have 0...ZONE_NORMAL, set zone_last to ZONE_NORMAL.
 +       *
 +       * If we don't have HIGHMEM, node_states[N_NORMAL_MEMORY] contains nodes
 +       * which have 0...ZONE_MOVABLE, set zone_last to ZONE_MOVABLE.
 +       */
 +      if (N_HIGH_MEMORY == N_NORMAL_MEMORY)
 +              zone_last = ZONE_MOVABLE;
 +
 +      /*
 +       * check whether node_states[N_NORMAL_MEMORY] will be changed.
 +       * If the memory to be offline is in a zone of 0...zone_last,
 +       * and it is the last present memory, 0...zone_last will
 +       * become empty after offline , thus we can determind we will
 +       * need to clear the node from node_states[N_NORMAL_MEMORY].
 +       */
 +      for (zt = 0; zt <= zone_last; zt++)
 +              present_pages += pgdat->node_zones[zt].present_pages;
 +      if (zone_idx(zone) <= zone_last && nr_pages >= present_pages)
 +              arg->status_change_nid_normal = zone_to_nid(zone);
 +      else
 +              arg->status_change_nid_normal = -1;
 +
 +      /*
 +       * node_states[N_HIGH_MEMORY] contains nodes which have 0...ZONE_MOVABLE
 +       */
 +      zone_last = ZONE_MOVABLE;
 +
 +      /*
 +       * check whether node_states[N_HIGH_MEMORY] will be changed
 +       * If we try to offline the last present @nr_pages from the node,
 +       * we can determind we will need to clear the node from
 +       * node_states[N_HIGH_MEMORY].
 +       */
 +      for (; zt <= zone_last; zt++)
 +              present_pages += pgdat->node_zones[zt].present_pages;
 +      if (nr_pages >= present_pages)
 +              arg->status_change_nid = zone_to_nid(zone);
 +      else
 +              arg->status_change_nid = -1;
 +}
 +
 +static void node_states_clear_node(int node, struct memory_notify *arg)
 +{
 +      if (arg->status_change_nid_normal >= 0)
 +              node_clear_state(node, N_NORMAL_MEMORY);
 +
 +      if ((N_HIGH_MEMORY != N_NORMAL_MEMORY) &&
 +          (arg->status_change_nid >= 0))
 +              node_clear_state(node, N_HIGH_MEMORY);
 +}
 +
  static int __ref __offline_pages(unsigned long start_pfn,
                  unsigned long end_pfn, unsigned long timeout)
  {
        node = zone_to_nid(zone);
        nr_pages = end_pfn - start_pfn;
  
 +      ret = -EINVAL;
 +      if (zone_idx(zone) <= ZONE_NORMAL && !can_offline_normal(zone, nr_pages))
 +              goto out;
 +
        /* set above range as isolated */
 -      ret = start_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE);
 +      ret = start_isolate_page_range(start_pfn, end_pfn,
 +                                     MIGRATE_MOVABLE, true);
        if (ret)
                goto out;
  
        arg.start_pfn = start_pfn;
        arg.nr_pages = nr_pages;
 -      arg.status_change_nid = -1;
 -      if (nr_pages >= node_present_pages(node))
 -              arg.status_change_nid = node;
 +      node_states_check_changes_offline(nr_pages, zone, &arg);
  
        ret = memory_notify(MEM_GOING_OFFLINE, &arg);
        ret = notifier_to_errno(ret);
@@@ -1230,10 -950,10 +1230,10 @@@ repeat
                        goto repeat;
                }
        }
-       /* drain all zone's lru pagevec, this is asyncronous... */
+       /* drain all zone's lru pagevec, this is asynchronous... */
        lru_add_drain_all();
        yield();
-       /* drain pcp pages , this is synchrouns. */
+       /* drain pcp pages, this is synchronous. */
        drain_all_pages();
        /* check again */
        offlined_pages = check_pages_isolated(start_pfn, end_pfn);
                goto failed_removal;
        }
        printk(KERN_INFO "Offlined Pages %ld\n", offlined_pages);
-       /* Ok, all of our target is islaoted.
+       /* Ok, all of our target is isolated.
           We cannot do rollback at this point. */
        offline_isolated_pages(start_pfn, end_pfn);
        /* reset pagetype flags and makes migrate type to be MOVABLE */
        } else
                zone_pcp_update(zone);
  
 -      if (!node_present_pages(node)) {
 -              node_clear_state(node, N_HIGH_MEMORY);
 +      node_states_clear_node(node, &arg);
 +      if (arg.status_change_nid >= 0)
                kswapd_stop(node);
 -      }
  
        vm_total_pages = nr_free_pagecache_pages();
        writeback_set_ratelimit();
diff --combined mm/page_alloc.c
index 5a8d339d282a88cd0c5687596eca8023f93846ba,57806b7e118bdf22133636ada8769aa84f9e6936..eee3efa58c9122d55620be79c86f986e0f24d3c6
@@@ -523,7 -523,7 +523,7 @@@ static inline int page_is_buddy(struct 
   * If a block is freed, and its buddy is also free, then this
   * triggers coalescing into a block of larger size.
   *
-  * -- wli
+  * -- nyc
   */
  
  static inline void __free_one_page(struct page *page,
@@@ -667,13 -667,11 +667,13 @@@ static void free_pcppages_bulk(struct z
                        /* MIGRATE_MOVABLE list may include MIGRATE_RESERVEs */
                        __free_one_page(page, zone, 0, mt);
                        trace_mm_page_pcpu_drain(page, 0, mt);
 -                      if (is_migrate_cma(mt))
 -                              __mod_zone_page_state(zone, NR_FREE_CMA_PAGES, 1);
 +                      if (likely(get_pageblock_migratetype(page) != MIGRATE_ISOLATE)) {
 +                              __mod_zone_page_state(zone, NR_FREE_PAGES, 1);
 +                              if (is_migrate_cma(mt))
 +                                      __mod_zone_page_state(zone, NR_FREE_CMA_PAGES, 1);
 +                      }
                } while (--to_free && --batch_free && !list_empty(list));
        }
 -      __mod_zone_page_state(zone, NR_FREE_PAGES, count);
        spin_unlock(&zone->lock);
  }
  
@@@ -782,7 -780,7 +782,7 @@@ void __init init_cma_reserved_pageblock
   * large block of memory acted on by a series of small allocations.
   * This behavior is a critical factor in sglist merging's success.
   *
-  * -- wli
+  * -- nyc
   */
  static inline void expand(struct zone *zone, struct page *page,
        int low, int high, struct free_area *area,
@@@ -1394,22 -1392,21 +1394,22 @@@ int capture_free_page(struct page *page
  
        zone = page_zone(page);
        order = page_order(page);
 +      mt = get_pageblock_migratetype(page);
  
 -      /* Obey watermarks as if the page was being allocated */
 -      watermark = low_wmark_pages(zone) + (1 << order);
 -      if (!zone_watermark_ok(zone, 0, watermark, 0, 0))
 -              return 0;
 +      if (mt != MIGRATE_ISOLATE) {
 +              /* Obey watermarks as if the page was being allocated */
 +              watermark = low_wmark_pages(zone) + (1 << order);
 +              if (!zone_watermark_ok(zone, 0, watermark, 0, 0))
 +                      return 0;
 +
 +              __mod_zone_freepage_state(zone, -(1UL << alloc_order), mt);
 +      }
  
        /* Remove page from free list */
        list_del(&page->lru);
        zone->free_area[order].nr_free--;
        rmv_page_order(page);
  
 -      mt = get_pageblock_migratetype(page);
 -      if (unlikely(mt != MIGRATE_ISOLATE))
 -              __mod_zone_freepage_state(zone, -(1UL << order), mt);
 -
        if (alloc_order != order)
                expand(zone, page, alloc_order, order,
                        &zone->free_area[order], migratetype);
                }
        }
  
 -      return 1UL << order;
 +      return 1UL << alloc_order;
  }
  
  /*
@@@ -1874,7 -1871,7 +1874,7 @@@ zonelist_scan
         */
        for_each_zone_zonelist_nodemask(zone, z, zonelist,
                                                high_zoneidx, nodemask) {
 -              if (NUMA_BUILD && zlc_active &&
 +              if (IS_ENABLED(CONFIG_NUMA) && zlc_active &&
                        !zlc_zone_worth_trying(zonelist, z, allowednodes))
                                continue;
                if ((alloc_flags & ALLOC_CPUSET) &&
                                    classzone_idx, alloc_flags))
                                goto try_this_zone;
  
 -                      if (NUMA_BUILD && !did_zlc_setup && nr_online_nodes > 1) {
 +                      if (IS_ENABLED(CONFIG_NUMA) &&
 +                                      !did_zlc_setup && nr_online_nodes > 1) {
                                /*
                                 * we do zlc_setup if there are multiple nodes
                                 * and before considering the first zone allowed
                         * As we may have just activated ZLC, check if the first
                         * eligible zone has failed zone_reclaim recently.
                         */
 -                      if (NUMA_BUILD && zlc_active &&
 +                      if (IS_ENABLED(CONFIG_NUMA) && zlc_active &&
                                !zlc_zone_worth_trying(zonelist, z, allowednodes))
                                continue;
  
@@@ -1966,11 -1962,11 +1966,11 @@@ try_this_zone
                if (page)
                        break;
  this_zone_full:
 -              if (NUMA_BUILD)
 +              if (IS_ENABLED(CONFIG_NUMA))
                        zlc_mark_zone_full(zonelist, z);
        }
  
 -      if (unlikely(NUMA_BUILD && page == NULL && zlc_active)) {
 +      if (unlikely(IS_ENABLED(CONFIG_NUMA) && page == NULL && zlc_active)) {
                /* Disable zlc cache for second zonelist scan */
                zlc_active = 0;
                goto zonelist_scan;
@@@ -2270,7 -2266,7 +2270,7 @@@ __alloc_pages_direct_reclaim(gfp_t gfp_
                return NULL;
  
        /* After successful reclaim, reconsider all zones for allocation */
 -      if (NUMA_BUILD)
 +      if (IS_ENABLED(CONFIG_NUMA))
                zlc_clear_zones_full(zonelist);
  
  retry:
@@@ -2416,14 -2412,12 +2416,14 @@@ __alloc_pages_slowpath(gfp_t gfp_mask, 
         * allowed per node queues are empty and that nodes are
         * over allocated.
         */
 -      if (NUMA_BUILD && (gfp_mask & GFP_THISNODE) == GFP_THISNODE)
 +      if (IS_ENABLED(CONFIG_NUMA) &&
 +                      (gfp_mask & GFP_THISNODE) == GFP_THISNODE)
                goto nopage;
  
  restart:
 -      wake_all_kswapd(order, zonelist, high_zoneidx,
 -                                      zone_idx(preferred_zone));
 +      if (!(gfp_mask & __GFP_NO_KSWAPD))
 +              wake_all_kswapd(order, zonelist, high_zoneidx,
 +                                              zone_idx(preferred_zone));
  
        /*
         * OK, we're below the kswapd watermark and have kicked background
@@@ -2500,7 -2494,7 +2500,7 @@@ rebalance
         * system then fail the allocation instead of entering direct reclaim.
         */
        if ((deferred_compaction || contended_compaction) &&
 -          (gfp_mask & (__GFP_MOVABLE|__GFP_REPEAT)) == __GFP_MOVABLE)
 +                                              (gfp_mask & __GFP_NO_KSWAPD))
                goto nopage;
  
        /* Try direct reclaim and then allocating */
@@@ -2824,7 -2818,7 +2824,7 @@@ unsigned int nr_free_pagecache_pages(vo
  
  static inline void show_node(struct zone *zone)
  {
 -      if (NUMA_BUILD)
 +      if (IS_ENABLED(CONFIG_NUMA))
                printk("Node %d ", zone_to_nid(zone));
  }
  
  
  #define K(x) ((x) << (PAGE_SHIFT-10))
  
 +static void show_migration_types(unsigned char type)
 +{
 +      static const char types[MIGRATE_TYPES] = {
 +              [MIGRATE_UNMOVABLE]     = 'U',
 +              [MIGRATE_RECLAIMABLE]   = 'E',
 +              [MIGRATE_MOVABLE]       = 'M',
 +              [MIGRATE_RESERVE]       = 'R',
 +#ifdef CONFIG_CMA
 +              [MIGRATE_CMA]           = 'C',
 +#endif
 +              [MIGRATE_ISOLATE]       = 'I',
 +      };
 +      char tmp[MIGRATE_TYPES + 1];
 +      char *p = tmp;
 +      int i;
 +
 +      for (i = 0; i < MIGRATE_TYPES; i++) {
 +              if (type & (1 << i))
 +                      *p++ = types[i];
 +      }
 +
 +      *p = '\0';
 +      printk("(%s) ", tmp);
 +}
 +
  /*
   * Show free area list (used inside shift_scroll-lock stuff)
   * We also calculate the percentage fragmentation. We do this by counting the
@@@ -3035,7 -3004,6 +3035,7 @@@ void show_free_areas(unsigned int filte
  
        for_each_populated_zone(zone) {
                unsigned long nr[MAX_ORDER], flags, order, total = 0;
 +              unsigned char types[MAX_ORDER];
  
                if (skip_free_areas_node(filter, zone_to_nid(zone)))
                        continue;
  
                spin_lock_irqsave(&zone->lock, flags);
                for (order = 0; order < MAX_ORDER; order++) {
 -                      nr[order] = zone->free_area[order].nr_free;
 +                      struct free_area *area = &zone->free_area[order];
 +                      int type;
 +
 +                      nr[order] = area->nr_free;
                        total += nr[order] << order;
 +
 +                      types[order] = 0;
 +                      for (type = 0; type < MIGRATE_TYPES; type++) {
 +                              if (!list_empty(&area->free_list[type]))
 +                                      types[order] |= 1 << type;
 +                      }
                }
                spin_unlock_irqrestore(&zone->lock, flags);
 -              for (order = 0; order < MAX_ORDER; order++)
 +              for (order = 0; order < MAX_ORDER; order++) {
                        printk("%lu*%lukB ", nr[order], K(1UL) << order);
 +                      if (nr[order])
 +                              show_migration_types(types[order]);
 +              }
                printk("= %lukB\n", K(total));
        }
  
@@@ -4549,7 -4505,7 +4549,7 @@@ static void __paginginit free_area_init
                zone->zone_pgdat = pgdat;
  
                zone_pcp_init(zone);
 -              lruvec_init(&zone->lruvec, zone);
 +              lruvec_init(&zone->lruvec);
                if (!size)
                        continue;
  
@@@ -5218,6 -5174,10 +5218,6 @@@ static void __setup_per_zone_wmarks(voi
                zone->watermark[WMARK_LOW]  = min_wmark_pages(zone) + (tmp >> 2);
                zone->watermark[WMARK_HIGH] = min_wmark_pages(zone) + (tmp >> 1);
  
 -              zone->watermark[WMARK_MIN] += cma_wmark_pages(zone);
 -              zone->watermark[WMARK_LOW] += cma_wmark_pages(zone);
 -              zone->watermark[WMARK_HIGH] += cma_wmark_pages(zone);
 -
                setup_zone_migrate_reserve(zone);
                spin_unlock_irqrestore(&zone->lock, flags);
        }
@@@ -5615,8 -5575,7 +5615,8 @@@ void set_pageblock_flags_group(struct p
   * MIGRATE_MOVABLE block might include unmovable pages. It means you can't
   * expect this function should be exact.
   */
 -bool has_unmovable_pages(struct zone *zone, struct page *page, int count)
 +bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
 +                       bool skip_hwpoisoned_pages)
  {
        unsigned long pfn, iter, found;
        int mt;
                        continue;
                }
  
 +              /*
 +               * The HWPoisoned page may be not in buddy system, and
 +               * page_count() is not 0.
 +               */
 +              if (skip_hwpoisoned_pages && PageHWPoison(page))
 +                      continue;
 +
                if (!PageLRU(page))
                        found++;
                /*
@@@ -5700,7 -5652,7 +5700,7 @@@ bool is_pageblock_removable_nolock(stru
                        zone->zone_start_pfn + zone->spanned_pages <= pfn)
                return false;
  
 -      return !has_unmovable_pages(zone, page, 0);
 +      return !has_unmovable_pages(zone, page, 0, true);
  }
  
  #ifdef CONFIG_CMA
@@@ -5758,10 -5710,58 +5758,10 @@@ static int __alloc_contig_migrate_range
                                    0, false, MIGRATE_SYNC);
        }
  
 -      putback_lru_pages(&cc->migratepages);
 +      putback_movable_pages(&cc->migratepages);
        return ret > 0 ? 0 : ret;
  }
  
 -/*
 - * Update zone's cma pages counter used for watermark level calculation.
 - */
 -static inline void __update_cma_watermarks(struct zone *zone, int count)
 -{
 -      unsigned long flags;
 -      spin_lock_irqsave(&zone->lock, flags);
 -      zone->min_cma_pages += count;
 -      spin_unlock_irqrestore(&zone->lock, flags);
 -      setup_per_zone_wmarks();
 -}
 -
 -/*
 - * Trigger memory pressure bump to reclaim some pages in order to be able to
 - * allocate 'count' pages in single page units. Does similar work as
 - *__alloc_pages_slowpath() function.
 - */
 -static int __reclaim_pages(struct zone *zone, gfp_t gfp_mask, int count)
 -{
 -      enum zone_type high_zoneidx = gfp_zone(gfp_mask);
 -      struct zonelist *zonelist = node_zonelist(0, gfp_mask);
 -      int did_some_progress = 0;
 -      int order = 1;
 -
 -      /*
 -       * Increase level of watermarks to force kswapd do his job
 -       * to stabilise at new watermark level.
 -       */
 -      __update_cma_watermarks(zone, count);
 -
 -      /* Obey watermarks as if the page was being allocated */
 -      while (!zone_watermark_ok(zone, 0, low_wmark_pages(zone), 0, 0)) {
 -              wake_all_kswapd(order, zonelist, high_zoneidx, zone_idx(zone));
 -
 -              did_some_progress = __perform_reclaim(gfp_mask, order, zonelist,
 -                                                    NULL);
 -              if (!did_some_progress) {
 -                      /* Exhausted what can be done so it's blamo time */
 -                      out_of_memory(zonelist, gfp_mask, order, NULL, false);
 -              }
 -      }
 -
 -      /* Restore original watermark levels. */
 -      __update_cma_watermarks(zone, -count);
 -
 -      return count;
 -}
 -
  /**
   * alloc_contig_range() -- tries to allocate given range of pages
   * @start:    start PFN to allocate
  int alloc_contig_range(unsigned long start, unsigned long end,
                       unsigned migratetype)
  {
 -      struct zone *zone = page_zone(pfn_to_page(start));
        unsigned long outer_start, outer_end;
        int ret = 0, order;
  
         */
  
        ret = start_isolate_page_range(pfn_max_align_down(start),
 -                                     pfn_max_align_up(end), migratetype);
 +                                     pfn_max_align_up(end), migratetype,
 +                                     false);
        if (ret)
                return ret;
  
        }
  
        /* Make sure the range is really isolated. */
 -      if (test_pages_isolated(outer_start, end)) {
 +      if (test_pages_isolated(outer_start, end, false)) {
                pr_warn("alloc_contig_range test_pages_isolated(%lx, %lx) failed\n",
                       outer_start, end);
                ret = -EBUSY;
                goto done;
        }
  
 -      /*
 -       * Reclaim enough pages to make sure that contiguous allocation
 -       * will not starve the system.
 -       */
 -      __reclaim_pages(zone, GFP_HIGHUSER_MOVABLE, end-start);
  
        /* Grab isolated pages from freelists. */
        outer_end = isolate_freepages_range(&cc, outer_start, end);
@@@ -5926,6 -5931,7 +5926,6 @@@ void __meminit zone_pcp_update(struct z
  }
  #endif
  
 -#ifdef CONFIG_MEMORY_HOTREMOVE
  void zone_pcp_reset(struct zone *zone)
  {
        unsigned long flags;
        local_irq_restore(flags);
  }
  
 +#ifdef CONFIG_MEMORY_HOTREMOVE
  /*
   * All pages in the range must be isolated before calling this.
   */
@@@ -5972,16 -5977,6 +5972,16 @@@ __offline_isolated_pages(unsigned long 
                        continue;
                }
                page = pfn_to_page(pfn);
 +              /*
 +               * The HWPoisoned page may be not in buddy system, and
 +               * page_count() is not 0.
 +               */
 +              if (unlikely(!PageBuddy(page) && PageHWPoison(page))) {
 +                      pfn++;
 +                      SetPageReserved(page);
 +                      continue;
 +              }
 +
                BUG_ON(page_count(page));
                BUG_ON(!PageBuddy(page));
                order = page_order(page);
                list_del(&page->lru);
                rmv_page_order(page);
                zone->free_area[order].nr_free--;
 -              __mod_zone_page_state(zone, NR_FREE_PAGES,
 -                                    - (1UL << order));
                for (i = 0; i < (1 << order); i++)
                        SetPageReserved((page+i));
                pfn += (1 << order);
@@@ -6101,3 -6098,37 +6101,3 @@@ void dump_page(struct page *page
        dump_page_flags(page->flags);
        mem_cgroup_print_bad_page(page);
  }
 -
 -/* reset zone->present_pages */
 -void reset_zone_present_pages(void)
 -{
 -      struct zone *z;
 -      int i, nid;
 -
 -      for_each_node_state(nid, N_HIGH_MEMORY) {
 -              for (i = 0; i < MAX_NR_ZONES; i++) {
 -                      z = NODE_DATA(nid)->node_zones + i;
 -                      z->present_pages = 0;
 -              }
 -      }
 -}
 -
 -/* calculate zone's present pages in buddy system */
 -void fixup_zone_present_pages(int nid, unsigned long start_pfn,
 -                              unsigned long end_pfn)
 -{
 -      struct zone *z;
 -      unsigned long zone_start_pfn, zone_end_pfn;
 -      int i;
 -
 -      for (i = 0; i < MAX_NR_ZONES; i++) {
 -              z = NODE_DATA(nid)->node_zones + i;
 -              zone_start_pfn = z->zone_start_pfn;
 -              zone_end_pfn = zone_start_pfn + z->spanned_pages;
 -
 -              /* if the two regions intersect */
 -              if (!(zone_start_pfn >= end_pfn || zone_end_pfn <= start_pfn))
 -                      z->present_pages += min(end_pfn, zone_end_pfn) -
 -                                          max(start_pfn, zone_start_pfn);
 -      }
 -}
diff --combined net/ipv4/tcp_cong.c
index baf28611b3345030d42ea73d40a14284648717bb,701a7f6fb9b180b4b12f65edfe72d33792f631d8..291f2ed7cc311649a72700d65098b6d70ba338b5
@@@ -1,7 -1,7 +1,7 @@@
  /*
   * Plugable TCP congestion control support and newReno
   * congestion control.
-  * Based on ideas from I/O scheduler suport and Web100.
+  * Based on ideas from I/O scheduler support and Web100.
   *
   * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org>
   */
@@@ -259,8 -259,7 +259,8 @@@ int tcp_set_congestion_control(struct s
        if (!ca)
                err = -ENOENT;
  
 -      else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) || capable(CAP_NET_ADMIN)))
 +      else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) ||
 +                 ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)))
                err = -EPERM;
  
        else if (!try_module_get(ca->owner))
index c6560cc7a9d6468b6b3239afc81baaecccc3957e,f28772443bd32b94e2e6188d24f55b7579080746..698dc7e6f309847373541748c3cc4a2f40b67f58
@@@ -490,38 -490,6 +490,38 @@@ static inline void drv_sta_remove(struc
        trace_drv_return_void(local);
  }
  
 +#ifdef CONFIG_MAC80211_DEBUGFS
 +static inline void drv_sta_add_debugfs(struct ieee80211_local *local,
 +                                     struct ieee80211_sub_if_data *sdata,
 +                                     struct ieee80211_sta *sta,
 +                                     struct dentry *dir)
 +{
 +      might_sleep();
 +
 +      sdata = get_bss_sdata(sdata);
 +      check_sdata_in_driver(sdata);
 +
 +      if (local->ops->sta_add_debugfs)
 +              local->ops->sta_add_debugfs(&local->hw, &sdata->vif,
 +                                          sta, dir);
 +}
 +
 +static inline void drv_sta_remove_debugfs(struct ieee80211_local *local,
 +                                        struct ieee80211_sub_if_data *sdata,
 +                                        struct ieee80211_sta *sta,
 +                                        struct dentry *dir)
 +{
 +      might_sleep();
 +
 +      sdata = get_bss_sdata(sdata);
 +      check_sdata_in_driver(sdata);
 +
 +      if (local->ops->sta_remove_debugfs)
 +              local->ops->sta_remove_debugfs(&local->hw, &sdata->vif,
 +                                             sta, dir);
 +}
 +#endif
 +
  static inline __must_check
  int drv_sta_state(struct ieee80211_local *local,
                  struct ieee80211_sub_if_data *sdata,
@@@ -634,7 -602,7 +634,7 @@@ static inline void drv_reset_tsf(struc
  
  static inline int drv_tx_last_beacon(struct ieee80211_local *local)
  {
-       int ret = 0; /* default unsuported op for less congestion */
+       int ret = 0; /* default unsupported op for less congestion */
  
        might_sleep();
  
@@@ -736,17 -704,17 +736,17 @@@ static inline int drv_get_antenna(struc
  }
  
  static inline int drv_remain_on_channel(struct ieee80211_local *local,
 +                                      struct ieee80211_sub_if_data *sdata,
                                        struct ieee80211_channel *chan,
 -                                      enum nl80211_channel_type chantype,
                                        unsigned int duration)
  {
        int ret;
  
        might_sleep();
  
 -      trace_drv_remain_on_channel(local, chan, chantype, duration);
 -      ret = local->ops->remain_on_channel(&local->hw, chan, chantype,
 -                                          duration);
 +      trace_drv_remain_on_channel(local, sdata, chan, duration);
 +      ret = local->ops->remain_on_channel(&local->hw, &sdata->vif,
 +                                          chan, duration);
        trace_drv_return_int(local, ret);
  
        return ret;
@@@ -903,104 -871,4 +903,104 @@@ static inline void drv_mgd_prepare_tx(s
                local->ops->mgd_prepare_tx(&local->hw, &sdata->vif);
        trace_drv_return_void(local);
  }
 +
 +static inline int drv_add_chanctx(struct ieee80211_local *local,
 +                                struct ieee80211_chanctx *ctx)
 +{
 +      int ret = -EOPNOTSUPP;
 +
 +      trace_drv_add_chanctx(local, ctx);
 +      if (local->ops->add_chanctx)
 +              ret = local->ops->add_chanctx(&local->hw, &ctx->conf);
 +      trace_drv_return_int(local, ret);
 +
 +      return ret;
 +}
 +
 +static inline void drv_remove_chanctx(struct ieee80211_local *local,
 +                                    struct ieee80211_chanctx *ctx)
 +{
 +      trace_drv_remove_chanctx(local, ctx);
 +      if (local->ops->remove_chanctx)
 +              local->ops->remove_chanctx(&local->hw, &ctx->conf);
 +      trace_drv_return_void(local);
 +}
 +
 +static inline void drv_change_chanctx(struct ieee80211_local *local,
 +                                    struct ieee80211_chanctx *ctx,
 +                                    u32 changed)
 +{
 +      trace_drv_change_chanctx(local, ctx, changed);
 +      if (local->ops->change_chanctx)
 +              local->ops->change_chanctx(&local->hw, &ctx->conf, changed);
 +      trace_drv_return_void(local);
 +}
 +
 +static inline int drv_assign_vif_chanctx(struct ieee80211_local *local,
 +                                       struct ieee80211_sub_if_data *sdata,
 +                                       struct ieee80211_chanctx *ctx)
 +{
 +      int ret = 0;
 +
 +      check_sdata_in_driver(sdata);
 +
 +      trace_drv_assign_vif_chanctx(local, sdata, ctx);
 +      if (local->ops->assign_vif_chanctx)
 +              ret = local->ops->assign_vif_chanctx(&local->hw,
 +                                                   &sdata->vif,
 +                                                   &ctx->conf);
 +      trace_drv_return_int(local, ret);
 +
 +      return ret;
 +}
 +
 +static inline void drv_unassign_vif_chanctx(struct ieee80211_local *local,
 +                                          struct ieee80211_sub_if_data *sdata,
 +                                          struct ieee80211_chanctx *ctx)
 +{
 +      check_sdata_in_driver(sdata);
 +
 +      trace_drv_unassign_vif_chanctx(local, sdata, ctx);
 +      if (local->ops->unassign_vif_chanctx)
 +              local->ops->unassign_vif_chanctx(&local->hw,
 +                                               &sdata->vif,
 +                                               &ctx->conf);
 +      trace_drv_return_void(local);
 +}
 +
 +static inline int drv_start_ap(struct ieee80211_local *local,
 +                             struct ieee80211_sub_if_data *sdata)
 +{
 +      int ret = 0;
 +
 +      check_sdata_in_driver(sdata);
 +
 +      trace_drv_start_ap(local, sdata, &sdata->vif.bss_conf);
 +      if (local->ops->start_ap)
 +              ret = local->ops->start_ap(&local->hw, &sdata->vif);
 +      trace_drv_return_int(local, ret);
 +      return ret;
 +}
 +
 +static inline void drv_stop_ap(struct ieee80211_local *local,
 +                             struct ieee80211_sub_if_data *sdata)
 +{
 +      check_sdata_in_driver(sdata);
 +
 +      trace_drv_stop_ap(local, sdata);
 +      if (local->ops->stop_ap)
 +              local->ops->stop_ap(&local->hw, &sdata->vif);
 +      trace_drv_return_void(local);
 +}
 +
 +static inline void drv_restart_complete(struct ieee80211_local *local)
 +{
 +      might_sleep();
 +
 +      trace_drv_restart_complete(local);
 +      if (local->ops->restart_complete)
 +              local->ops->restart_complete(&local->hw);
 +      trace_drv_return_void(local);
 +}
 +
  #endif /* __MAC80211_DRIVER_OPS */
diff --combined net/sctp/endpointola.c
index 32ab55b18281e7e614b7226c5029c10356ca854c,bd7e6a6a815a123ca51dce2bcb8b924c0a43d66e..17a001bac2cc3c81ab052c2b603b02091bd924e0
@@@ -163,7 -163,7 +163,7 @@@ static struct sctp_endpoint *sctp_endpo
  
        list_add(&null_key->key_list, &ep->endpoint_shared_keys);
  
-       /* Allocate and initialize transorms arrays for suported HMACs. */
+       /* Allocate and initialize transorms arrays for supported HMACs. */
        err = sctp_auth_init_hmacs(ep, gfp);
        if (err)
                goto nomem_hmacs;
@@@ -480,11 -480,8 +480,11 @@@ normal
                 */
                if (asoc && sctp_chunk_is_data(chunk))
                        asoc->peer.last_data_from = chunk->transport;
 -              else
 +              else {
                        SCTP_INC_STATS(sock_net(ep->base.sk), SCTP_MIB_INCTRLCHUNKS);
 +                      if (asoc)
 +                              asoc->stats.ictrlchunks++;
 +              }
  
                if (chunk->transport)
                        chunk->transport->last_time_heard = jiffies;
diff --combined net/sctp/sm_statefuns.c
index ebcd1eedb1151d050d51c5a5043e720f4797a33a,49493f335861b2479a566df05871e698300fc6e4..618ec7e216cae9bb17038c07ff5d87a75c8f6208
@@@ -1055,7 -1055,6 +1055,7 @@@ sctp_disposition_t sctp_sf_beat_8_3(str
                                    void *arg,
                                    sctp_cmd_seq_t *commands)
  {
 +      sctp_paramhdr_t *param_hdr;
        struct sctp_chunk *chunk = arg;
        struct sctp_chunk *reply;
        size_t paylen = 0;
         * Information field copied from the received HEARTBEAT chunk.
         */
        chunk->subh.hb_hdr = (sctp_heartbeathdr_t *) chunk->skb->data;
 +      param_hdr = (sctp_paramhdr_t *) chunk->subh.hb_hdr;
        paylen = ntohs(chunk->chunk_hdr->length) - sizeof(sctp_chunkhdr_t);
 +
 +      if (ntohs(param_hdr->length) > paylen)
 +              return sctp_sf_violation_paramlen(net, ep, asoc, type, arg,
 +                                                param_hdr, commands);
 +
        if (!pskb_pull(chunk->skb, paylen))
                goto nomem;
  
 -      reply = sctp_make_heartbeat_ack(asoc, chunk,
 -                                      chunk->subh.hb_hdr, paylen);
 +      reply = sctp_make_heartbeat_ack(asoc, chunk, param_hdr, paylen);
        if (!reply)
                goto nomem;
  
@@@ -4000,7 -3994,7 +4000,7 @@@ static sctp_ierror_t sctp_sf_authentica
        chunk->subh.auth_hdr = auth_hdr;
        skb_pull(chunk->skb, sizeof(struct sctp_authhdr));
  
-       /* Make sure that we suport the HMAC algorithm from the auth
+       /* Make sure that we support the HMAC algorithm from the auth
         * chunk.
         */
        if (!sctp_auth_asoc_verify_hmac_id(asoc, auth_hdr->hmac_id))
@@@ -6133,8 -6127,6 +6133,8 @@@ static int sctp_eat_data(const struct s
                /* The TSN is too high--silently discard the chunk and
                 * count on it getting retransmitted later.
                 */
 +              if (chunk->asoc)
 +                      chunk->asoc->stats.outofseqtsns++;
                return SCTP_IERROR_HIGH_TSN;
        } else if (tmp > 0) {
                /* This is a duplicate.  Record it.  */
        /* Note: Some chunks may get overcounted (if we drop) or overcounted
         * if we renege and the chunk arrives again.
         */
 -      if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED)
 +      if (chunk->chunk_hdr->flags & SCTP_DATA_UNORDERED) {
                SCTP_INC_STATS(net, SCTP_MIB_INUNORDERCHUNKS);
 -      else {
 +              if (chunk->asoc)
 +                      chunk->asoc->stats.iuodchunks++;
 +      } else {
                SCTP_INC_STATS(net, SCTP_MIB_INORDERCHUNKS);
 +              if (chunk->asoc)
 +                      chunk->asoc->stats.iodchunks++;
                ordered = 1;
        }
  
diff --combined sound/pci/es1968.c
index 879db2d7796a6c4cf0ee7569b98e7dc2035b065b,dc14234fea29250fcfc7400aa3d0f5f069f362d2..a1f32b5ae0d1b4131a7ba7b9a8d2366bfd959e3d
@@@ -1429,7 -1429,7 +1429,7 @@@ static void snd_es1968_free_dmabuf(stru
        }
  }
  
 -static int __devinit
 +static int
  snd_es1968_init_dmabuf(struct es1968 *chip)
  {
        int err;
@@@ -1704,7 -1704,7 +1704,7 @@@ static struct snd_pcm_ops snd_es1968_ca
   */
  #define CLOCK_MEASURE_BUFSIZE 16768   /* enough large for a single shot */
  
 -static void __devinit es1968_measure_clock(struct es1968 *chip)
 +static void es1968_measure_clock(struct es1968 *chip)
  {
        int i, apu;
        unsigned int pa, offset, t;
@@@ -1806,7 -1806,7 +1806,7 @@@ static void snd_es1968_pcm_free(struct 
        esm->pcm = NULL;
  }
  
 -static int __devinit
 +static int
  snd_es1968_pcm(struct es1968 *chip, int device)
  {
        struct snd_pcm *pcm;
@@@ -2016,7 -2016,7 +2016,7 @@@ static irqreturn_t snd_es1968_interrupt
   *  Mixer stuff
   */
  
 -static int __devinit
 +static int
  snd_es1968_mixer(struct es1968 *chip)
  {
        struct snd_ac97_bus *pbus;
@@@ -2291,7 -2291,7 +2291,7 @@@ static void snd_es1968_chip_init(struc
        outb(0x88, iobase+0x1f);
  
        /* it appears some maestros (dell 7500) only work if these are set,
-          regardless of wether we use the assp or not. */
+          regardless of whether we use the assp or not. */
  
        outb(0, iobase + ASSP_CONTROL_B);
        outb(3, iobase + ASSP_CONTROL_A);       /* M: Reserved bits... */
@@@ -2465,7 -2465,7 +2465,7 @@@ static SIMPLE_DEV_PM_OPS(es1968_pm, es1
  
  #ifdef SUPPORT_JOYSTICK
  #define JOYSTICK_ADDR 0x200
 -static int __devinit snd_es1968_create_gameport(struct es1968 *chip, int dev)
 +static int snd_es1968_create_gameport(struct es1968 *chip, int dev)
  {
        struct gameport *gp;
        struct resource *r;
@@@ -2516,7 -2516,7 +2516,7 @@@ static inline void snd_es1968_free_game
  #endif
  
  #ifdef CONFIG_SND_ES1968_INPUT
 -static int __devinit snd_es1968_input_register(struct es1968 *chip)
 +static int snd_es1968_input_register(struct es1968 *chip)
  {
        struct input_dev *input_dev;
        int err;
@@@ -2581,14 -2581,9 +2581,14 @@@ static u8 snd_es1968_tea575x_get_pins(s
        struct es1968 *chip = tea->private_data;
        unsigned long io = chip->io_port + GPIO_DATA;
        u16 val = inw(io);
 +      u8 ret;
  
 -      return  (val & STR_DATA) ? TEA575X_DATA : 0 |
 -              (val & STR_MOST) ? TEA575X_MOST : 0;
 +      ret = 0;
 +      if (val & STR_DATA)
 +              ret |= TEA575X_DATA;
 +      if (val & STR_MOST)
 +              ret |= TEA575X_MOST;
 +      return ret;
  }
  
  static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output)
@@@ -2653,30 -2648,28 +2653,30 @@@ struct ess_device_list 
        unsigned short vendor;  /* subsystem vendor id */
  };
  
 -static struct ess_device_list pm_whitelist[] __devinitdata = {
 +static struct ess_device_list pm_whitelist[] = {
        { TYPE_MAESTRO2E, 0x0e11 },     /* Compaq Armada */
        { TYPE_MAESTRO2E, 0x1028 },
        { TYPE_MAESTRO2E, 0x103c },
        { TYPE_MAESTRO2E, 0x1179 },
        { TYPE_MAESTRO2E, 0x14c0 },     /* HP omnibook 4150 */
        { TYPE_MAESTRO2E, 0x1558 },
 +      { TYPE_MAESTRO2E, 0x125d },     /* a PCI card, e.g. Terratec DMX */
 +      { TYPE_MAESTRO2, 0x125d },      /* a PCI card, e.g. SF64-PCE2 */
  };
  
 -static struct ess_device_list mpu_blacklist[] __devinitdata = {
 +static struct ess_device_list mpu_blacklist[] = {
        { TYPE_MAESTRO2, 0x125d },
  };
  
 -static int __devinit snd_es1968_create(struct snd_card *card,
 -                                     struct pci_dev *pci,
 -                                     int total_bufsize,
 -                                     int play_streams,
 -                                     int capt_streams,
 -                                     int chip_type,
 -                                     int do_pm,
 -                                     int radio_nr,
 -                                     struct es1968 **chip_ret)
 +static int snd_es1968_create(struct snd_card *card,
 +                           struct pci_dev *pci,
 +                           int total_bufsize,
 +                           int play_streams,
 +                           int capt_streams,
 +                           int chip_type,
 +                           int do_pm,
 +                           int radio_nr,
 +                           struct es1968 **chip_ret)
  {
        static struct snd_device_ops ops = {
                .dev_free =     snd_es1968_dev_free,
  
  /*
   */
 -static int __devinit snd_es1968_probe(struct pci_dev *pci,
 -                                    const struct pci_device_id *pci_id)
 +static int snd_es1968_probe(struct pci_dev *pci,
 +                          const struct pci_device_id *pci_id)
  {
        static int dev;
        struct snd_card *card;
        return 0;
  }
  
 -static void __devexit snd_es1968_remove(struct pci_dev *pci)
 +static void snd_es1968_remove(struct pci_dev *pci)
  {
        snd_card_free(pci_get_drvdata(pci));
        pci_set_drvdata(pci, NULL);
@@@ -2916,7 -2909,7 +2916,7 @@@ static struct pci_driver es1968_driver 
        .name = KBUILD_MODNAME,
        .id_table = snd_es1968_ids,
        .probe = snd_es1968_probe,
 -      .remove = __devexit_p(snd_es1968_remove),
 +      .remove = snd_es1968_remove,
        .driver = {
                .pm = ES1968_PM_OPS,
        },
index ab2bca164d6f84726bd303415731f8fdf93bec26,d09239cf7961794c40bddab1b3473d1b39637877..9e28cc12969b3632357ae4f198634da499864903
@@@ -22,6 -22,7 +22,6 @@@
   *
   */      
  
 -#include <asm/io.h>
  #include <linux/delay.h>
  #include <linux/interrupt.h>
  #include <linux/init.h>
@@@ -431,7 -432,7 +431,7 @@@ static int snd_ice1712_delta1010lt_word
        return 0;
  }
  
 -static struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_status __devinitdata =
 +static struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_status =
  {
        .access =       (SNDRV_CTL_ELEM_ACCESS_READ),
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
   * initialize the chips on M-Audio cards
   */
  
 -static struct snd_akm4xxx akm_audiophile __devinitdata = {
 +static struct snd_akm4xxx akm_audiophile = {
        .type = SND_AK4528,
        .num_adcs = 2,
        .num_dacs = 2,
        }
  };
  
 -static struct snd_ak4xxx_private akm_audiophile_priv __devinitdata = {
 +static struct snd_ak4xxx_private akm_audiophile_priv = {
        .caddr = 2,
        .cif = 0,
        .data_mask = ICE1712_DELTA_AP_DOUT,
        .mask_flags = 0,
  };
  
 -static struct snd_akm4xxx akm_delta410 __devinitdata = {
 +static struct snd_akm4xxx akm_delta410 = {
        .type = SND_AK4529,
        .num_adcs = 2,
        .num_dacs = 8,
        }
  };
  
 -static struct snd_ak4xxx_private akm_delta410_priv __devinitdata = {
 +static struct snd_ak4xxx_private akm_delta410_priv = {
        .caddr = 0,
        .cif = 0,
        .data_mask = ICE1712_DELTA_AP_DOUT,
        .mask_flags = 0,
  };
  
 -static struct snd_akm4xxx akm_delta1010lt __devinitdata = {
 +static struct snd_akm4xxx akm_delta1010lt = {
        .type = SND_AK4524,
        .num_adcs = 8,
        .num_dacs = 8,
        }
  };
  
 -static struct snd_ak4xxx_private akm_delta1010lt_priv __devinitdata = {
 +static struct snd_ak4xxx_private akm_delta1010lt_priv = {
        .caddr = 2,
        .cif = 0, /* the default level of the CIF pin from AK4524 */
        .data_mask = ICE1712_DELTA_1010LT_DOUT,
        .mask_flags = 0,
  };
  
 -static struct snd_akm4xxx akm_delta66e __devinitdata = {
 +static struct snd_akm4xxx akm_delta66e = {
        .type = SND_AK4524,
        .num_adcs = 4,
        .num_dacs = 4,
        }
  };
  
 -static struct snd_ak4xxx_private akm_delta66e_priv __devinitdata = {
 +static struct snd_ak4xxx_private akm_delta66e_priv = {
        .caddr = 2,
        .cif = 0, /* the default level of the CIF pin from AK4524 */
        .data_mask = ICE1712_DELTA_66E_DOUT,
  };
  
  
 -static struct snd_akm4xxx akm_delta44 __devinitdata = {
 +static struct snd_akm4xxx akm_delta44 = {
        .type = SND_AK4524,
        .num_adcs = 4,
        .num_dacs = 4,
        }
  };
  
 -static struct snd_ak4xxx_private akm_delta44_priv __devinitdata = {
 +static struct snd_ak4xxx_private akm_delta44_priv = {
        .caddr = 2,
        .cif = 0, /* the default level of the CIF pin from AK4524 */
        .data_mask = ICE1712_DELTA_CODEC_SERIAL_DATA,
        .mask_flags = 0,
  };
  
 -static struct snd_akm4xxx akm_vx442 __devinitdata = {
 +static struct snd_akm4xxx akm_vx442 = {
        .type = SND_AK4524,
        .num_adcs = 4,
        .num_dacs = 4,
        }
  };
  
 -static struct snd_ak4xxx_private akm_vx442_priv __devinitdata = {
 +static struct snd_ak4xxx_private akm_vx442_priv = {
        .caddr = 2,
        .cif = 0,
        .data_mask = ICE1712_VX442_DOUT,
        .mask_flags = 0,
  };
  
 -static int __devinit snd_ice1712_delta_init(struct snd_ice1712 *ice)
 +static int snd_ice1712_delta_init(struct snd_ice1712 *ice)
  {
        int err;
        struct snd_akm4xxx *ak;
                ice->num_total_dacs = 4;        /* two AK4324 codecs */
                break;
        case ICE1712_SUBDEVICE_VX442:
-       case ICE1712_SUBDEVICE_DELTA66E:        /* omni not suported yet */
+       case ICE1712_SUBDEVICE_DELTA66E:        /* omni not supported yet */
                ice->num_total_dacs = 4;
                ice->num_total_adcs = 4;
                break;
   * additional controls for M-Audio cards
   */
  
 -static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_select __devinitdata =
 +static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_select =
  ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Sync", 0, ICE1712_DELTA_WORD_CLOCK_SELECT, 1, 0);
 -static struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_select __devinitdata =
 +static struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_select =
  ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Sync", 0, ICE1712_DELTA_1010LT_WORDCLOCK, 0, 0);
 -static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_status __devinitdata =
 +static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_status =
  ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Status", 0, ICE1712_DELTA_WORD_CLOCK_STATUS, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE);
 -static struct snd_kcontrol_new snd_ice1712_deltadio2496_spdif_in_select __devinitdata =
 +static struct snd_kcontrol_new snd_ice1712_deltadio2496_spdif_in_select =
  ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, ICE1712_DELTA_SPDIF_INPUT_SELECT, 0, 0);
 -static struct snd_kcontrol_new snd_ice1712_delta_spdif_in_status __devinitdata =
 +static struct snd_kcontrol_new snd_ice1712_delta_spdif_in_status =
  ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Delta IEC958 Input Status", 0, ICE1712_DELTA_SPDIF_IN_STAT, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE);
  
  
 -static int __devinit snd_ice1712_delta_add_controls(struct snd_ice1712 *ice)
 +static int snd_ice1712_delta_add_controls(struct snd_ice1712 *ice)
  {
        int err;
  
  
  
  /* entry point */
 -struct snd_ice1712_card_info snd_ice1712_delta_cards[] __devinitdata = {
 +struct snd_ice1712_card_info snd_ice1712_delta_cards[] = {
        {
                .subvendor = ICE1712_SUBDEVICE_DELTA1010,
                .name = "M Audio Delta 1010",
diff --combined sound/pci/sis7019.c
index 550b9cfb8e3ef248f8ea78aecd8e5df8d0ee7693,9024545ebb86b0812089cee960344fe70a0cf921..d59abe1682c58f9d394340d48c38e1860f906e89
@@@ -894,7 -894,7 +894,7 @@@ static struct snd_pcm_ops sis_capture_o
        .pointer = sis_pcm_pointer,
  };
  
 -static int __devinit sis_pcm_create(struct sis7019 *sis)
 +static int sis_pcm_create(struct sis7019 *sis)
  {
        struct snd_pcm *pcm;
        int rc;
@@@ -1013,7 -1013,7 +1013,7 @@@ static unsigned short sis_ac97_read(str
                                        (reg << 8) | cmd[ac97->num]);
  }
  
 -static int __devinit sis_mixer_create(struct sis7019 *sis)
 +static int sis_mixer_create(struct sis7019 *sis)
  {
        struct snd_ac97_bus *bus;
        struct snd_ac97_template ac97;
@@@ -1171,7 -1171,7 +1171,7 @@@ static int sis_chip_init(struct sis701
        outl(SIS_DMA_CSR_PCI_SETTINGS, io + SIS_DMA_CSR);
  
        /* Reset the synchronization groups for all of the channels
-        * to be asyncronous. If we start doing SPDIF or 5.1 sound, etc.
+        * to be asynchronous. If we start doing SPDIF or 5.1 sound, etc.
         * we'll need to change how we handle these. Until then, we just
         * assign sub-mixer 0 to all playback channels, and avoid any
         * attenuation on the audio.
@@@ -1326,8 -1326,8 +1326,8 @@@ static int sis_alloc_suspend(struct sis
        return 0;
  }
  
 -static int __devinit sis_chip_create(struct snd_card *card,
 -                                      struct pci_dev *pci)
 +static int sis_chip_create(struct snd_card *card,
 +                         struct pci_dev *pci)
  {
        struct sis7019 *sis = card->private_data;
        struct voice *voice;
@@@ -1417,8 -1417,8 +1417,8 @@@ error_out
        return rc;
  }
  
 -static int __devinit snd_sis7019_probe(struct pci_dev *pci,
 -                                      const struct pci_device_id *pci_id)
 +static int snd_sis7019_probe(struct pci_dev *pci,
 +                           const struct pci_device_id *pci_id)
  {
        struct snd_card *card;
        struct sis7019 *sis;
@@@ -1478,7 -1478,7 +1478,7 @@@ error_out
        return rc;
  }
  
 -static void __devexit snd_sis7019_remove(struct pci_dev *pci)
 +static void snd_sis7019_remove(struct pci_dev *pci)
  {
        snd_card_free(pci_get_drvdata(pci));
        pci_set_drvdata(pci, NULL);
@@@ -1488,7 -1488,7 +1488,7 @@@ static struct pci_driver sis7019_drive
        .name = KBUILD_MODNAME,
        .id_table = snd_sis7019_ids,
        .probe = snd_sis7019_probe,
 -      .remove = __devexit_p(snd_sis7019_remove),
 +      .remove = snd_sis7019_remove,
        .driver = {
                .pm = SIS_PM_OPS,
        },