safe/jmp/linux-2.6
14 years agoi2c-scmi: Support IBM SMBus CMI devices
Crane Cai [Wed, 24 Mar 2010 13:38:38 +0000 (14:38 +0100)]
i2c-scmi: Support IBM SMBus CMI devices

*) add a new HID for IBM SMBus CMI devices
*) add methods for IBM SMBus CMI devices
*) hook different HID with different control methods set
*) minor tweaks as suggested by Jean Delvare

Slightly modified by Darrick to use #define'd IBM SMBUS HID from Darrick's ACPI
scan quirk patch.

Signed-off-by: Crane Cai <crane.cai@amd.com>
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoacpi: Support IBM SMBus CMI devices
Darrick J. Wong [Wed, 24 Mar 2010 13:38:37 +0000 (14:38 +0100)]
acpi: Support IBM SMBus CMI devices

On some old IBM workstations and desktop computers, the BIOS presents in the
DSDT an SMBus object that is missing the HID identifier that the i2c-scmi
driver looks for.  Modify the ACPI device scan code to insert the missing HID
if it finds an IBM system with such an object.

Affected machines: IntelliStation Z20/Z30.  Note that the i2c-i801 driver no
longer works on these machines because of ACPI resource conflicts.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agogenirq: Move two IRQ functions from .init.text to .text
Henrik Kretzschmar [Wed, 24 Mar 2010 11:59:20 +0000 (12:59 +0100)]
genirq: Move two IRQ functions from .init.text to .text

Both functions should not be marked as __init, since they be called
from modules after the init section is freed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Kosina <jkosina@suse.cz>
LKML-Reference: <1269431961-5731-1-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agogenirq: Protect access to irq_desc->action in can_request_irq()
Thomas Gleixner [Tue, 23 Mar 2010 21:40:53 +0000 (22:40 +0100)]
genirq: Protect access to irq_desc->action in can_request_irq()

can_request_irq() accesses and dereferences irq_desc->action w/o
holding irq_desc->lock. So action can be freed on another CPU before
it's dereferenced. Unlikely, but ...

Protect it with desc->lock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years ago[S390] fix boot failures with compressed kernels
Martin Schwidefsky [Wed, 24 Mar 2010 10:49:57 +0000 (11:49 +0100)]
[S390] fix boot failures with compressed kernels

Fix two bugs with the kernel image compression:
1) reset the bss section of the compressed vmlinux
2) clear the high half of the registers for 64 bit early enough
   for the decompression step

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] fix broken proc interface for sclp_async
Hans-Joachim Picht [Wed, 24 Mar 2010 10:49:56 +0000 (11:49 +0100)]
[S390] fix broken proc interface for sclp_async

This patch now allows the use of the proc interface to either activate
or deactivate call home on panic.
e.g.  echo 1 > /proc/sys/kernel/callhome
strict_strtoul() requires _either_'\n\0' _or_ '\0' termination.
This was missing and therefore the interface did not recognise valid input.

Signed-off-by: Hans-Joachim Picht <hans@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] sclp: avoid 64 bit division
Heiko Carstens [Wed, 24 Mar 2010 10:49:55 +0000 (11:49 +0100)]
[S390] sclp: avoid 64 bit division

Avoid 64 bit division to fix this compile error on 32 bit:
drivers/s390/char/sclp_cmd.c:711: undefined reference to `__udivdi3'

Also move the whole arch_get_memory_phys_device function to the
memory hotplug related functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: check tsb validity
Stefan Haberland [Wed, 24 Mar 2010 10:49:54 +0000 (11:49 +0100)]
[S390] dasd: check tsb validity

Check tsb validity before the tcw_get_tsb function is called.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: fix alignment of transport mode recovery TCW
Stefan Weinhuber [Wed, 24 Mar 2010 10:49:53 +0000 (11:49 +0100)]
[S390] dasd: fix alignment of transport mode recovery TCW

All TCWs need to be aligned on a 64 byte boundary or the I/O will be
rejected. For recovery requests we create fresh TCWs, so we need to
do the proper alignment here as well.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] system.h: Fix compile error for 1 and 2 byte cmpxchg
Christian Borntraeger [Wed, 24 Mar 2010 10:49:52 +0000 (11:49 +0100)]
[S390] system.h: Fix compile error for 1 and 2 byte cmpxchg

commit 024914477e15ef8b17f271ec47f1bb8a589f0806 "memcg: move charges of anonymous
swap" revealed that the 1 byte and 2 byte cmpxchg is currently broken:

arch/s390/include/asm/system.h: Assembler messages:
arch/s390/include/asm/system.h:241: Error: junk at end of line: `(%r5)'
make[1]: *** [mm/page_cgroup.o] Error 1
make[1]: *** Waiting for unfinished jobs....

It turned out that commit 987bcdacb18a3adc2a48d85c9b005069c2f4dd7b ([S390] use
inline assembly contraints available with gcc 3.3.3) broke the inline assembly.
The or operands are now in constraint 3 and 4 instead of 2 and 3.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] smp: fix lowcore allocation
Heiko Carstens [Wed, 24 Mar 2010 10:49:51 +0000 (11:49 +0100)]
[S390] smp: fix lowcore allocation

The intermediate lowcore for CONFIG_SMP is allocated using a call to
__alloc_bootmem() with a goal of 0. That however doesn't guarantee that
the allocated piece of memory is below 2GB.
Instead we should call __alloc_bootmem_low().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] zcore: CPU registers are not saved under LPAR
Michael Holzheu [Wed, 24 Mar 2010 10:49:50 +0000 (11:49 +0100)]
[S390] zcore: CPU registers are not saved under LPAR

To save the registers for all CPUs a sigp "store status" is done that
stores the registers to address absolute zero. To access storage at
absolute zero, normally the address of the prefix register of the
accessing CPU has to be used. This does not work when large pages are
active (currently only under LPAR). In order to fix that problem,
instead of memcpy memcpy_real is used, which switches to real mode
where prefixing works.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years agopcmcia: use dev_pm_ops for class pcmcia_socket_class
Dominik Brodowski [Mon, 15 Mar 2010 20:46:34 +0000 (21:46 +0100)]
pcmcia: use dev_pm_ops for class pcmcia_socket_class

Instead of requiring PCMCIA socket drivers to call various functions
during their (bus) resume and suspend functions, register an own
dev_pm_ops for this class. This fixes several suspend/resume bugs
seen on db1xxx-ss, and probably on some other socket drivers, too.

With regard to the asymmetry with only _noirq suspend, but split up
resume, please see bug 14334 and commit 9905d1b411946fb3 .

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopower: support _noirq actions on device types and classes
Dominik Brodowski [Mon, 15 Mar 2010 20:43:11 +0000 (21:43 +0100)]
power: support _noirq actions on device types and classes

The new-style dev_pm_ops provide callbacks for both IRQs enabled
and disabled. However, the _noirq variants were only called for
buses registered with a device, not for classes and types.

In order to properly use dev_pm_ops in class pcmcia_socket_class,
support _noirq actions also on classes and types.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agopcmcia: allow for four multifunction subdevices (again)
Dominik Brodowski [Wed, 24 Mar 2010 09:49:14 +0000 (10:49 +0100)]
pcmcia: allow for four multifunction subdevices (again)

Commit aa584ca4 broke what 6cf5be51 had already fixed: there may
be four multifunction devices, but just two pseudo-multifunction
devices per PCMCIA card.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Wed, 24 Mar 2010 07:03:38 +0000 (08:03 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Wed, 24 Mar 2010 07:03:34 +0000 (08:03 +0100)]
Merge branch 'fix/asoc' into for-linus

14 years agoALSA: cmipci: work around invalid PCM pointer
Clemens Ladisch [Wed, 24 Mar 2010 06:10:54 +0000 (07:10 +0100)]
ALSA: cmipci: work around invalid PCM pointer

When the CMI8738 FRAME2 register is read, the chip sometimes (probably
when wrapping around) returns an invalid value that would be outside the
programmed DMA buffer. This leads to an inconsistent PCM pointer that is
likely to result in an underrun.

To work around this, read the register multiple times until we get a
valid value; the error state seems to be very short-lived.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Matija Nalis <mnalis-alsadev@voyager.hr>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoigb: only use vlan_gro_receive if vlans are registered
Alexander Duyck [Tue, 23 Mar 2010 18:35:18 +0000 (18:35 +0000)]
igb: only use vlan_gro_receive if vlans are registered

This change makes it so that vlan_gro_receive is only used if vlans have been
registered to the adapter structure.  Previously we were just sending all vlan
tagged frames in via this function but this results in a null pointer
dereference when vlans are not registered.

[ This fixes bugzilla entry 15582 -Eric Dumazet]

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: do not modify tx_queue_len on link speed change
Emil Tantilov [Tue, 23 Mar 2010 18:34:57 +0000 (18:34 +0000)]
igb: do not modify tx_queue_len on link speed change

Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex.
This had the effect of overriding user set values on link change/reset. Testing shows that
adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex.

Based on e1000e patch by Franco Fichtner <franco@lastsummer.de>

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: count Rx FIFO errors correctly
Mitch Williams [Tue, 23 Mar 2010 18:34:38 +0000 (18:34 +0000)]
igb: count Rx FIFO errors correctly

Don't aggregate rx_no_buffer_count into rx_fifo_errors. RNBC counts
packets that get queued temporarily in the adapter's FIFO. These
packets are not dropped and are not errors. The correct counter
is rx_missed_errors (MPC).

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Use proper handler during netpoll.
Michael Chan [Tue, 23 Mar 2010 13:13:12 +0000 (13:13 +0000)]
bnx2: Use proper handler during netpoll.

Netpoll needs to call the proper handler depending on the IRQ mode
and the vector.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Fix netpoll crash.
Benjamin Li [Tue, 23 Mar 2010 13:13:11 +0000 (13:13 +0000)]
bnx2: Fix netpoll crash.

The bnx2 driver calls netif_napi_add() for all the NAPI structs during
->probe() time but not all of them will be used if we're not in MSI-X
mode.  This creates a problem for netpoll since it will poll all the
NAPI structs in the dev_list whether or not they are scheduled, resulting
in a crash when we access structure fields not initialized for that vector.

We fix it by moving the netif_napi_add() call to ->open() after the number
of IRQ vectors has been determined.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoext4: Fixed inode allocator to correctly track a flex_bg's used_dirs
Eric Sandeen [Wed, 24 Mar 2010 01:32:00 +0000 (21:32 -0400)]
ext4: Fixed inode allocator to correctly track a flex_bg's used_dirs

When used_dirs was introduced for the flex_groups struct, it looks
like the accounting was not put into place properly, in some places
manipulating free_inodes rather than used_dirs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Don't use delayed allocation by default when used instead of ext3
Jan Kara [Thu, 25 Mar 2010 00:18:37 +0000 (20:18 -0400)]
ext4: Don't use delayed allocation by default when used instead of ext3

When ext4 driver is used to mount a filesystem instead of the ext3 file
system driver (through CONFIG_EXT4_USE_FOR_EXT23), do not enable delayed
allocation by default since some ext3 users and application writers have
developed unfortunate expectations about the safety of writing files on
systems subject to sudden and violent death without using fsync().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Fix spelling of CONTIG_FS_EXT3 to CONFIG_FS_EXT3
Theodore Ts'o [Thu, 25 Mar 2010 00:06:41 +0000 (20:06 -0400)]
ext4: Fix spelling of CONTIG_FS_EXT3 to CONFIG_FS_EXT3

Oops.  (Blush.)

Thanks to Sedat Dilek for pointing this out.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoresources: add interfaces that return conflict information
Bjorn Helgaas [Fri, 12 Mar 2010 00:01:09 +0000 (17:01 -0700)]
resources: add interfaces that return conflict information

request_resource() and insert_resource() only return success or failure,
which no information about what existing resource conflicted with the
proposed new reservation.  This patch adds request_resource_conflict()
and insert_resource_conflict(), which return the conflicting resource.

Callers may use this for better error messages or to adjust the new
resource and retry the request.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoksz884x: fix return value of netdev_set_eeprom
Jens Rottmann [Tue, 23 Mar 2010 04:23:50 +0000 (04:23 +0000)]
ksz884x: fix return value of netdev_set_eeprom

ksz884x: fix return value of netdev_set_eeprom

netdev_set_eeprom() confused ethtool by just returning 1 on error
instead of a proper -EINVAL.

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocgroups: net_cls as module
Ben Blum [Tue, 23 Mar 2010 05:24:03 +0000 (05:24 +0000)]
cgroups: net_cls as module

Allows the net_cls cgroup subsystem to be compiled as a module

This patch modifies net/sched/cls_cgroup.c to allow the net_cls subsystem
to be optionally compiled as a module instead of builtin.  The
cgroup_subsys struct is moved around a bit to allow the subsys_id to be
either declared as a compile-time constant by the cgroup_subsys.h include
in cgroup.h, or, if it's a module, initialized within the struct by
cgroup_load_subsys.

Signed-off-by: Ben Blum <bblum@andrew.cmu.edu>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrm/i915: Stop trying to use ACPI lid status to determine LVDS connection.
Eric Anholt [Wed, 17 Mar 2010 20:48:06 +0000 (13:48 -0700)]
drm/i915: Stop trying to use ACPI lid status to determine LVDS connection.

I've been getting more and more quirk reports about this.  It seems
clear at this point that other OSes are not using this for determining
whether the integrated panel should be turned on, and it is not
reliable for doing so.  Better to light up an unintended panel than to
not light up the only usable output on the system.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agopcmcia: do not use ioports < 0x100 on x86
Dominik Brodowski [Tue, 23 Mar 2010 15:05:00 +0000 (16:05 +0100)]
pcmcia: do not use ioports < 0x100 on x86

On x86 systems using ACPI _CRS information -- now the default for
post-2008 systems -- the PCI root bus no longer pretends to be
offering the root ioport_resource. To avoid accidentally hitting
some platform / system device, use only I/O ports >= 0x100 for
PCMCIA devices on x86.

Reported-by: Komuro <komurojun-mbn@nifty.com>
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years ago[ARM] Orion5x: replace KEY_WLAN with KEY_WPS_BUTTON
Christian Lamparter [Mon, 8 Mar 2010 23:26:35 +0000 (15:26 -0800)]
[ARM] Orion5x: replace KEY_WLAN with KEY_WPS_BUTTON

"Input: add KEY_WPS_BUTTON definition" introduced
a generic keycode for WPS input events.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
14 years ago[ARM] Kirkwood: WPS button keycode mapping
Christian Lamparter [Mon, 8 Mar 2010 23:25:29 +0000 (15:25 -0800)]
[ARM] Kirkwood: WPS button keycode mapping

Commit "Input: add KEY_WPS_BUTTON definition"
added a generic keycode for WPS button.
Let's use it, instead of "F1" mapping.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
14 years agonilfs2: fix imperfect completion wait in nilfs_wait_on_logs
Ryusuke Konishi [Mon, 22 Mar 2010 10:33:43 +0000 (19:33 +0900)]
nilfs2: fix imperfect completion wait in nilfs_wait_on_logs

nilfs_wait_on_logs has a potential to slip out before completion of
all bio requests when it met an error.  This synchronization fault may
cause unexpected results, for instance, violative access to freed
segment buffers from an end-bio callback routine.

This fixes the issue by ensuring that nilfs_wait_on_logs waits all
given logs.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
14 years agotime: Fix accumulation bug triggered by long delay.
John Stultz [Thu, 18 Mar 2010 21:47:30 +0000 (14:47 -0700)]
time: Fix accumulation bug triggered by long delay.

The logarithmic accumulation done in the timekeeping has some overflow
protection that limits the max shift value. That means it will take
more then shift loops to accumulate all of the cycles. This causes
the shift decrement to underflow, which causes the loop to never exit.

The simplest fix would be simply to do a:
if (shift)
shift--;

However that is not optimal, as we know the cycle offset is larger
then the interval << shift, the above would make shift drop to zero,
then we would be spinning for quite awhile accumulating at interval
chunks at a time.

Instead, this patch only decreases shift if the offset is smaller
then cycle_interval << shift.  This makes sure we accumulate using
the largest chunks possible without overflowing tick_length, and limits
the number of iterations through the loop.

This issue was found and reported by Sonic Zhang, who also tested the fix.
Many thanks your explanation and testing!

Reported-by: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Tested-by: Sonic Zhang <sonic.adi@gmail.com>
LKML-Reference: <1268948850-5225-1-git-send-email-johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agopd6729: Coding Style fixes
Komuro [Fri, 19 Mar 2010 21:39:19 +0000 (06:39 +0900)]
pd6729: Coding Style fixes

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agonilfs2: fix hang-up of cleaner after log writer returned with error
Ryusuke Konishi [Mon, 22 Mar 2010 12:36:06 +0000 (21:36 +0900)]
nilfs2: fix hang-up of cleaner after log writer returned with error

According to the report from Andreas Beckmann (Message-ID:
<4BA54677.3090902@abeckmann.de>), nilfs in 2.6.33 kernel got stuck
after a disk full error.

This turned out to be a regression by log writer updates merged at
kernel 2.6.33.  nilfs_segctor_abort_construction, which is a cleanup
function for erroneous cases, was skipping writeback completion for
some logs.

This fixes the bug and would resolve the hang issue.

Reported-by: Andreas Beckmann <debian@abeckmann.de>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org> [2.6.33.x]
14 years agolibata-sff: fix spurious IRQ handling
Tejun Heo [Tue, 23 Mar 2010 03:24:08 +0000 (12:24 +0900)]
libata-sff: fix spurious IRQ handling

Commit 27943620cbd960f710a385ff4a538e14ed3f1922 introduced spurious
IRQ handling but it has a race condition where valid completion can be
lost while trying to clear spurious IRQ leading to occassional command
timeouts.

This patch improves SFF interrupt handler such that

1. Once BMDMA HSM is stopped, the condition is never considered
   spurious.  As there's no way to resume stopped BMDMA HSM, if device
   status doesn't agree with BMDMA status, the only way out is
   aborting the command (otherwise, it will just end up timing out).

2. ap->ops->sff_check_status() can be safely called to clear spurious
   device IRQ as it atomically returns completion status but BMDMA IRQ
   status can't be cleared in safe way if command is in flight.  After
   a spurious IRQ, call ap->ops->sff_irq_clear() only if the
   respective device is idle and retry completion if
   sff_check_status() indicates command completion.

Please note that ata_piix uses bmdma_status for sff_irq_check() and #2
won't weaken spurious IRQ handling even with in-flight command because
if bmdma_status indicates IRQ pending but device status is not on
spurious check, the next IRQ handler invocation will abort the command
due to #1.

This fixes bko#15537.

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

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andrew Benton <b3nton@gmail.com>
Cc: Petr Uzel <petr.uzel@centrum.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Tue, 23 Mar 2010 08:18:25 +0000 (08:18 +0000)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6

14 years agosh: Silence unintialized variable warnings in dwarf unwinder.
Paul Mundt [Tue, 23 Mar 2010 08:07:41 +0000 (17:07 +0900)]
sh: Silence unintialized variable warnings in dwarf unwinder.

The parent rb_node needs to be initialized to shut up the compiler, even
though we're unlikely to ever hit this issue at run time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Tidy up a couple of section mismatches.
Paul Mundt [Tue, 23 Mar 2010 08:06:47 +0000 (17:06 +0900)]
sh: Tidy up a couple of section mismatches.

select_idle_routine() and register_sh_pmu() both needed their annotations
fixed up to silence section mismatch warnings.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix build after dynamic PMB rework
Matt Fleming [Mon, 22 Mar 2010 22:09:58 +0000 (22:09 +0000)]
sh: Fix build after dynamic PMB rework

set_pmb_entry() is now only used by a function that is wrapped in #ifdef
CONFIG_PM, so wrap set_pmb_entry() in CONFIG_PM too.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Replace unsafe manipulation of MMUCR
Matt Fleming [Sun, 21 Mar 2010 19:51:52 +0000 (19:51 +0000)]
sh: Replace unsafe manipulation of MMUCR

Setting the TI in MMUCR causes all the TLB bits in MMUCR to be
cleared. Unfortunately, the TLB wired bits are also cleared when setting
the TI bit, causing any wired TLB entries to become unwired.

Use local_flush_tlb_all() which implements TLB flushing in a safer
manner by using the memory-mapped TLB registers. As each CPU has its own
PMB the modifications in pmb_init() only affect the local CPU, so only
flush the local CPU's TLB.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Flush ITLB too in PTEAEX's flush_tlb_page()
Matt Fleming [Sun, 21 Mar 2010 19:51:43 +0000 (19:51 +0000)]
sh: Flush ITLB too in PTEAEX's flush_tlb_page()

flush_tlb_page() can be used to flush TLB entries that map executable
pages. Therefore, we need to ensure that the ITLB is also flushed in
local_flush_tlb_page().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh64: Remove long unused mid_sched macro
Andreas Bombe [Sat, 20 Mar 2010 00:38:01 +0000 (00:38 +0000)]
sh64: Remove long unused mid_sched macro

interruptible_sleep_on() is referenced for use in the mid_sched macro
which is not used anywhere.  Remove reference and macro as well as the
comment which appears to belong with them.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoSH: remove superfluous warning from the serial driver
Guennadi Liakhovetski [Fri, 19 Mar 2010 13:53:36 +0000 (13:53 +0000)]
SH: remove superfluous warning from the serial driver

This warning has been introduced during the SCI DMA support developmenr and is
not needed any more.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoSH: fix SCIFA SCASCR register bit definitions
Guennadi Liakhovetski [Fri, 19 Mar 2010 13:52:35 +0000 (13:52 +0000)]
SH: fix SCIFA SCASCR register bit definitions

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoserial: sh-sci: fix SH-Mobile SH breakage
Magnus Damm [Tue, 16 Mar 2010 11:21:07 +0000 (11:21 +0000)]
serial: sh-sci: fix SH-Mobile SH breakage

The follwing commit breaks SH-Mobile on non-ARM platforms:
"8a77b8d serial: sh-sci: Support ARM-based SH-Mobile CPUs."

The commit assumed that CONFIG_ARCH_SHMOBILE only was set
on ARM platforms, but it turns out that this kconfig is also
set by all SH-based SoCs. Sh7724 and other older SH-Mobile
SoCs are all broken without this fix.

This patch converts the "defined(CONFIG_ARCH_SHMOBILE)" into
one "defined()" per SoC model - similar to existing SH code.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Add watch-dog register address for SH7722/SH7723/SH7724
Kuninori Morimoto [Tue, 16 Mar 2010 02:02:08 +0000 (02:02 +0000)]
sh: Add watch-dog register address for SH7722/SH7723/SH7724

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: ms7724: Add tiny-document for sound
Kuninori Morimoto [Tue, 16 Mar 2010 02:01:53 +0000 (02:01 +0000)]
sh: ms7724: Add tiny-document for sound

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init
Kuninori Morimoto [Tue, 16 Mar 2010 02:01:33 +0000 (02:01 +0000)]
sh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init

i2c_put_adapter is needed after i2c_get_adapter

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agonetxen: The driver doesn't work on NX_P3_B1 so cause probe to fail.
Eric W. Biederman [Wed, 17 Mar 2010 22:24:39 +0000 (22:24 +0000)]
netxen: The driver doesn't work on NX_P3_B1 so cause probe to fail.

I haven't been able to get link up on a NX_P3_B1 since 2.6.31.  The
driver complains about a firmware hang instead.  When I asked I was
told rev 0x41 was a preproduction rev.  So disable support in the
driver so no one is surprised the code doesn't work.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetpoll: warn when there are spaces in parameters
Amerigo Wang [Sun, 21 Mar 2010 22:59:58 +0000 (22:59 +0000)]
netpoll: warn when there are spaces in parameters

v2: update according to Frans' comments.

Currently, if we leave spaces before dst port,
netconsole will silently accept it as 0. Warn about this.

Also, when spaces appear in other places, make them
visible in error messages.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: David Miller <davem@davemloft.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: bfin_can: switch to common Blackfin can header
Mike Frysinger [Sun, 21 Mar 2010 21:06:01 +0000 (21:06 +0000)]
can: bfin_can: switch to common Blackfin can header

The MMR bits are being moved to this header, so include it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Tue, 23 Mar 2010 03:05:26 +0000 (20:05 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

14 years agopata_via: Add VIA VX900 support
JosephChan@via.com.tw [Fri, 19 Mar 2010 06:08:11 +0000 (14:08 +0800)]
pata_via: Add VIA VX900 support

Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoFix up prototype for sys_ipc breakage
Linus Torvalds [Mon, 22 Mar 2010 20:12:33 +0000 (13:12 -0700)]
Fix up prototype for sys_ipc breakage

Commit 45575f5a426c ("ppc64 sys_ipc breakage in 2.6.34-rc2") fixed the
definition of the sys_ipc() helper, but didn't fix the prototype in
<linux/syscalls.h>

Reported-and-tested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoregulator: fix dangling pointers
Wolfram Sang [Sat, 20 Mar 2010 14:12:58 +0000 (15:12 +0100)]
regulator: fix dangling pointers

Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agolp3971: Fix BUCK_VOL_CHANGE_SHIFT logic
Axel Lin [Thu, 11 Mar 2010 01:50:07 +0000 (09:50 +0800)]
lp3971: Fix BUCK_VOL_CHANGE_SHIFT logic

Given x=0,1,2, current implementation of BUCK_VOL_CHANGE_SHIFT(x) returns 0,4,8.
The correct return value should be 0,4,6.
This patch fix the logic.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agolp3971: Fix setting val for LDO2 and LDO4
Axel Lin [Tue, 9 Mar 2010 08:53:59 +0000 (16:53 +0800)]
lp3971: Fix setting val for LDO2 and LDO4

In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: Get rid of lockdep warning
Ameya Palande [Fri, 12 Mar 2010 18:09:01 +0000 (20:09 +0200)]
regulator: Get rid of lockdep warning

WARNING: at kernel/lockdep.c:2706 sysfs_add_file_mode+0x4c/0xa8()

Difference between v1 and v2:
Moved sysfs_attr_init() call as first one to access the structure.

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
CC: Liam Girdwood <lrg@slimlogic.co.uk>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: handle kcalloc() failure
Dan Carpenter [Sun, 7 Mar 2010 12:36:45 +0000 (15:36 +0300)]
regulator: handle kcalloc() failure

Return -ENOMEM if kcalloc() fails

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoRegulators: max8925-regulator - clean up driver data after removal
Dmitry Torokhov [Wed, 24 Feb 2010 07:38:55 +0000 (23:38 -0800)]
Regulators: max8925-regulator - clean up driver data after removal

It is a good tone to reset driver data after unbinding the device.
Also change find_regulator_info() fro inline to __devinit - let compiler
figure out if it wants it to be inlined or not.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agonetfilter: xt_recent: fix regression in rules using a zero hit_count
Patrick McHardy [Mon, 22 Mar 2010 17:25:20 +0000 (18:25 +0100)]
netfilter: xt_recent: fix regression in rules using a zero hit_count

Commit 8ccb92ad (netfilter: xt_recent: fix false match) fixed supposedly
false matches in rules using a zero hit_count. As it turns out there is
nothing false about these matches and people are actually using entries
with a hit_count of zero to make rules dependant on addresses inserted
manually through /proc.

Since this slipped past the eyes of three reviewers, instead of
reverting the commit in question, this patch explicitly checks
for a hit_count of zero to make the intentions more clear.

Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Tested-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agorxrpc: Check allocation failure.
Tetsuo Handa [Mon, 22 Mar 2010 17:22:55 +0000 (10:22 -0700)]
rxrpc: Check allocation failure.

alloc_skb() can return NULL.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Mon, 22 Mar 2010 17:03:51 +0000 (10:03 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mst/vhost

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio: console: Check if port is valid in resize_console
  virtio: console: Generate a kobject CHANGE event on adding 'name' attribute

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 22 Mar 2010 17:01:58 +0000 (10:01 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (38 commits)
  ip_gre: include route header_len in max_headroom calculation
  if_tunnel.h: add missing ams/byteorder.h include
  ipv4: Don't drop redirected route cache entry unless PTMU actually expired
  net: suppress lockdep-RCU false positive in FIB trie.
  Bluetooth: Fix kernel crash on L2CAP stress tests
  Bluetooth: Convert debug files to actually use debugfs instead of sysfs
  Bluetooth: Fix potential bad memory access with sysfs files
  netfilter: ctnetlink: fix reliable event delivery if message building fails
  netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
  NET_DMA: free skbs periodically
  netlink: fix unaligned access in nla_get_be64()
  tcp: Fix tcp_mark_head_lost() with packets == 0
  net: ipmr/ip6mr: fix potential out-of-bounds vif_table access
  KS8695: update ksp->next_rx_desc_read at the end of rx loop
  igb: Add support for 82576 ET2 Quad Port Server Adapter
  ixgbevf: Message formatting cleanups
  ixgbevf: Shorten up delay timer for watchdog task
  ixgbevf: Fix VF Stats accounting after reset
  ixgbe: Set IXGBE_RSC_CB(skb)->DMA field to zero after unmapping the address
  ixgbe: fix for real_num_tx_queues update issue
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Mon, 22 Mar 2010 16:58:04 +0000 (09:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  edac, mce: Filter out invalid values

14 years agorxrpc: Check allocation failure.
Tetsuo Handa [Mon, 22 Mar 2010 13:50:19 +0000 (13:50 +0000)]
rxrpc: Check allocation failure.

alloc_skb() can return NULL.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoAFS: Potential null dereference
Dan Carpenter [Mon, 22 Mar 2010 13:07:14 +0000 (13:07 +0000)]
AFS: Potential null dereference

It seems clear from the surrounding code that xpermits is allowed to be
NULL here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoppc64 sys_ipc breakage in 2.6.34-rc2
Anton Blanchard [Mon, 22 Mar 2010 06:47:59 +0000 (17:47 +1100)]
ppc64 sys_ipc breakage in 2.6.34-rc2

I chased down a fail on ppc64 on 2.6.34-rc2 where an application that
uses shared memory was getting a SEGV.

Commit baed7fc9b580bd3fb8252ff1d9b36eaf1f86b670 ("Add generic sys_ipc
wrapper") changed the second argument from an unsigned long to an int.
When we call shmget the system call wrappers for sys_ipc will sign
extend second (ie the size) which truncates it.  It took a while to
track down because the call succeeds and strace shows the untruncated
size :)

The patch below changes second from an int to an unsigned long which
fixes shmget on ppc64 (and I assume s390, sparc64 and mips64).

Signed-off-by: Anton Blanchard <anton@samba.org>
--

I assume the function prototypes for the other IPC methods would cause us
to sign or zero extend second where appropriate (avoiding any security
issues). Come to think of it, the syscall wrappers for each method should do
that for us as well.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86 / perf: Fix suspend to RAM on HP nx6325
Rafael J. Wysocki [Sun, 21 Mar 2010 20:51:51 +0000 (21:51 +0100)]
x86 / perf: Fix suspend to RAM on HP nx6325

Commit 3f6da3905398826d85731247e7fbcf53400c18bd
(perf: Rework and fix the arch CPU-hotplug hooks) broke suspend to
RAM on my HP nx6325 (and most likely on other AMD-based boxes too)
by allowing amd_pmu_cpu_offline() to be executed for CPUs that are
going offline as part of the suspend process.  The problem is that
cpuhw->amd_nb may be NULL already, so the function should make sure
it's not NULL before accessing the object pointed to by it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoedac, mce: Filter out invalid values
Borislav Petkov [Tue, 9 Mar 2010 19:38:48 +0000 (20:38 +0100)]
edac, mce: Filter out invalid values

Print the CPU associated with the error only when the field is valid.

Cc: <stable@kernel.org> # .32.x .33.x
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agopxa168fb: fix incorrect resource calculation
Dan Carpenter [Mon, 22 Mar 2010 12:10:35 +0000 (15:10 +0300)]
pxa168fb: fix incorrect resource calculation

The size calculation is not correct.  It should be end - start + 1.
Use resource_size() to caculate it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years agovirtio: console: Check if port is valid in resize_console
Amit Shah [Fri, 19 Mar 2010 12:06:44 +0000 (17:36 +0530)]
virtio: console: Check if port is valid in resize_console

The console port could have been hot-unplugged. Check if it is valid
before working on it.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agovirtio: console: Generate a kobject CHANGE event on adding 'name' attribute
Amit Shah [Fri, 19 Mar 2010 12:06:43 +0000 (17:36 +0530)]
virtio: console: Generate a kobject CHANGE event on adding 'name' attribute

When the host lets us know what 'name' a port is assigned, we create the
sysfs 'name' attribute. Generate a 'change' event after this so that
udev wakes up and acts on the rules for virtio-ports (currently there's
only one rule that creates a symlink from the 'name' to the actual char
device).

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoASoC: Remove BROKEN from i.MX audio after dependencies merged
Mark Brown [Fri, 12 Feb 2010 14:39:36 +0000 (14:39 +0000)]
ASoC: Remove BROKEN from i.MX audio after dependencies merged

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge commit 'v2.6.34-rc2' into for-2.6.34
Mark Brown [Mon, 22 Mar 2010 11:17:26 +0000 (11:17 +0000)]
Merge commit 'v2.6.34-rc2' into for-2.6.34

14 years agoNFS: don't try to decode GETATTR if DELEGRETURN returned error
Jeff Layton [Sun, 21 Mar 2010 16:10:36 +0000 (12:10 -0400)]
NFS: don't try to decode GETATTR if DELEGRETURN returned error

The reply parsing code attempts to decode the GETATTR response even if
the DELEGRETURN portion of the compound returned an error. The GETATTR
response won't actually exist if that's the case and we're asking the
parser to read past the end of the response.

This bug is fairly benign. The parser catches this without reading past
the end of the response and decode_getfattr returns -EIO. Earlier
kernels however had decode_op_hdr using the READ_BUF macro, and this
bug would make this printk pop any time the client got an error from
a delegreturn:

kernel: decode_op_hdr: reply buffer overflowed in line XXXX

More recent kernels seem to have replaced this printk with a dprintk.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14 years agosunrpc: handle allocation errors from __rpc_lookup_create()
Dan Carpenter [Sun, 21 Mar 2010 16:10:34 +0000 (12:10 -0400)]
sunrpc: handle allocation errors from __rpc_lookup_create()

__rpc_lookup_create() can return ERR_PTR(-ENOMEM).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
14 years agoSUNRPC: Fix the return value of rpc_run_bc_task()
Trond Myklebust [Fri, 19 Mar 2010 20:17:45 +0000 (16:17 -0400)]
SUNRPC: Fix the return value of rpc_run_bc_task()

Currently rpc_run_bc_task() will return NULL if the task allocation failed.
However the only caller is bc_send, which assumes that the return value
will be an ERR_PTR.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14 years agoSUNRPC: Fix a use after free bug with the NFSv4.1 backchannel
Trond Myklebust [Fri, 19 Mar 2010 19:36:22 +0000 (15:36 -0400)]
SUNRPC: Fix a use after free bug with the NFSv4.1 backchannel

The ->release_request() callback was designed to allow the transport layer
to do housekeeping after the RPC call is done. It cannot be used to free
the request itself, and doing so leads to a use-after-free bug in
xprt_release().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14 years agoALSA: hda - Fix access-after-free in patch_realtek.c
Takashi Iwai [Mon, 22 Mar 2010 07:30:20 +0000 (08:30 +0100)]
ALSA: hda - Fix access-after-free in patch_realtek.c

alc_free_kctls() has to be called after all jobs done in alc_build_controls().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Sort codec entry list of Nvidia HDMI
Takashi Iwai [Mon, 22 Mar 2010 07:07:55 +0000 (08:07 +0100)]
ALSA: hda - Sort codec entry list of Nvidia HDMI

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add support of Nvidia GT220 HDMI
Derek Kelly [Mon, 22 Mar 2010 07:04:19 +0000 (08:04 +0100)]
ALSA: hda - Add support of Nvidia GT220 HDMI

This patch adds the device id for Nvidia GT220 cards to the nvhdmi
driver.  I have tested it and confirmed it to be working.

Original patch download link:
https://gist.github.com/324070/

Signed-off-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
Daniel T Chen [Sun, 21 Mar 2010 22:34:43 +0000 (18:34 -0400)]
ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)

BugLink: https://launchpad.net/bugs/420578
The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).

Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agonilfs2: fix duplicate call to nilfs_segctor_cancel_freev
Ryusuke Konishi [Mon, 22 Mar 2010 05:01:24 +0000 (14:01 +0900)]
nilfs2: fix duplicate call to nilfs_segctor_cancel_freev

Andreas Beckmann gave me a report that nilfs logged the following
warnings when it got a disk full:

  nilfs_sufile_do_cancel_free: segment 0 must be clean
  nilfs_sufile_do_cancel_free: segment 1 must be clean

These arise from a duplicate call to nilfs_segctor_cancel_freev in an
error path of log writer.  This will fix the issue.

Reported-by: Andreas Beckmann <debian@abeckmann.de>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
14 years agoip_gre: include route header_len in max_headroom calculation
Timo Teräs [Sat, 20 Mar 2010 02:27:58 +0000 (02:27 +0000)]
ip_gre: include route header_len in max_headroom calculation

Taking route's header_len into account, and updating gre device
needed_headroom will give better hints on upper bound of required
headroom. This is useful if the gre traffic is xfrm'ed.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoif_tunnel.h: add missing ams/byteorder.h include
Paulius Zaleckas [Mon, 22 Mar 2010 04:19:02 +0000 (21:19 -0700)]
if_tunnel.h: add missing ams/byteorder.h include

When compiling userspace application which includes
if_tunnel.h and uses GRE_* defines you will get undefined
reference to __cpu_to_be16.

Fix this by adding missing #include <asm/byteorder.h>

Cc: stable@kernel.org
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago[ARM] pxa/raumfeld: fix button name
Daniel Mack [Thu, 18 Mar 2010 18:37:29 +0000 (19:37 +0100)]
[ARM] pxa/raumfeld: fix button name

This fixes a warning when booting 2.6.34-rc2:

[   26.619814] ------------[ cut here ]------------
[   26.624604] WARNING: at fs/proc/generic.c:316 __xlate_proc_name+0xac/0xc0()
[   26.631555] name 'on/off button'
[   26.634753] Modules linked in:

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa/raumfeld: remove duplicated #include
Huang Weiyi [Mon, 22 Mar 2010 03:51:05 +0000 (11:51 +0800)]
[ARM] pxa/raumfeld: remove duplicated #include

Remove duplicated #include('s) in
 arch/arm/mach-pxa/raumfeld.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] locomo: fix unpaired spin_lock_irqsave
H Hartley Sweeten [Mon, 22 Mar 2010 03:09:20 +0000 (11:09 +0800)]
[ARM] locomo: fix unpaired spin_lock_irqsave

The function locomo_m62332_senddata sends a three byte i2c message to
a M62332 DAC. This entire function is guarded with a spin_lock_irqsave
at the start of the function and a spin_unlock_irqrestore at the end.

As each byte is transferred, the i2c ACK from the DAC is checked.
Currently, if the ACK is missing the function simply returns without
the unlock. It also leaves the i2c bus in an invalid state since the
last byte transferred did not have a "stop" condition and leave the
bus idle.

Fix this by adding an exit path using goto.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] locomo: fix SPI register offset
H Hartley Sweeten [Mon, 22 Mar 2010 02:33:58 +0000 (10:33 +0800)]
[ARM] locomo: fix SPI register offset

The locomo spi registers are all defined in locomo.h as offsets
from the first spi register LOCOMO_SPI (0x60), which is itself
an offset from the locomo base address.  To correctly access
these registers LOCOMO_SPI must always be included in the
address calculation.

There are two places in locomo.c where this is not done.  The
first one, in locomo_suspend, actually results in a write to
LOCOMO_ST instead of LOCOMO_SPICT.  The second is in __locomo_probe
and results in a write to LOCOMO_MCSX2 instead of LOCOMO_SPIIE.

Fix these by including LOCOMO_SPI in the calculation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa/sharpsl: add dependency of max1111 driver to sharpsl_pm
Eric Miao [Tue, 9 Mar 2010 02:34:27 +0000 (10:34 +0800)]
[ARM] pxa/sharpsl: add dependency of max1111 driver to sharpsl_pm

sharpsl_pm.c actually depends on max1111 driver being built-in when
not using legacy ssp code.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa: remove unnecessary 'select FB_W100' from some platforms
Eric Miao [Tue, 9 Mar 2010 03:04:44 +0000 (11:04 +0800)]
[ARM] pxa: remove unnecessary 'select FB_W100' from some platforms

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa: remove spi cs gpio direction to avoid clash with driver
Jonathan Cameron [Sun, 7 Mar 2010 21:59:16 +0000 (21:59 +0000)]
[ARM] pxa: remove spi cs gpio direction to avoid clash with driver

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] mmp: fix for variables in uncompress.h being discarded
Eric Miao [Mon, 22 Mar 2010 01:39:58 +0000 (09:39 +0800)]
[ARM] mmp: fix for variables in uncompress.h being discarded

Due to commit:

    5de813b  ARM: Eliminate decompressor -Dstatic= PIC hack

The data section will be discarded for the decompressor, thus move the
static variables into BSS section by initializing them at run time.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years ago[ARM] pxa: fix for variables in uncompress.h being discarded
Jonathan Cameron [Mon, 8 Mar 2010 17:44:19 +0000 (17:44 +0000)]
[ARM] pxa: fix for variables in uncompress.h being discarded

Due to commit:

    5de813b  ARM: Eliminate decompressor -Dstatic= PIC hack

The data section will be discarded for the decompressor, thus move the
static variables into BSS section by initializing them at run time.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years agoipv4: Don't drop redirected route cache entry unless PTMU actually expired
Guenter Roeck [Mon, 22 Mar 2010 03:55:13 +0000 (20:55 -0700)]
ipv4: Don't drop redirected route cache entry unless PTMU actually expired

TCP sessions over IPv4 can get stuck if routers between endpoints
do not fragment packets but implement PMTU instead, and we are using
those routers because of an ICMP redirect.

Setup is as follows

       MTU1    MTU2   MTU1
    A--------B------C------D

with MTU1 > MTU2. A and D are endpoints, B and C are routers. B and C
implement PMTU and drop packets larger than MTU2 (for example because
DF is set on all packets). TCP sessions are initiated between A and D.
There is packet loss between A and D, causing frequent TCP
retransmits.

After the number of retransmits on a TCP session reaches tcp_retries1,
tcp calls dst_negative_advice() prior to each retransmit. This results
in route cache entries for the peer to be deleted in
ipv4_negative_advice() if the Path MTU is set.

If the outstanding data on an affected TCP session is larger than
MTU2, packets sent from the endpoints will be dropped by B or C, and
ICMP NEEDFRAG will be returned. A and D receive NEEDFRAG messages and
update PMTU.

Before the next retransmit, tcp will again call dst_negative_advice(),
causing the route cache entry (with correct PMTU) to be deleted. The
retransmitted packet will be larger than MTU2, causing it to be
dropped again.

This sequence repeats until the TCP session aborts or is terminated.

Problem is fixed by removing redirected route cache entries in
ipv4_negative_advice() only if the PMTU is expired.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Mon, 22 Mar 2010 01:03:11 +0000 (18:03 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6