cascardo/linux.git
13 years agos390: Fix wrong size in memcmp (netiucv)
Stefan Weil [Wed, 2 Feb 2011 06:04:35 +0000 (06:04 +0000)]
s390: Fix wrong size in memcmp (netiucv)

This error was reported by cppcheck:
drivers/s390/net/netiucv.c:568: error: Using sizeof for array given
as function argument returns the size of pointer.

sizeof(ipuser) did not result in 16 (as many programmers would have
expected) but sizeof(u8 *), so it is 4 or 8, too small here.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: allow OSA CHPARM change in suspend state
Ursula Braun [Wed, 2 Feb 2011 06:04:34 +0000 (06:04 +0000)]
qeth: allow OSA CHPARM change in suspend state

For OSA the CHPARM-definition determines the number of available
outbound queues.
A CHPARM-change may occur while a Linux system with probed
OSA device is in suspend state. This patch enables proper
resuming of an OSA device in this case.

Signed-off-by: Ursula braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: allow HiperSockets framesize change in suspend
Ursula Braun [Wed, 2 Feb 2011 06:04:33 +0000 (06:04 +0000)]
qeth: allow HiperSockets framesize change in suspend

For HiperSockets the framesize-definition determines the selected
mtu-size and the size of the allocated qdio buffers.
A framesize-change may occur while a Linux system with probed
HiperSockets device is in suspend state. This patch enables proper
resuming of a HiperSockets device in this case.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: add more strict MTU checking
Frank Blaschka [Wed, 2 Feb 2011 06:04:32 +0000 (06:04 +0000)]
qeth: add more strict MTU checking

HiperSockets and OSA hardware report a maximum MTU size. Add checking
to reject larger MTUs than allowed by hardware.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: show new mac-address if its setting fails
Ursula Braun [Wed, 2 Feb 2011 06:04:31 +0000 (06:04 +0000)]
qeth: show new mac-address if its setting fails

Setting of a MAC-address may fail because an already used MAC-address
is to bet set or because of authorization problems. In those cases
qeth issues a message, but the mentioned MAC-address is not the
new MAC-address to be set, but the actual MAC-address. This patch
chooses now the new MAC-address to be set for the error messages.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogro: reset skb_iif on reuse
Andy Gospodarek [Wed, 2 Feb 2011 22:53:25 +0000 (14:53 -0800)]
gro: reset skb_iif on reuse

Like Herbert's change from a few days ago:

66c46d741e2e60f0e8b625b80edb0ab820c46d7a gro: Reset dev pointer on reuse

this may not be necessary at this point, but we should still clean up
the skb->skb_iif.  If not we may end up with an invalid valid for
skb->skb_iif when the skb is reused and the check is done in
__netif_receive_skb.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogenirq: Prevent irq storm on migration
Thomas Gleixner [Fri, 28 Jan 2011 07:47:15 +0000 (08:47 +0100)]
genirq: Prevent irq storm on migration

move_native_irq() masks and unmasks the interrupt line
unconditionally, but the interrupt line might be masked due to a
threaded oneshot handler in progress. Unmasking the line in that case
can lead to interrupt storms. Observed on PREEMPT_RT.

Originally-from: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
13 years agoALSA: use linux/io.h to fix compile warnings
Takashi Iwai [Wed, 2 Feb 2011 16:49:53 +0000 (17:49 +0100)]
ALSA: use linux/io.h to fix compile warnings

For helping to reduce Greert's regression list...
  src/sound/drivers/mtpav.c: error: implicit declaration of function 'inb'
  src/sound/drivers/mtpav.c: error: implicit declaration of function 'outb'
  ...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Fix memory leaks in conexant jack arrays
Takashi Iwai [Wed, 2 Feb 2011 16:16:38 +0000 (17:16 +0100)]
ALSA: hda - Fix memory leaks in conexant jack arrays

The Conexant codec driver adds the jack arrays in init callback which
may be called also in each PM resume.  This results in the addition of
new jack element at each time.

The fix is to check whether the requested jack is already present in
the array.

Reference: Novell bug 668929
https://bugzilla.novell.com/show_bug.cgi?id=668929

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agodrm/radeon: remove 0x4243 pci id
Alex Deucher [Wed, 2 Feb 2011 00:06:46 +0000 (19:06 -0500)]
drm/radeon: remove 0x4243 pci id

0x4243 is a PCI bridge, not a GPU.

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

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: Enable new pll calculation for avivo+ asics
Alex Deucher [Mon, 31 Jan 2011 21:48:53 +0000 (16:48 -0500)]
drm/radeon/kms: Enable new pll calculation for avivo+ asics

New algo is used for r5xx+ and legacy is used for
r1xx-r4xx, rv515.

I've tested on all relevant GPUs and monitors that I
have access to and have found no problems.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=26562
https://bugzilla.kernel.org/show_bug.cgi?id=26552
May fix:
https://bugs.freedesktop.org/show_bug.cgi?id=32556

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add new pll algo for avivo asics
Alex Deucher [Mon, 31 Jan 2011 21:48:52 +0000 (16:48 -0500)]
drm/radeon/kms: add new pll algo for avivo asics

Based on the vbios code.  This should hopefully
fix the pll problems on a number of avivo asics
once it's enabled.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add pll debugging output
Alex Deucher [Mon, 31 Jan 2011 21:48:51 +0000 (16:48 -0500)]
drm/radeon/kms: add pll debugging output

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: switch back to min->max pll post divider iteration
Alex Deucher [Mon, 31 Jan 2011 21:48:50 +0000 (16:48 -0500)]
drm/radeon/kms: switch back to min->max pll post divider iteration

Seems more reliable.  Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=26552

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: rv6xx+ thermal sensor fixes
Alex Deucher [Tue, 1 Feb 2011 21:12:34 +0000 (16:12 -0500)]
drm/radeon/kms: rv6xx+ thermal sensor fixes

Some fixes to the thermal sensor code:
- handle negative numbers
- properly handle temp calculation on different asics

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge remote branch 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next into...
Dave Airlie [Wed, 2 Feb 2011 01:29:02 +0000 (11:29 +1000)]
Merge remote branch 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next into drm-fixes

* 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next:
  drm/nv50: fix display on 0x50
  drm/nouveau: correctly pair hwmon_init and hwmon_fini

13 years agoMerge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixes
Dave Airlie [Wed, 2 Feb 2011 01:22:34 +0000 (11:22 +1000)]
Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixes

* 'intel/drm-intel-fixes' of /ssd/git/drm-next:
  drm/i915: Only bind to function 0 of the PCI device
  drm/i915: Suppress spurious vblank interrupts
  drm: Avoid leak of adjusted mode along quick set_mode paths
  drm: Simplify and defend later checks when disabling a crtc
  drm: Don't switch fb when disabling an output
  drm/i915: Reset crtc after resume
  drm/i915/crt: Force the initial probe after reset
  drm/i915: Reset state after a GPU reset or resume
  drm: Add an interface to reset the device
  drm/i915/sdvo: If at first we don't succeed in reading the response, wait

13 years agodrm/nv50: fix display on 0x50
Ben Skeggs [Mon, 31 Jan 2011 06:23:27 +0000 (16:23 +1000)]
drm/nv50: fix display on 0x50

Accidently busted a while back.  We'll be creating objects that aren't
necessary here, but, they're never used so no harm..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: correctly pair hwmon_init and hwmon_fini
Lucas Stach [Sun, 30 Jan 2011 09:54:11 +0000 (10:54 +0100)]
drm/nouveau: correctly pair hwmon_init and hwmon_fini

I broke this with my commit
07cfe0e7a820ecad078c04e9c2a102521709145d

This fixes fdo #33434

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agobe2net: remove netif_stop_queue being called before register_netdev.
Ajit Khaparde [Tue, 1 Feb 2011 23:41:59 +0000 (15:41 -0800)]
be2net: remove netif_stop_queue being called before register_netdev.

It is illegal to call netif_stop_queue before register_netdev.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix a crash seen during insmod/rmmod test
Ajit Khaparde [Tue, 1 Feb 2011 23:41:13 +0000 (15:41 -0800)]
be2net: fix a crash seen during insmod/rmmod test

While running insmod/rmood in a loop, an unnecessary netif_stop_queue
causes the system to crash. Remove the netif_stop_queue call
and netif_start_queue in the link status update path.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Tue, 1 Feb 2011 23:23:58 +0000 (10:23 +1100)]
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze

* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Fix ASM optimized code for LE
  microblaze: Fix unaligned issue on MMU system with BS=0 DIV=1
  microblaze: Fix DTB passing from bootloader

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Tue, 1 Feb 2011 23:22:40 +0000 (10:22 +1100)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: fix length checks in checkSMB
  [CIFS] Update cifs minor version
  cifs: No need to check crypto blockcipher allocation
  cifs: clean up some compiler warnings
  cifs: make CIFS depend on CRYPTO_MD4
  cifs: force a reconnect if there are too many MIDs in flight
  cifs: don't pop a printk when sending on a socket is interrupted
  cifs: simplify SMB header check routine
  cifs: send an NT_CANCEL request when a process is signalled
  cifs: handle cancelled requests better
  cifs: fix two compiler warning about uninitialized vars

13 years agomlock: operate on any regions with protection != PROT_NONE
Michel Lespinasse [Tue, 1 Feb 2011 01:03:41 +0000 (17:03 -0800)]
mlock: operate on any regions with protection != PROT_NONE

As Tao Ma noticed, change 5ecfda0 breaks blktrace. This is because
blktrace mmaps a file with PROT_WRITE permissions but without PROT_READ,
so my attempt to not unnecessarity break COW during mlock ended up
causing mlock to fail with a permission problem.

I am proposing to let mlock ignore vma protection in all cases except
PROT_NONE. In particular, mlock should not fail for PROT_WRITE regions
(as in the blktrace case, which broke at 5ecfda0) or for PROT_EXEC
regions (which seem to me like they were always broken).

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpu/stub: fix acpi_video build error, fix stub kconfig dependencies
Randy Dunlap [Tue, 1 Feb 2011 19:17:28 +0000 (11:17 -0800)]
gpu/stub: fix acpi_video build error, fix stub kconfig dependencies

The comments under "config STUB_POULSBO" are close to correct,
but they are not being followed.  This patch updates them to reflect
the requirements for THERMAL.

This build error is caused by STUB_POULSBO selecting ACPI_VIDEO
when ACPI_VIDEO's config requirements are not met.

  ERROR: "thermal_cooling_device_register" [drivers/acpi/video.ko] undefined!
  ERROR: "thermal_cooling_device_unregister" [drivers/acpi/video.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoisdn: icn: Fix potentially wrong string handling
Stefan Weil [Sun, 30 Jan 2011 10:31:26 +0000 (10:31 +0000)]
isdn: icn: Fix potentially wrong string handling

This warning was reported by cppcheck:
drivers/isdn/icn/icn.c:1641: error: Dangerous usage of 'rev' (strncpy doesn't always 0-terminate it)

If strncpy copied 20 bytes, the destination string rev was not terminated.
The patch adds one more byte to rev and makes sure that this byte is
always 0.

Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Tejun Heo <tj@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: multicasts in NPAR mode
Vladislav Zolotarov [Tue, 1 Feb 2011 22:05:30 +0000 (14:05 -0800)]
bnx2x: multicasts in NPAR mode

The chip was erroneously configured to accept all multicast frames
in a normal (none-promisc) rx mode both on the RSS and on the FCoE L2 rings
when in an NPAR mode. This caused packet duplication for every received multicast
frame in this mode.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrm/i915: Only bind to function 0 of the PCI device
Chris Wilson [Tue, 1 Feb 2011 19:43:02 +0000 (19:43 +0000)]
drm/i915: Only bind to function 0 of the PCI device

Early chipsets (gen2/3) used function 1 as a placeholder for multi-head.
We used to ignore these since they were not assigned to
PCI_CLASS_DISPLAY_VGA. However with 934f992c7 we attempt to bind to all
Intel PCI_CLASS_DISPLAY devices (and functions) to work in multi-gpu
systems. This fails hard on gen2/3.

Reported-by: Ferenc Wágner <wferi@niif.hu>
Tested-by: Ferenc Wágner <wferi@niif.hu>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28012
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agodepca: Fix warnings
Alan Cox [Tue, 1 Feb 2011 21:19:07 +0000 (13:19 -0800)]
depca: Fix warnings

Replace the rather weird use of ++ with + 1 as the value is being assigned

Signed-off-by: Alan Cox <alan@linux.intel.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 1 Feb 2011 21:08:59 +0000 (13:08 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agoMerge branch 'vhost-net' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
David S. Miller [Tue, 1 Feb 2011 20:56:11 +0000 (12:56 -0800)]
Merge branch 'vhost-net' of git://git./linux/kernel/git/mst/vhost

13 years agovxge: Fix wrong boolean operator
Stefan Weil [Fri, 28 Jan 2011 12:30:17 +0000 (12:30 +0000)]
vxge: Fix wrong boolean operator

This error is reported by cppcheck:
drivers/net/vxge/vxge-config.c:3693: warning: Mutual exclusion over || always evaluates to true. Did you intend to use && instead?

It looks like cppcheck is correct, so fix this. No test was run.

Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Cc: Sivakumar Subramani <sivakumar.subramani@exar.com>
Cc: Sreenivasa Honnur <sreenivasa.honnur@exar.com>
Cc: Jon Mason <jon.mason@exar.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoath9k: Fix memory leak due to failed PAPRD frames
Mohammed Shafi Shajakhan [Mon, 31 Jan 2011 07:55:29 +0000 (13:25 +0530)]
ath9k: Fix memory leak due to failed PAPRD frames

free the skb's when the Tx of PAPRD frames fails and also add a debug
message indicating that.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonetfilter: ecache: always set events bits, filter them later
Pablo Neira Ayuso [Tue, 1 Feb 2011 15:06:30 +0000 (16:06 +0100)]
netfilter: ecache: always set events bits, filter them later

For the following rule:

iptables -I PREROUTING -t raw -j CT --ctevents assured

The event delivered looks like the following:

 [UPDATE] tcp      6 src=192.168.0.2 dst=192.168.1.2 sport=37041 dport=80 src=192.168.1.2 dst=192.168.1.100 sport=80 dport=37041 [ASSURED]

Note that the TCP protocol state is not included. For that reason
the CT event filtering is not very useful for conntrackd.

To resolve this issue, instead of conditionally setting the CT events
bits based on the ctmask, we always set them and perform the filtering
in the late stage, just before the delivery.

Thus, the event delivered looks like the following:

 [UPDATE] tcp      6 432000 ESTABLISHED src=192.168.0.2 dst=192.168.1.2 sport=37041 dport=80 src=192.168.1.2 dst=192.168.1.100 sport=80 dport=37041 [ASSURED]

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonetfilter: arpt_mangle: fix return values of checkentry
Pablo Neira Ayuso [Tue, 1 Feb 2011 15:03:46 +0000 (16:03 +0100)]
netfilter: arpt_mangle: fix return values of checkentry

In 135367b "netfilter: xtables: change xt_target.checkentry return type",
the type returned by checkentry was changed from boolean to int, but the
return values where not adjusted.

arptables: Input/output error

This broke arptables with the mangle target since it returns true
under success, which is interpreted by xtables as >0, thus
returning EIO.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agovhost: rcu annotation fixup
Michael S. Tsirkin [Tue, 18 Jan 2011 11:04:43 +0000 (13:04 +0200)]
vhost: rcu annotation fixup

When built with rcu checks enabled, vhost triggers
bogus warnings as vhost features are read without
dev->mutex sometimes, and private pointer is read
with our kind of rcu where work serves as a
read side critical section.

Fixing it properly is not trivial.
Disable the warnings by stubbing out the checks for now.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agoASoC: CX20442: fix NULL pointer dereference
Janusz Krzysztofik [Tue, 1 Feb 2011 12:01:17 +0000 (13:01 +0100)]
ASoC: CX20442: fix NULL pointer dereference

The CX20442 codec driver never provided the snd_soc_codec_driver's
.reg_cache_default member. With the latest ASoC framework changes, it
seems to be referred unconditionally, resulting in a NULL pointer
dereference if missing. Provide it.

Created and tested on Amstrad Delta against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Amstrad Delta: fix const related build error
Janusz Krzysztofik [Tue, 1 Feb 2011 10:11:55 +0000 (11:11 +0100)]
ASoC: Amstrad Delta: fix const related build error

The Amstrad Delta ASoC driver used to override the digital_mute()
callback, expected to be not provided by the on-board CX20442 CODEC
driver, with its own implementation. While this is still posssible when
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct
after the snd_soc_dai_driver.ops member has been constified, and results
in build error.

Drop this actually not used code path in hope the CX20442 driver never
provides its own snd_soc_dai_ops structure.

Created and tested against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agosched, docs: Update schedstats documentation to version 15
Javi Merino [Mon, 31 Jan 2011 23:11:36 +0000 (23:11 +0000)]
sched, docs: Update schedstats documentation to version 15

Version 15 of schedstats was introduced in:

   67aa0f767af4: sched: remove unused fields from struct rq

and removed three unused counters in sched_yield(). Update
the documentation.

Signed-off-by: Javi Merino <cibervicho@gmail.com>
Cc: henrix@sapo.pt
Cc: rdunlap@xenotime.net
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1296515496-8229-1-git-send-email-cibervicho@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoenc28j60: Fix reading of transmit status vector
Stefan Weil [Tue, 1 Feb 2011 04:56:54 +0000 (20:56 -0800)]
enc28j60: Fix reading of transmit status vector

This error was reported by cppcheck:
drivers/net/enc28j60.c:815: error: Using sizeof for array given as function argument returns the size of pointer.

The original code reads 4 or 8 bytes instead of TSV_SIZE (= 100) bytes.
I just fixed the code, but did not run any tests.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix ipv6 neighbour unregister_sysctl_table warning
Eric W. Biederman [Tue, 1 Feb 2011 04:54:17 +0000 (20:54 -0800)]
net: Fix ipv6 neighbour unregister_sysctl_table warning

In my testing of 2.6.37 I was occassionally getting a warning about
sysctl table entries being unregistered in the wrong order.  Digging
in it turns out this dates back to the last great sysctl reorg done
where Al Viro introduced the requirement that sysctl directories
needed to be created before and destroyed after the files in them.

It turns out that in that great reorg /proc/sys/net/ipv6/neigh was
overlooked.  So this patch fixes that oversight and makes an annoying
warning message go away.

>------------[ cut here ]------------
>WARNING: at kernel/sysctl.c:1992 unregister_sysctl_table+0x134/0x164()
>Pid: 23951, comm: kworker/u:3 Not tainted 2.6.37-350888.2010AroraKernelBeta.fc14.x86_64 #1
>Call Trace:
> [<ffffffff8103e034>] warn_slowpath_common+0x80/0x98
> [<ffffffff8103e061>] warn_slowpath_null+0x15/0x17
> [<ffffffff810452f8>] unregister_sysctl_table+0x134/0x164
> [<ffffffff810e7834>] ? kfree+0xc4/0xd1
> [<ffffffff813439b2>] neigh_sysctl_unregister+0x22/0x3a
> [<ffffffffa02cd14e>] addrconf_ifdown+0x33f/0x37b [ipv6]
> [<ffffffff81331ec2>] ? skb_dequeue+0x5f/0x6b
> [<ffffffffa02ce4a5>] addrconf_notify+0x69b/0x75c [ipv6]
> [<ffffffffa02eb953>] ? ip6mr_device_event+0x98/0xa9 [ipv6]
> [<ffffffff813d2413>] notifier_call_chain+0x32/0x5e
> [<ffffffff8105bdea>] raw_notifier_call_chain+0xf/0x11
> [<ffffffff8133cdac>] call_netdevice_notifiers+0x45/0x4a
> [<ffffffff8133d2b0>] rollback_registered_many+0x118/0x201
> [<ffffffff8133d3af>] unregister_netdevice_many+0x16/0x6d
> [<ffffffff8133d571>] default_device_exit_batch+0xa4/0xb8
> [<ffffffff81337c42>] ? cleanup_net+0x0/0x194
> [<ffffffff81337a2a>] ops_exit_list+0x4e/0x56
> [<ffffffff81337d36>] cleanup_net+0xf4/0x194
> [<ffffffff81053318>] process_one_work+0x187/0x280
> [<ffffffff8105441b>] worker_thread+0xff/0x19f
> [<ffffffff8105431c>] ? worker_thread+0x0/0x19f
> [<ffffffff8105776d>] kthread+0x7d/0x85
> [<ffffffff81003824>] kernel_thread_helper+0x4/0x10
> [<ffffffff810576f0>] ? kthread+0x0/0x85
> [<ffffffff81003820>] ? kernel_thread_helper+0x0/0x10
>---[ end trace 8a7e9310b35e9486 ]---

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaxnet_cs: reduce delay time at ei_rx_overrun
Ken Kawasaki [Sun, 30 Jan 2011 11:16:16 +0000 (11:16 +0000)]
axnet_cs: reduce delay time at ei_rx_overrun

axnet_cs:
    mdelay of 10ms is too long at ei_rx_overrun.
    It should be reduced to 2ms.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoLinux 2.6.38-rc3 v2.6.38-rc3
Linus Torvalds [Tue, 1 Feb 2011 03:05:49 +0000 (13:05 +1000)]
Linux 2.6.38-rc3

13 years agonet: Check rps_flow_table when RPS map length is 1
Tom Herbert [Tue, 1 Feb 2011 00:23:42 +0000 (16:23 -0800)]
net: Check rps_flow_table when RPS map length is 1

In get_rps_cpu, add check that the rps_flow_table for the device is
NULL when trying to take fast path when RPS map length is one.
Without this, RFS is effectively disabled if map length is one which
is not correct.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Mon, 31 Jan 2011 23:41:02 +0000 (09:41 +1000)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: NFSv4 readdir loses entries
  NFS: Micro-optimize nfs4_decode_dirent()
  NFS: Fix an NFS client lockdep issue
  NFS construct consistent co_ownerid for v4.1
  NFS: nfs_wcc_update_inode() should set nfsi->attr_gencount
  NFS improve pnfs_put_deviceid_cache debug print
  NFS fix cb_sequence error processing
  NFS do not find client in NFSv4 pg_authenticate
  NLM: Fix "kernel BUG at fs/lockd/host.c:417!" or ".../host.c:283!"
  NFS: Prevent memory allocation failure in nfsacl_encode()
  NFS: nfsacl_{encode,decode} should return signed integer
  NFS: Fix "kernel BUG at fs/nfs/nfs3xdr.c:1338!"
  NFS: Fix "kernel BUG at fs/aio.c:554!"
  NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds().
  NFS: fix handling of malloc failure during nfs_flush_multi()

13 years agocifs: fix length checks in checkSMB
Jeff Layton [Mon, 31 Jan 2011 14:14:17 +0000 (09:14 -0500)]
cifs: fix length checks in checkSMB

The cERROR message in checkSMB when the calculated length doesn't match
the RFC1001 length is incorrect in many cases. It always says that the
RFC1001 length is bigger than the SMB, even when it's actually the
reverse.

Fix the error message to say the reverse of what it does now when the
SMB length goes beyond the end of the received data. Also, clarify the
error message when the RFC length is too big. Finally, clarify the
comments to show that the 512 byte limit on extra data at the end of
the packet is arbitrary.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoMerge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 31 Jan 2011 22:30:31 +0000 (08:30 +1000)]
Merge branch 'fixes' of /home/rmk/linux-2.6-arm

* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: smp_on_up: allow non-ARM SMP processors
  ARM: io: ensure inb/outb() et.al. are properly ordered on ARMv6+
  ARM: initrd: disable initrd if passed address overlaps reserved region
  ARM: footbridge: fix debug macros
  ARM: mmci: round down the bytes transferred on error
  ARM: mmci: complete the transaction on error
  ARM: 6642/1: mmci: calculate remaining bytes at error correctly

13 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 31 Jan 2011 22:27:55 +0000 (08:27 +1000)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  arch/arm/mach-omap2/dma.c: Convert IS_ERR result to PTR_ERR
  arm: omap2: mux: fix compile warning
  omap1: Simplify use of omap_irq_flags
  omap2+: Fix unused variable warning for omap_irq_base

13 years agokernel.h: fix kernel-doc warning
Randy Dunlap [Mon, 31 Jan 2011 17:29:14 +0000 (09:29 -0800)]
kernel.h: fix kernel-doc warning

Fix kernel-doc warning in kernel.h from commit 7ef88ad56145
("BUILD_BUG_ON: make it handle more cases"):

  Warning(include/linux/kernel.h:605): No description found for parameter 'condition'
  Warning(include/linux/kernel.h:605): Excess function parameter 'cond' description in 'BUILD_BUG_ON'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Mon, 31 Jan 2011 22:15:40 +0000 (08:15 +1000)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: xfs_bmap_add_extent_delay_real should init br_startblock
  xfs: fix dquot shaker deadlock
  xfs: handle CIl transaction commit failures correctly
  xfs: limit extsize to size of AGs and/or MAXEXTLEN
  xfs: prevent extsize alignment from exceeding maximum extent size
  xfs: limit extent length for allocation to AG size
  xfs: speculative delayed allocation uses rounddown_power_of_2 badly
  xfs: fix efi item leak on forced shutdown
  xfs: fix log ticket leak on forced shutdown.

13 years agovirtio: update MAINTAINERS
Michael S. Tsirkin [Mon, 31 Jan 2011 06:16:20 +0000 (16:46 +1030)]
virtio: update MAINTAINERS

Patches should keep coming through Rusty but it helps if I'm Cc'd as
well.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 31 Jan 2011 22:07:40 +0000 (08:07 +1000)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (42 commits)
  usb: gadget: composite: avoid access beyond array max length
  USB: serial: handle Data Carrier Detect changes
  USB: gadget: Fix endpoint representation in ci13xxx_udc
  USB: gadget: Fix error path in ci13xxx_udc gadget probe function
  usb: pch_udc: Fix the worning log issue at gadget driver remove
  USB: serial: Updated support for ICOM devices
  USB: ehci-mxc: add work-around for efika mx/sb bug
  USB: unbreak ehci-mxc on otg port of i.MX27
  drivers: update to pl2303 usb-serial to support Motorola cables
  USB: adding USB support for Cinterion's HC2x, EU3 and PH8 products
  USB serial: add missing .usb_driver field in serial drivers
  USB: ehci-fsl: Fix 'have_sysif_regs' detection
  USB: g_printer: fix bug in module parameter definitions
  USB: g_printer: fix bug in unregistration
  USB: uss720: remove duplicate USB device
  MAINTAINERS: add ueagle-atm entry
  USB: EHCI: fix DMA deallocation bug
  USB: pch_udc: support new device ML7213 IOH
  usb: pch_udc: Fixed issue which does not work with g_serial
  usb: set ep_dev async suspend should be later than device_initialize
  ...

13 years agoMerge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 31 Jan 2011 22:06:31 +0000 (08:06 +1000)]
Merge branch 'staging-linus' of git://git./linux/kernel/git/gregkh/staging-2.6

* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (26 commits)
  staging: r8712u: Add new device IDs
  staging: brcm80211: fix suspend/resume issue in brcmsmac
  staging: brcm80211: remove assert to avoid panic since 2.6.37 kernel
  Staging: iio: Aditional fixpoint formatted output bugfix
  staging: usbip: vhci: use urb->dev->portnum to find port
  staging: usbip: vhci: handle EAGAIN from SO_RCVTIMEO
  staging: usbip: vhci: friendly log messages for connection errors
  staging: usbip: vhci: refuse to enqueue for dead connections
  staging: usbip: vhci: give back URBs from in-flight unlink requests
  staging: usbip: vhci: update reference count for usb_device
  staging: usbip: stub: update refcounts for devices and interfaces
  staging: tidspbridge: replace mbox callback with notifier_call
  staging: comedi: ni_labpc: Use shared IRQ for PCMCIA card
  Staging: speakup: &&/|| confusion in silent_store()
  iio: Fixpoint formatted output bugfix
  staging: rt2860: Fix incorrect netif_stop_queue usage warning
  staging: r8712u: Fix memory leak in firmware loading
  staging: tidspbridge: configure full L1 MMU range
  staging: rt2870sta: Add ID for Linksys WUSB100v2
  Staging: xgfib: put parenthesis in the right place
  ...

13 years agoMerge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 31 Jan 2011 22:05:19 +0000 (08:05 +1000)]
Merge branch 'tty-linus' of git://git./linux/kernel/git/gregkh/tty-2.6

* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty/serial: fix apbuart build
  n_hdlc: fix read and write locking
  serial: unbreak billionton CF card
  tty: use for_each_console() and WARN() on sysfs failures
  vt: fix issue when fbcon wants to takeover a second time.

Fix up trivial conflict in drivers/tty/tty_io.c

13 years ago[CIFS] Update cifs minor version
Steve French [Mon, 31 Jan 2011 21:56:35 +0000 (21:56 +0000)]
[CIFS] Update cifs minor version

Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoARM: smp_on_up: allow non-ARM SMP processors
Russell King [Sun, 30 Jan 2011 16:40:20 +0000 (16:40 +0000)]
ARM: smp_on_up: allow non-ARM SMP processors

Allow non-ARM SMP processors to use the SMP_ON_UP feature.  CPUs
supporting SMP must have the new CPU ID format, so check for this first.
Then check for ARM11MPCore, which fails the MPIDR check.  Lastly check
the MPIDR reports multiprocessing extensions and that the CPU is part of
a multiprocessing system.

Cc: <stable@kernel.org>
Reported-and-Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoCAN: softing driver depends on IOMEM
Chuck Ebbert [Mon, 31 Jan 2011 05:44:07 +0000 (05:44 +0000)]
CAN: softing driver depends on IOMEM

Without this dependency the softing driver will be buildable on s390,
where it fails.

Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add default_mtu() methods to blackhole dst_ops
Roland Dreier [Mon, 31 Jan 2011 21:16:00 +0000 (13:16 -0800)]
net: Add default_mtu() methods to blackhole dst_ops

When an IPSEC SA is still being set up, __xfrm_lookup() will return
-EREMOTE and so ip_route_output_flow() will return a blackhole route.
This can happen in a sndmsg call, and after d33e455337ea ("net: Abstract
default MTU metric calculation behind an accessor.") this leads to a
crash in ip_append_data() because the blackhole dst_ops have no
default_mtu() method and so dst_mtu() calls a NULL pointer.

Fix this by adding default_mtu() methods (that simply return 0, matching
the old behavior) to the blackhole dst_ops.

The IPv4 part of this patch fixes a crash that I saw when using an IPSEC
VPN; the IPv6 part is untested because I don't have an IPv6 VPN, but it
looks to be needed as well.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agowl12xx: fix use after free
Mathias Krause [Sun, 30 Jan 2011 10:29:47 +0000 (11:29 +0100)]
wl12xx: fix use after free

When DEBUG_SPI is included in the debug log level wl1271_spi_reset()
will dump the already freed memory instead of the SPI buffer.

This bug was spotted by the semantic patch tool coccinelle using the
script found at scripts/coccinelle/free/kfree.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocifs: No need to check crypto blockcipher allocation
Shirish Pargaonkar [Sat, 29 Jan 2011 19:54:58 +0000 (13:54 -0600)]
cifs: No need to check crypto blockcipher allocation

Missed one change as per earlier suggestion.

Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years ago[media] fix saa7111 non-detection
Russell King [Sun, 30 Jan 2011 13:03:30 +0000 (10:03 -0300)]
[media] fix saa7111 non-detection

One saa7111 device is reporting a different ID:

saa7115 0-0024: chip found @ 0x48 (ID 0f7111d0e111111) does not match a known saa711x chip.

As this is for sure a saa7111, change the detection code to also
cover this device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agocifs: clean up some compiler warnings
Jeff Layton [Mon, 31 Jan 2011 12:24:46 +0000 (07:24 -0500)]
cifs: clean up some compiler warnings

New compiler warnings that I noticed when building a patchset based
on recent Fedora kernel:

fs/cifs/cifssmb.c: In function 'CIFSSMBSetFileSize':
fs/cifs/cifssmb.c:4813:8: warning: variable 'data_offset' set but not used
[-Wunused-but-set-variable]

fs/cifs/file.c: In function 'cifs_open':
fs/cifs/file.c:349:24: warning: variable 'pCifsInode' set but not used
[-Wunused-but-set-variable]
fs/cifs/file.c: In function 'cifs_partialpagewrite':
fs/cifs/file.c:1149:23: warning: variable 'cifs_sb' set but not used
[-Wunused-but-set-variable]
fs/cifs/file.c: In function 'cifs_iovec_write':
fs/cifs/file.c:1740:9: warning: passing argument 6 of 'CIFSSMBWrite2' from
incompatible pointer type [enabled by default]
fs/cifs/cifsproto.h:337:12: note: expected 'unsigned int *' but argument is
of type 'size_t *'

fs/cifs/readdir.c: In function 'cifs_readdir':
fs/cifs/readdir.c:767:23: warning: variable 'cifs_sb' set but not used
[-Wunused-but-set-variable]

fs/cifs/cifs_dfs_ref.c: In function 'cifs_dfs_d_automount':
fs/cifs/cifs_dfs_ref.c:342:2: warning: 'rc' may be used uninitialized in
this function [-Wuninitialized]
fs/cifs/cifs_dfs_ref.c:278:6: note: 'rc' was declared here

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: make CIFS depend on CRYPTO_MD4
Jeff Layton [Mon, 31 Jan 2011 13:41:36 +0000 (08:41 -0500)]
cifs: make CIFS depend on CRYPTO_MD4

Recently CIFS was changed to use the kernel crypto API for MD4 hashes,
but the Kconfig dependencies were not changed to reflect this.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reported-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years ago[media] rc/streamzap: fix reporting response times
Jarod Wilson [Thu, 27 Jan 2011 18:08:35 +0000 (15:08 -0300)]
[media] rc/streamzap: fix reporting response times

The streamzap driver has relatively low sampling resolution, and any
delays in reporting events seem to cause some minor problems for the
likes of irw when using the lirc bridge driver, resulting in a single
keypress registering as multiple independent ones, rather than as a
single press with repeats. If we call ir_raw_event_handle() more
frequently and reset the rawir kfifo at end-of-signal, the behavior
improves quite a bit.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] mceusb: really fix remaining keybounce issues
Jarod Wilson [Wed, 26 Jan 2011 15:20:09 +0000 (12:20 -0300)]
[media] mceusb: really fix remaining keybounce issues

Make sure rawir struct is zeroed out before populating it for each
ir_raw_event_store_with_filter() call, and when we see a trailing 0x80
packet (end-of-data), issue an ir_raw_event_reset() call.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] rc: use time unit conversion macros correctly
Jarod Wilson [Tue, 18 Jan 2011 20:31:24 +0000 (17:31 -0300)]
[media] rc: use time unit conversion macros correctly

Due to my own stupidity, some of the wrong time unit conversion macros
were being used inside some of the IR drivers I've been working on. Fix
that, and convert over some additional places to also use the macros.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] rc/ir-lirc-codec: add back debug spew
Jarod Wilson [Tue, 18 Jan 2011 05:33:08 +0000 (02:33 -0300)]
[media] rc/ir-lirc-codec: add back debug spew

Some occasionally useful debug spew disappeared as part of a feature
update a while back, and I'm finding myself in need of it again to help
diagnose some issues.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ir-kbd-i2c: improve remote behavior with z8 behind usb
Jarod Wilson [Thu, 20 Jan 2011 21:31:18 +0000 (18:31 -0300)]
[media] ir-kbd-i2c: improve remote behavior with z8 behind usb

Add the same "are you ready?" i2c_master_send() poll command to
get_key_haup_xvr found in lirc_zilog, which is apparently seen in
the Windows driver for the PVR-150 w/a z8. This stabilizes what is
received from both the HD-PVR and HVR-1950, even with their polling
intervals at the default of 100, thus the removal of the custom
260ms polling_interval in pvrusb2-i2c-core.c.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Acked-by: Mike Isely <isely@isely.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] lirc_zilog: z8 on usb doesn't like back-to-back i2c_master_send
Jarod Wilson [Wed, 19 Jan 2011 21:49:19 +0000 (18:49 -0300)]
[media] lirc_zilog: z8 on usb doesn't like back-to-back i2c_master_send

Both the HD-PVR and HVR-1950, driven by the hdpvr and pvrusb2 drivers
respectively, have a zilog z8 chip exposed via i2c. These are both
usb-connected devices, and on both of them, back-to-back i2c_master_send
calls that work fine with a z8 on a pci card fail with a -EIO, as the
chip isn't yet ready from the prior command. To cope with that, add a
delay and retry loop where necessary.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] hdpvr: fix up i2c device registration
Jarod Wilson [Wed, 19 Jan 2011 21:10:14 +0000 (18:10 -0300)]
[media] hdpvr: fix up i2c device registration

We have to actually call i2c_new_device() once for each of the rx and tx
addresses. Also improve error-handling and device remove i2c cleanup.

Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] rc/mce: add mappings for missing keys
Jarod Wilson [Tue, 18 Jan 2011 05:27:45 +0000 (02:27 -0300)]
[media] rc/mce: add mappings for missing keys

Per http://mediacenterguides.com/book/export/html/31 and investigation
by Erin, we were missing these last three mappings to complete the mce
key table. Lets remedy that.

Reported-by: Erin Simonds <fisslefink@gmail.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - zc3xx: Discard the partial frames
Jean-François Moine [Mon, 24 Jan 2011 19:31:58 +0000 (16:31 -0300)]
[media] gspca - zc3xx: Discard the partial frames

In some cases, some frames may not end with the JPEG end of frame.
Being not complete, they are now discarded.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - zc3xx: Fix bad images with the sensor hv7131r
Jean-François Moine [Mon, 24 Jan 2011 19:22:11 +0000 (16:22 -0300)]
[media] gspca - zc3xx: Fix bad images with the sensor hv7131r

The problem was introduced by the commit 2af0b4c60cc0daf0.
Some registers were no more initialized.

Tested-by: <Giovanni Scafora giovanni@archlinux.org>
Tested-by: <Sergey Manucharian sm@ingeniware.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - zc3xx: Bad delay when given by a table
Jean-François Moine [Mon, 24 Jan 2011 18:15:34 +0000 (15:15 -0300)]
[media] gspca - zc3xx: Bad delay when given by a table

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agodrm/i915: Suppress spurious vblank interrupts
Chris Wilson [Mon, 31 Jan 2011 10:48:04 +0000 (10:48 +0000)]
drm/i915: Suppress spurious vblank interrupts

Hugh Dickins found that characters in xterm were going missing and oft
delayed. Being the curious type, he managed to associate this with the
new high-precision vblank patches; disabling these he found, restored
the orderliness of his characters.

The oddness begins when one realised that Hugh was not using vblanks at
all on his system (fvwm and some xterms). Instead, all he had to go on
were warning of a pipe underrun, curiously enough at around 60Hz. He
poked and found that in addition to the underrun warning, the hardware
was flagging the start of a new frame, a vblank, which in turn was
kicking off the pending vblank processing code.

There is little we can do for the underruns on Hugh's machine, a
Crestline [965GM], which must have its FIFO watermarks set to 8.
However, we do not need to process the vblank if we know that they are
disabled...

Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm: Avoid leak of adjusted mode along quick set_mode paths
Chris Wilson [Fri, 28 Jan 2011 11:31:56 +0000 (11:31 +0000)]
drm: Avoid leak of adjusted mode along quick set_mode paths

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm: Simplify and defend later checks when disabling a crtc
Chris Wilson [Mon, 31 Jan 2011 11:16:33 +0000 (11:16 +0000)]
drm: Simplify and defend later checks when disabling a crtc

By setting the FB of a CRTC to NULL, we are turning off the CRTC (and so
disable the unused encoders and connectors). As such we can simplify the
later tests by making sure the set->mode is NULL. Setting the
num_connectors to zero means that we do not need to loop over the unused
connectors.

All current usage appears correct, this only builds additional defense
into the routine.

References: https://bugzilla.kernel.org/show_bug.cgi?id=27722
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm: Don't switch fb when disabling an output
Chris Wilson [Fri, 28 Jan 2011 11:53:03 +0000 (11:53 +0000)]
drm: Don't switch fb when disabling an output

In drm_crtc_helper_set_config, we call drm_crtc_helper_set_mode which
may return early and do no operation if the crtc is to be disabled. In
this case we merrily swap to the new fb, discarding the old_fb believing
that it has been cleaned up. However, due to the early return, the
old_fb was not presented to the backend for correct reaping, and nor was
the new one - which is about to be reaped via the
drm_helper_disable_unused_functions(), leading to incorrect refcounting
of the pinned objects.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27722
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29857
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29230
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agowatchdog: Don't change watchdog state on read of sysctl
Marcin Slusarz [Fri, 28 Jan 2011 16:00:33 +0000 (11:00 -0500)]
watchdog: Don't change watchdog state on read of sysctl

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
[ add {}'s to fix a warning ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1296230433-6261-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agowatchdog: Fix sysctl consistency
Marcin Slusarz [Fri, 28 Jan 2011 16:00:32 +0000 (11:00 -0500)]
watchdog: Fix sysctl consistency

If it was not possible to enable watchdog for any cpu, switch
watchdog_enabled back to 0, because it's visible via
kernel.watchdog sysctl.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1296230433-6261-2-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agowatchdog: Fix broken nowatchdog logic
Marcin Slusarz [Fri, 28 Jan 2011 16:00:31 +0000 (11:00 -0500)]
watchdog: Fix broken nowatchdog logic

Passing nowatchdog to kernel disables 2 things: creation of
watchdog threads AND initialization of percpu watchdog_hrtimer.
As hrtimers are initialized only at boot it's not possible to
enable watchdog later - for me all watchdog threads started to
eat 100% of CPU time, but they could just crash.

Additionally, even if these threads would start properly,
watchdog_disable_all_cpus was guarded by no_watchdog check, so
you couldn't disable watchdog.

To fix this, remove no_watchdog variable and use already
existing watchdog_enabled variable.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
[ removed another no_watchdog instance ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1296230433-6261-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoMerge branch 'topic/hda' into fix/hda
Takashi Iwai [Mon, 31 Jan 2011 11:04:50 +0000 (12:04 +0100)]
Merge branch 'topic/hda' into fix/hda

13 years agoALSA: oxygen: fix output routing on Xonar DG
Clemens Ladisch [Mon, 31 Jan 2011 10:47:52 +0000 (11:47 +0100)]
ALSA: oxygen: fix output routing on Xonar DG

This card uses separate I2S outputs for the front speakers and
headphones, and reverses the order of the three speaker outputs.
To work around this, add a model-specific callback to adjust the
controller's playback routing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoARM: io: ensure inb/outb() et.al. are properly ordered on ARMv6+
Russell King [Sun, 30 Jan 2011 11:29:40 +0000 (11:29 +0000)]
ARM: io: ensure inb/outb() et.al. are properly ordered on ARMv6+

Ensure that the ISA/PCI IO space accessors are properly ordered on
ARMv6+ architectures.  These should always be ordered with respect to
all other accesses.

This also fixes __iormb() and __iowmb() not being visible to ioread/
iowrite if a platform defines its own MMIO accessors.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: initrd: disable initrd if passed address overlaps reserved region
Russell King [Sun, 30 Jan 2011 11:21:05 +0000 (11:21 +0000)]
ARM: initrd: disable initrd if passed address overlaps reserved region

Disable the initrd if the passed address already overlaps the reserved
region.  This avoids oopses on Netwinders when NeTTrom tells the kernel
that an initrd is located at mem+4MB, but this overlaps the BSS,
resulting in the kernels in-use BSS being freed.

This should be applied to v2.6.37-stable.

Cc: <stable@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: footbridge: fix debug macros
Russell King [Fri, 28 Jan 2011 20:57:57 +0000 (20:57 +0000)]
ARM: footbridge: fix debug macros

0ea1293 (arm: return both physical and virtual addresses from addruart)
changed the way the 'addruart' worked, making it return both the virt
and phys addresses.  Unfortunately, for footbridge, these were reversed.
Fix that.  Tested on Netwinder.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: mmci: round down the bytes transferred on error
Russell King [Sun, 30 Jan 2011 21:06:53 +0000 (21:06 +0000)]
ARM: mmci: round down the bytes transferred on error

We should not report incomplete blocks on error.  Return the number of
bytes successfully transferred, rounded down to the nearest block.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: mmci: complete the transaction on error
Russell King [Sun, 30 Jan 2011 21:03:50 +0000 (21:03 +0000)]
ARM: mmci: complete the transaction on error

When we encounter an error, make sure we complete the transaction
otherwise we'll leave the request dangling.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years ago[S390] reset default for CONFIG_CHSC_SCH
Sebastian Ott [Mon, 31 Jan 2011 10:30:09 +0000 (11:30 +0100)]
[S390] reset default for CONFIG_CHSC_SCH

6f9a3c33 "[S390] cleanup s390 Kconfig" accidentally changed
the default for CONFIG_CHSC_SCH. Reset it to m.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: prevent compile warning under CONFIG_32BIT
Jan Glauber [Mon, 31 Jan 2011 10:30:08 +0000 (11:30 +0100)]
[S390] qdio: prevent compile warning under CONFIG_32BIT

Prevent the following compiler warning if compiling a 31 bit kernel:

drivers/s390/cio/qdio_main.c: In function ‘get_outbound_buffer_frontier’:
drivers/s390/cio/qdio_main.c:646:16: warning: ‘state’ may be used uninitialized in this function
  CC      lib/radix-tree.o
  CC      drivers/s390/scsi/zfcp_cfdc.o
drivers/s390/cio/qdio_main.c: In function ‘qdio_inbound_q_moved’:
drivers/s390/cio/qdio_main.c:479:16: warning: ‘state’ may be used uninitialized in this function
drivers/s390/cio/qdio_main.c:479:16: note: ‘state’ was declared here

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] use asm-generic/cacheflush.h
Akinobu Mita [Mon, 31 Jan 2011 10:30:07 +0000 (11:30 +0100)]
[S390] use asm-generic/cacheflush.h

The implementation of the cache flushing interfaces on the s390
is identical with the default implementation in asm-generic.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] tlb: fix build error caused by THP
Heiko Carstens [Mon, 31 Jan 2011 10:30:06 +0000 (11:30 +0100)]
[S390] tlb: fix build error caused by THP

Fix this build error with !CONFIG_SWAP caused by tranparent huge pages support:

In file included from mm/pgtable-generic.c:9:0:
/linux-2.6/arch/s390/include/asm/tlb.h: In function 'tlb_remove_page':
/linux-2.6/arch/s390/include/asm/tlb.h:92:2: error: implicit declaration of function 'page_cache_release'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] missing sacf in uaccess
Martin Schwidefsky [Mon, 31 Jan 2011 10:30:05 +0000 (11:30 +0100)]
[S390] missing sacf in uaccess

The uaccess functions copy_in_user_std and clear_user_std fail to
switch back from secondary space mode to primary space mode with sacf
in case of an unresolvable page fault. We need to make sure that the
switch back to primary mode is done in all cases, otherwise the code
following the uaccess inline assembly will crash.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] pgtable_list corruption
Martin Schwidefsky [Mon, 31 Jan 2011 10:30:04 +0000 (11:30 +0100)]
[S390] pgtable_list corruption

After page_table_free_rcu removed a page from the pgtable_list
page_table_free better not add it again. Otherwise a page_table_alloc
can reuse a page table fragment that is still in the rcu process.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd: prevent panic with unresumed devices
Stefan Haberland [Mon, 31 Jan 2011 10:30:03 +0000 (11:30 +0100)]
[S390] dasd: prevent panic with unresumed devices

If a device is not resumed correctly the system crashes when this
device is set offline. This may happen if it gets disconnected
during suspend.
Check if the device is already removed from alias handling and skip
these steps to prevent the kernel panic.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years agosound: silent echo'ed messages in Makefile
Amerigo Wang [Fri, 28 Jan 2011 08:52:00 +0000 (16:52 +0800)]
sound: silent echo'ed messages in Makefile

Silent these echo's, please.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agobnx2x: Update bnx2x version to 1.62.00-5
Yaniv Rosner [Sun, 30 Jan 2011 04:15:13 +0000 (04:15 +0000)]
bnx2x: Update bnx2x version to 1.62.00-5

Update bnx2x version to 1.62.00-5

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fix potential link loss in multi-function mode
Yaniv Rosner [Sun, 30 Jan 2011 04:15:07 +0000 (04:15 +0000)]
bnx2x: Fix potential link loss in multi-function mode

All functions on a port should be set to take the MDC/MDIO lock to avoid contention on the bus

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fix port swap for BCM8073
Yaniv Rosner [Sun, 30 Jan 2011 04:15:00 +0000 (04:15 +0000)]
bnx2x: Fix port swap for BCM8073

Fix link on BCM57712 + BCM8073 when port swap is enabled. Common PHY reset was done on the wrong port.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fix LED blink rate on BCM84823
Yaniv Rosner [Sun, 30 Jan 2011 04:14:55 +0000 (04:14 +0000)]
bnx2x: Fix LED blink rate on BCM84823

Fix blink rate of activity LED of the BCM84823 on 10G link

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>