pandora-kernel.git
14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Wed, 7 Apr 2010 07:54:33 +0000 (09:54 +0200)]
Merge branch 'fix/misc' into for-linus

14 years agomicroblaze: Enable memory leak detector
Michal Simek [Tue, 6 Apr 2010 08:19:30 +0000 (10:19 +0200)]
microblaze: Enable memory leak detector

Enable DEBUG_KMEMLEAK for microblaze

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Fix futex code
Michal Simek [Tue, 6 Apr 2010 16:51:37 +0000 (18:51 +0200)]
microblaze: Fix futex code

Use logical and NOT for ANDN. It was likely type fault.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Fix ftrace_update_ftrace_func panic
Steven J. Magnani [Fri, 2 Apr 2010 18:29:39 +0000 (13:29 -0500)]
microblaze: Fix ftrace_update_ftrace_func panic

The Microblaze dynamic ftrace code assumes a call ordering that is not met
in all scenarios. Specifically, executing a command similar to:

  echo 105 > /sys/kernel/debug/tracing/set_ftrace_pid

before any other tracing-related commands results in a kernel panic:

  BUG: failure at arch/microblaze/kernel/ftrace.c:198/ftrace_update_ftrace_func()!

Recoding ftrace_update_ftrace_func() to use &ftrace_caller directly eliminates
the need to capture its address elsewhere (and thus rely on a particular call
sequence).

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agodrm/radeon/kms/combios: verify dac_adj values are valid
Alex Deucher [Tue, 6 Apr 2010 16:35:26 +0000 (12:35 -0400)]
drm/radeon/kms/combios: verify dac_adj values are valid

Some vbios dac_adj tables are all zeros.  Check for that
case and use the default table if so.

Should fix fdo bug 27478.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: clean up atom dac handling
Alex Deucher [Tue, 6 Apr 2010 05:22:41 +0000 (01:22 -0400)]
drm/radeon/kms: clean up atom dac handling

- make sure legacy dac1 has an enc priv
- remove unused num var
- no need for extra tv_dac var in atom dac functions

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: legacy tv dac cleanup
Alex Deucher [Tue, 6 Apr 2010 04:05:46 +0000 (00:05 -0400)]
drm/radeon/kms: legacy tv dac cleanup

- fix formatting
- clean up tv_dac_cntl handling for tv

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: small memory leak in atom exit code
Dan Carpenter [Tue, 6 Apr 2010 10:55:33 +0000 (10:55 +0000)]
drm/radeon/kms: small memory leak in atom exit code

This is an unlikely memory leak, but we may as well fix it.  It's easy
to fix and every static checker will complain if we don't.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/edid/quirks: Envision EN2028
Adam Jackson [Tue, 6 Apr 2010 16:11:00 +0000 (16:11 +0000)]
drm/edid/quirks: Envision EN2028

Claims 1280x1024 preferred, physically 1600x1200

cf. http://bugzilla.redhat.com/530399

Signed-off-by: Adam Jackson <ajax@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoide: Fix IDE taskfile with cfq scheduler
Mikulas Patocka [Tue, 6 Apr 2010 23:43:33 +0000 (16:43 -0700)]
ide: Fix IDE taskfile with cfq scheduler

When ide taskfile access is being used (for example with hdparm --security
commands) and cfq scheduler is selected, the scheduler crashes on BUG in
cfq_put_request.

The reason is that the cfq scheduler is tracking counts of read and write
requests separately; the ide-taskfile subsystem allocates a read request and
then flips the flag to make it a write request. The counters in cfq will
mismatch.

This patch changes ide-taskfile to allocate the READ or WRITE request as
required and don't change the flag later.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonodemask: include slab.h from drivers/base/node.c
Tejun Heo [Tue, 6 Apr 2010 10:23:33 +0000 (19:23 +0900)]
nodemask: include slab.h from drivers/base/node.c

NODEMASK_ALLOC/FREE are mapped to kmalloc/free if NODES_SHIFT > 8.
Among its several users, drivers/base/node.c wasn't including slab.h
leading to build failure if NODES_SHIFT > 8.  Include slab.h from
drivers/base/node.c.

This isn't an ideal solution but including slab.h directly from
nodemask.h is not an option because nodemask.h gets included
everywhere.  For now, make it work by including slab.h from its users.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branches 'battery', 'bugzilla-14667', 'bugzilla-15096', 'bugzilla-15480', ...
Len Brown [Tue, 6 Apr 2010 21:06:22 +0000 (17:06 -0400)]
Merge branches 'battery', 'bugzilla-14667', 'bugzilla-15096', 'bugzilla-15480', 'bugzilla-15521', 'bugzilla-15605', 'gpe-reference-counters', 'misc', 'pxm-fix' and 'video-random-key' into release

14 years agoACPI / PM: Move ACPI video resume to a PM notifier
Rafael J. Wysocki [Sun, 4 Apr 2010 23:43:51 +0000 (01:43 +0200)]
ACPI / PM: Move ACPI video resume to a PM notifier

There is a problem with the ACPI video resume routine that it's
executed before the GPU that may be accessed by it.  To fix this
issue, move the ACPI video resume to a power management notifier,
so that's executed after resuming all devices, including the GPU.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15096, which is
a listed regression from 2.6.31.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Tue, 6 Apr 2010 20:03:52 +0000 (13:03 -0700)]
Merge branch 'urgent' of git://git./linux/kernel/git/brodo/pcmcia-2.6

* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: fix up alignf issues

14 years agoMerge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 6 Apr 2010 20:03:22 +0000 (13:03 -0700)]
Merge branch 'irq-core-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Force MSI irq handlers to run with interrupts disabled

14 years agonot overwriting file_lock structure after GET_LK
Pavel Shilovsky [Mon, 5 Apr 2010 05:59:14 +0000 (09:59 +0400)]
not overwriting file_lock structure after GET_LK

If we have preventing lock, cifs should overwrite file_lock structure
with info about preventing lock. If we haven't preventing lock, cifs
should leave it unchanged except for the lock type (change it to F_UNLCK).

Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 6 Apr 2010 16:56:40 +0000 (09:56 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] hpwdt - fix lower timeout limit
  [WATCHDOG] iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs
  [WATCHDOG] doc: Fix use of WDIOC_SETOPTIONS ioctl.
  [WATCHDOG] doc: watchdog simple example: don't fail on fsync()
  [WATCHDOG] set max63xx driver as ARM only
  [WATCHDOG] powerpc: pika_wdt ident cannot be const

14 years agoALSA: mixart: range checking proc file
Dan Carpenter [Tue, 6 Apr 2010 16:31:26 +0000 (19:31 +0300)]
ALSA: mixart: range checking proc file

The original code doesn't take into consideration that the value of
MIXART_BA0_SIZE - pos can be less than zero which would lead to a large
unsigned value for "count".

Also I moved the check that read size is a multiple of 4 bytes below
the code that adjusts "count".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: <stable@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoperf, x86: Enable Nehalem-EX support
Vince Weaver [Tue, 6 Apr 2010 14:01:19 +0000 (10:01 -0400)]
perf, x86: Enable Nehalem-EX support

According to Intel Software Devel Manual Volume 3B, the
Nehalem-EX PMU is just like regular Nehalem (except for the
uncore support, which is completely different).

Signed-off-by: Vince Weaver <vweaver1@eecs.utk.edu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <alpine.DEB.2.00.1004060956580.1417@cl320.eecs.utk.edu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf kmem: Fix breakage introduced by 5a0e3ad slab.h script
Arnaldo Carvalho de Melo [Tue, 6 Apr 2010 13:37:33 +0000 (10:37 -0300)]
perf kmem: Fix breakage introduced by 5a0e3ad slab.h script

Commit 5a0e3ad ("include cleanup: Update gfp.h and slab.h
includes to prepare for breaking implicit slab.h inclusion
from percpu.h") added a '#include <linux/slab.h>' to
tools/perf/builtin-kmem.h because: that tool has lines like
this:

        if (!strcmp(event->name, "kmalloc") ||
            !strcmp(event->name, "kmem_cache_alloc")) {
                process_alloc_event(data, event, cpu, timestamp, thread, 0);
                return;
        }

So, using the script regex:

>>> import re
>>> s = re.compile(r'^(|.*[^a-zA-Z0-9_])_*(slab_is_available|kmem_cache_|k[mzc]alloc|krealloc|kz?free|ksize|__getname|putname)')
>>> l = '   !strcmp(event->name, "kmem_cache_alloc")) {'
>>> s.search(l)
<_sre.SRE_Match object at 0xb77b1ad0>
>>>

Remove that file that is not available in the tools/perf include
path and thus builtin-kmem.c couldn't be compiled.

Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1270561053-14308-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 6 Apr 2010 15:36:31 +0000 (08:36 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: unlock HPA if device shrunk
  libata: disable NCQ on Crucial C300 SSD
  libata: don't whine on spurious IRQ

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 6 Apr 2010 15:34:06 +0000 (08:34 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
  smc91c92_cs: fix the problem of "Unable to find hardware address"
  r8169: clean up my printk uglyness
  net: Hook up cxgb4 to Kconfig and Makefile
  cxgb4: Add main driver file and driver Makefile
  cxgb4: Add remaining driver headers and L2T management
  cxgb4: Add packet queues and packet DMA code
  cxgb4: Add HW and FW support code
  cxgb4: Add register, message, and FW definitions
  netlabel: Fix several rcu_dereference() calls used without RCU read locks
  bonding: fix potential deadlock in bond_uninit()
  net: check the length of the socket address passed to connect(2)
  stmmac: add documentation for the driver.
  stmmac: fix kconfig for crc32 build error
  be2net: fix bug in vlan rx path for big endian architecture
  be2net: fix flashing on big endian architectures
  be2net: fix a bug in flashing the redboot section
  bonding: bond_xmit_roundrobin() fix
  drivers/net: Add missing unlock
  net: gianfar - align BD ring size console messages
  net: gianfar - initialize per-queue statistics
  ...

14 years agoproc: copy_to_user() returns unsigned
Dan Carpenter [Tue, 6 Apr 2010 10:45:39 +0000 (13:45 +0300)]
proc: copy_to_user() returns unsigned

copy_to_user() returns the number of bytes left to be copied.

This was a typo from: d82ef020cf31 "proc: pagemap: Hold mmap_sem during
page walk".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolibata: unlock HPA if device shrunk
Tejun Heo [Mon, 5 Apr 2010 01:33:13 +0000 (10:33 +0900)]
libata: unlock HPA if device shrunk

Some BIOSes don't configure HPA during boot but do so while resuming.
This causes harddrives to shrink during resume making libata detach
and reattach them.  This can be worked around by unlocking HPA if old
size equals native size.

Add ATA_DFLAG_UNLOCK_HPA so that HPA unlocking can be controlled
per-device and update ata_dev_revalidate() such that it sets
ATA_DFLAG_UNLOCK_HPA and fails with -EIO when the above condition is
detected.

This patch fixes the following bug.

  https://bugzilla.kernel.org/show_bug.cgi?id=15396

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Oleksandr Yermolenko <yaa.bta@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: disable NCQ on Crucial C300 SSD
Tejun Heo [Mon, 5 Apr 2010 01:51:26 +0000 (10:51 +0900)]
libata: disable NCQ on Crucial C300 SSD

Crucial said,

  Thank you for contacting us. We know that with our M225 line of SSDs
  you sometimes need to disable NCQ (native command queuing) to avoid
  just the type of errors you're seeing. Our recommendation for the
  M225 is to add libata.force=noncq to your Linux kernel boot options,
  under the kernel ATA library option.

  I have sent your feedback to the engineers working on the C300, and
  asked them to please pass it on to the firmware team. I have been
  notified that they are in the process of testing and finalizing a
  new firmware version, that you can expect to see released around the
  end of April. We’ll keep you posted as to when it will be available
  for download.

So, turn off NCQ on the drive w/ the current firmware revision.

Reported in the following bug.

  https://bugzilla.kernel.org/show_bug.cgi?id=15573

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: lethalwp@scarlet.be
Reported-by: Luke Macken <lmacken@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: don't whine on spurious IRQ
Tejun Heo [Wed, 31 Mar 2010 07:41:18 +0000 (16:41 +0900)]
libata: don't whine on spurious IRQ

On configurations where IRQ line is shared with a different
controller, spurious IRQs may happen continuously.  The message was
put there primarily for debugging anyway.  Kill it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years ago[WATCHDOG] hpwdt - fix lower timeout limit
Thomas Mingarelli [Wed, 17 Mar 2010 15:33:31 +0000 (15:33 +0000)]
[WATCHDOG] hpwdt - fix lower timeout limit

[Novell Bug 581103] HP Watchdog driver has arbitrary (wrong) timeout limits.
Fix the lower timeout limit to a more appropriate value.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: stable <stable@kernel.org>
14 years ago[WATCHDOG] iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs
Seth Heasley [Thu, 25 Mar 2010 23:14:41 +0000 (16:14 -0700)]
[WATCHDOG] iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs

This patch adds the Intel Cougar Point PCH LPC Controller DeviceIDs for iTCO Watchdog.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: stable <stable@kernel.org>
14 years ago[WATCHDOG] doc: Fix use of WDIOC_SETOPTIONS ioctl.
James Hogan [Mon, 5 Apr 2010 10:31:29 +0000 (11:31 +0100)]
[WATCHDOG] doc: Fix use of WDIOC_SETOPTIONS ioctl.

In the watchdog-test program and watchdog-api.txt, pass the values to
the WDIOC_SETOPTIONS ioctl as a pointer to an integer containing the
values intead of directly in the third ioctl argument. The actual
watchdog drivers in drivers/watchdog don't read the options directly
from the argument but use get_user and copy_from_user.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 years agosched: Fix sched_getaffinity()
Anton Blanchard [Tue, 6 Apr 2010 07:02:19 +0000 (17:02 +1000)]
sched: Fix sched_getaffinity()

taskset on 2.6.34-rc3 fails on one of my ppc64 test boxes with
the following error:

  sched_getaffinity(0, 16, 0x10029650030) = -1 EINVAL (Invalid argument)

This box has 128 threads and 16 bytes is enough to cover it.

Commit cd3d8031eb4311e516329aee03c79a08333141f1 (sched:
sched_getaffinity(): Allow less than NR_CPUS length) is
comparing this 16 bytes agains nr_cpu_ids.

Fix it by comparing nr_cpu_ids to the number of bits in the
cpumask we pass in.

Signed-off-by: Anton Blanchard <anton@samba.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Sharyathi Nagesh <sharyath@in.ibm.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Mike Travis <travis@sgi.com>
LKML-Reference: <20100406070218.GM5594@kryten>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agodrm/radeon/kms: fix washed out image on legacy tv dac
Alex Deucher [Tue, 6 Apr 2010 03:57:52 +0000 (23:57 -0400)]
drm/radeon/kms: fix washed out image on legacy tv dac

bad cast was overwriting the tvdac adj values
Fixes fdo bug 27478

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoFix up possibly racy module refcounting
Nick Piggin [Thu, 1 Apr 2010 08:09:40 +0000 (19:09 +1100)]
Fix up possibly racy module refcounting

Module refcounting is implemented with a per-cpu counter for speed.
However there is a race when tallying the counter where a reference may
be taken by one CPU and released by another.  Reference count summation
may then see the decrement without having seen the previous increment,
leading to lower than expected count.  A module which never has its
actual reference drop below 1 may return a reference count of 0 due to
this race.

Module removal generally runs under stop_machine, which prevents this
race causing bugs due to removal of in-use modules.  However there are
other real bugs in module.c code and driver code (module_refcount is
exported) where the callers do not run under stop_machine.

Fix this by maintaining running per-cpu counters for the number of
module refcount increments and the number of refcount decrements.  The
increments are tallied after the decrements, so any decrement seen will
always have its corresponding increment counted.  The final refcount is
the difference of the total increments and decrements, preventing a
low-refcount from being returned.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrm/radeon/kms/atom: fix gpio i2c table overrun (v2)
Alex Deucher [Thu, 1 Apr 2010 19:08:47 +0000 (19:08 +0000)]
drm/radeon/kms/atom: fix gpio i2c table overrun (v2)

The GPIO_I2C_INFO table does not always have
ATOM_MAX_SUPPORTED_DEVICE entries. Limit
the number of indices to the size of the
table.

Should fix Novell bug 589022.

v2: fix typo

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon: R300 AD only has one quad pipe.
Michel Dänzer [Fri, 2 Apr 2010 16:59:06 +0000 (16:59 +0000)]
drm/radeon: R300 AD only has one quad pipe.

Gleaned from the Mesa code.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27355 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Mon, 5 Apr 2010 22:37:12 +0000 (15:37 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] qla1280: retain firmware for error recovery
  [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init
  [SCSI] advansys: fix regression with request_firmware change
  [SCSI] qla2xxx: Updated version number to 8.03.02-k2.
  [SCSI] qla2xxx: Prevent sending mbx commands from sysfs during isp reset.
  [SCSI] qla2xxx: Disable MSI on qla24xx chips other than QLA2432.
  [SCSI] qla2xxx: Check to make sure multique and CPU affinity support is not enabled at the same time.
  [SCSI] qla2xxx: Correct vp_idx checking during PORT_UPDATE processing.
  [SCSI] qla2xxx: Honour "Extended BB credits" bit for CNAs.
  [SCSI] scsi_transport_fc: Make sure commands are completed when rport is offline
  [SCSI] libiscsi: Fix recovery slowdown regression

14 years agodavinci: DM365: fix duplicate default IRQ priorities
Kevin Hilman [Fri, 26 Feb 2010 00:24:41 +0000 (16:24 -0800)]
davinci: DM365: fix duplicate default IRQ priorities

IRQ 29 has two possible interrupts DDRINT and RTC, but having both in
the default priority table is confusing (and triggers a warning from
sparse.)

This patch removes the lower priority DDRINT from the default priority
table leaving the RTC setting as the default.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agodavinci: edma: clear events in edma_start()
Brian Niebuhr [Tue, 9 Mar 2010 22:48:03 +0000 (16:48 -0600)]
davinci: edma: clear events in edma_start()

This patch fixes an issue where a DMA channel can erroneously process an
event generated by a previous transfer.  A failure case is where DMA is
being used for SPI transmit and receive channels on OMAP L138.  In this
case there is a single bit that controls all event generation from the
SPI peripheral.  Therefore it is possible that between when edma_stop()
has been called for the transmit channel on a previous transfer and
edma_start() is called for the transmit channel on a subsequent transfer,
that a transmit event has been generated.

The fix is to clear events in edma_start().  This prevents false events
from being processed when events are enabled for that channel.

Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agodavinci: da8xx/omap-l1: fix build error when CONFIG_DAVINCI_MUX is undefined
Sekhar Nori [Wed, 10 Mar 2010 09:41:24 +0000 (15:11 +0530)]
davinci: da8xx/omap-l1: fix build error when CONFIG_DAVINCI_MUX is undefined

The da8xx/omap-l1 boards refuse to build when CONFIG_DAVINCI_MUX is undefined
because arch/arm/mach-davinci/mux.c:da8xx_pinmux_setup() is not defined.

This patch fixes this issue. This is build tested with davinci_all_defconfig
and da8xx_omapl_defconfig and boot tested on DA830 EVM.

Reported-by: Shanmuga Sundaram Mahendran <shanmuga@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agodavinci: timers: don't enable timer until clocksource is initialized
Kevin Hilman [Thu, 11 Mar 2010 22:57:35 +0000 (14:57 -0800)]
davinci: timers: don't enable timer until clocksource is initialized

On da830, when the same timer is used for clocksource and clockevent,
the timer can be started before the clockevent is
registered/initialzed.  This creates a window where a timer
interrupt might fire before the clockevent handler has been
setup and causes a crash.

This patch moves the actual enable/start of the timer after
the clockevent has ben registered.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoALSA: hda - Fix a wrong array range check in patch_realtek.c
Takashi Iwai [Mon, 5 Apr 2010 21:25:13 +0000 (23:25 +0200)]
ALSA: hda - Fix a wrong array range check in patch_realtek.c

The commit 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 introduced a wrong
comparision for the array range check, which effectively skips the whole
initialization of DAC connections.  Fixed now.

Reference: bko#15689
https://bugzilla.kernel.org/show_bug.cgi?id=15689

Reported-by: Adrian Ulrich <kernel@blinkenlights.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Mon, 5 Apr 2010 20:42:54 +0000 (13:42 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: saving negative to unsigned char
  9p: return on mutex_lock_interruptible()
  9p: Creating files with names too long should fail with ENAMETOOLONG.
  9p: Make sure we are able to clunk the cached fid on umount
  9p: drop nlink remove
  fs/9p: Clunk the fid resulting from partial walk of the name
  9p: documentation update
  9p: Fix setting of protocol flags in v9fs_session_info structure.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Linus Torvalds [Mon, 5 Apr 2010 20:21:15 +0000 (13:21 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: add check for changed leaves in setup_leaf_for_split
  Btrfs: create snapshot references in same commit as snapshot
  Btrfs: fix small race with delalloc flushing waitqueue's
  Btrfs: use add_to_page_cache_lru, use __page_cache_alloc
  Btrfs: fix chunk allocate size calculation
  Btrfs: kill max_extent mount option
  Btrfs: fail to mount if we have problems reading the block groups
  Btrfs: check btrfs_get_extent return for IS_ERR()
  Btrfs: handle kmalloc() failure in inode lookup ioctl
  Btrfs: dereferencing freed memory
  Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk()
  Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree()
  Btrfs: Remove unnecessary finish_wait() in wait_current_trans()
  Btrfs: add NULL check for do_walk_down()
  Btrfs: remove duplicate include in ioctl.c

Fix trivial conflict in fs/btrfs/compression.c due to slab.h include
cleanups.

14 years agoaudit: preface audit printk with audit
Eric Paris [Mon, 5 Apr 2010 20:16:26 +0000 (16:16 -0400)]
audit: preface audit printk with audit

There have been a number of reports of people seeing the message:
"name_count maxed, losing inode data: dev=00:05, inode=3185"
in dmesg.  These usually lead to people reporting problems to the filesystem
group who are in turn clueless what they mean.

Eventually someone finds me and I explain what is going on and that
these come from the audit system.  The basics of the problem is that the
audit subsystem never expects a single syscall to 'interact' (for some
wish washy meaning of interact) with more than 20 inodes.  But in fact
some operations like loading kernel modules can cause changes to lots of
inodes in debugfs.

There are a couple real fixes being bandied about including removing the
fixed compile time limit of 20 or not auditing changes in debugfs (or
both) but neither are small and obvious so I am not sending them for
immediate inclusion (I hope Al forwards a real solution next devel
window).

In the meantime this patch simply adds 'audit' to the beginning of the
crap message so if a user sees it, they come blame me first and we can
talk about what it means and make sure we understand all of the reasons
it can happen and make sure this gets solved correctly in the long run.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years ago9p: saving negative to unsigned char
Dan Carpenter [Mon, 5 Apr 2010 19:37:28 +0000 (14:37 -0500)]
9p: saving negative to unsigned char

Saving -EINVAL as unsigned char truncates the high bits and changes it
into 234 instead of -22.  This breaks the test for "if (ret == -EINVAL)"
in parse_opts().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: return on mutex_lock_interruptible()
Dan Carpenter [Tue, 30 Mar 2010 09:41:25 +0000 (09:41 +0000)]
9p: return on mutex_lock_interruptible()

If "err" is -EINTR here the original code calls mutex_unlock() and then
returns, but it should just return directly.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

14 years agoBtrfs: add check for changed leaves in setup_leaf_for_split
Chris Mason [Fri, 2 Apr 2010 13:20:18 +0000 (09:20 -0400)]
Btrfs: add check for changed leaves in setup_leaf_for_split

setup_leaf_for_split needs to drop the path and search again, and has
checks to see if the item we want to split changed size.  But, it misses
the case where the leaf changed and now has enough room for the item
we want to insert.

This adds an extra check to make sure the leaf really needs splitting
before we call btrfs_split_leaf(), which keeps us from trying to split
a leaf with a single item.

btrfs_split_leaf() will blindly split the single item leaf, leaving us
with one good leaf and one empty leaf and then a crash.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: create snapshot references in same commit as snapshot
Sage Weil [Mon, 15 Mar 2010 17:27:13 +0000 (17:27 +0000)]
Btrfs: create snapshot references in same commit as snapshot

This creates the reference to a new snapshot in the same commit as the
snapshot itself.  This avoids the need for a second commit in order for a
snapshot to be persistent, and also avoids the problem of "leaking" a
new snapshot tree root if the host crashes before the second commit takes
place.

It is not at all clear to me why it wasn't always done this way.  If there
is still a reason for the two-stage {create,finish}_pending_snapshots()
approach I'm missing something!  :)

I've been running this for a couple weeks under pretty heavy usage (a few
snapshots per minute) without obvious problems.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix small race with delalloc flushing waitqueue's
Josef Bacik [Fri, 12 Mar 2010 19:28:18 +0000 (19:28 +0000)]
Btrfs: fix small race with delalloc flushing waitqueue's

Everytime we start a new flushing thread, we init the waitqueue if there isn't a
flushing thread running.  The problem with this is we check
space_info->flushing, which we clear right before doing a wake_up on the
flushing waitqueue, which causes problems if we init the waitqueue in the middle
of clearing the flushing flagh and calling wake_up.  This is hard to hit, but
the code is wrong anyway, so init the flushing/allocating waitqueue when
creating the space info and let it be.  I haven't seen the panic since I've been
using this patch.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: use add_to_page_cache_lru, use __page_cache_alloc
Nick Piggin [Wed, 17 Mar 2010 13:31:04 +0000 (13:31 +0000)]
Btrfs: use add_to_page_cache_lru, use __page_cache_alloc

Pagecache pages should be allocated with __page_cache_alloc, so they
obey pagecache memory policies.

add_to_page_cache_lru is exported, so it should be used. Benefits over
using a private pagevec: neater code, 128 bytes fewer stack used, percpu
lru ordering is preserved, and finally don't need to flush pagevec
before returning so batching may be shared with other LRU insertions.

Signed-off-by: Nick Piggin <npiggin@suse.de>:
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
Daniel Mack [Mon, 22 Mar 2010 09:11:15 +0000 (10:11 +0100)]
ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream

This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

[Note that this is a backported version for 2.6.34.
 Upstream commit is fd23b7dee]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'slabh' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc
Linus Torvalds [Mon, 5 Apr 2010 16:39:11 +0000 (09:39 -0700)]
Merge branch 'slabh' of git://git./linux/kernel/git/tj/misc

* 'slabh' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc:
  eeepc-wmi: include slab.h
  staging/otus: include slab.h from usbdrv.h
  percpu: don't implicitly include slab.h from percpu.h
  kmemcheck: Fix build errors due to missing slab.h
  include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
  iwlwifi: don't include iwl-dev.h from iwl-devtrace.h
  x86: don't include slab.h from arch/x86/include/asm/pgtable_32.h

Fix up trivial conflicts in include/linux/percpu.h due to
is_kernel_percpu_address() having been introduced since the slab.h
cleanup with the percpu_up.c splitup.

14 years agoALSA: hda - Enable amplifiers on Acer Inspire 6530G
Tony Vroon [Mon, 5 Apr 2010 15:30:43 +0000 (16:30 +0100)]
ALSA: hda - Enable amplifiers on Acer Inspire 6530G

After more tests it appears that EAPD needs to be enabled
on both the 0x14 and 0x15 NIDs to enable the main speaker
and headphone amplifiers. The maximum volume setting is
now equal to what the machine achieves under other operating
systems.
Disabling Front or LFE playback triggers EAPD and disables
the amplifier. As such, these two playback switches have
been removed from the mixer.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoblock: expose the statistics in blkio.time and blkio.sectors for the root cgroup
Ricky Benitez [Mon, 5 Apr 2010 16:22:17 +0000 (18:22 +0200)]
block: expose the statistics in blkio.time and blkio.sectors for the root cgroup

Currently, the io statistics for the root cgroup are maintained, but
they are not shown because the device information is not available at
the point that the root blkio cgroup is created. This patch updates
the device information when the statistics are updated so that the
statistics become visible.

Signed-off-by: Ricky Benitez <rickyb@google.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Linus Torvalds [Mon, 5 Apr 2010 16:16:37 +0000 (09:16 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  module: add stub for is_module_percpu_address
  percpu, module: implement and use is_kernel/module_percpu_address()
  module: encapsulate percpu handling better and record percpu_size

14 years agormap: fix anon_vma_fork() memory leak
Rik van Riel [Mon, 5 Apr 2010 16:13:33 +0000 (12:13 -0400)]
rmap: fix anon_vma_fork() memory leak

Fix a memory leak in anon_vma_fork(), where we fail to tear down the
anon_vmas attached to the new VMA in case setting up the new anon_vma
fails.

This bug also has the potential to leave behind anon_vma_chain structs
with pointers to invalid memory.

Reported-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years ago9p: Creating files with names too long should fail with ENAMETOOLONG.
Sripathi Kodi [Mon, 29 Mar 2010 23:13:59 +0000 (18:13 -0500)]
9p: Creating files with names too long should fail with ENAMETOOLONG.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: Make sure we are able to clunk the cached fid on umount
Aneesh Kumar K.V [Mon, 29 Mar 2010 23:13:59 +0000 (18:13 -0500)]
9p: Make sure we are able to clunk the cached fid on umount

dcache prune happen on umount. So we cannot mark the client
satus disconnect. That will prevent a 9p call to the server

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: drop nlink remove
Aneesh Kumar K.V [Mon, 29 Mar 2010 23:14:50 +0000 (18:14 -0500)]
9p: drop nlink remove

We need to drop the link count on the inode of a sucessfull remove

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years agofs/9p: Clunk the fid resulting from partial walk of the name
Aneesh Kumar K.V [Fri, 19 Mar 2010 12:47:26 +0000 (12:47 +0000)]
fs/9p: Clunk the fid resulting from partial walk of the name

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: documentation update
Sripathi Kodi [Thu, 18 Mar 2010 08:01:33 +0000 (08:01 +0000)]
9p: documentation update

This patch adds documentation for new 9P options introduced in
2.6.34.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: Fix setting of protocol flags in v9fs_session_info structure.
Sripathi Kodi [Wed, 17 Mar 2010 17:02:38 +0000 (17:02 +0000)]
9p: Fix setting of protocol flags in v9fs_session_info structure.

This patch fixes a simple bug I left behind in my earlier protocol
negotiation patch.

Thanks,
Sripathi.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years agoASoC: Only do WM8994 bias off transition from standby
Mark Brown [Tue, 30 Mar 2010 13:29:14 +0000 (14:29 +0100)]
ASoC: Only do WM8994 bias off transition from standby

Otherwise we may try to power down multiple times when the using
idle bias off and the driver is removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
Mark Brown [Mon, 29 Mar 2010 16:18:41 +0000 (17:18 +0100)]
ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices

The DCS_DATAPATH_BUSY bit used to monitor the completion of DC servo
operations has been deprecated and with some more recente revisions
may perform incorrectly, especially when only analogue bypass paths
are in use. Switch to using readback from the DC servo command
register instead, which is supported for all devices. Without this
unacceptably long timeouts may be observed in some circumstances.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
Mark Brown [Mon, 29 Mar 2010 15:34:42 +0000 (16:34 +0100)]
ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction

If we need to offset correct the DC servo then don't use runtime
recalibration since that is likely to introduce further offsets
which will be evident on powerdown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Support second DC servo readback method for wm_hubs
Mark Brown [Mon, 29 Mar 2010 16:09:45 +0000 (17:09 +0100)]
ASoC: Support second DC servo readback method for wm_hubs

More recent Wolfson hubs devices add the ability to read back the DC
servo calibration information from the register used to write offsets,
and later still ones remove the old readback registers. Add support
for the new scheme, and use it for WM8994 device revisions that
support it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Avoid wraparound in wm_hubs DC servo correction
Mark Brown [Mon, 29 Mar 2010 14:24:40 +0000 (15:24 +0100)]
ASoC: Avoid wraparound in wm_hubs DC servo correction

If the correction wraps around then a substantial offset would be
introduced.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoeeepc-wmi: include slab.h
Tejun Heo [Mon, 5 Apr 2010 02:37:59 +0000 (11:37 +0900)]
eeepc-wmi: include slab.h

eeepc-wmi uses kfree() but doesn't include slab.h.  Include it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Yong Wang <yong.y.wang@intel.com>
14 years agoMerge branch 'master' into export-slabh
Tejun Heo [Mon, 5 Apr 2010 02:37:28 +0000 (11:37 +0900)]
Merge branch 'master' into export-slabh

14 years agostaging/otus: include slab.h from usbdrv.h
Tejun Heo [Mon, 5 Apr 2010 02:23:16 +0000 (11:23 +0900)]
staging/otus: include slab.h from usbdrv.h

drivers/staging/otus/usbdrv.h users use slab facilities.  Include
linux/slab.h from usbdrv.h.

Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agoACPI: Reduce ACPI resource conflict message to KERN_WARNING, printk cleanup
Chase Douglas [Mon, 22 Mar 2010 19:08:09 +0000 (15:08 -0400)]
ACPI: Reduce ACPI resource conflict message to KERN_WARNING, printk cleanup

By default, ACPI resource conflict messages are logged at level
KERN_ERR. This is a rather high level for a message that is more a
warning than an indication of a real kernel error. Also, KERN_ERR level
messages can appear over some boot splash screens, and this message is
not serious enough to warrant such treatment. Thus, the log level has
been reduced to KERN_WARNING.

[lenb changed to KERN_WARNING rather than all the way to KERN_INFO]

Also, cleanup message to use %pR resource printing format.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: battery drivers should call power_supply_changed()
Alan Jenkins [Tue, 30 Jun 2009 14:36:16 +0000 (14:36 +0000)]
ACPI: battery drivers should call power_supply_changed()

Calling kobject_uevent() directly is a layering violation.  In
particular, it means we'll miss updating the generic LED trigger.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n
Alan Jenkins [Tue, 30 Jun 2009 14:35:05 +0000 (14:35 +0000)]
ACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n

Disabling CONFIG_ACPI_SYSFS_POWER changes the behaviour of
acpi_battery_update().  It will call acpi_battery_get_info()
even if the battery is not present.  I haven't noticed this
causing any problem, but it does look like a bad idea.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sun, 4 Apr 2010 19:14:44 +0000 (12:14 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sunxvr500: Ignore secondary output PCI devices.
  sparc64: Implement perf_arch_fetch_caller_regs
  sparc64: Update defconfig.
  sparc64: Fix array size reported by vmemmap_populate()
  sparc: Fix regset register window handling.
  drivers/serial/sunsu.c: Correct use after free

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 4 Apr 2010 19:13:10 +0000 (12:13 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf: Always build the powerpc perf_arch_fetch_caller_regs version
  perf: Always build the stub perf_arch_fetch_caller_regs version
  perf, probe-finder: Build fix on Debian
  perf/scripts: Tuple was set from long in both branches in python_process_event()
  perf: Fix 'perf sched record' deadlock
  perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
  perf, x86: Fix AMD hotplug & constraint initialization
  x86: Move notify_cpu_starting() callback to a later stage
  x86,kgdb: Always initialize the hw breakpoint attribute
  perf: Use hot regs with software sched switch/migrate events
  perf: Correctly align perf event tracing buffer

14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 4 Apr 2010 19:12:31 +0000 (12:12 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: set_cpus_allowed_ptr(): Don't use rq->migration_thread after unlock
  sched: Fix proc_sched_set_task()

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 4 Apr 2010 19:12:19 +0000 (12:12 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ring-buffer: Add missing unlock
  tracing: Fix lockdep warning in global_clock()

14 years agoproc: pagemap: Hold mmap_sem during page walk
KAMEZAWA Hiroyuki [Fri, 2 Apr 2010 00:11:29 +0000 (09:11 +0900)]
proc: pagemap: Hold mmap_sem during page walk

In initial design, walk_page_range() was designed just for walking page
table and it didn't require mmap_sem.  Now, find_vma() etc..  are used
in walk_page_range() and we need mmap_sem around it.

This patch adds mmap_sem around walk_page_range().

Because /proc/<pid>/pagemap's callback routine use put_user(), we have
to get rid of it to do sane fix.

Changelog: 2010/Apr/2
 - fixed start_vaddr and end overflow
Changelog: 2010/Apr/1
 - fixed start_vaddr calculation
 - removed unnecessary cast.
 - removed unnecessary change in smaps.
 - use GFP_TEMPORARY instead of GFP_KERNEL

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: San Mehat <san@google.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
[ Fixed kmalloc failure return code as per Matt ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopcmcia: fix up alignf issues
Dominik Brodowski [Sun, 4 Apr 2010 16:10:35 +0000 (18:10 +0200)]
pcmcia: fix up alignf issues

- pcmcia_align() used a "start" variable twice. That's obviously a bad
  idea.

- pcmcia_common_resource() needs the current "start" parameter being
  passed, instead of res->start.

- pcmcia_common_resource() doesn't use the size and align parameters,
  so get rid of those.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agoALSA: echoaudio - Eliminate use after free
Julia Lawall [Fri, 2 Apr 2010 12:47:59 +0000 (14:47 +0200)]
ALSA: echoaudio - Eliminate use after free

Use the call to snd_card_free in the error handling code at the end of the
function, as in the other error cases.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E,E2;
@@

snd_card_free(E)
...
(
  E = E2
|
* E
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: i2c: cleanup: change parameter to pointer
Dan Carpenter [Fri, 2 Apr 2010 11:29:23 +0000 (14:29 +0300)]
ALSA: i2c: cleanup: change parameter to pointer

We actually pass an array of 7 chars not 5.
This silences a smatch warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add MSI blacklist for Aopen MZ915-M
Takashi Iwai [Sun, 4 Apr 2010 10:14:03 +0000 (12:14 +0200)]
ALSA: hda - Add MSI blacklist for Aopen MZ915-M

The device needs MSI disablement.  Added to the quirk list.

Reported-by: Harald Dunkel <harri@afaics.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosunxvr500: Ignore secondary output PCI devices.
David S. Miller [Sun, 4 Apr 2010 08:12:50 +0000 (01:12 -0700)]
sunxvr500: Ignore secondary output PCI devices.

These just represent the secondary and further heads attached to the
card, and they have different sets of PCI bar registers to map.

So don't try to drive them in the main driver.

Reported-by: Frans van Berckel <fberckel@xs4all.nl>
Tested-by: Frans van Berckel <fberckel@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Implement perf_arch_fetch_caller_regs
David S. Miller [Sun, 4 Apr 2010 06:50:59 +0000 (23:50 -0700)]
sparc64: Implement perf_arch_fetch_caller_regs

We provide regs->tstate, regs->tpc, regs->tnpc and
regs->u_regs[UREG_FP].

regs->tstate is necessary for:

user_mode() (via perf_exclude_event())

perf_misc_flags() (via perf_prepare_sample())

regs->tpc is necessary for:

perf_instruction_pointer() (via perf_prepare_sample())

and regs->u_regs[UREG_FP] is necessary for:

perf_callchain() (via perf_prepare_sample())

The regs->tnpc value is provided just to be tidy.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPNPACPI: truncate _CRS windows with _LEN > _MAX - _MIN + 1
Bjorn Helgaas [Thu, 25 Mar 2010 16:32:49 +0000 (10:32 -0600)]
PNPACPI: truncate _CRS windows with _LEN > _MAX - _MIN + 1

The ACPI spec (sec 6.4.3.5 in v4.0) requires that for Address Space Resource
Descriptors, _LEN <= _MAX - _MIN + 1 in all cases, but there are BIOSes that
violate this.  We experimentally determined that Windows truncates the
resource so it doesn't extend past _MAX, so let's do the same thing in
Linux.

http://bugzilla.kernel.org/show_bug.cgi?id=15480

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: Don't send KEY_UNKNOWN for random video notifications
Matthew Garrett [Fri, 11 Dec 2009 22:40:46 +0000 (17:40 -0500)]
ACPI: Don't send KEY_UNKNOWN for random video notifications

I have a machine here that's sending 0xD1 notifications on the video
device once every second or so. I have no idea why (it's a prototype,
it may be broken), but sending KEY_UNKNOWN is unhelpful and results in
the console becoming unusable. Let's not report keys unless we have
something useful to say about them.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: NUMA: map pxms to low node ids
David Rientjes [Thu, 25 Mar 2010 23:33:04 +0000 (16:33 -0700)]
ACPI: NUMA: map pxms to low node ids

pxms are mapped to low node ids to maintain generic kernel use of
functions such as pxm_to_node() that are used to determine device
affinity.  Otherwise, there is no pxm-to-node and node-to-pxm matching
rule for x86_64 users of NUMA emulation where a single pxm may be bound
to multiple NUMA nodes.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: use _HID when supplied by root-level devices
Bjorn Helgaas [Wed, 24 Mar 2010 16:44:33 +0000 (10:44 -0600)]
ACPI: use _HID when supplied by root-level devices

Previously, we assumed the only Device object immediately below the root
was the \_SB Scope (which the ACPI CA treats as a Device), so we forced
the HID of all such objects to ACPI_BUS_HID ("LNXSYBUS").

However, there are DSDTs that supply root-level Device objects with _HIDs.
This patch makes us pay attention to those _HIDs and only add the synthetic
ACPI_BUS_HID for root-level objects that do not supply their own _HID.

For example, this DSDT: https://bugzilla.kernel.org/show_bug.cgi?id=15605
contains:

    Scope (_SB) {
...
    }
    Device (AMW0) {
Name (_HID, EisaId ("PNP0C14"))
...
    }

and we should use "PNP0C14" for the AMW0 device, not "LNXSYBUS".

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agosparc64: Update defconfig.
David S. Miller [Sat, 3 Apr 2010 23:18:32 +0000 (16:18 -0700)]
sparc64: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago[WATCHDOG] doc: watchdog simple example: don't fail on fsync()
Giel van Schijndel [Mon, 29 Mar 2010 19:12:09 +0000 (21:12 +0200)]
[WATCHDOG] doc: watchdog simple example: don't fail on fsync()

Don't terminate the watchdog daemon when fsync() fails because no
watchdog driver actually implements the fsync() syscall.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Sat, 3 Apr 2010 22:49:14 +0000 (15:49 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

14 years ago[WATCHDOG] set max63xx driver as ARM only
Marc Zyngier [Mon, 29 Mar 2010 19:09:14 +0000 (20:09 +0100)]
[WATCHDOG] set max63xx driver as ARM only

Use of ioremap() causes build failure on S390.
Restrict the driver to ARM until another architecture comes along
and enables the driver for its own use.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 years ago[WATCHDOG] powerpc: pika_wdt ident cannot be const
Sean MacLennan [Tue, 9 Mar 2010 00:46:41 +0000 (19:46 -0500)]
[WATCHDOG] powerpc: pika_wdt ident cannot be const

The watchdog_info struct cannot be a const since we dynamically fill
in the firmware version.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years agosmc91c92_cs: fix the problem of "Unable to find hardware address"
Ken Kawasaki [Sat, 3 Apr 2010 22:07:10 +0000 (15:07 -0700)]
smc91c92_cs: fix the problem of "Unable to find hardware address"

smc91c92_cs:
 *cvt_ascii_address returns 0, if success.
 *call free_netdev, if we can't find hardware address.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Fix array size reported by vmemmap_populate()
Ben Hutchings [Sat, 3 Apr 2010 20:58:45 +0000 (13:58 -0700)]
sparc64: Fix array size reported by vmemmap_populate()

vmemmap_populate() attempts to report the used index and total size of
vmemmap_table, but it wrongly shifts the total size so that it is
always shown as 0.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocifs: Fix a kernel BUG with remote OS/2 server (try #3)
Suresh Jayaraman [Wed, 31 Mar 2010 06:30:03 +0000 (12:00 +0530)]
cifs: Fix a kernel BUG with remote OS/2 server (try #3)

While chasing a bug report involving a OS/2 server, I noticed the server sets
pSMBr->CountHigh to a incorrect value even in case of normal writes. This
results in 'nbytes' being computed wrongly and triggers a kernel BUG at
mm/filemap.c.

void iov_iter_advance(struct iov_iter *i, size_t bytes)
{
        BUG_ON(i->count < bytes);    <--- BUG here

Why the server is setting 'CountHigh' is not clear but only does so after
writing 64k bytes. Though this looks like the server bug, the client side
crash may not be acceptable.

The workaround is to mask off high 16 bits if the number of bytes written as
returned by the server is greater than the bytes requested by the client as
suggested by Jeff Layton.

CC: Stable <stable@kernel.org>
Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years ago[CIFS] initialize nbytes at the beginning of CIFSSMBWrite()
Steve French [Sat, 3 Apr 2010 17:20:21 +0000 (17:20 +0000)]
[CIFS] initialize nbytes at the beginning of CIFSSMBWrite()

By doing this we always overwrite nbytes value that is being passed on to
CIFSSMBWrite() and need not rely on the callers to initialize. CIFSSMBWrite2 is
doing this already.

CC: Stable <stable@kernel.org>
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years agoperf: Always build the powerpc perf_arch_fetch_caller_regs version
Frederic Weisbecker [Sat, 3 Apr 2010 10:22:05 +0000 (12:22 +0200)]
perf: Always build the powerpc perf_arch_fetch_caller_regs version

Now that software events use perf_arch_fetch_caller_regs() too, we
need the powerpc version to be always built.

Fixes the following build error:

(.text+0x3210): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0x3324): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0x33bc): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0x33ec): undefined reference to `perf_arch_fetch_caller_regs'
(.text+0xd4a0): undefined reference to `perf_arch_fetch_caller_regs'
arch/powerpc/kernel/built-in.o:(.text+0xd528): more undefined references to `perf_arch_fetch_caller_regs' follow
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

Reported-by: Michael Ellerman <michael@ellerman.id.au>
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoperf: Always build the stub perf_arch_fetch_caller_regs version
Frederic Weisbecker [Sat, 3 Apr 2010 10:22:05 +0000 (12:22 +0200)]
perf: Always build the stub perf_arch_fetch_caller_regs version

Now that software events use perf_arch_fetch_caller_regs() too, we
need the stub version to be always built in for archs that don't
implement it.

Fixes the following build error in PARISC:

kernel/built-in.o: In function `perf_event_task_sched_out':
(.text.perf_event_task_sched_out+0x54): undefined reference to `perf_arch_fetch_caller_regs'

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 3 Apr 2010 02:50:11 +0000 (19:50 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 5965/1: Fix soft lockup in at91 udc driver
  ARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
  ARM: 6005/1: arm: kprobes: fix register corruption with jprobes
  ARM: 6003/1: removing compilation warning from pl061.h
  ARM: 6001/1: removing compilation warning comming from clkdev.h
  ARM: 6000/1: removing compilation warning comming from <asm/irq.h>
  ARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.h
  ARM: 5997/1: ARM: Correct the VFPv3 detection
  ARM: 5996/1: ARM: Change the mandatory barriers implementation (4/4)
  ARM: 5995/1: ARM: Add L2x0 outer_sync() support (3/4)
  ARM: 5994/1: ARM: Add outer_cache_fns.sync function pointer (2/4)
  ARM: 5993/1: ARM: Move the outer_cache definitions into a separate file (1/4)

14 years agoMerge branch 'merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Sat, 3 Apr 2010 02:49:50 +0000 (19:49 -0700)]
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6

* 'merge' of git://git.secretlab.ca/git/linux-2.6:
  powerpc/5200: in lpbfifo, flag DMA irqs as enabled after requesting them
  powerpc/fsl: add device tree binding for QE firmware
  of/flattree: Fix unhandled OF_DT_NOP tag when unflattening the device tree