pandora-kernel.git
14 years agoi2c: imx: only imx1 needs disable delay
Richard Zhao [Sat, 17 Oct 2009 09:46:23 +0000 (17:46 +0800)]
i2c: imx: only imx1 needs disable delay

check cpu_is_mx1() when disable delay.

Signed-off-by: Richard Zhao <linuxzsc@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c: imx: check busy bit when START/STOP
Richard Zhao [Sat, 17 Oct 2009 09:46:22 +0000 (17:46 +0800)]
i2c: imx: check busy bit when START/STOP

The controller can't do anything else before it actually generates START/STOP.
So we check busy bit to make sure START/STOP is successfully finished.

If we don't check busy bit, START/STOP may fail on some fast CPUs.

Signed-off-by: Richard Zhao <linuxzsc@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Mon, 2 Nov 2009 20:23:21 +0000 (12:23 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: fix readdir corner cases
  9p: fix readlink
  9p: fix a small bug in readdir for long directories

14 years agomac80211: check interface is down before type change
Johannes Berg [Sun, 1 Nov 2009 18:25:40 +0000 (19:25 +0100)]
mac80211: check interface is down before type change

For some strange reason the netif_running() check
ended up after the actual type change instead of
before, potentially causing all kinds of problems
if the interface is up while changing the type;
one of the problems manifests itself as a warning:

WARNING: at net/mac80211/iface.c:651 ieee80211_teardown_sdata+0xda/0x1a0 [mac80211]()
Hardware name: Aspire one
Pid: 2596, comm: wpa_supplicant Tainted: G        W  2.6.31-10-generic #32-Ubuntu
Call Trace:
 [] warn_slowpath_common+0x6d/0xa0
 [] warn_slowpath_null+0x15/0x20
 [] ieee80211_teardown_sdata+0xda/0x1a0 [mac80211]
 [] ieee80211_if_change_type+0x4a/0xc0 [mac80211]
 [] ieee80211_change_iface+0x61/0xa0 [mac80211]
 [] cfg80211_wext_siwmode+0xc7/0x120 [cfg80211]
 [] ioctl_standard_call+0x58/0xf0

(http://www.kerneloops.org/searchweek.php?search=ieee80211_teardown_sdata)

Cc: Arjan van de Ven <arjan@infradead.org>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix NULL ptr deref
Johannes Berg [Sat, 31 Oct 2009 06:40:37 +0000 (07:40 +0100)]
cfg80211: fix NULL ptr deref

commit 211a4d12abf86fe0df4cd68fc6327cbb58f56f81
  Author: Johannes Berg <johannes@sipsolutions.net>
  Date:   Tue Oct 20 15:08:53 2009 +0900

      cfg80211: sme: deauthenticate on assoc failure

introduced a potential NULL pointer dereference that
some people have been hitting for some reason -- the
params.bssid pointer is not guaranteed to be non-NULL
for what seems to be a race between various ways of
reaching the same thing.

While I'm trying to analyse the problem more let's
first fix the crash. I think the real fix may be to
avoid doing _anything_ if it ended up being NULL, but
right now I'm not sure yet.

I think
http://bugzilla.kernel.org/show_bug.cgi?id=14342
might also be this issue.

Reported-by: Parag Warudkar <parag.lkml@gmail.com>
Tested-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 2 Nov 2009 18:22:25 +0000 (10:22 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  Revert "[IA64] fix percpu warnings"
  [IA64] fix percpu warnings
  [IA64] SMT friendly version of spin_unlock_wait()
  [IA64] use printk_once() unaligned.c/io_common.c
  [IA64] Require SAL 3.2 in order to do extended config space ops
  [IA64] unsigned cannot be less than 0 in sn_hwperf_ioctl()
  [IA64] Restore registers in the stack on INIT
  [IA64] Re-implement spinaphores using ticket lock concepts
  [IA64] Squeeze ticket locks back into 4 bytes.

14 years agoRevert "ext4: Remove journal_checksum mount option and enable it by default"
Linus Torvalds [Mon, 2 Nov 2009 18:15:27 +0000 (10:15 -0800)]
Revert "ext4: Remove journal_checksum mount option and enable it by default"

This reverts commit d0646f7b636d067d715fab52a2ba9c6f0f46b0d7, as
requested by Eric Sandeen.

It can basically cause an ext4 filesystem to miss recovery (and thus get
mounted with errors) if the journal checksum does not match.

Quoth Eric:

   "My hand-wavy hunch about what is happening is that we're finding a
    bad checksum on the last partially-written transaction, which is
    not surprising, but if we have a wrapped log and we're doing the
    initial scan for head/tail, and we abort scanning on that bad
    checksum, then we are essentially running an unrecovered filesystem.

    But that's hand-wavy and I need to go look at the code.

    We lived without journal checksums on by default until now, and at
    this point they're doing more harm than good, so we should revert
    the default-changing commit until we can fix it and do some good
    power-fail testing with the fixes in place."

See

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

for all the gory details.

Requested-by: Eric Sandeen <sandeen@redhat.com>
Cc: Theodore Tso <tytso@mit.edu>
Cc: Alexey Fisher <bug-track@fisher-privat.net>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Mathias Burén <mathias.buren@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 2 Nov 2009 17:53:19 +0000 (09:53 -0800)]
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: ensure initial page tables are setup for SMP systems
  ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
  ARM: 5774/1: Fix Realview ARM1176PB board reboot
  ARM: Fix errata 411920 workarounds
  ARM: Fix sparsemem with SPARSEMEM_EXTREME enabled
  ARM: Use GFP_DMA only for masks _less_ than 32-bit
  ARM: integrator: allow Integrator to be built with highmem
  ARM: Fix signal restart issues with NX and OABI compat

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 2 Nov 2009 17:50:22 +0000 (09:50 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Don't check invalid HP pin
  ALSA: dummy - Fix descriptions of pcm_substreams parameter
  ALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
  ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
  sound: via82xx: deactivate DXS controls of inactive streams
  ALSA: snd-usb-caiaq: Bump version number to 1.3.20
  ALSA: snd-usb-caiaq: Lock on stream start/unpause
  ALSA: snd-usb-caiaq: Missing lock around use of buffer positions
  ALSA: sound/parisc: Move dereference after NULL test
  ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
  ALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller
  ALSA: pcsp - Fix nforce workaround
  ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
  ASoC: Amstrad Delta: add info about the line discipline requirement to Kconfig help text
  ASoC: Fix possible codec_dai->ops NULL pointer problems
  ALSA: hda - Fix capture source checks for ALC662/663 codecs
  ASoC: Serialize access to dapm_power_widgets()

14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 2 Nov 2009 17:46:33 +0000 (09:46 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Fix spurious wakeup for requeue_pi really

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 2 Nov 2009 17:46:06 +0000 (09:46 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tools: Remove -Wcast-align
  perf tools: Fix compatibility with libelf 0.8 and autodetect
  perf events: Don't generate events for the idle task when exclude_idle is set
  perf events: Fix swevent hrtimer sampling by keeping track of remaining time when enabling/disabling swevent hrtimers

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 2 Nov 2009 17:45:44 +0000 (09:45 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing: Remove cpu arg from the rb_time_stamp() function
  tracing: Fix comment typo and documentation example
  tracing: Fix trace_seq_printf() return value
  tracing: Update *ppos instead of filp->f_pos

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 2 Nov 2009 17:45:17 +0000 (09:45 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Make EFI RTC function depend on 32bit again
  x86-64: Fix register leak in 32-bit syscall audting
  x86: crash_dump: Fix non-pae kdump kernel memory accesses
  x86: Side-step lguest problem by only building cmpxchg8b_emu for pre-Pentium
  x86: Remove STACKPROTECTOR_ALL

14 years agomm: remove incorrect swap_count() from try_to_unuse()
Bo Liu [Mon, 2 Nov 2009 16:50:33 +0000 (16:50 +0000)]
mm: remove incorrect swap_count() from try_to_unuse()

In try_to_unuse(), swcount is a local copy of *swap_map, including the
SWAP_HAS_CACHE bit; but a wrong comparison against swap_count(*swap_map),
which masks off the SWAP_HAS_CACHE bit, succeeded where it should fail.

That had the effect of resetting the mm from which to start searching
for the next swap page, to an irrelevant mm instead of to an mm in which
this swap page had been found: which may increase search time by ~20%.
But we're used to swapoff being slow, so never noticed the slowdown.

Remove that one spurious use of swap_count(): Bo Liu thought it merely
redundant, Hugh rewrote the description since it was measurably wrong.

Signed-off-by: Bo Liu <bo-liu@hotmail.com>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoi915: fix intel graphics suspend breakage due to resume/lid event confusion
Linus Torvalds [Mon, 2 Nov 2009 17:29:55 +0000 (09:29 -0800)]
i915: fix intel graphics suspend breakage due to resume/lid event confusion

In commit c1c7af60892070e4b82ad63bbfb95ae745056de0 ("drm/i915: force
mode set at lid open time") the intel graphics driver was taught to
restore the LVDS mode on lid open.

That caused problems with interaction with the suspend/resume code,
which commonly runs at the same time (suspend is often caused by the lid
close event, while lid open is commonly a resume event), which was
worked around with in commit 06891e27a9b5dba5268bb80e41a283f51335afe7
("drm/i915: fix suspend/resume breakage in lid notifier").

However, in the meantime the lid event code had also grown a user event
notifier (commit 06324194eee97a51b5f172270df49ec39192d6cc: "drm/i915:
generate a KMS uevent at lid open/close time"), and now _that_ causes
problems with suspend/resume and some versions of Xorg reacting to those
uevents by setting the mode.

So this effectively reverts that commit 06324194ee, and makes the lid
open protection logic against suspend/resume more explicit.  This fixes
at least one laptop. See

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

for more details.

Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoASoC: TWL4030: Make sure, that the codec is powered on startup
Peter Ujfalusi [Mon, 2 Nov 2009 12:34:54 +0000 (14:34 +0200)]
ASoC: TWL4030: Make sure, that the codec is powered on startup

Set the codec->bias_level to SND_SOC_BIAS_OFF before changing
the initial bias level to STANDBY.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoRevert "[IA64] fix percpu warnings"
Tony Luck [Mon, 2 Nov 2009 17:23:08 +0000 (09:23 -0800)]
Revert "[IA64] fix percpu warnings"

This reverts commit b94b08081fcecf83fa690d6c5664f6316fe72208.

genksyms currently cannot handle complicated types for exported
percpu variables.  Drop this patch for now as it prevents a
module from being loaded on sn2 systems:

 xpc: no symbol version for per_cpu____sn_cnodeid_to_nasid
 xpc: Unknown symbol per_cpu____sn_cnodeid_to_nasid

Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years agoARM: ensure initial page tables are setup for SMP systems
Russell King [Sun, 1 Nov 2009 17:44:24 +0000 (17:44 +0000)]
ARM: ensure initial page tables are setup for SMP systems

Mapping the same memory using two different attributes (memory
type, shareability, cacheability) is unpredictable.  During boot,
we encounter a situation when we're updating the kernel's page
tables which can lead to dirty cache lines existing in the cache
which are subsequently missed.  This causes stack corruption,
and therefore a crash.

Therefore, ensure that the shared and cacheability settings
matches the configuration that will be used later; this together
with the restriction in early_cachepolicy() ensures that we won't
create a mismatch during boot.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
Claudio Scordino [Fri, 30 Oct 2009 11:06:05 +0000 (12:06 +0100)]
ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.

ARM unwind is known to compile only with EABI and not-buggy compilers.
The problem is not the unwinding information but the -fno-frame-pointer
option added as a result of !CONFIG_FRAME_POINTER.  Now we check the
compiler and raise a #warning in case of wrong compiler.

Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoASoC: Add support for the WM8727 DAC.
Neil Jones [Mon, 2 Nov 2009 15:14:17 +0000 (15:14 +0000)]
ASoC: Add support for the WM8727 DAC.

Add support for the Wolfson Microelectronics WM8727 DAC, this is a simple
non-configurable DAC.

Signed-off-by: Neil Jones <neil.jones@imgtec.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Mon, 2 Nov 2009 15:18:33 +0000 (16:18 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Mon, 2 Nov 2009 15:18:29 +0000 (16:18 +0100)]
Merge branch 'fix/asoc' into for-linus

14 years ago9p: fix readdir corner cases
Eric Van Hensbergen [Mon, 2 Nov 2009 14:39:28 +0000 (08:39 -0600)]
9p: fix readdir corner cases

The patch below also addresses a couple of other corner cases in readdir
seen with a large (e.g. 64k) msize.  I'm not sure what people think of
my co-opting of fid->aux here.  I'd be happy to rework if there's a better
way.

When the size of the user supplied buffer passed to readdir is smaller
than the data returned in one go by the 9P read request, v9fs_dir_readdir()
currently discards extra data so that, on the next call, a 9P read
request will be issued with offset < previous offset + bytes returned,
which voilates the constraint described in paragraph 3 of read(5) description.
This patch preseves the leftover data in fid->aux for use in the next call.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: fix readlink
Martin Stava [Mon, 2 Nov 2009 14:39:34 +0000 (08:39 -0600)]
9p: fix readlink

I do not know if you've looked on the patch, but unfortunately it is
incorrect. A suggested better version is in this email (the old
version didn't work in case the user provided buffer was not long
enough - it incorrectly appended null byte on a position of last char,
and thus broke the contract of the readlink method). However, I'm
still not sure this is 100% correct thing to do, I think readlink is
supposed to return buffer without last null byte in all cases, but we
do return last null byte (even the old version).. on the other hand it
is likely unspecified what is in the remaining part of the buffer, so
null character may be fine there ;):

Signed-off-by: Martin Stava <martin.stava@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years ago9p: fix a small bug in readdir for long directories
Martin Stava [Mon, 2 Nov 2009 14:39:35 +0000 (08:39 -0600)]
9p: fix a small bug in readdir for long directories

Here is a proposed patch for bug in readdir. Listing of dirs with
many files fails without this patch.

Signed-off-by: Martin Stava <martin.stava@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
14 years agoALSA: hda - Don't check invalid HP pin
Takashi Iwai [Mon, 2 Nov 2009 13:23:15 +0000 (14:23 +0100)]
ALSA: hda - Don't check invalid HP pin

alc_automute_pin() might be called even if any HP pin is defined, and
it will result in verbs with NID=0.

This patch adds a check for the validity of HP widget before issuing
any verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: dummy - Fix descriptions of pcm_substreams parameter
Takashi Iwai [Mon, 2 Nov 2009 13:10:59 +0000 (14:10 +0100)]
ALSA: dummy - Fix descriptions of pcm_substreams parameter

Now up to 128 substreams are supported.

Reported-by: Adrian Bridgett <adrian@smop.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: au1x: convert to platform drivers.
Manuel Lauss [Sat, 31 Oct 2009 19:15:08 +0000 (20:15 +0100)]
ASoC: au1x: convert to platform drivers.

Convert psc-ac97,i2s to platform drivers similar to the davinci ones.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMIPS: O32: Fix ppoll
Arnaud Patard [Tue, 20 Oct 2009 08:27:47 +0000 (10:27 +0200)]
MIPS: O32: Fix ppoll

sys_ppoll syscall needs to use a compat handler on 64bit kernels with o32
user-space.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Oprofile: Rename cpu_type from godson2 to loongson2
Wu Zhangjin [Wed, 21 Oct 2009 14:51:46 +0000 (22:51 +0800)]
MIPS: Oprofile: Rename cpu_type from godson2 to loongson2

Unify the naming method between kernel and the user-space oprofile tool.
Because loongson is used instead of godson in most of the places, we agreed
to use loongson instead, which will simplify future maintenance.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Fix hang with high-frequency edge interrupts
Manuel Lauss [Wed, 14 Oct 2009 10:22:20 +0000 (12:22 +0200)]
MIPS: Alchemy: Fix hang with high-frequency edge interrupts

The handle_edge_irq() flowhandler disables edge int sources which occur
too fast (i.e. another edge comes in before the irq handler function
had a chance to finish).  Currently, the mask_ack() callback does not
ack the edges in hardware, leading to an endless loop in the flowhandler
where it tries to shut up the irq source.

When I rewrote the alchemy IRQ code  I wrongly assumed the mask_ack()
callback was only used by the level flowhandler, hence it omitted the
(at the time pointless) edge acks.  Turned out I was wrong; so here
is a complete mask_ack implementation for Alchemy IC, which fixes
the above mentioned problem.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: TXx9: Fix spi-baseclk value
Atsushi Nemoto [Thu, 3 Sep 2009 13:59:00 +0000 (22:59 +0900)]
MIPS: TXx9: Fix spi-baseclk value

TXx9 SPI bit rate is calculated by:
fBR = fSPI / 2 / (n + 1)
(fSPI is SPI master clock freq, i.e. imbusclk freq.)
So use imbus_clk / 2 as a spi-baseclk.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: bcm63xx: Set the correct BCM3302 CPU name
Florian Fainelli [Wed, 14 Oct 2009 07:56:00 +0000 (09:56 +0200)]
MIPS: bcm63xx: Set the correct BCM3302 CPU name

For consistency with other BCM63xx SoC set the CPU name to "Broadcom
BCM6338" when actually running on that system.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson 2: Set cpu_has_dc_aliases and cpu_icache_snoops_remote_store
Zhang Le [Fri, 19 Jun 2009 10:01:39 +0000 (18:01 +0800)]
MIPS: Loongson 2: Set cpu_has_dc_aliases and cpu_icache_snoops_remote_store

Loongson 2 does not have dcache aliases when is using 16k pages. and the

And because Loongson 2 doesn't do SMP , cpu_icache_snoops_remote_store does
not matter here.

Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Avoid potential hazard on Context register
Ralf Baechle [Tue, 13 Oct 2009 21:23:28 +0000 (23:23 +0200)]
MIPS: Avoid potential hazard on Context register

set_saved_sp reads Context register. Avoid reading stale value from
earlier incomplete write.

Issue found and fixed for head.S by Chris Dearman <chris@mips.com>.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Use lockless interrupt controller operations when possible.
David Daney [Tue, 13 Oct 2009 18:26:03 +0000 (11:26 -0700)]
MIPS: Octeon: Use lockless interrupt controller operations when possible.

Some newer Octeon chips have registers that allow lockless operation of
the interrupt controller.  Take advantage of them.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Use write_{un,}lock_irq{restore,save} to set irq affinity
David Daney [Tue, 13 Oct 2009 15:52:28 +0000 (08:52 -0700)]
MIPS: Octeon: Use write_{un,}lock_irq{restore,save} to set irq affinity

Since the locks are used from interrupt context we need the
irqsave/irqrestore versions of the locking functions.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Set S-cache linesize to 64-bytes for MTI's S-cache
Ralf Baechle [Tue, 13 Oct 2009 14:54:01 +0000 (16:54 +0200)]
MIPS: Set S-cache linesize to 64-bytes for MTI's S-cache

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMTC: Avoid queing multiple reschedule IPIs
Jaidev Patwardhan [Fri, 10 Jul 2009 09:06:00 +0000 (02:06 -0700)]
MIPS: SMTC: Avoid queing multiple reschedule IPIs

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: GCMP: Avoid accessing registers when they are not present
Jaidev Patwardhan [Fri, 10 Jul 2009 08:54:25 +0000 (01:54 -0700)]
MIPS: GCMP: Avoid accessing registers when they are not present

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: GIC: Random fixes and enhancements.
Chris Dearman [Fri, 10 Jul 2009 08:54:09 +0000 (01:54 -0700)]
MIPS: GIC: Random fixes and enhancements.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start
Chris Dearman [Fri, 10 Jul 2009 09:06:38 +0000 (02:06 -0700)]
MIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start

Signed-off-by: Chris Dearman (chris@mips.com)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix abs.[sd] and neg.[sd] emulation for NaN operands
Nigel Stephens [Mon, 12 Oct 2009 21:57:18 +0000 (14:57 -0700)]
MIPS: Fix abs.[sd] and neg.[sd] emulation for NaN operands

This patch ensures that the sign bit is always updated for NaN operands.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SPRAM: Clean up support code a little
Chris Dearman [Fri, 10 Jul 2009 08:51:27 +0000 (01:51 -0700)]
MIPS: SPRAM: Clean up support code a little

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: 1004K: Enable SPRAM support.
Ralf Baechle [Mon, 12 Oct 2009 21:20:20 +0000 (23:20 +0200)]
MIPS: 1004K: Enable SPRAM support.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Malta: Enable PCI 2.1 compatibility in PIIX4
Ralf Baechle [Mon, 12 Oct 2009 20:54:47 +0000 (22:54 +0200)]
MIPS: Malta: Enable PCI 2.1 compatibility in PIIX4

Based on original patch by Chris Dearman <chris@mips.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Kconfig: Fix duplicate default value for MIPS_L1_CACHE_SHIFT.
Ralf Baechle [Mon, 12 Oct 2009 20:30:06 +0000 (22:30 +0200)]
MIPS: Kconfig: Fix duplicate default value for MIPS_L1_CACHE_SHIFT.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MTI: Fix accesses to device registers on MIPS boards
Chris Dearman [Fri, 10 Jul 2009 08:53:54 +0000 (01:53 -0700)]
MIPS: MTI: Fix accesses to device registers on MIPS boards

This fixes the remaining problems introduced by
f197465384bf7ef1af184c2ed1a4e268911a91e3 (incorrect access length &
byteswapping in bigendian mode)

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix machine check exception in kmap_coherent()
Kevin Cernekee [Mon, 7 Sep 2009 18:11:31 +0000 (11:11 -0700)]
MIPS: Fix machine check exception in kmap_coherent()

On an SMP system with cache aliases, the following sequence of events may
happen:

1) copy_user_highpage() runs on CPU0, invoking kmap_coherent() to create a
   temporary mapping in the fixmap region
2) copy_page() starts on CPU0
3) CPU1 sends CPU0 an IPI asking CPU0 to run local_r4k_flush_cache_page()
4) CPU0 takes the interrupt, interrupting copy_page()
5) local_r4k_flush_cache_page() on CPU0 calls kmap_coherent() again
6) The second invocation of kmap_coherent() on CPU0 tries to use the
   same fixmap virtual address that was being used by copy_user_highpage()
7) CPU0 throws a machine check exception for the TLB address conflict

Fixed by creating an extra set of fixmap entries for use in interrupt
handlers.  This prevents fixmap VA conflicts between copy_user_highpage()
running in user context, and local_r4k_flush_cache_page() invoked from an
SMP IPI.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MTX-1: Fix build if CONFIG_PCI is disabled.
Ralf Baechle [Mon, 12 Oct 2009 00:23:48 +0000 (02:23 +0200)]
MIPS: MTX-1: Fix build if CONFIG_PCI is disabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: AR7: register watchdog device only if enabled in hw configuration
Florian Fainelli [Tue, 4 Aug 2009 21:09:36 +0000 (23:09 +0200)]
MIPS: AR7: register watchdog device only if enabled in hw configuration

This patch checks if the watchdog enable bit is set in the DCL register
meaning that the hardware watchdog actually works and if so, register the
ar7_wdt platform_device.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Prepare for watchdog support
Florian Fainelli [Mon, 10 Aug 2009 19:42:59 +0000 (21:42 +0200)]
MIPS: BCM63xx: Prepare for watchdog support

This patch prepares the board code to register a bcm63xx_wdt
platform_device that we are going to use in a subsequent patch.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Make bcm63xx_uart_register an initfunc
Florian Fainelli [Mon, 10 Aug 2009 19:42:54 +0000 (21:42 +0200)]
MIPS: BCM63xx: Make bcm63xx_uart_register an initfunc

This patch removes the calls to bcm63xx_uart_register in board_bcm963xx.c
and make bcm63xx_uart_register an initfunc.  Allows us to remove
bcm63xx_dev_uart.h which was there to make checkpatch.pl happy.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: AU1000: Fix build failure for db1x00 configured for Au1100 SoC
Florian Fainelli [Sun, 16 Aug 2009 22:28:24 +0000 (00:28 +0200)]
MIPS: AU1000: Fix build failure for db1x00 configured for Au1100 SoC

This patch fixes the following warning, which becomes an error due to
-Werror to be turned on:
  CC      arch/mips/alchemy/common/gpiolib-au1000.o
cc1: warnings being treated as errors
arch/mips/alchemy/common/gpiolib-au1000.c: In function 'au1100_gpio2_to_irq':
/home/florian/dev/kernel/linux-queue/arch/mips/include/asm/mach-au1x00/gpio-au1000.h:107: warning: control reaches end of non-void function

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Fix soft-reset lockup on BCM6345
Florian Fainelli [Mon, 31 Aug 2009 18:27:39 +0000 (20:27 +0200)]
MIPS: BCM63xx: Fix soft-reset lockup on BCM6345

This patch fixes a lockup on BCM6345 where setting the PLL soft reset bit
will also lock the other blocks including UART.  Instead of setting only
the PLL soft reset bit in the software reset register, set this bit but do
not touch the others.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: TXx9: Fix error handling / Fix for noenexisting gpio_remove.
Ralf Roesch [Wed, 16 Sep 2009 06:01:20 +0000 (08:01 +0200)]
MIPS: TXx9: Fix error handling / Fix for noenexisting gpio_remove.

Error was introduced by commit 0385d1f3d394c6814be0b165c153fc3fc254469a.

Signed-off-by: Ralf Roesch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Add IRQF_TIMER flag for timer interrupts
Wu Zhangjin [Sat, 10 Oct 2009 15:26:35 +0000 (23:26 +0800)]
MIPS: Add IRQF_TIMER flag for timer interrupts

As the commit 3ee4c147 shows, we need to "Add IRQF_TIMER flag for timer
interrupts", Atsushi Nemoto have reported that some other timer interrupts
should be considered, Here it is.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: 64-bit: Fix o32 lookup_dcookie syscall
Wu Zhangjin [Sat, 10 Oct 2009 11:19:49 +0000 (19:19 +0800)]
MIPS: 64-bit: Fix o32 lookup_dcookie syscall

An o32 aplication passes a 64-bit value in a pair of registers; a 64-bit
kernel expects a 64-bit argument in a single register.

Signed-off-by: Chen Jie <chenj@lemote.com>
Signed-off-by: Hu Hongbing <huhb@lemote.com>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: VPE: Remove stray unlock_kernel.
Ralf Baechle [Thu, 8 Oct 2009 20:16:47 +0000 (22:16 +0200)]
MIPS: VPE: Remove stray unlock_kernel.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Josip Rodin <joy@entuzijast.net>
14 years agoMIPS: Add IRQF_TIMER flag for timer interrupts
Wu Zhangjin [Thu, 8 Oct 2009 13:17:54 +0000 (21:17 +0800)]
MIPS: Add IRQF_TIMER flag for timer interrupts

Along the lines of d6c585a4342a2ff627a29f9aea77c5ed4cd76023, add IRQF_TIMER
flag for all timer interrupts  This ensures that timer interrupts won't be
disabled on suspend and not threaded for PREEMPT_RT.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson: Remove redundant local_irq_disable()
Wu Zhangjin [Thu, 8 Oct 2009 12:39:50 +0000 (20:39 +0800)]
MIPS: Loongson: Remove redundant local_irq_disable()

That code is executed with irq disabled already, so, remove the redundant
local_irq_disable() here.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: IP27: Fix build
Ralf Baechle [Wed, 7 Oct 2009 20:11:08 +0000 (22:11 +0200)]
MIPS: IP27: Fix build

Broken by 182a85f8a119c789610a9d464f4129ded9f3c107.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Cleanup CONFIG_DEBUG_STACK_USAGE version of alloc_thread_info.
Ralf Baechle [Tue, 6 Oct 2009 23:59:20 +0000 (01:59 +0200)]
MIPS: Cleanup CONFIG_DEBUG_STACK_USAGE version of alloc_thread_info.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/smp.c
David Daney [Thu, 1 Oct 2009 23:47:38 +0000 (16:47 -0700)]
MIPS: Octeon: Fix compile error in arch/mips/cavium-octeon/smp.c

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Don't write ones to reserved entryhi bits.
Ralf Baechle [Wed, 27 May 2009 16:29:37 +0000 (17:29 +0100)]
MIPS: Don't write ones to reserved entryhi bits.

We've silently been relying on the hardware chopping off excess, reserved
ASID bits for no better reason that it saving an instruction.  Because we
already have:

#define cpu_asid(cpu, mm)       (cpu_context((cpu), (mm)) & ASID_MASK)

in <asm/mmu_context.h>.

We can use a cleanup to avoid writing non-zero bits into the reserved
entryhi bits.  This avoid triggering some debugging assertion in the
Cavium simulator.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Extend COMMAND_LINE_SIZE
Ralf Baechle [Mon, 2 Nov 2009 11:00:01 +0000 (12:00 +0100)]
MIPS: Extend COMMAND_LINE_SIZE

Some firmware may pass well over 256 bytes these days.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
Dominik Brodowski [Sat, 24 Oct 2009 19:43:03 +0000 (21:43 +0200)]
ALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)

Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.

Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
Daniel T Chen [Sun, 1 Nov 2009 23:32:29 +0000 (18:32 -0500)]
ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268

BugLink: https://bugs.launchpad.net/bugs/368629
We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoARM: 5774/1: Fix Realview ARM1176PB board reboot
Philby John [Wed, 28 Oct 2009 18:09:12 +0000 (19:09 +0100)]
ARM: 5774/1: Fix Realview ARM1176PB board reboot

This is the fix for proper reboot of Realview ARM1176PB board
when issuing the reboot command. Setting the eighth bit of
control register SYS_RESETCTL to 1 to force a soft reset.
arch_reset() is modified for realview machines to call machine
specific reset function pointers.

Signed-off-by: Philby John <pjohn@in.mvista.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:16:20 +0000 (12:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: fix wireless drivers depends
  Staging: wireless drivers Kconfig change
  Staging: android: mark subsystem as broken
  Staging: remove stlc45xx driver
  Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload
  Staging: vt6656: fix the memory free bug in vntwusb_disconnect()
  Staging: Panel: prevent driver from calling misc_deregister twice on same ressource
  Staging: hv: fix oops in vmbus - missing #include
  Staging: hv: fix oops in vmbus - netvsc list_head
  Staging: hv: fix oops in vmbus - udev events
  Staging: hv: Fix vmbus load hang caused by faulty data packing
  Staging: hv: Fix null pointer error after vmbus loading
  Staging: hv TODO patches

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:16:09 +0000 (12:16 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fsl_udc_core: Fix kernel oops on module removal
  USB: option: TLAYTECH TUE800 support
  USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
  USB: serial: sierra driver autopm fixes
  USB: serial: sierra driver send_setup() autopm fix
  USB: rndis_host: debug info clobbered before it is logged

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:15:58 +0000 (12:15 -0700)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty: Mark generic_serial users as BROKEN

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:15:28 +0000 (12:15 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Documentation: ABI: /sys/devices/system/cpu/cpu#/node
  Documentation: ABI: /sys/devices/system/cpu/cpuidle/
  Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings
  Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
  Documentation: ABI: /sys/devices/system/cpu/ topology files
  Documentation: ABI: document /sys/devices/system/cpu/
  Documentation: ABI: rename sysfs-devices-cache_disable properly
  Driver core: allow certain drivers prohibit bind/unbind via sysfs
  Driver core: fix driver_register() return value

14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sat, 31 Oct 2009 19:14:56 +0000 (12:14 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] smp: fix sigp sense handling
  [S390] smp: fix sigp stop handling
  [S390] cputime: fix overflow on 31 bit systems
  [S390] call home: fix string length handling
  [S390] call home: fix error handling in init function
  [S390] smp: fix prefix handling of offlined cpus
  [S390] s/r: cmm resume fix
  [S390] call home: fix local buffer usage in proc handler

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs
Linus Torvalds [Sat, 31 Oct 2009 19:12:49 +0000 (12:12 -0700)]
Merge branch 'for-linus' of git://git./fs/xfs/xfs

* 'for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs:
  xfs: fix xfs_quota remove error
  xfs: free temporary cursor in xfs_dialloc

14 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Sat, 31 Oct 2009 19:12:19 +0000 (12:12 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  async_tx: fix asynchronous raid6 recovery for ddf layouts
  async_pq: rename scribble page
  async_pq: kill a stray dma_map() call and other cleanups
  md/raid6: kill a gcc-4.0.1 'uninitialized variable' warning
  raid6/async_tx: handle holes in block list in async_syndrome_val
  md/async: don't pass a memory pointer as a page pointer.
  md: Fix handling of raid5 array which is being reshaped to fewer devices.
  md: fix problems with RAID6 calculations for DDF.
  md/raid456: downlevel multicore operations to raid_run_ops
  md: drivers/md/unroll.pl replaced with awk analog
  md: remove clumsy usage of do_sync_mapping_range from bitmap code
  md: raid1/raid10: handle allocation errors during array setup.
  md/raid5: initialize conf->device_lock earlier
  md/raid1/raid10: add a cond_resched
  Revert "md: do not progress the resync process if the stripe was blocked"

14 years agodpt_i2o: Fix typo of EINVAL
OGAWA Hirofumi [Fri, 30 Oct 2009 08:02:31 +0000 (17:02 +0900)]
dpt_i2o: Fix typo of EINVAL

Commit ef7562b7f28319e6dd1f85dc1af87df2a7a84832 ("dpt_i2o: Fix up
copy*user") had a silly typo: EINVAL should be -EINVAL.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: stable@kernel.org
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoNOMMU: Don't pass NULL pointers to fput() in do_mmap_pgoff()
David Howells [Fri, 30 Oct 2009 13:13:26 +0000 (13:13 +0000)]
NOMMU: Don't pass NULL pointers to fput() in do_mmap_pgoff()

Don't pass NULL pointers to fput() in the error handling paths of the NOMMU
do_mmap_pgoff() as it can't handle it.

The following can be used as a test program:

int main() { static long long a[1024 * 1024 * 20] = { 0 }; return a;}

Without the patch, the code oopses in atomic_long_dec_and_test() as called by
fput() after the kernel complains that it can't allocate that big a chunk of
memory.  With the patch, the kernel just complains about the allocation size
and then the program segfaults during execve() as execve() can't complete the
allocation of all the new ELF program segments.

Reported-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/cpu#/node
Alex Chiang [Thu, 22 Oct 2009 04:15:30 +0000 (22:15 -0600)]
Documentation: ABI: /sys/devices/system/cpu/cpu#/node

Describe NUMA node symlink created for CPUs when CONFIG_NUMA is set.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/cpuidle/
Alex Chiang [Thu, 22 Oct 2009 03:45:41 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/cpuidle/

Document cpuidle sysfs attributes by reading code, Documentation/cpuidle/,
and git logs.

Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings
Alex Chiang [Thu, 22 Oct 2009 03:45:36 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/sched_[mc|smt]_power_savings

Document sched_[mc|smt]_power_savings by reading existing code and
git logs.

Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
Alex Chiang [Thu, 22 Oct 2009 03:45:31 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files

Add brief descriptions for the following sysfs files:

/sys/devices/system/cpu/cpu#/topology/core_id
/sys/devices/system/cpu/cpu#/topology/core_siblings
/sys/devices/system/cpu/cpu#/topology/core_siblings_list
/sys/devices/system/cpu/cpu#/topology/physical_package_id
/sys/devices/system/cpu/cpu#/topology/thread_siblings
/sys/devices/system/cpu/cpu#/topology/thread_siblings_list

The descriptions in Documentation/cputopology.txt weren't very
informative, so I attempted a better description based on code
reading and hopeful guessing.

Updated Documentation/cputopology.txt with the better descriptions and
fixed some style issues.

Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: /sys/devices/system/cpu/ topology files
Alex Chiang [Thu, 22 Oct 2009 03:45:25 +0000 (21:45 -0600)]
Documentation: ABI: /sys/devices/system/cpu/ topology files

Add brief descriptions for the following sysfs files:

/sys/devices/system/cpu/kernel_max
/sys/devices/system/cpu/offline
/sys/devices/system/cpu/online
/sys/devices/system/cpu/possible
/sys/devices/system/cpu/present

Excerpted the relevant information from Documentation/cputopology.txt
and pointed back to cputopology.txt as the authoritative source of
information.

Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: document /sys/devices/system/cpu/
Alex Chiang [Thu, 22 Oct 2009 03:45:20 +0000 (21:45 -0600)]
Documentation: ABI: document /sys/devices/system/cpu/

This interface has been around for a long time, but hasn't been
officially documented.

Document the top level sysfs directory for CPU attributes.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDocumentation: ABI: rename sysfs-devices-cache_disable properly
Alex Chiang [Thu, 22 Oct 2009 03:45:15 +0000 (21:45 -0600)]
Documentation: ABI: rename sysfs-devices-cache_disable properly

Rename sysfs-devices-cache_disable to sysfs-devices-system-cpu, in
order to keep a stricter correlation between a sysfs directory and
its documentation.

Reported-by: David Rientjes <rientjes@google.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver core: allow certain drivers prohibit bind/unbind via sysfs
Dmitry Torokhov [Tue, 13 Oct 2009 03:17:41 +0000 (20:17 -0700)]
Driver core: allow certain drivers prohibit bind/unbind via sysfs

Platform drivers registered via platform_driver_probe() can be bound
to devices only once, upon registration, because discard their probe()
routines to save memory. Unbinding the driver through sysfs 'unbind'
leaves the device stranded and confuses users so let's not create
bind and unbind attributes for such drivers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoDriver core: fix driver_register() return value
Stas Sergeev [Sat, 17 Oct 2009 20:31:38 +0000 (00:31 +0400)]
Driver core: fix driver_register() return value

In this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=16dc42e018c2868211b4928f20a957c0c216126c
the check was added for another driver to already claim the same device
on the same bus. But the returned error code was wrong: to modprobe, the
-EEXIST means that _this_ driver is already installed. It therefore
doesn't produce the needed error message when _another_ driver is trying
to register for the same device.  Returning -EBUSY fixes the problem.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fsl_udc_core: Fix kernel oops on module removal
Anton Vorontsov [Thu, 29 Oct 2009 16:50:43 +0000 (19:50 +0300)]
USB: fsl_udc_core: Fix kernel oops on module removal

fsl_udc_release() calls dma_free_coherent() with an inappropriate
device passed to it, and since the device has no dma_ops, the following
oops pops up:

  Kernel BUG at d103ce9c [verbose debug info unavailable]
  Oops: Exception in kernel mode, sig: 5 [#1]
  ...
  NIP [d103ce9c] fsl_udc_release+0x50/0x80 [fsl_usb2_udc]
  LR [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  Call Trace:
  [cfbc7dc0] [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  [cfbc7dd0] [c01a35c4] device_release+0x2c/0x90
  [cfbc7de0] [c016b480] kobject_cleanup+0x58/0x98
  [cfbc7e00] [c016c52c] kref_put+0x54/0x6c
  [cfbc7e10] [c016b360] kobject_put+0x34/0x64
  [cfbc7e20] [c01a1d0c] put_device+0x1c/0x2c
  [cfbc7e30] [d103dbfc] fsl_udc_remove+0xc0/0x1e4 [fsl_usb2_udc]
  ...

This patch fixes the issue by passing dev->parent, which points to
a correct device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Li Yang <leoli@freescale.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: TLAYTECH TUE800 support
Bryan Wu [Thu, 22 Oct 2009 07:00:36 +0000 (15:00 +0800)]
USB: option: TLAYTECH TUE800 support

Add ID for Tlaytech TUE800 CDMA modem to the option driver.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-By: Matthias Urlichs <matthias@urlichs.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set
Yoshihiro Shimoda [Wed, 21 Oct 2009 11:33:39 +0000 (20:33 +0900)]
USB: r8a66597-hcd: fix cannot detect a device when uses_new_polling is set

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver autopm fixes
Elina Pasheva [Tue, 27 Oct 2009 20:49:59 +0000 (13:49 -0700)]
USB: serial: sierra driver autopm fixes

This patch presents fixes for the autosuspend feature implementation in
sierra usb serial driver in  functions sierra_open(), sierra_close() and
stop_read_write_urbs().

The patch "sierra_close() must resume the device before it notifies it
of a closure" submitted by Oliver Neukum on Wed, October 14 has been
merged as fix in sierra_close() function.

The bug fix  in sierra_open() function restores the autopm interface
state on error condition.

The bug fix in in stop_read_write_urbs() function assures that both
receive and interrupt urbs are recycled.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver send_setup() autopm fix
Elina Pasheva [Fri, 16 Oct 2009 19:04:54 +0000 (12:04 -0700)]
USB: serial: sierra driver send_setup() autopm fix

This patch presents a fix for the autosuspend feature implementation in
sierra usb serial driver for function sierra_send_setup().  Because it
is possible to call sierra_send_setup() before sierra_open() or after
sierra_close() we added a get/put interface activity to assure that the
usb control can happen even when the device is autosuspended.

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Tested-by: Matthew Safar <msafar@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: rndis_host: debug info clobbered before it is logged
George Nassar [Wed, 14 Oct 2009 23:27:41 +0000 (18:27 -0500)]
USB: rndis_host: debug info clobbered before it is logged

The MTU throttle-down if a RNDIS device doesn't support a particular
packet size is being incorrectly logged.  The attempted packet size is
being clobbered before it gets logged.

First patch; please inform if I'm doing this incorrectly.  Diff'd
against latest official source as per the FAQ; forward port to current
git version is straightforward.

Signed-off-by: George Nassar <george.nassar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: fix wireless drivers depends
Randy Dunlap [Thu, 29 Oct 2009 16:52:02 +0000 (09:52 -0700)]
Staging: fix wireless drivers depends

These drivers can (erroneously) be enabled even when
CONFIG_NET=n, CONFIG_NETDEVICES=n, CONFIG_WLAN=n, etc.
Stop this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: wireless drivers Kconfig change
Greg Kroah-Hartman [Tue, 27 Oct 2009 22:46:18 +0000 (15:46 -0700)]
Staging: wireless drivers Kconfig change

Change the wireless drivers to depend on CONFIG_WLAN instead of
CONFIG_WLAN_80211 which is going away soon.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: android: mark subsystem as broken
Greg Kroah-Hartman [Mon, 26 Oct 2009 23:03:51 +0000 (16:03 -0700)]
Staging: android: mark subsystem as broken

It's causing lots of build errors, so just mark it as broken.  It is
scheduled to be removed in 2.6.33 anyway.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove stlc45xx driver
Greg Kroah-Hartman [Mon, 26 Oct 2009 23:35:32 +0000 (16:35 -0700)]
Staging: remove stlc45xx driver

It's no longer needed as the p54spi driver is the same thing,
under a different name and in the correct portion of the kernel tree.

Cc: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8187se/rtl8192e/rtl8192su: allow module unload
Herton Ronaldo Krzesinski [Fri, 2 Oct 2009 14:03:38 +0000 (11:03 -0300)]
Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload

On rtl81* additions, they had its wireless stack made builtin instead of
separated modules. But try_module_get/module_put in stack were kept,
they are uneeded with the stack builtin and makes rtl81* modules
impossible to remove on a system with an rtl81* card. request_module
calls are also uneeded with stack builtin, so remove them too.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: vt6656: fix the memory free bug in vntwusb_disconnect()
miaofng [Tue, 29 Sep 2009 07:02:53 +0000 (15:02 +0800)]
Staging: vt6656: fix the memory free bug in vntwusb_disconnect()

This patch is used to solve the memory bug when people plug out the wusb card then plug in.
Error logs are following:

root@smdk2440:~# ifdown eth1
AP deauthed me, reason=2.
Config_FileOperation file Not exist
Zone=[1][J][P]!!
WPA: Terminating
root@smdk2440:~#  ----> !!!!!!!!!!!!!!here plug out the wusbcard
usb 1-1: USB disconnect, address 4
----> !!!!!!!!!!!!!!!!!!!here plug in the wusb card
usb 1-1: new full speed USB device using s3c2410-ohci and address 5
usb 1-1: New USB device found, idVendor=160a, idProduct=3184
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: VNT USB-802.11 Wireless LAN Adapter
usb 1-1: Manufacturer: VIA Networking Technologies, Inc.
usb 1-1: configuration #1 chosen from 1 choice
VIA Networking Wireless LAN USB Driver Ver. 1.19_12
Copyright (c) 2004 VIA Networking Technologies, Inc.
kernel BUG at mm/slab.c:2974!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
Modules linked in: vt6656_stage
CPU: 0    Not tainted  (2.6.32-rc2 #14)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<c002fb10>]    lr : [<c002fb0c>]    psr: 40000093
sp : c3867c68  ip : c3867bd0  fp : c3866000
r10: c3800600  r9 : c3802430  r8 : 00000004
r7 : c3802428  r6 : c3802660  r5 : c3802420  r4 : a0000013
r3 : 00000000  r2 : c3866000  r1 : 00000003  r0 : 00000024
Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0000717f  Table: 330a8000  DAC: 00000017
Process khubd (pid: 152, stack limit = 0xc3866270)
Stack: (0xc3867c68 to 0xc3868000)
7c60:                   c0093fdc c0094088 000000d0 000000d0 00000000 000080d0
7c80: 00000000 a0000013 c39ebec0 c3800600 000080d0 00000001 c03f13cc 00000006
7ca0: c02b36f0 c0094574 c0043428 0001c9de c39ebec0 c39ebea0 c3000c00 c02a6a84
7cc0: 89705f41 c3000c00 c39ebec0 c39ebea0 c3000c00 bf036f24 c39ebec8 00000006
7ce0: 00000000 c3000c00 c39ebec0 c39ebea0 c3000c00 bf036f24 c39ebec8 00000006
7d00: 00000000 bf003398 c00aa514 c3867d20 0000a1ff c00e1448 c39d9f84 c39aabe8
7d20: c3867d50 c00e1888 c39aabe8 c39ebea0 c39ebec0 bf036ebc c3000c00 bf036f24
7d40: 0000bec8 01000000 00000000 c39ebea0 c39ebec0 bf036ebc c3000c00 bf036f24
7d60: c39ebec8 00000000 00000000 c0223798 c39ebec0 c01daa14 bf036eec c3867da0
7d80: c045a4f8 c01da6e4 c39ebec0 00000000 c01daa14 c39ebec0 c3867da0 c01d9870
7da0: c38331a8 c39fcb94 c005b3b4 c39ebec0 c39ebec0 c39ebef4 00000000 c01da890
7dc0: c39ebec0 c39ebec0 c3000c00 c01d97f4 00000000 c01d8470 c39ebea0 c3000c68
7de0: 00000000 c3000c68 c3218a00 c3abcd20 00000001 c39ebec0 c39ebea0 c3000c00
7e00: 00000000 c3000c68 c3218a00 c3abcd20 00000001 c0221ee8 00000001 00000000
7e20: 00000000 00000000 00001388 00000000 c3000c04 c3000c68 c3bc29c0 00000001
7e40: c3bc29c4 00000001 c03f4af8 00000000 c39fe780 c3000c00 00000001 c045ab04
7e60: c3867eb8 c045a3bc c3000c70 00000000 00000000 c0229238 c3000c68 c0223210
7e80: c3000c00 c045aaf0 c045ab04 c0223230 c3000c68 c01daa14 c045ab04 c01da6e4
7ea0: c3000c68 00000000 c01daa14 c3000c68 c3867eb8 c01d9870 c38331a8 c3862f54
7ec0: c005b3b4 c3000c68 c3000c68 c3000c9c 00000002 c01da890 c3867ef9 c3000c68
7ee0: c3829f60 c01d97f4 00000000 c01d8470 c38918e0 c3aaf468 39383102 c300343a
7f00: 00000001 c0219660 c03f1768 c3000c00 00000000 c3000c68 00000002 c3aaf814
7f20: 00000001 00000101 c38918e0 c021b6e0 00000002 00000000 00000000 c3000c00
7f40: c38917c0 c021c418 00000064 00000064 00000101 c3867f60 c005b920 c3867f94
7f60: c3891830 c3aaf400 c3866000 c3aaf400 c3aaf800 00000000 c38918e0 c3aaf400
7f80: 00000012 00000000 00000000 c3837920 c00574a0 c3867f94 c3867f94 00000101
7fa0: 01010001 c3867fd4 c381bf48 c3867fd4 c381bf48 00000000 c021ba3c 00000000
7fc0: 00000000 00000000 00000000 c00573dc 00000000 00000000 c3867fd8 c3867fd8
7fe0: 00000000 00000000 00000000 00000000 00000000 c002ce88 00000000 ffff0000
[<c002fb10>] (__bug+0x1c/0x28) from [<c0094088>] (cache_alloc_refill+0x13c/0x594)
[<c0094088>] (cache_alloc_refill+0x13c/0x594) from [<c0094574>] (__kmalloc+0x94/0xd0)
[<c0094574>] (__kmalloc+0x94/0xd0) from [<c02a6a84>] (alloc_netdev_mq+0x48/0x1b0)
[<c02a6a84>] (alloc_netdev_mq+0x48/0x1b0) from [<bf003398>] (vntwusb_found1+0x58/0x53c [vt6656_stage])
[<bf003398>] (vntwusb_found1+0x58/0x53c [vt6656_stage]) from [<c0223798>] (usb_probe_interface+0x130/0x180)
[<c0223798>] (usb_probe_interface+0x130/0x180) from [<c01da6e4>] (driver_probe_device+0xac/0x164)
[<c01da6e4>] (driver_probe_device+0xac/0x164) from [<c01d9870>] (bus_for_each_drv+0x50/0x90)
[<c01d9870>] (bus_for_each_drv+0x50/0x90) from [<c01da890>] (device_attach+0x50/0x68)
[<c01da890>] (device_attach+0x50/0x68) from [<c01d97f4>] (bus_probe_device+0x28/0x54)
[<c01d97f4>] (bus_probe_device+0x28/0x54) from [<c01d8470>] (device_add+0x3b4/0x4f0)
[<c01d8470>] (device_add+0x3b4/0x4f0) from [<c0221ee8>] (usb_set_configuration+0x524/0x5b8)
[<c0221ee8>] (usb_set_configuration+0x524/0x5b8) from [<c0229238>] (generic_probe+0x5c/0xa0)
[<c0229238>] (generic_probe+0x5c/0xa0) from [<c0223230>] (usb_probe_device+0x48/0x54)
[<c0223230>] (usb_probe_device+0x48/0x54) from [<c01da6e4>] (driver_probe_device+0xac/0x164)
[<c01da6e4>] (driver_probe_device+0xac/0x164) from [<c01d9870>] (bus_for_each_drv+0x50/0x90)
[<c01d9870>] (bus_for_each_drv+0x50/0x90) from [<c01da890>] (device_attach+0x50/0x68)
[<c01da890>] (device_attach+0x50/0x68) from [<c01d97f4>] (bus_probe_device+0x28/0x54)
[<c01d97f4>] (bus_probe_device+0x28/0x54) from [<c01d8470>] (device_add+0x3b4/0x4f0)
[<c01d8470>] (device_add+0x3b4/0x4f0) from [<c021b6e0>] (usb_new_device+0x100/0x174)
[<c021b6e0>] (usb_new_device+0x100/0x174) from [<c021c418>] (hub_thread+0x9dc/0xeec)
[<c021c418>] (hub_thread+0x9dc/0xeec) from [<c00573dc>] (kthread+0x78/0x80)
[<c00573dc>] (kthread+0x78/0x80) from [<c002ce88>] (kernel_thread_exit+0x0/0x8)
Code: e1a01000 e59f000c eb005014 e3a03000 (e5833000)
---[ end trace 2a51e0dbab9e4fbe ]---
note: khubd[152] exited with preempt_count 1

Signed-off-by: miaofng <miaofng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: Panel: prevent driver from calling misc_deregister twice on same ressource
Peter Huewe [Mon, 28 Sep 2009 23:22:40 +0000 (01:22 +0200)]
Staging: Panel: prevent driver from calling misc_deregister twice on same ressource

This patch prevents the driver from calling misc_deregister twice on the same
ressouce when unloading the driver.
Unloading the driver without this patch results in a Kernel BUG like this:
Panel driver version 0.9.5 registered on parport0 (io=0x378).
BUG: unable to handle kernel paging request at 0000000000100108
IP: [<ffffffff803c02ee>] misc_deregister+0x2d/0x90
PGD 6caff067 PUD 762b7067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
last sysfs file: /sys/devices/platform/w83627hf.656/in8_input
...

This patch fixes this issue, although maybe not in the best way possible :)

linux version v2.6.32-rc1 - linus git tree, Di 29. Sep 01:10:18 CEST 2009

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>