pandora-kernel.git
13 years agofuse: make fuse_permission() RCU aware
Miklos Szeredi [Mon, 21 Mar 2011 12:58:06 +0000 (13:58 +0100)]
fuse: make fuse_permission() RCU aware

Only bail out of fuse_permission() on IPERM_FLAG_RCU when blocking is
actually necessary.

CC: Nick Piggin <npiggin@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 years agofuse: wakeup pollers on connection release/abort
Bryan Green [Wed, 2 Mar 2011 00:43:52 +0000 (16:43 -0800)]
fuse: wakeup pollers on connection release/abort

If a fuse dev connection is broken, wake up any
processes that are blocking, in a poll system call,
on one of the files in the now defunct filesystem.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 years agofuse: reduce size of struct fuse_request
Miklos Szeredi [Mon, 21 Mar 2011 12:58:05 +0000 (13:58 +0100)]
fuse: reduce size of struct fuse_request

Reduce the size of struct fuse_request by removing cuse_init_out from
the request structure and allocating it dinamically instead.

CC: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
13 years agobfs: fix bitmap size argument to find_first_zero_bit()
Akinobu Mita [Mon, 21 Mar 2011 12:32:53 +0000 (08:32 -0400)]
bfs: fix bitmap size argument to find_first_zero_bit()

The usage of find_first_zero_bit() in bfs_create() is wrong for two
reasons.

The bitmap size argument to find_first_zero_bit() is info->si_lasti but
the correct bitmap size is info->si_lasti + 1 as info->si_lasti is the
last valid index in info->si_imap bitmap.

Another problem is that it is impossible to detect that info->si_imap
bitmap is full because there is an off-by-one bug in the return value
check for find_first_zero_bit().  If no zero bits exist in info->si_imap,
find_first_zero_bit() returns info->si_lasti.  But the check can't catch
it due to the off-by-one.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agokbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default
Michal Marek [Mon, 21 Mar 2011 09:44:30 +0000 (10:44 +0100)]
kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default

CONFIG_DEBUG_SECTION_MISMATCH has also runtime effects due to the
-fno-inline-functions-called-once compiler flag, so forcing it on
everyone is not a good idea.

Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoi2c-pxa2xx: Fix register offsets
Vasily Khoruzhick [Sun, 13 Mar 2011 13:53:28 +0000 (15:53 +0200)]
i2c-pxa2xx: Fix register offsets

Fix regression that was introduced by dynamic register layout.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoi2c-pxa2xx: pass of_node from platform driver to adapter and publish
Sebastian Andrzej Siewior [Wed, 23 Feb 2011 11:38:20 +0000 (12:38 +0100)]
i2c-pxa2xx: pass of_node from platform driver to adapter and publish

the of_node will auto-publish devices which are added to the device
tree.

Commit 925bb9c6 aka ("of/i2c: Fix module load order issue caused by
of_i2c.c) moved the of_i2c_register_devices() function from the i2c core
back to the drivers. This patch does the same thing for the pxa driver.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoi2c-pxa2xx: check timeout correctly
Sebastian Andrzej Siewior [Wed, 23 Feb 2011 11:38:19 +0000 (12:38 +0100)]
i2c-pxa2xx: check timeout correctly

timeout here maybe 0 if the event occured and a task with a higher
priority stole the cpu and we were sleeping longer than the timeout
value we specified.
In case of a real timeout I changed the error code to I2C_RETRY so we
retry the transfer.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoi2c-pxa2xx: add support for shared IRQ handler
Sebastian Andrzej Siewior [Wed, 23 Feb 2011 11:38:18 +0000 (12:38 +0100)]
i2c-pxa2xx: add support for shared IRQ handler

Sodaville has three of them on a single IRQ. IRQF_DISABLED is removed
because it is a NOP allready and scheduled for removal.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoi2c-pxa2xx: Add PCI support for PXA I2C controller
Sebastian Andrzej Siewior [Wed, 2 Mar 2011 10:26:53 +0000 (11:26 +0100)]
i2c-pxa2xx: Add PCI support for PXA I2C controller

The Sodaville I2C controller is almost the same as found on PXA2xx. The
difference:
- the register are at a different offset
- no slave support

The PCI probe code adds three platform devices which are probed then by
the platform code.
The X86 part also adds dummy clock defines because we don't have HW
clock support.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: pxa2xx: reorganize I2C files
Sebastian Andrzej Siewior [Wed, 23 Feb 2011 11:38:16 +0000 (12:38 +0100)]
ARM: pxa2xx: reorganize I2C files

This patch moves the platform data definition from
arch/arm/plat-pxa/include/plat/i2c.h to include/linux/i2c/pxa-i2c.h so
it can be accessed from x86 the same way as on ARM.

This change should make no functional change to the PXA code. The move
is verified by building the following defconfigs:
  cm_x2xx_defconfig corgi_defconfig em_x270_defconfig ezx_defconfig
  imote2_defconfig pxa3xx_defconfig spitz_defconfig zeus_defconfig
  raumfeld_defconfig magician_defconfig mmp2_defconfig pxa168_defconfig
  pxa910_defconfig

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoi2c-pxa2xx: use dynamic register layout
Sebastian Andrzej Siewior [Wed, 23 Feb 2011 11:38:15 +0000 (12:38 +0100)]
i2c-pxa2xx: use dynamic register layout

This will prepare the driver to handle register layouts where certain
registers are not available at all.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agofs: Use BUG_ON(!mnt) at dentry_open().
Tetsuo Handa [Wed, 19 Jan 2011 12:08:41 +0000 (21:08 +0900)]
fs: Use BUG_ON(!mnt) at dentry_open().

dentry_open() requires callers to pass a valid vfsmount.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: devpts_pty_new() return -ENOMEM if dentry allocation failed
Andrey Vagin [Mon, 7 Feb 2011 21:14:52 +0000 (00:14 +0300)]
fs: devpts_pty_new() return -ENOMEM if dentry allocation failed

In this case nobody can open a slave point, so will be better return
from devpts_pty_new()

Now we should not check error code from d_find_alias() in
devpts_pty_kill(), because the dentry exists all times.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonfs: lock() vs unlock() typo
Dan Carpenter [Sun, 20 Mar 2011 11:22:07 +0000 (14:22 +0300)]
nfs: lock() vs unlock() typo

These should be spin_unlock() instead of spin_lock().  It's a typo.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agopstore: fix leaking ->i_private
Tony Luck [Fri, 18 Mar 2011 18:44:48 +0000 (11:44 -0700)]
pstore: fix leaking ->i_private

Move kfree() of i_private out of ->unlink() and into ->evict_inode()

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agointroduce sys_syncfs to sync a single file system
Sage Weil [Thu, 10 Mar 2011 19:31:30 +0000 (11:31 -0800)]
introduce sys_syncfs to sync a single file system

It is frequently useful to sync a single file system, instead of all
mounted file systems via sync(2):

 - On machines with many mounts, it is not at all uncommon for some of
   them to hang (e.g. unresponsive NFS server).  sync(2) will get stuck on
   those and may never get to the one you do care about (e.g., /).
 - Some applications write lots of data to the file system and then
   want to make sure it is flushed to disk.  Calling fsync(2) on each
   file introduces unnecessary ordering constraints that result in a large
   amount of sub-optimal writeback/flush/commit behavior by the file
   system.

There are currently two ways (that I know of) to sync a single super_block:

 - BLKFLSBUF ioctl on the block device: That also invalidates the bdev
   mapping, which isn't usually desirable, and doesn't work for non-block
   file systems.
 - 'mount -o remount,rw' will call sync_filesystem as an artifact of the
   current implemention.  Relying on this little-known side effect for
   something like data safety sounds foolish.

Both of these approaches require root privileges, which some applications
do not have (nor should they need?) given that sync(2) is an unprivileged
operation.

This patch introduces a new system call syncfs(2) that takes an fd and
syncs only the file system it references.  Maybe someday we can

 $ sync /some/path

and not get

 sync: ignoring all arguments

The syscall is motivated by comments by Al and Christoph at the last LSF.
syncfs(2) seems like an appropriate name given statfs(2).

A similar ioctl was also proposed a while back, see
http://marc.info/?l=linux-fsdevel&m=127970513829285&w=2

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoSmall typo fix...
Holger Hans Peter Freyther [Thu, 24 Feb 2011 16:46:49 +0000 (17:46 +0100)]
Small typo fix...

Hi,

I was backporting the coredump over pipe feature and noticed this small typo,
I wish I would have something bigger to contribute...

>From 15d6080e0ed4267da103c706917a33b1015e8804 Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Date: Thu, 24 Feb 2011 17:42:50 +0100
Subject: [PATCH] fs: Fix a small typo in the comment

The function is called umh_pipe_setup not uhm_pipe_setup.

Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoFilesystem: fifo: Fixed coding style issue.
David Jenni [Wed, 23 Feb 2011 15:51:05 +0000 (16:51 +0100)]
Filesystem: fifo: Fixed coding style issue.

Fixed coding style issue.

Signed-off-by: David Jenni <dave.j@gmx.ch>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs/inode: Fix kernel-doc format for inode_init_owner
Ben Hutchings [Tue, 15 Feb 2011 12:48:09 +0000 (12:48 +0000)]
fs/inode: Fix kernel-doc format for inode_init_owner

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoselect: remove unused MAX_SELECT_SECONDS
Namhyung Kim [Fri, 21 Jan 2011 04:59:59 +0000 (13:59 +0900)]
select: remove unused MAX_SELECT_SECONDS

Remove the leftover from the commit 8ff3e8e85fa6 ("select:
switch select() and poll() over to hrtimers").

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: cleanup do_vfs_ioctl()
Namhyung Kim [Sun, 16 Jan 2011 15:48:17 +0000 (00:48 +0900)]
vfs: cleanup do_vfs_ioctl()

Move declaration of 'inode' to beginning of the function. Since it
is referenced directly or indirectly (in case of FIFREEZE/FITHAW/
FS_IOC_FIEMAP) it's not harmful IMHO. And remove unnecessary casts
using 'argp' instead.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoMerge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
Linus Torvalds [Mon, 21 Mar 2011 01:14:55 +0000 (18:14 -0700)]
Merge branch 'trivial' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
  video: change to new flag variable
  scsi: change to new flag variable
  rtc: change to new flag variable
  rapidio: change to new flag variable
  pps: change to new flag variable
  net: change to new flag variable
  misc: change to new flag variable
  message: change to new flag variable
  memstick: change to new flag variable
  isdn: change to new flag variable
  ieee802154: change to new flag variable
  ide: change to new flag variable
  hwmon: change to new flag variable
  dma: change to new flag variable
  char: change to new flag variable
  fs: change to new flag variable
  xtensa: change to new flag variable
  um: change to new flag variables
  s390: change to new flag variable
  mips: change to new flag variable
  ...

Fix up trivial conflict in drivers/hwmon/Makefile

13 years agoMerge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
Linus Torvalds [Mon, 21 Mar 2011 01:13:09 +0000 (18:13 -0700)]
Merge branch 'misc' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  scripts/extract-ikconfig: add xz compression support
  kbuild: add GNU GLOBAL tags generation
  setlocalversion: update mercurial tag parsing

13 years agoMerge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek...
Linus Torvalds [Mon, 21 Mar 2011 01:12:42 +0000 (18:12 -0700)]
Merge branch 'packaging' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kbuild: Add make tarxz-pkg build option

13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 21 Mar 2011 00:54:13 +0000 (17:54 -0700)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c-i801: SMBus patch for Intel DH89xxCC DeviceIDs
  i2c: Drop i2c_adapter.id
  i2c: Deprecate i2c_driver.attach_adapter and .detach_adapter
  i2c-dev: Use standard bus notification mechanism
  i2c: Export i2c_for_each_dev
  i2c: Get rid of <linux/i2c-id.h>
  i2c: Minor fixes to upgrading-clients document
  i2c: make i2c_get_adapter prototype clearer
  i2c: Fix typo in instantiating-devices document
  i2c-boardinfo: Fix typo in comment

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Linus Torvalds [Mon, 21 Mar 2011 00:53:50 +0000 (17:53 -0700)]
Merge git://git./linux/kernel/git/cmetcalf/linux-tile

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  asm-generic: support clock_adjtime() in <asm-generic/unistd.h>
  arch/tile: fix futex sanitization definition/prototype mismatch

13 years agor8169: fix a bug in rtl8169_init_phy()
Eric Dumazet [Sat, 19 Mar 2011 15:39:11 +0000 (16:39 +0100)]
r8169: fix a bug in rtl8169_init_phy()

commit 54405cde7624 (r8169: support control of advertising.)
introduced a bug in rtl8169_init_phy()

Reported-and-tested-by: Piotr Hosowicz <piotr@hosowicz.com>
Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by:: Oliver Neukum <oliver@neukum.org>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Anca Emanuel <anca.emanuel@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopowerpc/ptrace: Remove BUG_ON when full register set not available
Mike Wolf [Mon, 21 Mar 2011 00:14:53 +0000 (11:14 +1100)]
powerpc/ptrace: Remove BUG_ON when full register set not available

In some cases during a threaded core dump not all the threads will have
a full register set. This happens when the signal causing the core dump
races with a thread exiting.  The race happens when the exiting thread
has entered the kernel for the last time before the signal arrives, but
doesn't get far enough through the exit code to avoid being included
in the core dump.

So we get a thread included in the core dump which is never going to go
out to userspace again and only has a partial register set recorded

Normally we would catch each thread as it is about to go into userspace
and capture the full register set then.

However, this exiting thread is never going to go out to userspace
again, so we have no way to capture its full register set.  It doesn't
really matter, though, as this is a thread which is effectively
already dead.

So instead of hitting a BUG() in this case (a really bad choice of
action in the first place), we use a poison value for the register
values.

[BenH]: Some cosmetic/stylistic changes and fix build on ppc32

Signed-off-by: Mike Wolf <mjw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Factoring mpic cpu id fetching into a function
Meador Inge [Mon, 14 Mar 2011 10:01:07 +0000 (10:01 +0000)]
powerpc: Factoring mpic cpu id fetching into a function

The following code snippet:

unsigned int cpu = 0;
if (mpic->flags & MPIC_PRIMARY)
cpu = hard_smp_processor_id();

is seen in several places in the 'mpic.c' code.  This changeset factors
that pattern out into a helper function called 'mpic_processor_id'.

Signed-off-by: Meador Inge <meador_inge@mentor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Make MPIC honor the "pic-no-reset" device tree property
Meador Inge [Mon, 14 Mar 2011 10:01:06 +0000 (10:01 +0000)]
powerpc: Make MPIC honor the "pic-no-reset" device tree property

This property, defined in the Open PIC binding, tells the kernel not to use
the reset bit in the global configuration register.  Additionally, its
presence mandates that only sources which are actually used (i.e. appear in
the device tree) should have their VECPRI bits initialized.

Although, "pic-no-reset" can be used for the same use cases that
"protected-sources" is covering, the "protected-sources" implementation was
left completely intact.  This is a more pragmatic approach as there are
already several existing systems which use protected sources.  If
"pic-no-reset" *and* "protected-sources" are both used, however, then
"pic-no-reset" takes precedence in terms of the init behavior and the
sanity checks done by protected sources will still take place.

Signed-off-by: Meador Inge <meador_inge@mentor.com>
Cc: Hollis Blanchard <hollis_blanchard@mentor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Document the Open PIC device tree binding
Meador Inge [Mon, 14 Mar 2011 10:01:05 +0000 (10:01 +0000)]
powerpc: Document the Open PIC device tree binding

This binding documents several properties that have been in use for quite
some time, and adds one new property 'pic-no-reset', which controls the
runtime initialization behavior of the PIC.  More specifically, the presence
of 'pic-no-reset' mandates that the PIC shall not be reset during runtime
initialization and that any initialization related to interrupt sources
shall be limited to sources explicitly referenced in the device tree.  This
functionality is useful in AMP systems where multiple OSes are sharing the
PIC and the reinitialization of the PIC can interfere with OSes that are
already up and running.

The interrupt specifier definition is based off of Stuart Yoder's FSL MPIC
binding.

Signed-off-by: Meador Inge <meador_inge@mentor.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Stuart Yoder <stuart.yoder@freescale.com>
Cc: Hollis Blanchard <hollis_blanchard@mentor.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/pci: Fix crash in PCI code on ppc64 when matching device nodes
Benjamin Herrenschmidt [Sun, 20 Mar 2011 23:57:57 +0000 (10:57 +1100)]
powerpc/pci: Fix crash in PCI code on ppc64 when matching device nodes

Commit b5d937de0367d26f65b9af1aef5f2c34c1939be0 has a bug which causes
basically a NULL dereference in the PCI code during boot on ppc64
machines.

fetch_dev_dn() is called when dev->dev.of_node is NULL, so using that
as the starting point for the search makes no sense. It should instead
start from the device node of the PHB.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoi2c-mxs: set controller to pio queue mode after reset
Sascha Hauer [Fri, 25 Feb 2011 17:54:51 +0000 (18:54 +0100)]
i2c-mxs: set controller to pio queue mode after reset

mxs_reset_block() clears the PIO_QUEUE_MODE bit. So we have
to set it again after a controller reset.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2442: RX1950: Add support for LED blinking
Vasily Khoruzhick [Thu, 6 Jan 2011 19:52:52 +0000 (21:52 +0200)]
ARM: S3C2442: RX1950: Add support for LED blinking

Add .gpio_set_blink callback to support HW blinking
available on RX1950

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2442: RX1950: Retain LEDs state in suspend
Vasily Khoruzhick [Thu, 6 Jan 2011 19:52:51 +0000 (21:52 +0200)]
ARM: S3C2442: RX1950: Retain LEDs state in suspend

s3c_adc_battery uses LEDs to indicate charging process,
retain LEDs state in suspend, otherwise user have no information if PDA
battery is charging after he put it to suspend.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2410: H1940: Fix lcd_power_set function
Vasily Khoruzhick [Thu, 6 Jan 2011 19:52:50 +0000 (21:52 +0200)]
ARM: S3C2410: H1940: Fix lcd_power_set function

Current implementation of lcd_power_set is not reliable, sometimes
it does not enable LCD at all.
Mimic WinCE behavior to fix this issue.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2410: H1940: Add battery support
Vasily Khoruzhick [Thu, 6 Jan 2011 19:52:49 +0000 (21:52 +0200)]
ARM: S3C2410: H1940: Add battery support

Add battery monitoring/charging support via pda_power and
s3c_adc_battery drivers

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2410: H1940: Use leds-gpio driver for LEDs managing
Vasily Khoruzhick [Thu, 6 Jan 2011 19:52:48 +0000 (21:52 +0200)]
ARM: S3C2410: H1940: Use leds-gpio driver for LEDs managing

We can use generic leds-gpio driver, as latch api was converted
to gpiolib.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2410: H1940: Make h1940-bluetooth.c compile again
Vasily Khoruzhick [Thu, 6 Jan 2011 19:52:47 +0000 (21:52 +0200)]
ARM: S3C2410: H1940: Make h1940-bluetooth.c compile again

It was broken by removal of rfkill_set_led_trigger_name function,
and now compiler complains about implicit declaration.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoARM: S3C2410: H1940: Add keys device
Arnaud Patard (Rtp) [Thu, 6 Jan 2011 19:52:46 +0000 (21:52 +0200)]
ARM: S3C2410: H1940: Add keys device

Add buttons definition for H1940.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agoMerge branch 'for-2639/i2c/i2c-u2c12' into for-linus/2639/i2c-12
Ben Dooks [Sun, 20 Mar 2011 22:14:04 +0000 (22:14 +0000)]
Merge branch 'for-2639/i2c/i2c-u2c12' into for-linus/2639/i2c-12

13 years agoMerge branch 'vhost-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst...
David S. Miller [Sun, 20 Mar 2011 21:35:09 +0000 (14:35 -0700)]
Merge branch 'vhost-net-next' of git://git./linux/kernel/git/mst/vhost

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Sun, 20 Mar 2011 20:42:25 +0000 (13:42 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

13 years agoMerge branch 'slub/lockless' into for-linus
Pekka Enberg [Sun, 20 Mar 2011 16:13:26 +0000 (18:13 +0200)]
Merge branch 'slub/lockless' into for-linus

Conflicts:
include/linux/slub_def.h

13 years agoMerge branch 'slab/next' into for-linus
Pekka Enberg [Sun, 20 Mar 2011 16:12:03 +0000 (18:12 +0200)]
Merge branch 'slab/next' into for-linus

13 years agoslub: Dont define useless label in the !CONFIG_CMPXCHG_LOCAL case
Christoph Lameter [Tue, 15 Mar 2011 17:45:21 +0000 (12:45 -0500)]
slub: Dont define useless label in the !CONFIG_CMPXCHG_LOCAL case

The redo label needs #ifdeffery. Fixes the following problem introduced by
commit 8a5ec0ba42c4 ("Lockless (and preemptless) fastpaths for slub"):

  mm/slub.c: In function 'slab_free':
  mm/slub.c:2124: warning: label 'redo' defined but not used

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agofirewire: core: ignore link-active bit of new nodes, fix device recognition
Stefan Richter [Mon, 14 Mar 2011 23:08:41 +0000 (00:08 +0100)]
firewire: core: ignore link-active bit of new nodes, fix device recognition

Like the older ieee1394 core driver, firewire-core skipped scanning of
any new node whose PHY sent a self ID without "link active" bit.  If a
device had this bit off mistakenly, it meant that it was inaccessible to
kernel drivers with the old IEEE 1394 driver stack but could still be
accessed by userspace drivers through the raw1394 interface.

But with firewire-core, userspace drivers don't get to see such buggy
devices anymore.  This is effectively a driver regression since this
device bug is otherwise harmless.

We now attempt to scan all devices, even repeaters that don't have a
link or powered-down devices that have everything but their PHY shut
down when plugged in.  This results in futile repeated scanning attempts
in case of such devices that really don't have an active link, but this
doesn't hurt since recent workqueue infrastructure lets us run more
concurrent scanning jobs than we can shake a stick at.

This should fix accessibility of Focusrite Saffire PRO 26 I/O:
http://sourceforge.net/mailarchive/forum.php?thread_name=20110314215622.5c751bb0%40stein&forum_name=ffado-user

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
13 years agofirewire: sbp2: revert obsolete 'fix stall with "Unsolicited response"'
Stefan Richter [Mon, 14 Mar 2011 23:04:42 +0000 (00:04 +0100)]
firewire: sbp2: revert obsolete 'fix stall with "Unsolicited response"'

Now that firewire-core sets the local node's SPLIT_TIMEOUT to 2 seconds
per default, commit a481e97d3cdc40b9d58271675bd4f0abb79d4872 is no
longer required.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
13 years agofirewire: core: increase default SPLIT_TIMEOUT value
Clemens Ladisch [Mon, 7 Mar 2011 10:21:15 +0000 (11:21 +0100)]
firewire: core: increase default SPLIT_TIMEOUT value

The SPLIT_TIMEOUT mechanism is intended to detect requests that somehow
got lost.  However, when the timeout value is too low, transactions that
could have been completed successfully will be cancelled.  Furthermore,
there are chips whose firmwares ignore the configured split timeout and
send late split response; known examples are the DM1x00 (BeBoB), TCD22x0
(DICE), and some OXUF936QSE firmwares.

This patch changes the default timeout to two seconds, which happens to
be the default on other OSes, too.

Actual lost requests are extremely rare, so there should be no practical
downside to increasing the split timeout even on devices that work
correctly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
13 years agonetfilter: ipt_CLUSTERIP: fix buffer overflow
Vasiliy Kulikov [Sun, 20 Mar 2011 14:42:52 +0000 (15:42 +0100)]
netfilter: ipt_CLUSTERIP: fix buffer overflow

'buffer' string is copied from userspace.  It is not checked whether it is
zero terminated.  This may lead to overflow inside of simple_strtoul().
Changli Gao suggested to copy not more than user supplied 'size' bytes.

It was introduced before the git epoch.  Files "ipt_CLUSTERIP/*" are
root writable only by default, however, on some setups permissions might be
relaxed to e.g. network admin user.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: xtables: fix reentrancy
Eric Dumazet [Sun, 20 Mar 2011 14:40:06 +0000 (15:40 +0100)]
netfilter: xtables: fix reentrancy

commit f3c5c1bfd4308 (make ip_tables reentrant) introduced a race in
handling the stackptr restore, at the end of ipt_do_table()

We should do it before the call to xt_info_rdunlock_bh(), or we allow
cpu preemption and another cpu overwrites stackptr of original one.

A second fix is to change the underflow test to check the origptr value
instead of 0 to detect underflow, or else we allow a jump from different
hooks.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ipset: fix checking the type revision at create command
Jozsef Kadlecsik [Sun, 20 Mar 2011 14:35:01 +0000 (15:35 +0100)]
netfilter: ipset: fix checking the type revision at create command

The revision of the set type was not checked at the create command: if the
userspace sent a valid set type but with not supported revision number,
it'd create a loop.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: ipset: fix address ranges at hash:*port* types
Jozsef Kadlecsik [Sun, 20 Mar 2011 14:33:26 +0000 (15:33 +0100)]
netfilter: ipset: fix address ranges at hash:*port* types

The hash:*port* types with IPv4 silently ignored when address ranges
with non TCP/UDP were added/deleted from the set and used the first
address from the range only.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoi2c-i801: SMBus patch for Intel DH89xxCC DeviceIDs
Seth Heasley [Sun, 20 Mar 2011 13:50:53 +0000 (14:50 +0100)]
i2c-i801: SMBus patch for Intel DH89xxCC DeviceIDs

Add the SMBus Controller DeviceIDs for the Intel DH89xxCC PCH.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Drop i2c_adapter.id
Jean Delvare [Sun, 20 Mar 2011 13:50:53 +0000 (14:50 +0100)]
i2c: Drop i2c_adapter.id

There is no user left of i2c_adapter.id, so we can get rid of it.
Finally! :)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Deprecate i2c_driver.attach_adapter and .detach_adapter
Jean Delvare [Sun, 20 Mar 2011 13:50:53 +0000 (14:50 +0100)]
i2c: Deprecate i2c_driver.attach_adapter and .detach_adapter

The last legitimate user of i2c_driver.attach_adapter and
.detach_adapter is gone, so we can finally deprecate these callbacks.
The last few drivers which still use these will have to be updated to
make use of standard I2C device instantiation ways instead.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c-dev: Use standard bus notification mechanism
Jean Delvare [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c-dev: Use standard bus notification mechanism

Use the standard driver core mechanism to keep track of i2c adapters
present on the system: i2c_for_each_dev and a notifier. This will let
us deprecate and ultimately remove the legacy attach_adapter and
detach_adapter callbacks in i2c_driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Export i2c_for_each_dev
Jean Delvare [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c: Export i2c_for_each_dev

Introduce i2c_for_each_dev(), an i2c device iterator with proper
locking for use by i2c-dev. This is needed so that we can get rid of
the attach_adapter and detach_adapter legacy callback functions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Get rid of <linux/i2c-id.h>
Jean Delvare [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c: Get rid of <linux/i2c-id.h>

The last remaining ID in <linux/i2c-id.h> is no longer used anywhere,
so we can finally get rid of it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Minor fixes to upgrading-clients document
Jean Delvare [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c: Minor fixes to upgrading-clients document

* Typical legacy drivers implemented method .detach_client, not
  .detach_adapter.
* Drop all references to __devexit, as i2c drivers shouldn't use it.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: make i2c_get_adapter prototype clearer
Jean Delvare [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c: make i2c_get_adapter prototype clearer

Rename the parameter of i2c_get_adapter() to "nr", to make it clear we
are passing an adapter number and not an adapter ID (which have gone
away by now.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Fix typo in instantiating-devices document
Roman Fietze [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c: Fix typo in instantiating-devices document

The struct i2c_board_info member holding the name is "type", not
"name".

Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
13 years agoi2c-boardinfo: Fix typo in comment
Wolfram Sang [Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)]
i2c-boardinfo: Fix typo in comment

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoniu: Rename NIU parent platform device name to fix conflict.
David S. Miller [Sun, 20 Mar 2011 06:06:33 +0000 (23:06 -0700)]
niu: Rename NIU parent platform device name to fix conflict.

When the OF device driver bits were converted over to the platform
device infrastructure in commit 74888760d40b3ac9054f9c5fa07b566c0676ba2d
("dt/net: Eliminate users of of_platform_{,un}register_driver") we
inadvertantly created probing problems in the OF case.

The NIU driver creates a dummy platform device to represent the
board that contains one or more child NIU devices.  Unfortunately
we use the same name, "niu", as the OF device driver itself uses.

The result is that we try to probe the dummy "niu" parent device we
create, and since it has a NULL ofdevice pointer etc. everything
explodes:

[783019.128243] niu: niu.c:v1.1 (Apr 22, 2010)
[783019.128810] Unable to handle kernel NULL pointer dereference
[783019.128949] tsk->{mm,active_mm}->context = 000000000000039e
[783019.129078] tsk->{mm,active_mm}->pgd = fffff803afc5a000
[783019.129206]               \|/ ____ \|/
[783019.129213]               "@'/ .. \`@"
[783019.129220]               /_| \__/ |_\
[783019.129226]                  \__U_/
[783019.129378] modprobe(2004): Oops [#1]
[783019.129423] TSTATE: 0000000011001602 TPC: 0000000010052ff8 TNPC: 000000000061bbb4 Y: 00000000    Not tainted
[783019.129542] TPC: <niu_of_probe+0x3c/0x2dc [niu]>
[783019.129624] g0: 8080000000000000 g1: 0000000000000000 g2: 0000000010056000 g3: 0000000000000002
[783019.129733] g4: fffff803fc1da0c0 g5: fffff800441e2000 g6: fffff803fba84000 g7: 0000000000000000
[783019.129842] o0: fffff803fe7df010 o1: 0000000010055700 o2: 0000000000000000 o3: fffff803fbacaca0
[783019.129951] o4: 0000000000000080 o5: 0000000000777908 sp: fffff803fba866e1 ret_pc: 0000000010052ff4
[783019.130083] RPC: <niu_of_probe+0x38/0x2dc [niu]>
[783019.130165] l0: fffff803fe7df010 l1: fffff803fbacafc0 l2: fffff803fbacaca0 l3: ffffffffffffffed
[783019.130273] l4: 0000000000000000 l5: 000000007fffffff l6: fffff803fba86f40 l7: 0000000000000001
[783019.130382] i0: fffff803fe7df000 i1: fffff803fc20aba0 i2: 0000000000000000 i3: 0000000000000001
[783019.130490] i4: 0000000000000000 i5: 0000000000000000 i6: fffff803fba867a1 i7: 000000000062038c
[783019.130614] I7: <platform_drv_probe+0xc/0x20>

Fix by simply renaming the parent device to "niu-board".

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sun, 20 Mar 2011 05:27:06 +0000 (22:27 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits)
  Input: tsc2005 - remove 'disable' sysfs attribute
  Input: tsc2005 - add open/close
  Input: tsc2005 - handle read errors from SPI layer
  Input: tsc2005 - do not rearm timer in hardirq handler
  Input: tsc2005 - don't use work for 'pen up' handling
  Input: tsc2005 - do not use 0 in place of NULL
  Input: tsc2005 - use true/false for boolean variables
  Input: tsc2005 - hide selftest attribute if we can't reset
  Input: tsc2005 - rework driver initialization code
  Input: tsc2005 - set up bus type in input device
  Input: tsc2005 - set up parent device
  Input: tsc2005 - clear driver data after unbinding
  Input: tsc2005 - add module description
  Input: tsc2005 - remove driver banner message
  Input: tsc2005 - remove incorrect module alias
  Input: tsc2005 - convert to using dev_pm_ops
  Input: tsc2005 - use spi_get/set_drvdata()
  Input: introduce tsc2005 driver
  Input: xen-kbdfront - move to drivers/input/misc
  Input: xen-kbdfront - add grant reference for shared page
  ...

13 years agoasm-generic: support clock_adjtime() in <asm-generic/unistd.h>
Chris Metcalf [Sat, 19 Mar 2011 15:47:53 +0000 (11:47 -0400)]
asm-generic: support clock_adjtime() in <asm-generic/unistd.h>

A syscall was added without being added to asm-generic, which
makes tile (and presumably score and unicore32) break.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
13 years agoarch/tile: fix futex sanitization definition/prototype mismatch
Chris Metcalf [Sat, 19 Mar 2011 15:45:34 +0000 (11:45 -0400)]
arch/tile: fix futex sanitization definition/prototype mismatch

Commit 8d7718aa082aaf30a0b4989e1f04858952f941bc changed "int"
to "u32" in the prototypes but not the definition.
I missed this when I saw the patch go by on LKML.

We cast "u32 *" to "int *" since we are tying into the underlying
atomics framework, and atomic_t uses int as its value type.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Reviewed-by: Michel Lespinasse <walken@google.com>
13 years agor8169: fix a bug in rtl8169_init_phy()
Eric Dumazet [Sat, 19 Mar 2011 05:39:11 +0000 (05:39 +0000)]
r8169: fix a bug in rtl8169_init_phy()

commit 54405cde7624 (r8169: support control of advertising.)
introduced a bug in rtl8169_init_phy()

Reported-by: Piotr Hosowicz <piotr@hosowicz.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Anca Emanuel <anca.emanuel@gmail.com>
Tested-by: Piotr Hosowicz <piotr@hosowicz.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: fix a typo in a comment
Nicolas de Pesloüan [Sat, 19 Mar 2011 20:36:18 +0000 (13:36 -0700)]
bonding: fix a typo in a comment

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen: update mask_rw_pte after kernel page tables init changes
Stefano Stabellini [Wed, 9 Mar 2011 14:22:05 +0000 (14:22 +0000)]
xen: update mask_rw_pte after kernel page tables init changes

After "x86-64, mm: Put early page table high" already existing kernel
page table pages can be mapped using early_ioremap too so we need to
update mask_rw_pte to make sure these pages are still mapped RO.
The reason why we have to do that is explain by the commit message of
fef5ba797991f9335bcfc295942b684f9bf613a1:

"Xen requires that all pages containing pagetable entries to be mapped
read-only.  If pages used for the initial pagetable are already mapped
then we can change the mapping to RO.  However, if they are initially
unmapped, we need to make sure that when they are later mapped, they
are also mapped RO.

..SNIP..

the pagetable setup code early_ioremaps the pages to write their
entries, so we must make sure that mappings created in the early_ioremap
fixmap area are mapped RW.  (Those mappings are removed before the pages
are presented to Xen as pagetable pages.)"

We accomplish all this in mask_rw_pte by mapping RO all the pages mapped
using early_ioremap apart from the last one that has been allocated
because it is not a page table page yet (it has not been hooked into the
page tables yet).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
LKML-Reference: <alpine.DEB.2.00.1103171739050.3382@kaball-desktop>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agoxen: set max_pfn_mapped to the last pfn mapped
Stefano Stabellini [Fri, 18 Feb 2011 11:32:40 +0000 (11:32 +0000)]
xen: set max_pfn_mapped to the last pfn mapped

Do not set max_pfn_mapped to the end of the initial memory mappings,
that also contain pages that don't belong in pfn space (like the mfn
list).

Set max_pfn_mapped to the last real pfn mapped in the initial memory
mappings that is the pfn backing _end.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
LKML-Reference: <alpine.DEB.2.00.1103171739050.3382@kaball-desktop>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agox86: Cleanup highmap after brk is concluded
Yinghai Lu [Fri, 18 Feb 2011 11:30:30 +0000 (11:30 +0000)]
x86: Cleanup highmap after brk is concluded

Now cleanup_highmap actually is in two steps: one is early in head64.c
and only clears above _end; a second one is in init_memory_mapping() and
tries to clean from _brk_end to _end.
It should check if those boundaries are PMD_SIZE aligned but currently
does not.
Also init_memory_mapping() is called several times for numa or memory
hotplug, so we really should not handle initial kernel mappings there.

This patch moves cleanup_highmap() down after _brk_end is settled so
we can do everything in one step.
Also we honor max_pfn_mapped in the implementation of cleanup_highmap.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
LKML-Reference: <alpine.DEB.2.00.1103171739050.3382@kaball-desktop>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Sat, 19 Mar 2011 06:38:50 +0000 (23:38 -0700)]
Merge branch 'next' into for-linus

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Sat, 19 Mar 2011 05:33:38 +0000 (22:33 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: move NILFS_SUPER_MAGIC to linux/magic.h
  nilfs2: get rid of nilfs_sb_info structure
  nilfs2: use sb instance instead of nilfs_sb_info struct
  nilfs2: get rid of sc_sbi back pointer
  nilfs2: move log writer onto nilfs object
  nilfs2: move next generation counter into nilfs object
  nilfs2: move s_inode_lock and s_dirty_files into nilfs object
  nilfs2: move parameters on nilfs_sb_info into nilfs object
  nilfs2: move mount options to nilfs object
  nilfs2: record used amount of each checkpoint in checkpoint list
  nilfs2: optimize rec_len functions
  nilfs2: append blocksize info to warnings during loading super blocks
  nilfs2: add compat ioctl
  nilfs2: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION
  nilfs2: tighten restrictions on inode flags
  nilfs2: mark S_NOATIME on inodes only if NOATIME attribute is set
  nilfs2: use common file attribute macros
  nilfs2: add free entries count only if clear bit operation succeeded
  nilfs2: decrement inodes count only if raw inode was successfully deleted

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Sat, 19 Mar 2011 05:32:40 +0000 (22:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (53 commits)
  mmc: dw_mmc: support mmc power control with regulator
  mmc: dw_mmc: fix suspend/resume operation
  mmc: dw_mmc: add quirks for unreliable card detect, and capabilities
  mmc: tmio: fix address in kunmap_atomic() calls
  mmc: core: reset card voltage after power off
  mmc: core: export function mmc_do_release_host()
  mmc: sdio: remember new card RCA when redetecting card
  mmc: dw_mmc: Remove set-but-unused variable.
  mmc: sdhci-esdhc-imx: add card detect on custom GPIO for mx25/35
  mmc: sdhci-esdhc: broken card detection is not a default quirk
  mmc: sdhci-esdhc-imx: add write protect on custom GPIO on mx25/35
  mmc: msm_sdcc: remove needless cache flush after dma_unmap_sg()
  mmc: sh_mmcif: support aggressive clock gating
  mmc: check if mmc cards < 2GB do sector addressing
  mmc: core: comment on why sdio_reset is done at init time
  mmc: dw_mmc: support DDR mode
  mmc: via-sdmmc: Remove set-but-unused variable.
  mmc: cb710: Return err value in cb710_wait_while_busy()
  mmc: sdhci-pci: Remove set-but-unused variable.
  mmc: mxs-mmc: add mmc host driver for i.MX23/28
  ...

13 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Sat, 19 Mar 2011 05:31:54 +0000 (22:31 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  USB: Move runtime PM callbacks to usb_device_pm_ops

13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux...
Linus Torvalds [Sat, 19 Mar 2011 05:31:05 +0000 (22:31 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/dhowells/linux-2.6-mn10300

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300:
  MN10300: Clear ASB2364 peripheral interrupt masks before enabling interrupts
  MN10300: Fix the ASB2364 gdbport UART register defs
  MN10300: Fix ASB2364 FPGA register defs
  MN10300: Select GENERIC_HARDIRQS_NO_DEPRECATED
  MN10300: Select HAVE_GENERIC_HARDIRQS rather than GENERIC_HARDIRQS
  MN10300: Convert ASB2364 FPGA irq_chip to new functions
  MN10300: Convert ipi irq_chip to new functions
  MN10300: Convert serial irq_chip to new functions
  MN10300: Convert cpu irq_chips to new functions
  MN10300: Remove unused mn10300_intc_* functions
  MN10300: Remove stale irq_chip.end - V2
  MN10300: Use clockevents_calc_mult_shift()
  MN10300: Use clocksource_register_hz()
  MN10300: Remove stale code

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Sat, 19 Mar 2011 05:30:00 +0000 (22:30 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (32 commits)
  Blackfin: ip0x: fix unused variable warning
  Blackfin: punt unused HDMA masks
  Blackfin: wire up new syscalls
  Blackfin/ipipe: restore pipeline bits in irqflags
  Blackfin/ipipe: fix deferred pipeline sync for the root stage
  Blackfin/ipipe: upgrade to I-pipe mainline
  Blackfin: cpufreq: fix typos
  Blackfin: enable GENERIC_HARDIRQS_NO_DEPRECATED
  Blackfin: SMP: convert to irq chip functions
  Blackfin: use accessor functions in show_interrupts()
  Blackfin: use proper wrapper functions for modifying irq status
  Blackfin: convert gpio irq_chip to new functions
  Blackfin: convert mac irq_chip to new functions
  Blackfin: convert error irq_chip to new functions
  Blackfin: convert internal irq_chip to new functions
  Blackfin: convert core irq_chip to new functions
  Blackfin: use proper wrappers for irq_desc
  Blackfin: optimize startup code
  Blackfin: SMP: work around anomaly 05000491
  Blackfin: SMP: implement cpu_freq support
  ...

13 years agoftmac100: use resource_size()
Dan Carpenter [Sat, 19 Mar 2011 04:53:03 +0000 (21:53 -0700)]
ftmac100: use resource_size()

The calculation is off-by-one.  It should be "end - start + 1".  This
patch fixes it to use resource_size() instead.  Oddly, the code already
uses resource size correctly a couple lines earlier when it calls
request_mem_region() for this memory.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: Add {open_by,name_to}_handle_at and clock_adjtime syscalls.
David S. Miller [Sat, 19 Mar 2011 04:50:29 +0000 (21:50 -0700)]
sparc: Add {open_by,name_to}_handle_at and clock_adjtime syscalls.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: Implement of_iomap().
David S. Miller [Fri, 18 Mar 2011 22:47:26 +0000 (15:47 -0700)]
sparc: Implement of_iomap().

Grab the pre-computed resource and map using of_ioremap().

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: Implement of_address_to_resource().
David S. Miller [Fri, 18 Mar 2011 22:31:19 +0000 (15:31 -0700)]
sparc: Implement of_address_to_resource().

Similarly to irq_of_parse_and_map(), find the platform_device
object and return the pre-computed resource.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoheaders: use __aligned_xx types for userspace
Mike Frysinger [Fri, 18 Mar 2011 08:50:37 +0000 (08:50 +0000)]
headers: use __aligned_xx types for userspace

Now that we finally have __aligned_xx exported to userspace, convert
the headers that get exported over to the proper type.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Reset IPCB when entering IP stack on NF_FORWARD
Herbert Xu [Fri, 18 Mar 2011 05:27:28 +0000 (05:27 +0000)]
bridge: Reset IPCB when entering IP stack on NF_FORWARD

Whenever we enter the IP stack proper from bridge netfilter we
need to ensure that the skb is in a form the IP stack expects
it to be in.

The entry point on NF_FORWARD did not meet the requirements of
the IP stack, therefore leading to potential crashes/panics.

This patch fixes the problem.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovlan: should take into account needed_headroom
Eric Dumazet [Fri, 18 Mar 2011 00:27:27 +0000 (00:27 +0000)]
vlan: should take into account needed_headroom

Commit c95b819ad7 (gre: Use needed_headroom)
made gre use needed_headroom instead of hard_header_len

This uncover a bug in vlan code.

We should make sure vlan devices take into account their
real_dev->needed_headroom or we risk a crash in ipgre_header(), because
we dont have enough room to push IP header in skb.

Reported-by: Diddi Oscarsson <diddi@diddi.se>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Compat handling for struct ethtool_rxnfc
Ben Hutchings [Thu, 17 Mar 2011 07:34:32 +0000 (07:34 +0000)]
ethtool: Compat handling for struct ethtool_rxnfc

This structure was accidentally defined such that its layout can
differ between 32-bit and 64-bit processes.  Add compat structure
definitions and an ioctl wrapper function.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: stable@kernel.org [2.6.30+]
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: __ethtool_set_sg: check for function pointer before using it
Roger Luethi [Thu, 17 Mar 2011 06:37:21 +0000 (06:37 +0000)]
ethtool: __ethtool_set_sg: check for function pointer before using it

__ethtool_set_sg does not check if dev->ethtool_ops->set_sg is defined
which can result in a NULL pointer dereference when ethtool is used to
change SG settings for drivers without SG support.

Signed-off-by: Roger Luethi <rl@hellgate.ch>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoeconet: 4 byte infoleak to the network
Vasiliy Kulikov [Thu, 17 Mar 2011 01:40:10 +0000 (01:40 +0000)]
econet: 4 byte infoleak to the network

struct aunhdr has 4 padding bytes between 'pad' and 'handle' fields on
x86_64.  These bytes are not initialized in the variable 'ah' before
sending 'ah' to the network.  This leads to 4 bytes kernel stack
infoleak.

This bug was introduced before the git epoch.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Phil Blundell <philb@gnu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogianfar: Fall back to software tcp/udp checksum on older controllers
Alex Dubov [Wed, 16 Mar 2011 17:57:13 +0000 (17:57 +0000)]
gianfar: Fall back to software tcp/udp checksum on older controllers

As specified by errata eTSEC49 of MPC8548 and errata eTSEC12 of MPC83xx,
older revisions of gianfar controllers will be unable to calculate a TCP/UDP
packet checksum for some alignments of the appropriate FCB. This patch checks
for FCB alignment on such controllers and falls back to software checksumming
if the alignment is known to be bad.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc: Provide NO_IRQ definition.
David S. Miller [Fri, 18 Mar 2011 22:03:16 +0000 (15:03 -0700)]
sparc: Provide NO_IRQ definition.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoUSB: Move runtime PM callbacks to usb_device_pm_ops
Rafael J. Wysocki [Fri, 18 Mar 2011 18:55:36 +0000 (19:55 +0100)]
USB: Move runtime PM callbacks to usb_device_pm_ops

USB defines usb_device_type pointing to usb_device_pm_ops that
provides system-wide PM callbacks only and usb_bus_type pointing to
usb_bus_pm_ops that provides runtime PM callbacks only.  However,
the USB runtime PM callbacks may be defined in usb_device_pm_ops
which makes it possible to drop usb_bus_pm_ops and will allow us
to consolidate the handling of subsystems by the PM core code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 18 Mar 2011 17:56:44 +0000 (10:56 -0700)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: label: remove #include of ACPI header to avoid warnings
  PCI: label: Fix compilation error when CONFIG_ACPI is unset
  PCI: pre-allocate additional resources to devices only after successful allocation of essential resources.
  PCI: introduce reset_resource()
  PCI: data structure agnostic free list function
  PCI: refactor io size calculation code
  PCI: do not create quirk I/O regions below PCIBIOS_MIN_IO for ICH
  PCI hotplug: acpiphp: set current_state to D0 in register_slot
  PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs
  PCI: add more checking to ICH region quirks
  PCI: aer-inject: Override PCIe AER Mask Registers
  PCI: fix tlan build when CONFIG_PCI is not enabled
  PCI: remove quirk for pre-production systems
  PCI: Avoid potential NULL pointer dereference in pci_scan_bridge
  PCI/lpc: irq and pci_ids patch for Intel DH89xxCC DeviceIDs
  PCI: sysfs: Fix failure path for addition of "vpd" attribute

13 years agoMerge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 18 Mar 2011 17:56:02 +0000 (10:56 -0700)]
Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6

* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
  spi/dw_spi: move dw_spi.h into drivers/spi
  spi/dw_spi: Fix missing header
  gpio/langwell: Clear edge bit before handling
  gpio/langwell: Simplify demux loop
  gpio/langwell: Convert irq name space
  gpio/langwell: Fix broken irq_eoi change.
  gpio; Make Intel chipset gpio drivers depend on x86
  gpio/cs5535-gpio: Fix section mismatch
  spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
  spi/davinci: Support DMA transfers larger than 65535 words
  spi/davinci: Use correct length parameter to dma_map_single calls
  gpio: Use __devexit at necessary places
  gpio: add MODULE_DEVICE_TABLE to pch_gpio and ml_ioh_gpio
  gpio/mcp23s08: support mcp23s17 variant
  of_mmc_spi: add card detect irq support
  spi/omap_mcspi: catch xfers of non-multiple SPI word size
  spi/omap_mcspi: Off-by-one error in finding the right divisor
  gpio/pca953x: Fix wrong pointer type
  spi/pl022: rid dangling labels
  spi: add support for SuperH SPI
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Fri, 18 Mar 2011 17:55:11 +0000 (10:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: use alloc_workqueue function
  dlm: increase default hash table sizes
  dlm: record full callback state

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Fri, 18 Mar 2011 17:51:11 +0000 (10:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  fs: call security_d_instantiate in d_obtain_alias V2
  lose 'mounting_here' argument in ->d_manage()
  don't pass 'mounting_here' flag to follow_down()
  change the locking order for namespace_sem
  fix deadlock in pivot_root()
  vfs: split off vfsmount-related parts of vfs_kern_mount()
  Some fixes for pstore
  kill simple_set_mnt()

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bcopeland...
Linus Torvalds [Fri, 18 Mar 2011 17:50:52 +0000 (10:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bcopeland/omfs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bcopeland/omfs:
  omfs: make readdir stop when filldir says so
  omfs: merge unlink() and rmdir(), close leak in rename()
  omfs: stop playing silly buggers with omfs_unlink() in ->rename()
  omfs: rename() needs to mark old_inode dirty after ctime update

13 years agoMerge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
Linus Torvalds [Fri, 18 Mar 2011 17:50:27 +0000 (10:50 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6: (25 commits)
  UBIFS: clean-up commentaries
  UBIFS: save 128KiB or more RAM
  UBIFS: allocate orphans scan buffer on demand
  UBIFS: allocate lpt dump buffer on demand
  UBIFS: allocate ltab checking buffer on demand
  UBIFS: allocate scanning buffer on demand
  UBIFS: allocate dump buffer on demand
  UBIFS: do not check data crc by default
  UBIFS: simplify UBIFS Kconfig menu
  UBIFS: print max. index node size
  UBIFS: handle allocation failures in UBIFS write path
  UBIFS: use max_write_size during recovery
  UBIFS: use max_write_size for write-buffers
  UBIFS: introduce write-buffer size field
  UBI: incorporate LEB offset information
  UBIFS: incorporate maximum write size
  UBI: provide LEB offset information
  UBI: incorporate maximum write size
  UBIFS: fix LEB number in printk
  UBIFS: restrict world-writable debugfs files
  ...

13 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Fri, 18 Mar 2011 17:50:02 +0000 (10:50 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: make tests modes dynamic
  UBI: make self-checks dynamic
  UBI: make debugging messages dynamic
  UBI: remove UBI_IO_DEBUG macro
  UBI: kill debugging buffer
  UBI: allocate erase checking buffer on demand
  UBI: allocate write checking buffer on demand
  UBI: always re-read in case of read failures
  UBI: cleanup comments about corrupted PEBs
  UBI: add slab cache for ubi_scan_leb objects
  UBI: use raw mtd read function in debugging code
  UBI: try to reveal buggy MTD drivers
  UBI: add a commentary about allocating VID header buffer on stack
  UBI: cleanup LEB start calculations
  UBI: fix NOR erase preparation quirk

13 years agoMAINTAINERS: Add serial
Alan Cox [Fri, 18 Mar 2011 13:56:14 +0000 (13:56 +0000)]
MAINTAINERS: Add serial

Add an entry for serial maintainers.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>