safe/jmp/linux-2.6
14 years ago[ARM] pxafb: fix building issue of incorrect reference
Eric Miao [Sat, 26 Dec 2009 08:25:18 +0000 (16:25 +0800)]
[ARM] pxafb: fix building issue of incorrect reference

Commit "d2a34c1 drivers/video: Move dereference after NULL test" introduced
a build error of "fbi->dev->platform_data->smart_update" being unknown type
to the compiler, fix this by removing the unnecessary test of 'fbi'.

Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
14 years agox86: SGI UV: Fix writes to led registers on remote uv hubs
Mike Travis [Mon, 28 Dec 2009 21:28:25 +0000 (13:28 -0800)]
x86: SGI UV: Fix writes to led registers on remote uv hubs

The wrong address was being used to write the SCIR led regs on
remote hubs.  Also, there was an inconsistency between how BIOS
and the kernel indexed these regs.  Standardize on using the
lower 6 bits of the APIC ID as the index.

This patch fixes the problem of writing to an errant address to
a cpu # >= 64.

Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Jack Steiner <steiner@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@kernel.org
LKML-Reference: <4B3922F9.3060905@sgi.com>
[ v2: fix a number of annoying checkpatch artifacts and whitespace noise ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoiwmc3200wifi: fix array out-of-boundary access
Zhu Yi [Mon, 28 Dec 2009 06:23:11 +0000 (14:23 +0800)]
iwmc3200wifi: fix array out-of-boundary access

Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().

Cc: stable@kernel.org
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: timeout one too soon in wl1251_boot_run_firmware()
Roel Kluin [Sat, 26 Dec 2009 19:31:59 +0000 (20:31 +0100)]
wl1251: timeout one too soon in wl1251_boot_run_firmware()

`loop' reaches INIT_LOOP + 1 after the loop. so if ACX_INTR_INIT_COMPLETE
occurs in the last iteration the write occurs but also the error out as if a
timeout occurred. This is probably very unlikely to ever occur.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix propagation of failed hardware reconfigurations
Luis R. Rodriguez [Thu, 24 Dec 2009 20:38:22 +0000 (15:38 -0500)]
mac80211: fix propagation of failed hardware reconfigurations

mac80211 does not propagate failed hardware reconfiguration
requests. For suspend and resume this is important due to all
the possible issues that can come out of the suspend <-> resume
cycle. Not propagating the error means cfg80211 will assume
the resume for the device went through fine and mac80211 will
continue on trying to poke at the hardware, enable timers,
queue work, and so on for a device which is completley
unfunctional.

The least we can do is to propagate device start issues and
warn when this occurs upon resume. A side effect of this patch
is we also now propagate the start errors upon harware
reconfigurations (non-suspend), but this should also be desirable
anyway, there is not point in continuing to reconfigure a
device if mac80211 was unable to start the device.

For further details refer to the thread:

http://marc.info/?t=126151038700001&r=1&w=2

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix race with suspend and dynamic_ps_disable_work
Luis R. Rodriguez [Thu, 24 Dec 2009 20:26:09 +0000 (15:26 -0500)]
mac80211: fix race with suspend and dynamic_ps_disable_work

When mac80211 suspends it calls a driver's suspend callback
as a last step and after that the driver assumes no calls will
be made to it until we resume and its start callback is kicked.
If such calls are made, however, suspend can end up throwing
hardware in an unexpected state and making the device unusable
upon resume.

Fix this by preventing mac80211 to schedule dynamic_ps_disable_work
by checking for when mac80211 starts to suspend and starts
quiescing. Frames should be allowed to go through though as
that is part of the quiescing steps and we do not flush the
mac80211 workqueue since it was already done towards the
beginning of suspend cycle.

The other mac80211 issue will be hanled in the next patch.

For further details see refer to the thread:

http://marc.info/?t=126144866100001&r=1&w=2

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix missed error codes in the tx status check
Felix Fietkau [Thu, 24 Dec 2009 13:04:32 +0000 (14:04 +0100)]
ath9k: fix missed error codes in the tx status check

My previous change added in:

 commit 815833e7ecf0b9a017315cae6aef4d7cd9517681
    ath9k: fix tx status reporting

was not checking all possible tx error conditions. This could possibly
lead to throughput issues due to slow rate control adaption or missed
retransmissions of failed A-MPDU frames.

This patch adds a mask for all possible error conditions and uses it
in the xmit ok check.

Cc: stable@kernel.org
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: wake hardware during AMPDU TX actions
Luis R. Rodriguez [Thu, 24 Dec 2009 01:03:29 +0000 (20:03 -0500)]
ath9k: wake hardware during AMPDU TX actions

AMDPDU actions poke hardware for TX operation, as such
we want to turn hardware on for these actions. AMDPU RX operations
do not require hardware on as nothing is done in hardware for
those actions. Without this we cannot guarantee hardware has
been programmed correctly for each AMPDU TX action.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: wake hardware for interface IBSS/AP/Mesh removal
Luis R. Rodriguez [Thu, 24 Dec 2009 01:03:28 +0000 (20:03 -0500)]
ath9k: wake hardware for interface IBSS/AP/Mesh removal

When we remove a IBSS/AP/Mesh interface we stop DMA
but to do this we should ensure hardware is on. Awaken
the device prior to these calls. This should ensure
DMA is stopped upon suspend and plain device removal.

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix suspend by waking device prior to stop
Sujith [Thu, 24 Dec 2009 01:03:27 +0000 (20:03 -0500)]
ath9k: fix suspend by waking device prior to stop

Ensure the device is awake prior to trying to tell hardware
to stop it. Impact of not doing this is we can likely leave
the device in an undefined state likely causing issues with
suspend and resume. This patch ensures harware is where it
should be prior to suspend.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix error path in cfg80211_wext_siwscan
Johannes Berg [Wed, 23 Dec 2009 14:33:35 +0000 (15:33 +0100)]
cfg80211: fix error path in cfg80211_wext_siwscan

If there's an invalid channel or SSID, the code leaks
the scan request. Always free the scan request, unless
it was successfully given to the driver.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271_cmd.c: cleanup char => u8
Dan Carpenter [Wed, 23 Dec 2009 13:23:19 +0000 (15:23 +0200)]
wl1271_cmd.c: cleanup char => u8

This is just a clean up and doesn't make a functional difference.  It keeps the
lint checkers happy.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Storage class should be before const qualifier
Tobias Klauser [Wed, 23 Dec 2009 13:18:11 +0000 (14:18 +0100)]
iwlwifi: Storage class should be before const qualifier

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Storage class should be before const qualifier
Tobias Klauser [Wed, 23 Dec 2009 13:04:43 +0000 (14:04 +0100)]
ath9k: Storage class should be before const qualifier

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix race between deauth and assoc response
Johannes Berg [Wed, 23 Dec 2009 12:12:05 +0000 (13:12 +0100)]
cfg80211: fix race between deauth and assoc response

Joseph Nahmias reported, in http://bugs.debian.org/562016,
that he was getting the following warning (with some log
around the issue):

  ath0: direct probe to AP 00:11:95:77:e0:b0 (try 1)
  ath0: direct probe responded
  ath0: authenticate with AP 00:11:95:77:e0:b0 (try 1)
  ath0: authenticated
  ath0: associate with AP 00:11:95:77:e0:b0 (try 1)
  ath0: deauthenticating from 00:11:95:77:e0:b0 by local choice (reason=3)
  ath0: direct probe to AP 00:11:95:77:e0:b0 (try 1)
  ath0: RX AssocResp from 00:11:95:77:e0:b0 (capab=0x421 status=0 aid=2)
  ath0: associated
  ------------[ cut here ]------------
  WARNING: at net/wireless/mlme.c:97 cfg80211_send_rx_assoc+0x14d/0x152 [cfg80211]()
  Hardware name: 7658CTO
  ...
  Pid: 761, comm: phy0 Not tainted 2.6.32-trunk-686 #1
  Call Trace:
   [<c1030a5d>] ? warn_slowpath_common+0x5e/0x8a
   [<c1030a93>] ? warn_slowpath_null+0xa/0xc
   [<f86cafc7>] ? cfg80211_send_rx_assoc+0x14d/0x152
  ...
  ath0: link becomes ready
  ath0: deauthenticating from 00:11:95:77:e0:b0 by local choice (reason=3)
  ath0: no IPv6 routers present
  ath0: link is not ready
  ath0: direct probe to AP 00:11:95:77:e0:b0 (try 1)
  ath0: direct probe responded
  ath0: authenticate with AP 00:11:95:77:e0:b0 (try 1)
  ath0: authenticated
  ath0: associate with AP 00:11:95:77:e0:b0 (try 1)
  ath0: RX ReassocResp from 00:11:95:77:e0:b0 (capab=0x421 status=0 aid=2)
  ath0: associated

It is not clear to me how the first "direct probe" here
happens, but this seems to be a race condition, if the
user requests to deauth after requesting assoc, but before
the assoc response is received. In that case, it may
happen that mac80211 tries to report the assoc success to
cfg80211, but gets blocked on the wdev lock that is held
because the user is requesting the deauth.

The result is that we run into a warning. This is mostly
harmless, but maybe cause an unexpected event to be sent
to userspace; we'd send an assoc success event although
userspace was no longer expecting that.

To fix this, remove the warning and check whether the
race happened and in that case abort processing.

Reported-by: Joseph Nahmias <joe@nahmias.net>
Cc: stable@kernel.org
Cc: 562016-quiet@bugs.debian.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: remove remaining qual code
Johannes Berg [Wed, 23 Dec 2009 12:12:04 +0000 (13:12 +0100)]
wireless: remove remaining qual code

This removes the remaining users of the rx status
'qual' field and the field itself.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Add USB ID for Linksys WUSB 600N rev 2.
Gertjan van Wingerde [Tue, 22 Dec 2009 23:03:21 +0000 (00:03 +0100)]
rt2x00: Add USB ID for Linksys WUSB 600N rev 2.

This is a rt2870 based device.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix SWI calibration interrupt storm
Bob Copeland [Tue, 22 Dec 2009 03:26:48 +0000 (22:26 -0500)]
ath5k: fix SWI calibration interrupt storm

The calibration period is now invoked by triggering a software
interrupt from within the ISR by ath5k_hw_calibration_poll()
instead of via a timer.

However, the calibration interval isn't initialized before
interrupts are enabled, so we can have a situation where an
interrupt occurs before the interval is assigned, so the
interval is actually negative.  As a result, the ISR will
arm a software interrupt to schedule the tasklet, and then
rearm it when the SWI is processed, and so on, leading to a
softlockup at modprobe time.

Move the initialization order around so the calibration interval
is set before interrupts are active.  Another possible fix
is to schedule the tasklet directly from the poll routine,
but I think there are additional plans for the SWI.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix ibss join with fixed-bssid
Felix Fietkau [Sun, 20 Dec 2009 18:07:09 +0000 (19:07 +0100)]
mac80211: fix ibss join with fixed-bssid

When fixed bssid is requested when joining an ibss network, incoming
beacons that match the configured bssid cause mac80211 to create new
sta entries, even before the ibss interface is in joined state.
When that happens, it fails to bring up the interface entirely, because
it checks for existing sta entries before joining.
This patch fixes this bug by refusing to create sta info entries before
the interface is fully operational.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: Remove carrier signaling from the scan code
Samuel Ortiz [Fri, 18 Dec 2009 10:36:49 +0000 (11:36 +0100)]
libertas: Remove carrier signaling from the scan code

There is no reason to signal a carrier off when doing a 802.11 scan.

Cc: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: fix GFP_KERNEL in orinoco_set_key with interrupts disabled
Andrey Borzenkov [Tue, 22 Dec 2009 18:38:44 +0000 (21:38 +0300)]
orinoco: fix GFP_KERNEL in orinoco_set_key with interrupts disabled

orinoco_set_key is called from two places both with interrupts disabled
(under orinoco_lock). Use GFP_ATOMIC instead of GFP_KERNEL. Fixes following
warning:

[   77.254109] WARNING: at /home/bor/src/linux-git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x9a/0xa0()
[   77.254109] Hardware name: PORTEGE 4000
[   77.254109] Modules linked in: af_packet irnet ppp_generic slhc ircomm_tty ircomm binfmt_misc dm_mirror dm_region_hash dm_log dm_round_robin dm_multipath dm_mod loop nvram toshiba cryptomgr aead pcompress crypto_blkcipher michael_mic crypto_hash crypto_algapi orinoco_cs orinoco cfg80211 smsc_ircc2 pcmcia irda toshiba_acpi yenta_socket video i2c_ali1535 backlight rsrc_nonstatic ali_agp pcmcia_core psmouse output crc_ccitt i2c_core alim1535_wdt rfkill sg evdev ohci_hcd agpgart usbcore pata_ali libata reiserfs [last unloaded: scsi_wait_scan]
[   77.254109] Pid: 2296, comm: wpa_supplicant Not tainted 2.6.32-1avb #1
[   77.254109] Call Trace:
[   77.254109]  [<c011f0ad>] warn_slowpath_common+0x6d/0xa0
[   77.254109]  [<c014206a>] ? lockdep_trace_alloc+0x9a/0xa0
[   77.254109]  [<c014206a>] ? lockdep_trace_alloc+0x9a/0xa0
[   77.254109]  [<c011f0f5>] warn_slowpath_null+0x15/0x20
[   77.254109]  [<c014206a>] lockdep_trace_alloc+0x9a/0xa0
[   77.254109]  [<c018d296>] __kmalloc+0x36/0x130
[   77.254109]  [<dffcb6a8>] ? orinoco_set_key+0x48/0x1c0 [orinoco]
[   77.254109]  [<dffcb6a8>] orinoco_set_key+0x48/0x1c0 [orinoco]
[   77.254109]  [<dffcb9fc>] orinoco_ioctl_set_encodeext+0x1dc/0x2d0 [orinoco]
[   77.254109]  [<c035b117>] ioctl_standard_call+0x207/0x3b0
[   77.254109]  [<dffcb820>] ? orinoco_ioctl_set_encodeext+0x0/0x2d0 [orinoco]
[   77.254109]  [<c0307f1f>] ? rtnl_lock+0xf/0x20
[   77.254109]  [<c0307f1f>] ? rtnl_lock+0xf/0x20
[   77.254109]  [<c02fb115>] ? __dev_get_by_name+0x85/0xb0
[   77.254109]  [<c035b616>] wext_handle_ioctl+0x176/0x200
[   77.254109]  [<dffcb820>] ? orinoco_ioctl_set_encodeext+0x0/0x2d0 [orinoco]
[   77.254109]  [<c030020f>] dev_ioctl+0x6af/0x730
[   77.254109]  [<c02eec65>] ? move_addr_to_kernel+0x55/0x60
[   77.254109]  [<c02eed59>] ? sys_sendto+0xe9/0x130
[   77.254109]  [<c02ed77e>] sock_ioctl+0x7e/0x250
[   77.254109]  [<c02ed700>] ? sock_ioctl+0x0/0x250
[   77.254109]  [<c019cf4c>] vfs_ioctl+0x1c/0x70
[   77.254109]  [<c019d1fa>] do_vfs_ioctl+0x6a/0x590
[   77.254109]  [<c0178e50>] ? might_fault+0x90/0xa0
[   77.254109]  [<c0178e0a>] ? might_fault+0x4a/0xa0
[   77.254109]  [<c02ef90e>] ? sys_socketcall+0x17e/0x280
[   77.254109]  [<c019d759>] sys_ioctl+0x39/0x60
[   77.254109]  [<c0102e3b>] sysenter_do_call+0x12/0x32
[   77.254109] ---[ end trace 95ef563548d21efd ]---

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoSLAB: Fix lockdep annotation breakage
Pekka Enberg [Sun, 27 Dec 2009 12:33:14 +0000 (14:33 +0200)]
SLAB: Fix lockdep annotation breakage

Commit ce79ddc8e2376a9a93c7d42daf89bfcbb9187e62 ("SLAB: Fix lockdep annotations
for CPU hotplug") broke init_node_lock_keys() off-slab logic which causes
lockdep false positives.

Fix that up by reverting the logic back to original while keeping CPU hotplug
fixes intact.

Reported-and-tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reported-and-tested-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
14 years agocfq-iosched: don't regard requests with long distance as close
Shaohua Li [Mon, 28 Dec 2009 12:18:44 +0000 (13:18 +0100)]
cfq-iosched: don't regard requests with long distance as close

seek_mean could be very big sometimes, using it as close criteria is meaningless
as this doen't improve any performance. So if it's big, let's fallback to
default value.

Reviewed-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agotracing: Kconfig spelling fixes and cleanups
Randy Dunlap [Mon, 21 Dec 2009 20:01:17 +0000 (12:01 -0800)]
tracing: Kconfig spelling fixes and cleanups

Fix filename reference (ftrace-implementation.txt ->
ftrace-design.txt).

Fix spelling, punctuation, grammar.

Fix help text indentation and line lengths to reduce need for
horizontal scrolling or larger window sizes.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20091221120117.3fb49cdc.randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf kmem: Fix statistics typo
Wenji Huang [Mon, 21 Dec 2009 09:52:55 +0000 (17:52 +0800)]
perf kmem: Fix statistics typo

Replace bytes_req with bytes_alloc.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: acme@redhat.com
LKML-Reference: <1261389175-2227-1-git-send-email-wenji.huang@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86, kmemcheck: Use KERN_WARNING for error reporting
Pekka Enberg [Mon, 28 Dec 2009 09:02:15 +0000 (11:02 +0200)]
x86, kmemcheck: Use KERN_WARNING for error reporting

As suggested by Vegard Nossum, use KERN_WARNING for error
reporting to make sure kmemcheck reports end up in syslog.

Suggested-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <1261990935.4641.7.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agokprobes: Fix distinct type warning
Heiko Carstens [Mon, 21 Dec 2009 12:02:24 +0000 (13:02 +0100)]
kprobes: Fix distinct type warning

Every time I see this:

 kernel/kprobes.c: In function 'register_kretprobe':
 kernel/kprobes.c:1038: warning: comparison of distinct pointer types lacks a cast

I'm wondering if something changed in common code and we need to
do something for s390. Apparently that's not the case.
Let's get rid of this annoying warning.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <20091221120224.GA4471@osiris.boeblingen.de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: Use KERN_DEFAULT log-level in __show_regs()
Pekka Enberg [Mon, 28 Dec 2009 08:26:59 +0000 (10:26 +0200)]
x86: Use KERN_DEFAULT log-level in __show_regs()

Andrew Morton reported a strange looking kmemcheck warning:

  WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (ffff88004fba6c20)
  0000000000000000310000000000000000000000000000002413000000c9ffff
   u u u u u u u u u u u u u u u u i i i i i i i i u u u u u u u u

   [<ffffffff810af3aa>] kmemleak_scan+0x25a/0x540
   [<ffffffff810afbcb>] kmemleak_scan_thread+0x5b/0xe0
   [<ffffffff8104d0fe>] kthread+0x9e/0xb0
   [<ffffffff81003074>] kernel_thread_helper+0x4/0x10
   [<ffffffffffffffff>] 0xffffffffffffffff

The above printout is missing register dump completely. The
problem here is that the output comes from syslog which doesn't
show KERN_INFO log-level messages. We didn't see this before
because both of us were testing on 32-bit kernels which use the
_default_ log-level.

Fix that up by explicitly using KERN_DEFAULT log-level for
__show_regs() printks.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1261988819.4641.2.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
Ingo Molnar [Mon, 28 Dec 2009 08:23:13 +0000 (09:23 +0100)]
Merge branch 'iommu/fixes' of git://git./linux/kernel/git/joro/linux-2.6-iommu into x86/urgent

14 years agoperf: Rename perf_event_hw_event in design document
Tim Blechmann [Sun, 27 Dec 2009 13:43:06 +0000 (14:43 +0100)]
perf: Rename perf_event_hw_event in design document

perf_event_hw_event has been renamed to perf_event_attr. The
design document was still using the old name, though.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4B37646A.90108@klingt.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Add missing header files to LIB_H Makefile variable
Arnaldo Carvalho de Melo [Sun, 27 Dec 2009 23:36:58 +0000 (21:36 -0200)]
perf tools: Add missing header files to LIB_H Makefile variable

So that changes in them trigger rebuilds, like when we're doing
bisects.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1261957026-15580-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf record: We should fork only if a program was specified to run
Arnaldo Carvalho de Melo [Sun, 27 Dec 2009 23:36:57 +0000 (21:36 -0200)]
perf record: We should fork only if a program was specified to run

IOW: Now 'perf record -a' works, this was a bug introduced in:

856e96608a72412d319e498a3a7c557571f811bd
"perf record: Properly synchronize child creation"

Also fix the -C usage, i.e. allow for profiling all the tasks in
one CPU.

Reported-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1261957026-15580-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoKVM: get rid of kvm_create_vm() unused label warning on s390
Heiko Carstens [Fri, 18 Dec 2009 08:41:43 +0000 (09:41 +0100)]
KVM: get rid of kvm_create_vm() unused label warning on s390

arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_create_vm':
arch/s390/kvm/../../../virt/kvm/kvm_main.c:409: warning: label 'out_err' defined but not used

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: powerpc: Fix mtsrin in book3s_64 mmu
Alexander Graf [Sat, 19 Dec 2009 17:07:39 +0000 (18:07 +0100)]
KVM: powerpc: Fix mtsrin in book3s_64 mmu

We were shifting the Ks/Kp/N bits one bit too far on mtsrin. It took
me some time to figure that out, so I also put in some debugging and a
comment explaining the conversion.

This fixes current OpenBIOS boot on PPC64 KVM.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: ia64: fix build breakage due to host spinlock change
Luck, Tony [Fri, 18 Dec 2009 01:05:03 +0000 (17:05 -0800)]
KVM: ia64: fix build breakage due to host spinlock change

Len Brown pointed out that allmodconfig is broken for
ia64 because of:

arch/ia64/kvm/vmm.c: In function 'vmm_spin_unlock':
arch/ia64/kvm/vmm.c:70: error: 'spinlock_t' has no member named 'raw_lock'

KVM has it's own spinlock routines. It should not depend on the base kernel
spinlock_t type (which changed when ia64 switched to ticket locks).  Define
its own vmm_spinlock_t type.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates
Jan Kiszka [Sun, 6 Dec 2009 17:24:15 +0000 (18:24 +0100)]
KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates

User space may not want to overwrite asynchronously changing VCPU event
states on write-back. So allow to skip nmi.pending and sipi_vector by
setting corresponding bits in the flags field of kvm_vcpu_events.

[avi: advertise the bits in KVM_GET_VCPU_EVENTS]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: LAPIC: make sure IRR bitmap is scanned after vm load
Marcelo Tosatti [Mon, 14 Dec 2009 19:37:35 +0000 (17:37 -0200)]
KVM: LAPIC: make sure IRR bitmap is scanned after vm load

The vcpus are initialized with irr_pending set to false, but
loading the LAPIC registers with pending IRR fails to reset
the irr_pending variable.

Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: Fix possible circular locking in kvm_vm_ioctl_assign_device()
Sheng Yang [Tue, 15 Dec 2009 02:28:07 +0000 (10:28 +0800)]
KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device()

One possible order is:

KVM_CREATE_IRQCHIP ioctl(took kvm->lock) -> kvm_iobus_register_dev() ->
down_write(kvm->slots_lock).

The other one is in kvm_vm_ioctl_assign_device(), which take kvm->slots_lock
first, then kvm->lock.

Update the comment of lock order as well.

Observe it due to kernel locking debug warnings.

Cc: stable@kernel.org
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: MMU: remove prefault from invlpg handler
Marcelo Tosatti [Sat, 5 Dec 2009 14:34:11 +0000 (12:34 -0200)]
KVM: MMU: remove prefault from invlpg handler

The invlpg prefault optimization breaks Windows 2008 R2 occasionally.

The visible effect is that the invlpg handler instantiates a pte which
is, microseconds later, written with a different gfn by another vcpu.

The OS could have other mechanisms to prevent a present translation from
being used, which the hypervisor is unaware of.

While the documentation states that the cpu is at liberty to prefetch tlb
entries, it looks like this is not heeded, so remove tlb prefetch from
invlpg.

Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 27 Dec 2009 12:36:25 +0000 (13:36 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoALSA: hda - Fix Oops at reloading beep devices
Takashi Iwai [Sun, 27 Dec 2009 12:27:39 +0000 (13:27 +0100)]
ALSA: hda - Fix Oops at reloading beep devices

The recent change for supporting dynamic beep device allocation caused
a problem resulting in Oops at reloading the driver.  Also, it ignores
the error from input device registration.

This patch fixes the wrong check in snd_hda_detach_beep_device(), and
returns an error when the input device registration fails properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Don't cache beep controls
Takashi Iwai [Sun, 27 Dec 2009 09:25:58 +0000 (10:25 +0100)]
ALSA: hda - Don't cache beep controls

The beep control verbs don't need to be cached for resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoNET: XFRM: Fix spelling of neighbour.
Ralf Baechle [Fri, 25 Dec 2009 23:30:02 +0000 (23:30 +0000)]
NET: XFRM: Fix spelling of neighbour.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 net/xfrm/xfrm_policy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobond_3ad.c avoid possible null deref
Dan Carpenter [Wed, 23 Dec 2009 03:27:10 +0000 (03:27 +0000)]
bond_3ad.c avoid possible null deref

A few lines earlier we assume that best->slave could be either null or non-null so
we should check it here as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoFix MAC address access in 3c507, ibmlana, pcnet32 and libertas
Daniel Drake [Thu, 24 Dec 2009 08:11:24 +0000 (08:11 +0000)]
Fix MAC address access in 3c507, ibmlana, pcnet32 and libertas

Commit f001fde5eadd915f4858d22ed70d7040f48767cf changed
net_device.dev_addr from a 32-byte array to a pointer.

I found 4 ethernet drivers which rely on sizeof(dev_addr), which are now
only copying 4 bytes of the address information on 32bit systems.

Fix them to use ETH_ALEN.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix gianfar select_queue bogosity
Sandeep Gopalpet [Thu, 24 Dec 2009 03:13:06 +0000 (03:13 +0000)]
gianfar: Fix gianfar select_queue bogosity

The gfar_select_queue() function was used to set queue mapping
only for forwarding/bridging applications and the condition
for locally generated packets was completely ignored.

The solution is to remove the gfar_select_queue() function and
use skb_record_rx_queue to set queue mapping for
forwarding/bridging applications. This will ensure that in case of
forwarding/bridging applications txq = rxq will be selected and
skb_tx_hash will be used to pick up a txq for locally generated packets.

Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotun: use tun_sk instead container_of
Vitaliy Gusev [Fri, 25 Dec 2009 07:17:43 +0000 (07:17 +0000)]
tun: use tun_sk instead container_of

Using macro tun_sk is more clear and shorter. However tun.c has tun_sk,
but doesn't use it.

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoucc_geth: Don't needlessly change MAC settings in adjust_link()
Anton Vorontsov [Thu, 24 Dec 2009 05:31:20 +0000 (05:31 +0000)]
ucc_geth: Don't needlessly change MAC settings in adjust_link()

If PHY doesn't have an IRQ, phylib would poll for link changes, and
would call adjust_link() every second. In that case we disable and
enable the controller every second.

Let's better check if there is actually anything changed, and, if so,
change the MAC settings.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoucc_geth: Fix netdev watchdog triggering on link changes
Anton Vorontsov [Thu, 24 Dec 2009 05:31:05 +0000 (05:31 +0000)]
ucc_geth: Fix netdev watchdog triggering on link changes

Since commit 864fdf884e82bacbe8ca5e93bd43393a61d2e2b4 ("ucc_geth:
Fix hangs after switching from full to half duplex") ucc_geth driver
disables the controller during MAC configuration changes. Though,
disabling the controller might take quite awhile, and so the netdev
watchdog might get upset:

 NETDEV WATCHDOG: eth2 (ucc_geth): transmit queue 0 timed out
 ------------[ cut here ]------------
 Badness at c02729a8 [verbose debug info unavailable]
 NIP: c02729a8 LR: c02729a8 CTR: c01b6088
 REGS: c0451c40 TRAP: 0700   Not tainted  (2.6.32-trunk-8360e)
 [...]
 NIP [c02729a8] dev_watchdog+0x280/0x290
 LR [c02729a8] dev_watchdog+0x280/0x290
 Call Trace:
 [c0451cf0] [c02729a8] dev_watchdog+0x280/0x290 (unreliable)
 [c0451d50] [c00377c4] run_timer_softirq+0x164/0x224
 [c0451da0] [c0032a38] __do_softirq+0xb8/0x13c
 [c0451df0] [c00065cc] do_softirq+0xa0/0xac
 [c0451e00] [c003280c] irq_exit+0x7c/0x9c
 [c0451e10] [c00640c4] __ipipe_sync_stage+0x248/0x24c
 [...]

This patch fixes the issue by detaching the netdev during the
time we change the configuration.

Reported-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Tested-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: Stable <stable@vger.kernel.org> [2.6.32]
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoucc_geth: Fix empty TX queue processing
Anton Vorontsov [Thu, 24 Dec 2009 05:31:03 +0000 (05:31 +0000)]
ucc_geth: Fix empty TX queue processing

Following oops was seen with the ucc_geth driver:

 Unable to handle kernel paging request for data at address 0x00000058
 Faulting instruction address: 0xc024f2fc
 Oops: Kernel access of bad area, sig: 11 [#1]
 [...]
 NIP [c024f2fc] skb_recycle_check+0x14/0x100
 LR [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver]
 Call Trace:
 [df857d50] [c000b03c] __ipipe_grab_irq+0x3c/0xa4 (unreliable)
 [df857d60] [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver]
 [df857dd0] [c0258cf8] net_rx_action+0xf8/0x1b8
 [df857e10] [c0032a38] __do_softirq+0xb8/0x13c
 [df857e60] [c00065cc] do_softirq+0xa0/0xac
 [...]

This is because ucc_geth_tx() tries to process an empty queue when
queues are logically stopped. Stopping the queues doesn't disable
polling, and since nowadays ucc_geth_tx() is actually called from
the polling routine, the oops above might pop up.

Fix this by removing 'netif_queue_stopped() == 0' check.

Reported-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Tested-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: Stable <stable@vger.kernel.org> [2.6.32]
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agothinkpad-acpi: improve Kconfig help text
Henrique de Moraes Holschuh [Sun, 27 Dec 2009 00:52:17 +0000 (22:52 -0200)]
thinkpad-acpi: improve Kconfig help text

Document that rfkill and ALSA functionality exists, but requires the
subsystems to be available, and not modular if thinkpad-acpi is not
modular.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agothinkpad-acpi: update volume subdriver documentation
Henrique de Moraes Holschuh [Sun, 27 Dec 2009 00:52:16 +0000 (22:52 -0200)]
thinkpad-acpi: update volume subdriver documentation

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agothinkpad-acpi: make volume subdriver optional
Henrique de Moraes Holschuh [Sun, 27 Dec 2009 00:52:15 +0000 (22:52 -0200)]
thinkpad-acpi: make volume subdriver optional

Allow the user to choose through Kconfig if the Console Audio Control
interface (aka "volume subdriver") should be available or not.

This not only saves some memory, but also allows the thinkpad-acpi
driver to be built-in even if ALSA is modular when the console audio
control interface is not wanted.

This change fixes a build problem that is causing some annoyances, in
a way that doesn't disable the entire driver on kernels without ALSA
support.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Amerigo Wang <amwang@redhat.com>
Cc: Helight Xu <helight.xu@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agothinkpad-acpi: don't fail to load the entire module due to ALSA problems
Henrique de Moraes Holschuh [Sun, 27 Dec 2009 00:52:14 +0000 (22:52 -0200)]
thinkpad-acpi: don't fail to load the entire module due to ALSA problems

If we cannot create the ALSA mixer, it is a good reason to fail to
load the volume subdriver, and not to fail to load the entire module.

While at it, add more debugging messages, as the error paths are being
used a lot more than I'd expect, and it is failing to set up the ALSA
mixer on a number of ThinkPads.

Reported-by: Peter Jordan <usernetwork@gmx.info>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agothinkpad-acpi: don't take the first ALSA slot by default
Henrique de Moraes Holschuh [Sun, 27 Dec 2009 00:52:13 +0000 (22:52 -0200)]
thinkpad-acpi: don't take the first ALSA slot by default

We don't want to be the first soundcard.  We don't want to shift other
soundcards out of the way either, even if they load much later.

Ask ALSA to (by default) load us in one of the last three slots.  This
can be overriden at will using the "index" parameter.

Reported-by: Whoopie <whoopie79@gmx.net>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoALSA: Fix a typo in Procfile.txt
Masanari Iida [Sat, 26 Dec 2009 15:09:45 +0000 (00:09 +0900)]
ALSA: Fix a typo in Procfile.txt

Fix a typo in Documentation/sound/alsa/Procfile.txt

Signed-off-by Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: sound/arm: Fix build failure caused by missing struct aaci definition
Peter Huewe [Sat, 26 Dec 2009 02:27:45 +0000 (03:27 +0100)]
ALSA: sound/arm: Fix build failure caused by missing struct aaci definition

This patch fixes a build failure introduced by the patch
  ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params [1]
by adding/moving the aaci struct to the right position.

The patch mentioned above merged common source parts into one function,
but unfortunately left out the aaci struct and consequently caused a
build failure e.g. for arm versatile_config [2]

References:
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d3aee7996c30f928bbbbfd0994148e35d2e83084
[2] http://kisskb.ellerman.id.au/kisskb/buildresult/1893605/

Patch against Linus' tree.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agovxge: use DMA_BIT_MASK instead of plain values.
Denis Kirjanov [Sat, 26 Dec 2009 02:48:33 +0000 (18:48 -0800)]
vxge: use DMA_BIT_MASK instead of plain values.

Use DMA_BIT_MASK instead of plain values.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: restore ip source validation
Jamal Hadi Salim [Sat, 26 Dec 2009 01:30:22 +0000 (17:30 -0800)]
net: restore ip source validation

when using policy routing and the skb mark:
there are cases where a back path validation requires us
to use a different routing table for src ip validation than
the one used for mapping ingress dst ip.
One such a case is transparent proxying where we pretend to be
the destination system and therefore the local table
is used for incoming packets but possibly a main table would
be used on outbound.
Make the default behavior to allow the above and if users
need to turn on the symmetry via sysctl src_valid_mark

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Initialize cnic status block during chip reset
Michael Chan [Sat, 26 Dec 2009 01:13:07 +0000 (17:13 -0800)]
bnx2x: Initialize cnic status block during chip reset

When the device is reset during MTU change, ring size change, or self
test, etc, the cnic status block needs to be properly initialized if
cnic is registered.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agox86, compress: Force i386 instructions for the decompressor
H. Peter Anvin [Fri, 25 Dec 2009 23:40:38 +0000 (15:40 -0800)]
x86, compress: Force i386 instructions for the decompressor

Recently, some distros have started shipping versions of gcc which
default to -march=i686.  This breaks building kernels for pre-i686
machines, even if they have been selected in Kconfig, due to the
generation of CMOV instructions.

There isn't enough benefit to try to preserve the generation of these
instructions even when selected, so simply force -march=i386 for the
decompressor when building a 32-bit kernel.

Reported-and-tested-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <219280.97558.qm@web52907.mail.re2.yahoo.com>

14 years agoALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c
Takashi Iwai [Fri, 25 Dec 2009 21:56:20 +0000 (22:56 +0100)]
ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c

Use snd_hda_jack_detect() again for jack-sensing.
The triggering problem can be worked around with codec->no_trigger_sense
flag now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Disable tigger at pin-sensing on AD codecs
Takashi Iwai [Fri, 25 Dec 2009 21:49:01 +0000 (22:49 +0100)]
ALSA: hda - Disable tigger at pin-sensing on AD codecs

Analog Device codecs seem to have problems with the triggering of
pin-sensing although their pincaps give the trigger requirements.
Some reported that constant CPU load on HP laptops with AD codecs.

For avoiding this regression, add a flag to codec struct to notify
explicitly that the codec doesn't suppot the trigger at pin-sensing.

Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoext4: return correct wbc.nr_to_write in ext4_da_writepages
Richard Kennedy [Fri, 25 Dec 2009 20:46:07 +0000 (15:46 -0500)]
ext4: return correct wbc.nr_to_write in ext4_da_writepages

When ext4_da_writepages increases the nr_to_write in writeback_control
then it must always re-base the return value.  Originally there was a
(misguided) attempt prevent wbc.nr_to_write from going negative.  In
fact, it's necessary to allow nr_to_write to be negative so that
wb_writeback() can correctly calculate how many pages were actually
written.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoALSA: hda - HDMI sticky stream tag support
Wu Fengguang [Fri, 25 Dec 2009 05:14:27 +0000 (13:14 +0800)]
ALSA: hda - HDMI sticky stream tag support

When we run the following commands in turn (with
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0),

speaker-test -Dhw:0,3 -c2 -twav  # HDMI
speaker-test -Dhw:0,0 -c2 -twav  # Analog

The second command will produce sound in the analog lineout _as well as_
HDMI sink. The root cause is, device 0 "reuses" the same stream tag that
was used by device 3, and the "intelhdmi - sticky stream id" patch leaves
the HDMI codec in a functional state. So the HDMI codec happily accepts
the audio samples which reuse its stream tag.

The proposed solution is to remember the last device each azx_dev was
assigned to, and prefer to
1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used
2) or assign a never-used azx_dev for HDMI

With this patch and the above two speaker-test commands,
HDMI codec will use stream tag 8 and Analog codec will use 5.

The stream tag used by HDMI codec won't be reused by others, as long
as we don't run out of the 4 playback azx_dev's. The legacy Analog
codec will continue to use stream tag 5 because its device id is 0
(this is a bit tricky).

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: Fix indentation in pcm_native.c
Guennadi Liakhovetski [Thu, 24 Dec 2009 00:17:46 +0000 (01:17 +0100)]
ALSA: Fix indentation in pcm_native.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoInput: matrix-keypad - handle cases when GPIOs can't be wakeup sources
Dmitry Torokhov [Fri, 25 Dec 2009 06:50:23 +0000 (22:50 -0800)]
Input: matrix-keypad - handle cases when GPIOs can't be wakeup sources

On certain boards not all GPIOs may be used as wakeup sources, in which
case some of enable_irq_wake() calls will fail. On resume calling
disable_irq_wake() will warn about unbalanced IRQ wake disable.

Solve this by checking whether enable_irq_wake() succeeded or not and
no not call disable_irq_wake() for these GPIOs/IRQs that have not been
enabled.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: iforce - fix oops on device disconnect
Dmitry Torokhov [Fri, 25 Dec 2009 06:37:49 +0000 (22:37 -0800)]
Input: iforce - fix oops on device disconnect

Do not try to free iforce device when we closing input device; disconnect
is the only place where it should be deleted.

Reported-by: Johannes Ebke <johannes.ebke@physik.uni-muenchen.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: ff-memless - add notion of direction to for rumble effects
Jari Vanhala [Fri, 25 Dec 2009 05:52:20 +0000 (21:52 -0800)]
Input: ff-memless - add notion of direction to for rumble effects

This adds simple direction calculation when combining effects. It's useful
to decide motor direction for rumble (vibrator).

Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com>
Acked-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: ff-memless - another fix for signed to unsigned overflow
Dmitry Torokhov [Fri, 25 Dec 2009 05:44:19 +0000 (21:44 -0800)]
Input: ff-memless - another fix for signed to unsigned overflow

The commit 9e68177ef93b2f34eee5a1e1707bceef4b9ba69c changed 'gain' from
signed to unsigned to fix an issue with rumble effect calculation, however
it introduced problems when calculating constant effects. Having 'gain'
being unsigned int was an unfortunate choice since it dominates all
implicit type conversions causing everything to be treated as unsigned
int.

Let's change it back to signed int and simply add proper casts to rumble
effect calculations.

Reported-by: Gary Stein <lordcnidarian@gmail.com>
Acked-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: ff-memless - start playing FF effects immediately
Jari Vanhala [Fri, 25 Dec 2009 05:52:19 +0000 (21:52 -0800)]
Input: ff-memless - start playing FF effects immediately

Instead of waiting for the next timer tick to start playing an effect
do it immediately. This mostly helps systems using low HZ setting.

Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com>
Acked-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: serio - do not mark kseriod freezable anymore
Dmitry Torokhov [Fri, 25 Dec 2009 05:40:43 +0000 (21:40 -0800)]
Input: serio - do not mark kseriod freezable anymore

We used to make kseriod freezable to prevent unnecessary attempts at
resuming keyboard and mouse before taking hibernation image when suspend
and hibernation were sharing PM operations. Now that they are separated
and we don't risk resuming during 'thaw' we don't need to freeze kseriod
anymore. This will allow us to start resetting mouse and keyboard a bit
earlier, before rest of the userspace comes back up.

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoInput: speed up suspend/shutdown for PS/2 mice and keyboards
Dmitry Torokhov [Fri, 25 Dec 2009 05:40:24 +0000 (21:40 -0800)]
Input: speed up suspend/shutdown for PS/2 mice and keyboards

Instead of doing full-blown reset while suspending or shutting down
the box use lighter form of reset that should take less time.

Tested-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoext4: Update documentation to correct the inode_readahead_blks option name
Fang Wenqi [Thu, 24 Dec 2009 22:51:42 +0000 (17:51 -0500)]
ext4: Update documentation to correct the inode_readahead_blks option name

Per commit 240799cd, the option name for readahead should be
inode_readahead_blks, not inode_readahead.

Signed-off-by: Fang Wenqi <antonf@turbolinux.com.cn>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoLinux 2.6.33-rc2 v2.6.33-rc2
Linus Torvalds [Thu, 24 Dec 2009 21:09:41 +0000 (13:09 -0800)]
Linux 2.6.33-rc2

14 years agoMerge branch 'sysctl' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc-2.6
Linus Torvalds [Thu, 24 Dec 2009 21:01:29 +0000 (13:01 -0800)]
Merge branch 'sysctl' of git://git./linux/kernel/git/ak/linux-misc-2.6

* 'sysctl' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc-2.6:
  SYSCTL: Add a mutex to the page_alloc zone order sysctl
  SYSCTL: Print binary sysctl warnings (nearly) only once

14 years agoMerge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux...
Linus Torvalds [Thu, 24 Dec 2009 21:01:13 +0000 (13:01 -0800)]
Merge branch 'hwpoison' of git://git./linux/kernel/git/ak/linux-mce-2.6

* 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6:
  HWPOISON: Add PROC_FS dependency to hwpoison injector v2

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Thu, 24 Dec 2009 21:00:02 +0000 (13:00 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (34 commits)
  classmate-laptop: add support for Classmate PC ACPI devices
  hp-wmi: Fix two memleaks
  acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIAS
  dell-wmi: do not keep driver loaded on unsupported boxes
  wmi: Free the allocated acpi objects through wmi_get_event_data
  drivers/platform/x86/acerhdf.c: check BIOS information whether it begins with string of table
  acerhdf: add new BIOS versions
  acerhdf: limit modalias matching to supported
  toshiba_acpi: convert to seq_file
  asus_acpi: convert to seq_file
  ACPI: do not select ACPI_DOCK from ATA_ACPI
  sony-laptop: enumerate rfkill devices using SN06
  sony-laptop: rfkill support for newer models
  ACPI: fix OSC regression that caused aer and pciehp not to load
  MAINTAINERS: add maintainer for msi-wmi driver
  fujitu-laptop: fix tests of acpi_evaluate_integer() return value
  arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by using smp_call_function_any()
  ACPI: processor: remove _PDC object list from struct acpi_processor
  ACPI: processor: change acpi_processor_set_pdc() interface
  ACPI: processor: open code acpi_processor_cleanup_pdc
  ...

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Thu, 24 Dec 2009 20:59:11 +0000 (12:59 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
  ocfs2/trivial: Use proper mask for 2 places in hearbeat.c
  Ocfs2: Let ocfs2 support fiemap for symlink and fast symlink.
  Ocfs2: Should ocfs2 support fiemap for S_IFDIR inode?
  ocfs2: Use FIEMAP_EXTENT_SHARED
  fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
  ocfs2: replace u8 by __u8 in ocfs2_fs.h
  ocfs2: explicit declare uninitialized var in user_cluster_connect()
  ocfs2-devel: remove redundant OCFS2_MOUNT_POSIX_ACL check in ocfs2_get_acl_nolock()
  ocfs2: return -EAGAIN instead of EAGAIN in dlm
  ocfs2/cluster: Make fence method configurable - v2
  ocfs2: Set MS_POSIXACL on remount
  ocfs2: Make acl use the default
  ocfs2: Always include ACL support

14 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 24 Dec 2009 20:57:45 +0000 (12:57 -0800)]
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  VIDEO: cyberpro: pci_request_regions needs a persistent name
  ARM: dma-isa: request cascade channel after registering it
  ARM: footbridge: trim down old ISA rtc setup
  ARM: fix PAGE_KERNEL
  ARM: Fix wrong shared bit for CPU write buffer bug test
  ARM: 5857/1: ARM: dmabounce: fix build
  ARM: 5856/1: Fix bug of uart0 platfrom data for nuc900
  ARM: 5855/1: putc support for nuc900
  ARM: 5854/1: fix compiling error for NUC900
  ARM: 5849/1: ARMv7: fix Oprofile events count
  ARM: add missing include to nwflash.c
  ARM: Kill CONFIG_CPU_32
  ARM: Convert VFP/Crunch/XscaleCP thread_release() to exit_thread()
  ARM: 5853/1: ARM: Fix build break on ARM v6 and v7

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Thu, 24 Dec 2009 20:55:40 +0000 (12:55 -0800)]
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, pci: remove pesky debug printk
  amd64_edac: restrict PCI config space access
  amd64_edac: fix forcing module load/unload
  amd64_edac: make driver loading more robust
  amd64_edac: fix driver instance freeing
  amd64_edac: fix K8 chip select reporting

14 years agoMerge branch 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Thu, 24 Dec 2009 20:54:02 +0000 (12:54 -0800)]
Merge branch 'sh/for-2.6.33' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Ensure all PG_dcache_dirty pages are written back.
  sh: mach-ecovec24: setup.c detailed correction
  serial: sh-sci: Convert tremaining ctrl_xxx I/O routines to __raw_xxx.
  serial: sh-sci: earlyprintk zero uartclk fix
  sh: Only use bl bit toggling for sleeping idle.
  sh: Restore bl bit toggling in idle loop.
  sh: Fix up MAX_DMA_CHANNELS definition when DMA is disabled.
  sh: dmaengine support for SH7785
  sh: dmaengine support for sh7724.

14 years agoVIDEO: cyberpro: pci_request_regions needs a persistent name
Russell King [Thu, 24 Dec 2009 13:36:21 +0000 (13:36 +0000)]
VIDEO: cyberpro: pci_request_regions needs a persistent name

Don't pass a name pointer from the kernel stack, it will not survive
and will result in corrupted /proc/iomem output.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: dma-isa: request cascade channel after registering it
Russell King [Thu, 24 Dec 2009 14:45:39 +0000 (14:45 +0000)]
ARM: dma-isa: request cascade channel after registering it

We can't request the cascade channel before it's been registered, so
move it afterwards.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: footbridge: trim down old ISA rtc setup
Russell King [Thu, 24 Dec 2009 12:52:44 +0000 (12:52 +0000)]
ARM: footbridge: trim down old ISA rtc setup

This fixes a "start_kernel(): bug: interrupts were enabled early".

rtc_cmos now takes care of initializing the ISA RTC and reading the
current time and date from it; there's no need to repeat that here,
thereby causing interrupts to be enabled too early.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: fix PAGE_KERNEL
Russell King [Thu, 24 Dec 2009 10:16:21 +0000 (10:16 +0000)]
ARM: fix PAGE_KERNEL

PAGE_KERNEL should not be executable; any area marked executable can
be prefetched into the instruction cache.  We don't want vmalloc areas
to be read in this way.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoedac, pci: remove pesky debug printk
Borislav Petkov [Mon, 21 Dec 2009 18:11:12 +0000 (19:11 +0100)]
edac, pci: remove pesky debug printk

Do not spam the logs needlessly with the sole info that
edac_pci_dev_parity_clear is being called.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: restrict PCI config space access
Borislav Petkov [Mon, 21 Dec 2009 18:21:41 +0000 (19:21 +0100)]
amd64_edac: restrict PCI config space access

Do not access F2x19[0,4] on K8 since they're undefined there.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix forcing module load/unload
Borislav Petkov [Mon, 21 Dec 2009 17:55:18 +0000 (18:55 +0100)]
amd64_edac: fix forcing module load/unload

Clear the override flag after force-loading the module.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: make driver loading more robust
Borislav Petkov [Mon, 21 Dec 2009 17:13:01 +0000 (18:13 +0100)]
amd64_edac: make driver loading more robust

Currently, the module does not initialize fully when the DIMMs aren't
ECC but remains still loaded. Propagate the error when no instance of
the driver is properly initialized and prevent further loading.

Reorganize and polish error handling in amd64_edac_init() while at it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix driver instance freeing
Borislav Petkov [Mon, 21 Dec 2009 14:15:59 +0000 (15:15 +0100)]
amd64_edac: fix driver instance freeing

Fix use-after-free errors by pushing all memory-freeing calls to the end
of amd64_remove_one_instance().

Reported-by: Darren Jenkins <darrenrjenkins@gmail.com>
LKML-Reference: <1261370306.11354.52.camel@ICE-BOX>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix K8 chip select reporting
Borislav Petkov [Mon, 21 Dec 2009 13:52:53 +0000 (14:52 +0100)]
amd64_edac: fix K8 chip select reporting

Fix the case when amd64_debug_display_dimm_sizes() reports only half the
amount of DRAM on it because it doesn't account for when the single DCT
operates in 128-bit mode and merges chip selects from different DIMMs.

Reported-by: Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>
LKML-Reference: <200912112202.48173.johannes.hirte@fem.tu-ilmenau.de>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoMerge branch 'misc-2.6.33' into release
Len Brown [Thu, 24 Dec 2009 06:19:00 +0000 (01:19 -0500)]
Merge branch 'misc-2.6.33' into release

14 years agoMerge branch 'tc1100-wmi' into release
Len Brown [Thu, 24 Dec 2009 06:17:46 +0000 (01:17 -0500)]
Merge branch 'tc1100-wmi' into release

14 years agoMerge branch 'sony' into release
Len Brown [Thu, 24 Dec 2009 06:17:41 +0000 (01:17 -0500)]
Merge branch 'sony' into release

14 years agoMerge branch 'classmate' into release
Len Brown [Thu, 24 Dec 2009 06:17:31 +0000 (01:17 -0500)]
Merge branch 'classmate' into release

14 years agoMerge branch 'pdc' into release
Len Brown [Thu, 24 Dec 2009 06:17:21 +0000 (01:17 -0500)]
Merge branch 'pdc' into release

14 years agoMerge branches 'bugzilla-14446', 'bugzilla-14753' and 'bugzilla-14824' into release
Len Brown [Thu, 24 Dec 2009 06:17:01 +0000 (01:17 -0500)]
Merge branches 'bugzilla-14446', 'bugzilla-14753' and 'bugzilla-14824' into release

14 years agoMerge branch 'osc' into release
Len Brown [Thu, 24 Dec 2009 06:16:35 +0000 (01:16 -0500)]
Merge branch 'osc' into release

14 years agoclassmate-laptop: add support for Classmate PC ACPI devices
Thadeu Lima de Souza Cascardo [Tue, 22 Dec 2009 00:20:01 +0000 (16:20 -0800)]
classmate-laptop: add support for Classmate PC ACPI devices

This add supports for devices like keyboard, backlight, tablet and
accelerometer.

This work is supported by International Syst S/A.

[randy.dunlap@oracle.com: cmpc_acpi: depends on ACPI]
[akpm@linux-foundation.org: readability tweaks]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>