platform/kernel/kernel-mfld-blackbay.git
15 years agox86: more than 8 32-bit CPUs requires X86_BIGSMP
Michael K. Johnson [Wed, 22 Apr 2009 01:44:48 +0000 (21:44 -0400)]
x86: more than 8 32-bit CPUs requires X86_BIGSMP

$ cat x86-more-than-8-cpus-requires-bigsmp.patch

Enforce NR_CPUS <= 8 limitation if X86_BIGSMP not set

Configuring more than 8 logical CPUs on 32-bit x86 requires
X86_BIGSMP to be set in order to boot successfully, if more than 8
logical CPUs are actually found at boot time.  The X86_BIGSMP help
text describes that it is required to be set if more than 8 CPUs
are configured, but this was previously not enforced.

This configuration error has affected multiple distributions:
    https://bugzilla.redhat.com/show_bug.cgi?id=480844
    https://issues.rpath.com/browse/RPL-3022

Signed-off-by: Michael K Johnson <johnsonm@rpath.com>
LKML-Reference: <20090422014448.GB32541@logo.rdu.rpath.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: avoid theoretical spurious NMI backtraces with CONFIG_CPUMASK_OFFSTACK=y
Rusty Russell [Tue, 21 Apr 2009 06:33:41 +0000 (16:03 +0930)]
x86: avoid theoretical spurious NMI backtraces with CONFIG_CPUMASK_OFFSTACK=y

In theory (though not shown in practice) alloc_cpumask_var() doesn't zero
memory, so CPUs might print an "NMI backtrace for cpu %d" once on boot.

(Bug introduced in fcef8576d8a64fc603e719c97d423f9f6d4e0e8b).

[ Impact: avoid theoretical syslog noise in rare configs ]

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <alpine.DEB.2.00.0904202113520.10097@gandalf.stny.rr.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix boot crash in NMI watchdog with CONFIG_CPUMASK_OFFSTACK=y and flat APIC
Rusty Russell [Tue, 21 Apr 2009 06:30:15 +0000 (16:00 +0930)]
x86: fix boot crash in NMI watchdog with CONFIG_CPUMASK_OFFSTACK=y and flat APIC

fcef8576d8a64fc603e719c97d423f9f6d4e0e8b converted backtrace_mask to a
cpumask_var_t, and assumed check_nmi_watchdog was called before
nmi_watchdog_tick was ever called.  Steven's oops shows I was wrong.

This is something of a bandaid: I'm not sure we *should* be calling
nmi_watchdog_tick before check_nmi_watchdog.  Note that gcc eliminates
this test for the CONFIG_CPUMASK_OFFSTACK=n case.

[ Impact: fix boot crash in rare configs ]

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <alpine.DEB.2.00.0904202113520.10097@gandalf.stny.rr.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86-64: fix FPU corruption with signals and preemption
Suresh Siddha [Thu, 9 Apr 2009 22:24:34 +0000 (15:24 -0700)]
x86-64: fix FPU corruption with signals and preemption

In 64bit signal delivery path, clear_used_math() was happening before saving
the current active FPU state on to the user stack for signal handling. Between
clear_used_math() and the state store on to the user stack, potentially we
can get a page fault for the user address and can block. Infact, while testing
we were hitting the might_fault() in __clear_user() which can do a schedule().

At a later point in time, we will schedule back into this process and
resume the save state (using "xsave/fxsave" instruction) which can lead
to DNA fault. And as used_math was cleared before, we will reinit the FP state
in the DNA fault and continue. This reinit will result in loosing the
FPU state of the process.

Move clear_used_math() to a point after the FPU state has been stored
onto the user stack.

This issue is present from a long time (even before the xsave changes
and the x86 merge). But it can easily be exposed in 2.6.28.x and 2.6.29.x
series because of the __clear_user() in this path, which has an explicit
__cond_resched() leading to a context switch with CONFIG_PREEMPT_VOLUNTARY.

[ Impact: fix FPU state corruption ]

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: <stable@kernel.org> [2.6.28.x, 2.6.29.x]
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
15 years agox86/uv: fix for no memory at paddr 0
Jack Steiner [Mon, 20 Apr 2009 13:25:31 +0000 (08:25 -0500)]
x86/uv: fix for no memory at paddr 0

Fix endcase where the memory at physical address 0 does not really
exist AND one of the sockets on blade 0 has no active cpus.

The memory that _appears_ to be at physical address 0 is actually
memory that located at a different address but has been remapped by
the chipset so that it appears to be at physical address 0.

When determining the UV pnode, the algorithm for determining the pnode
incorrectly used the relocated physical address instead of the actual
(global) address.

[ Impact: boot failure on partitioned systems ]

Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20090420132530.GA23156@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'linus' into x86/urgent
Ingo Molnar [Mon, 20 Apr 2009 16:08:07 +0000 (18:08 +0200)]
Merge branch 'linus' into x86/urgent

Merge reason: We need the x86/uv updates from upstream, to queue up
              dependent fix.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest-and-virtio
Linus Torvalds [Sun, 19 Apr 2009 17:58:20 +0000 (10:58 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-lguest-and-virtio

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest-and-virtio:
  lguest: document 32-bit and PAE requirements
  lguest: tell git to ignore Documentation/lguest/lguest
  virtio: fix suspend when using virtio_balloon
  lguest: fix guest crash on non-linear addresses in gdt pvops
  lguest: fix crash on vmlinux images

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 19 Apr 2009 17:57:38 +0000 (10:57 -0700)]
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 - Set function_id only on FG nodes
  ALSA: MAINTAINERS - Update SOUND
  ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0
  ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
  ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
  ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
  ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934
  ALSA: hda_intel.c - Consolidate bitfields

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Sun, 19 Apr 2009 17:54:06 +0000 (10:54 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: introduce subdir-ccflags-y
  kbuild: support include/generated

15 years agoRevert "console ASCII glyph 1:1 mapping"
Samuel Thibault [Sat, 18 Apr 2009 20:17:17 +0000 (22:17 +0200)]
Revert "console ASCII glyph 1:1 mapping"

This reverts commit 1c55f18717304100a5f624c923f7cb6511b4116d.

Ingo Brueckl was assuming that reverting to 1:1 mapping for chars >= 128
was not useful, but it happens to be: due to the limitations of the
Linux console, when a blind user wants to read BIG5 on it, he has no
other way than loading a font without SFM and let the 1:1 mapping permit
the screen reader to get the BIG5 encoding.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago<linux/seccomp.h> needs to include <linux/errno.h>.
Ralf Baechle [Sat, 18 Apr 2009 09:30:56 +0000 (11:30 +0200)]
<linux/seccomp.h> needs to include <linux/errno.h>.

<linux/seccomp.h> uses EINVAL so should include <linux/errno.h>.  This
fixes a build error on 64-bit MIPS if CONFIG_SECCOMP is disabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDon't set relatime when noatime is specified
Andi Kleen [Sun, 19 Apr 2009 16:40:43 +0000 (18:40 +0200)]
Don't set relatime when noatime is specified

Since commit 0a1c01c9477602ee8b44548a9405b2c1d587b5a2 ("Make relatime
default") when a file system is mounted explicitely with noatime it gets
both the MNT_RELATIME and MNT_NOATIME bits set.

This shows up like this in /proc/mounts:

  /dev/xxx /yyy ext3 rw,noatime,relatime,errors=continue,data=writeback 0 0

That looks strange.  The VFS uses noatime in this case, but both flags
are set.  So it's more a cosmetic issue, but still better to fix.

Cc: mjg@redhat.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolguest: document 32-bit and PAE requirements
Rusty Russell [Mon, 20 Apr 2009 05:14:02 +0000 (23:14 -0600)]
lguest: document 32-bit and PAE requirements

Robert noted that we don't actually document that lguest is 32-bit only,
nor that PAE must be off (CONFIG_PAE is now prompted for if HIGHMEM is
set to "off).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest@ozlabs.org
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
15 years agolguest: tell git to ignore Documentation/lguest/lguest
Matt Kraai [Fri, 17 Apr 2009 06:46:20 +0000 (23:46 -0700)]
lguest: tell git to ignore Documentation/lguest/lguest

This is the example lguest launcher binary.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 years agovirtio: fix suspend when using virtio_balloon
Marcelo Tosatti [Fri, 17 Apr 2009 00:14:04 +0000 (21:14 -0300)]
virtio: fix suspend when using virtio_balloon

Break out of wait_event_interruptible() if freezing has been requested,
in the vballoon thread. Without this change vballoon refuses to stop and
the system can't suspend.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
15 years agolguest: fix guest crash on non-linear addresses in gdt pvops
Rusty Russell [Mon, 20 Apr 2009 05:14:00 +0000 (23:14 -0600)]
lguest: fix guest crash on non-linear addresses in gdt pvops

Fixes guest crash 'lguest: bad read address 0x4800000 len 256'

The new per-cpu allocator ends up handing a non-linear address to
write_gdt_entry.  We do __pa() on it, and hand it to the host, which
kills us.

I've long wanted to make the hypercall "LOAD_GDT_ENTRY" to match the IDT
code, but had no pressing reason until now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: lguest@ozlabs.org
15 years agolguest: fix crash on vmlinux images
Matias Zabaljauregui [Wed, 8 Apr 2009 20:58:39 +0000 (17:58 -0300)]
lguest: fix crash on vmlinux images

Typical message: 'lguest: unhandled trap 6 at 0x418726 (0x0)'

vmlinux guests were broken by 4cd8b5e2a159f18a1507f1187b44a1acbfa6341b
'lguest: use KVM hypercalls', which rewrites guest text from kvm hypercalls
to trap 31.

The Launcher mmaps the kernel image.  The Guest executes and
immediately faults in the first text page (read-only).  Then it hits a
hypercall, and we rewrite that hypercall, causing a copy-on-write.
But the Guest pagetables still refer to the old page: we fault again,
but as Host we see the hypercall already rewritten, and pass the fault
back to the Guest.  The Guest hasn't set up an IDT yet, so we kill it.

This doesn't happen with bzImages: they unpack themselves and so the
text pages are already read-write.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Patrick McHardy <kaber@trash.net>
15 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:40:02 +0000 (11:40 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: MAINTAINERS - Update SOUND
  ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()

15 years agoMerge branch 'fix/intel8x0' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:39:57 +0000 (11:39 +0200)]
Merge branch 'fix/intel8x0' into for-linus

* fix/intel8x0:
  ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
  ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:39:46 +0000 (11:39 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Set function_id only on FG nodes
  ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
  ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
  ALSA: hda_intel.c - Consolidate bitfields

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sun, 19 Apr 2009 09:39:38 +0000 (11:39 +0200)]
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0

15 years agokbuild: introduce subdir-ccflags-y
Sam Ravnborg [Sun, 19 Apr 2009 09:04:26 +0000 (11:04 +0200)]
kbuild: introduce subdir-ccflags-y

Following patch introduce support for setting options
to gcc that has effect for current directory and all
subdirectories.

The typical use case are an architecture or a subsystem that
decide to cover all files with -Werror.
Today alpha, mips and sparc uses -Werror in almost all their
Makefile- with subdir-ccflag-y it is now simpler to do so
as only the top-level directories needs to be covered.

Likewise if we decide to cover a full subsystem such
as net/ with -Werror this is done by adding a single
line to net/Makefile.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
15 years agokbuild: support include/generated
Sam Ravnborg [Sat, 18 Apr 2009 21:51:08 +0000 (23:51 +0200)]
kbuild: support include/generated

We need a location for generated files.
Today they are spread over several places and bringing them
together to a common place makes it obvious hat is generated
and what isreal files.

Al Viro originally suggested: include/gen
Linus suggested to spell it out.

This patch implement support for

    include/generated

All files in include/generated are ignored by git.
include/generated is removed during "make mrproper".

With this we are ready to implement support for include/generated
in the various architctures and in the base kernel.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoRemove 'recurse into child resources' logic from 'reserve_region_with_split()'
Linus Torvalds [Sun, 19 Apr 2009 04:44:24 +0000 (21:44 -0700)]
Remove 'recurse into child resources' logic from 'reserve_region_with_split()'

This function is not actually used right now, since the original use
case for it was done with insert_resource_expand_to_fit() instead.

However, we now have another usage case that wants to basically do a
"reserve IO resource, splitting around existing resources", however that
one doesn't actually want the "recurse into the conflicting resource"
logic at all.

And since recursing into the conflicting resource was the most complex
part, and isn't wanted, just remove it.  Maybe we'll some day want both
versions, but we can just resurrect the logic then.

Tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 19 Apr 2009 04:37:07 +0000 (21:37 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: when renaming don't try to unlink negative dentry
  cifs: remove unneeded bcc_ptr update in CIFSTCon
  cifs: add cFYI messages with some of the saved strings from ssetup/tcon
  cifs: fix buffer size for tcon->nativeFileSystem field
  cifs: fix unicode string area word alignment in session setup
  [CIFS] Fix build break caused by change to new current_umask helper function
  [CIFS] Fix sparse warnings
  [CIFS] Add support for posix open during lookup
  cifs: no need to use rcu_assign_pointer on immutable keys
  cifs: remove dnotify thread code
  [CIFS] remove some build warnings
  cifs: vary timeout on writes past EOF based on offset (try #5)
  [CIFS] Fix build break from recent DFS patch when DFS support not enabled
  Remote DFS root support.
  [CIFS] Endian convert UniqueId when reporting inode numbers from server files
  cifs: remove some pointless conditionals before kfree()
  cifs: flush data on any setattr

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sat, 18 Apr 2009 19:07:25 +0000 (12:07 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  cs5536: define dma_sff_read_status() method
  ide: fix barriers support
  ide: Remove void casts
  hpt366: use ATA_DMA_* constants
  hpt366: fix HPT370 DMA timeouts

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sat, 18 Apr 2009 18:37:50 +0000 (11:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  Smack: check for SMACK xattr validity in smack_inode_setxattr

15 years agodoc: fix kernel-parameters.txt mistaken deletions
Randy Dunlap [Sat, 18 Apr 2009 01:30:28 +0000 (18:30 -0700)]
doc: fix kernel-parameters.txt mistaken deletions

Re-add missing kernel-parameters documentation that was accidentally
deleted in commit 0cb55ad2.

Thanks to Ingo and Weidong Han for the heads-up on this.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Ingo Molnar <mingo@elte.hu>
cc: Len Brown <lenb@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoPM/Hibernate: Fix memory shrinking
Rafael J. Wysocki [Sat, 18 Apr 2009 15:23:41 +0000 (17:23 +0200)]
PM/Hibernate: Fix memory shrinking

Commit d979677c4c0 ("mm: shrink_all_memory(): use sc.nr_reclaimed")
broke the memory shrinking used by hibernation, becuse it did not update
shrink_all_zones() in accordance with the other changes it made.

Fix this by making shrink_all_zones() update sc->nr_reclaimed instead of
overwriting its value.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13058

Reported-and-tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocs5536: define dma_sff_read_status() method
Sergei Shtylyov [Sat, 18 Apr 2009 15:42:20 +0000 (17:42 +0200)]
cs5536: define dma_sff_read_status() method

The driver somehow got merged with the initializer for the dma_sff_read_status()
method missing which caused kernel panic on bootup.

This should fix the kernel.org bug #13026...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reported-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: fix barriers support
Bartlomiej Zolnierkiewicz [Sat, 18 Apr 2009 15:42:20 +0000 (17:42 +0200)]
ide: fix barriers support

Freeing non-slab objects is bad and results in an oops.  Fix it.

Reported-and-tested-by: Andrew Price <andy@andrewprice.me.uk>
Cc: Theodore Tso <tytso@mit.edu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: Remove void casts
Jack Stone [Sat, 18 Apr 2009 15:42:19 +0000 (17:42 +0200)]
ide: Remove void casts

Remove uneeded void casts

Signed-off-by: Jack Stone <jwjstone@fastmail.fm>
Cc: jeff@garzik.org
Cc: kernel-janitors@vger.kernel.org
Cc: Jack Stone <jwjstone@fastmail.fm>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agohpt366: use ATA_DMA_* constants
Sergei Shtylyov [Sat, 18 Apr 2009 15:42:19 +0000 (17:42 +0200)]
hpt366: use ATA_DMA_* constants

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agohpt366: fix HPT370 DMA timeouts
Sergei Shtylyov [Sat, 18 Apr 2009 15:42:19 +0000 (17:42 +0200)]
hpt366: fix HPT370 DMA timeouts

The big driver change in 2.4.19-rc1 introduced a regression for many HPT370[A]
chips -- DMA stopped to work completely, only causing endless timeouts...

The culprit has been identified (at last!): it turned to be the code resetting
the DMA state machine before each transfer. Stop doing it now as this counter-
measure has clearly caused more harm than good.

This should fix the kernel.org bug #7703.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agodocs, x86: add nox2apic back to kernel-parameters.txt
Weidong Han [Fri, 17 Apr 2009 08:42:12 +0000 (16:42 +0800)]
docs, x86: add nox2apic back to kernel-parameters.txt

"nox2apic" was removed from kernel-parameters.txt by mistake, when
entries were sorted in alpha order (commit 0cb55ad2). But this early
parameter is still there, add it back to kernel-parameters.txt.

[ Impact: add boot parameter description ]

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: iommu@lists.linux-foundation.org
Cc: dwmw2@infradead.org
Cc: allen.m.kay@intel.com
Cc: fenghua.yu@intel.com
LKML-Reference: <1239957736-6161-2-git-send-email-weidong.han@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoSmack: check for SMACK xattr validity in smack_inode_setxattr
Etienne Basset [Thu, 16 Apr 2009 21:58:42 +0000 (23:58 +0200)]
Smack: check for SMACK xattr validity in smack_inode_setxattr

the following patch moves checks for SMACK xattr validity
from smack_inode_post_setxattr (which cannot return an error to the user)
to smack_inode_setxattr (which can return an error).

Signed-off-by: Etienne Basset <etienne.basset@numericable.fr>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 17 Apr 2009 23:20:29 +0000 (16:20 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] fix build error on drivers/ata/pata_legacy.c
  pata_via: Cache and rewrite the device bit
  sata_mv: workaround for multi_count errata sata24
  sata_mv: tidy up qc->tf usage in qc_prep() functions

15 years ago[libata] fix build error on drivers/ata/pata_legacy.c
Zhenwen Xu [Fri, 17 Apr 2009 07:32:59 +0000 (15:32 +0800)]
[libata] fix build error on drivers/ata/pata_legacy.c

fix those errors:

drivers/ata/pata_legacy.c: In function ‘pdc_data_xfer_vlb’:
drivers/ata/pata_legacy.c:289: error: ‘ap’ undeclared (first use in this function)
drivers/ata/pata_legacy.c:289: error: (Each undeclared identifier is reported only once
drivers/ata/pata_legacy.c:289: error: for each function it appears in.)
drivers/ata/pata_legacy.c: At top level:
drivers/ata/pata_legacy.c:869: error: ‘ATA_PFLAG_PIO32_CHANGE’ undeclared here (not in a
+function)
make[2]: *** [drivers/ata/pata_legacy.o] Error 1
make[1]: *** [drivers/ata] Error 2

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_via: Cache and rewrite the device bit
Alan Cox [Fri, 17 Apr 2009 11:21:21 +0000 (12:21 +0100)]
pata_via: Cache and rewrite the device bit

Some VIA chipsets will reset the DEV bit after IEN changes on ctl. Our
optimised write path avoids doing this but we need to remove the
optimisation on these devices.

[Identified and some original patches proposed by Josehn Chan @ VIA but
discussion then all ground to a halt so given a test case I dug it back out]

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk
Tested-by: Christoph Bisping (bug #13086)
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: workaround for multi_count errata sata24
Mark Lord [Mon, 13 Apr 2009 15:29:34 +0000 (11:29 -0400)]
sata_mv: workaround for multi_count errata sata24

Workaround for errata SATA#24 in sata_mv.
This errata affects WRITE_MULTI* commands when
the device multi_count produces a DRQ block size >= 4Kbytes.

We work around it here by converting such operations
into ordinary PIO_WRITEs instead.

Note that this might result in a PIO FUA write unavoidably being converted
into a non-FUA write.  In practice, any system using FUA is also going to be
using DMA rather than PIO, so this shouldn't affect anyone in the real world.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: tidy up qc->tf usage in qc_prep() functions
Mark Lord [Mon, 13 Apr 2009 15:27:18 +0000 (11:27 -0400)]
sata_mv: tidy up qc->tf usage in qc_prep() functions

Tidy up qc->tf accesses in the mv_qc_prep() functions.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agocifs: when renaming don't try to unlink negative dentry
Jeff Layton [Fri, 17 Apr 2009 15:45:30 +0000 (11:45 -0400)]
cifs: when renaming don't try to unlink negative dentry

When attempting to rename a file on a read-only share, the kernel can
call cifs_unlink on a negative dentry, which causes an oops. Only try
to unlink the file if it's a positive dentry.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Tested-by: Shirish Pargaonkar <shirishp@us.ibm.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Fri, 17 Apr 2009 20:53:34 +0000 (13:53 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (43 commits)
  staging: slicoss: update README
  otus/zdusb.c: additional USB idnetifier
  Staging: go7007: fix build issues
  Staging: sxg: Fix leaks and checksum errors in transmit code path
  Staging: sxg: Fix sleep in atomic context warning while loading driver
  Staging: sxg: Use correct queue_id for transmitting non-TCP packets
  Staging: sxg: Fire watchdog timer at end of open routine to change the link
  Staging: Pohmelfs: Add load balancing between network states with the same priority.
  Staging: Pohmelfs: Added IO permissions and priorities.
  Staging: Pohmelfs: Added ->show_stats() callback.
  Staging: Pohmelfs: Drop ftrans debugging code.
  Staging: Pohmelfs: Use wait_on_page_timeout when waiting for remote directory sync instead of hardcoded 25 seconds.
  Staging: Pohmelfs: Reduce debugging noise about non-existing objects.
  Staging: Pohmelfs: Sync fs before killing it, since dentry cache is shrunk before writeback is invoked via generic_shutdown_super()
  Staging: Pohmelfs: Extend remount option.
  Staging: Pohmelfs: Set NETFS_INODE_REMOTE_SYNCED and clear NETFS_INODE_OWNED bits in the root inode.
  Staging: Pohmelfs: Added 'need_lock' variable into debug print.
  Staging: Pohmelfs: Disable read lock in pohmelfs_getattr().
  Staging: Pohmelfs: Move parent lock to the place where we really have to send a lookup request to the server.
  Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry.
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Fri, 17 Apr 2009 20:53:16 +0000 (13:53 -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:
  UIO: fix specific device driver missing statement for depmod
  Driver core: remove pr_fmt() from dynamic_dev_dbg() printk
  driver core: prevent device_for_each_child from oopsing
  dynamic debug: resurrect old pr_debug() semantics as pr_devel()
  Driver Core: early platform driver
  proc: mounts_poll() make consistent to mdstat_poll
  sysfs: sysfs poll keep the poll rule of regular file.
  driver core: allow non-root users to listen to uevents
  driver core: fix driver_match_device
  sysfs: don't use global workqueue in sysfs_schedule_callback()

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 17 Apr 2009 20:53:00 +0000 (13:53 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (22 commits)
  WUSB: correct format of wusb_chid sysfs file
  WUSB: fix oops when completing URBs for disconnected devices
  WUSB: disconnect all devices when stopping a WUSB HCD
  USB: whci-hcd: check return value of usb_hcd_link_urb_to_ep()
  USB: whci-hcd: provide a endpoint_reset method
  USB: add reset endpoint operations
  USB device codes for Motorola phone.
  usb-storage: fix mistake in Makefile
  USB: usb-serial ch341: support for DTR/RTS/CTS
  Revert USB: usb-serial ch341: support for DTR/RTS/CTS
  USB: musb: fix possible panic while resuming
  USB: musb: fix isochronous TXDMA (take 2)
  USB: musb: sanitize clearing TXCSR DMA bits (take 2)
  USB: musb: bugfixes for multi-packet TXDMA support
  USB: musb_host, fix ep0 fifo flushing
  USB: usb-storage: augment unusual_devs entry for Simple Tech/Datafab
  USB: musb_host, minor enqueue locking fix (v2)
  USB: fix oops in cdc-wdm in case of malformed descriptors
  USB: qcserial: Add extra device IDs
  USB: option: Add ids for D-Link DWM-652 3.5G modem
  ...

15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 17 Apr 2009 20:51:14 +0000 (13:51 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (48 commits)
  [ARM] S3C24XX: ADC: Check pending queue before freeing adc client
  [ARM] S3C: Fix ADC driver sparse warning
  [ARM] Osiris: Fix double initialisation in machine block
  [ARM] Anubis: Fix sparse warnings for items that should be static
  [ARM] JIVE: Fix sparse warnings about items which should be static
  [ARM] S3C: Fix sparse warning from missing 's3c_device_hwmon'
  [ARM] S3C24XX: Fix sparse error in gpiolib.c
  [ARM] 5455/1: Fix IRQ noise from VIC code
  [ARM] 5454/1: ep93xx_eth: fix sparse warnings
  [ARM] remove .gitignore from include/asm-arm
  Update MAINTAINERS
  mxc defconfig updates
  mx31ads: Mark as having full regulatoion constraints with 1133-EV1 board
  mx31ads: Depend on all the WM8350 core dependencies for WM1133-EV1 board
  Fix ifdef in plat-mxc/irc.c
  MX1ADS: remove I2C ifdefs
  qong: remove AIPS[12] mappings from machine-specific iotable
  mx31ads: imoux pins should be passed in as unsigned int
  MXC: remove orphan imx_init_uart() definition
  mx31: pin definition for csi
  ...

15 years agox86: mm/numa_32.c calculate_numa_remap_pages should use __init
Jaswinder Singh Rajput [Fri, 17 Apr 2009 18:01:20 +0000 (23:31 +0530)]
x86: mm/numa_32.c calculate_numa_remap_pages should use __init

calculate_numa_remap_pages() is called only by __init initmem_init()
further calculate_numa_remap_pages is calling:
__init find_e820_area() and __init reserve_early()

So calculate_numa_remap_pages() should be __init calculate_numa_remap_pages().

 WARNING: arch/x86/built-in.o(.text+0x82ea3): Section mismatch in reference from the function calculate_numa_remap_pages() to the function .init.text:find_e820_area()
 The function calculate_numa_remap_pages() references
 the function __init find_e820_area().
 This is often because calculate_numa_remap_pages lacks a __init
 annotation or the annotation of find_e820_area is wrong.

 WARNING: arch/x86/built-in.o(.text+0x82f5f): Section mismatch in reference from the function calculate_numa_remap_pages() to the function .init.text:reserve_early()
 The function calculate_numa_remap_pages() references
 the function __init reserve_early().
 This is often because calculate_numa_remap_pages lacks a __init
 annotation or the annotation of reserve_early is wrong.

[ Impact: save memory, address Section mismatch warning ]

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
LKML-Reference: <1239991281.3153.4.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, kbuild: make "make install" not depend on vmlinux
H. Peter Anvin [Fri, 17 Apr 2009 17:46:37 +0000 (10:46 -0700)]
x86, kbuild: make "make install" not depend on vmlinux

It is common to use "make install" in restricted environments which
differ from the one which was actually used to build the kernel.  In
such environments it is highly undesirable to trigger a rebuild of any
part of the system.  Worse, the rebuild may be spurious, triggered by
differences in the environment.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
LKML-Reference: <20090415234642.GA28531@uranus.ravnborg.org>

15 years agox86/uv: fix init of cpu-less nodes
Jack Steiner [Fri, 17 Apr 2009 14:24:47 +0000 (09:24 -0500)]
x86/uv: fix init of cpu-less nodes

Fix an endcase in the UV initialization code for the "UV large system mode"
of apicids.  If node zero contains no cpus, cpus on another node will be the
boot cpu.  The percpu data that contains the extra apicid bits was not
being initialized early enough.

[ Impact: fix potential boot crash on cpu-less UV nodes ]

Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20090417142447.GA23759@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86/uv: fix init of memory-less nodes
Jack Steiner [Fri, 17 Apr 2009 14:22:42 +0000 (09:22 -0500)]
x86/uv: fix init of memory-less nodes

Add support for nodes that have cpus but no memory.
The current code was failing to add these nodes
to the nodes_present_map.

v2: Fixes case caught by David Rientjes - missed support
    for the x2apic SRAT table.

[ Impact: fix potential boot crash on memory-less UV nodes. ]

Reported-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20090417142242.GA23743@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'defconfig-s3c2410' of git://aeryn.fluff.org.uk/bjdooks/linux
Russell King [Fri, 17 Apr 2009 20:35:56 +0000 (21:35 +0100)]
Merge branch 'defconfig-s3c2410' of git://aeryn.fluff.org.uk/bjdooks/linux

15 years agoMerge branch 'v2630-rc2-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux
Russell King [Fri, 17 Apr 2009 20:35:44 +0000 (21:35 +0100)]
Merge branch 'v2630-rc2-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux

15 years agostaging: slicoss: update README
Stephen Hemminger [Wed, 15 Apr 2009 23:52:16 +0000 (16:52 -0700)]
staging: slicoss: update README

I looked, I gagged, I left

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agootus/zdusb.c: additional USB idnetifier
Daniele Napolitano [Tue, 14 Apr 2009 23:58:33 +0000 (16:58 -0700)]
otus/zdusb.c: additional USB idnetifier

Provide support for WN111v2 USB 802.11n adapter.

Signed-off-by: Daniele Napolitano <dnax88@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: go7007: fix build issues
Greg Kroah-Hartman [Mon, 13 Apr 2009 20:16:54 +0000 (13:16 -0700)]
Staging: go7007: fix build issues

Now that TUNER_SET_TYPE_ADDR is gone from the tree, the older code kicks
in and tries to use TUNER_SET_TYPE, which went away a long time ago.

This patch removes all of this logic, as it should not be needed anymore
now, and by doing so, fixes the build.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: sxg: Fix leaks and checksum errors in transmit code path
Mithlesh Thukral [Wed, 25 Mar 2009 10:21:49 +0000 (15:51 +0530)]
Staging: sxg: Fix leaks and checksum errors in transmit code path

Fix the transmit function for the following:
* Free XmtCmd in the error code path. This use to leak memory in
  error conditions.
* Do pci mapping after the checksum operations are over. They can
  reallocate the skb at a different location.
* Fix UDP checksum errors which were seen in wireshark

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: sxg: Fix sleep in atomic context warning while loading driver
Mithlesh Thukral [Wed, 25 Mar 2009 10:21:14 +0000 (15:51 +0530)]
Staging: sxg: Fix sleep in atomic context warning while loading driver

Leave a spinlock before calling request_irq(). request_irq() calls kmalloc
which can sleep. This was generating a warning dump while driver is loaded.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: sxg: Use correct queue_id for transmitting non-TCP packets
Mithlesh Thukral [Wed, 25 Mar 2009 10:20:34 +0000 (15:50 +0530)]
Staging: sxg: Use correct queue_id for transmitting non-TCP packets

Use correct queue_id while transmitting non-TCP packets.
They should always use queue 0.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
15 years agoStaging: sxg: Fire watchdog timer at end of open routine to change the link
Mithlesh Thukral [Wed, 25 Mar 2009 10:19:58 +0000 (15:49 +0530)]
Staging: sxg: Fire watchdog timer at end of open routine to change the link

The watchdog timer which updates the link status was not fired at the
end of sxg_entry_open(). Add that.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Add load balancing between network states with the same priority.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:30 +0000 (15:04 +0300)]
Staging: Pohmelfs: Add load balancing between network states with the same priority.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Added IO permissions and priorities.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:29 +0000 (15:04 +0300)]
Staging: Pohmelfs: Added IO permissions and priorities.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Added ->show_stats() callback.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:28 +0000 (15:04 +0300)]
Staging: Pohmelfs: Added ->show_stats() callback.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Drop ftrans debugging code.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:27 +0000 (15:04 +0300)]
Staging: Pohmelfs: Drop ftrans debugging code.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Use wait_on_page_timeout when waiting for remote directory sync...
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:26 +0000 (15:04 +0300)]
Staging: Pohmelfs: Use wait_on_page_timeout when waiting for remote directory sync instead of hardcoded 25 seconds.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Reduce debugging noise about non-existing objects.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:25 +0000 (15:04 +0300)]
Staging: Pohmelfs: Reduce debugging noise about non-existing objects.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Sync fs before killing it, since dentry cache is shrunk before...
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:24 +0000 (15:04 +0300)]
Staging: Pohmelfs: Sync fs before killing it, since dentry cache is shrunk before writeback is invoked via generic_shutdown_super()

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Extend remount option.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:23 +0000 (15:04 +0300)]
Staging: Pohmelfs: Extend remount option.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Set NETFS_INODE_REMOTE_SYNCED and clear NETFS_INODE_OWNED bits...
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:22 +0000 (15:04 +0300)]
Staging: Pohmelfs: Set NETFS_INODE_REMOTE_SYNCED and clear NETFS_INODE_OWNED bits in the root inode.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Added 'need_lock' variable into debug print.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:21 +0000 (15:04 +0300)]
Staging: Pohmelfs: Added 'need_lock' variable into debug print.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Disable read lock in pohmelfs_getattr().
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:20 +0000 (15:04 +0300)]
Staging: Pohmelfs: Disable read lock in pohmelfs_getattr().

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: Pohmelfs: Move parent lock to the place where we really have to send a looku...
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:19 +0000 (15:04 +0300)]
Staging: Pohmelfs: Move parent lock to the place where we really have to send a lookup request to the server.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: pohmelfs: Populate dentry cache when receiving the new readdir entry.
Evgeniy Polyakov [Fri, 27 Mar 2009 12:04:18 +0000 (15:04 +0300)]
Staging: pohmelfs: Populate dentry cache when receiving the new readdir entry.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoRevert Staging: SLICOSS: use gfp_kernel where possible
Lior Dotan [Wed, 11 Feb 2009 11:35:10 +0000 (13:35 +0200)]
Revert Staging: SLICOSS: use gfp_kernel where possible

Revert commit 2bb347361e2c19799431f56488a3f64de40a3aa6

This commit has been reported to cause problems:
  Mar 24 11:50:31 linuxdev kernel: BUG: sleeping function called from invalid context at mm/slub.c:1599 Mar 24 11:50:31 linuxdev kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 3251, name: avahi-daemon

Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: STLC45XX should depend on GENERIC_HARDIRQS
Geert Uytterhoeven [Mon, 6 Apr 2009 13:15:55 +0000 (15:15 +0200)]
Staging: STLC45XX should depend on GENERIC_HARDIRQS

m68k allmodconfig:
| drivers/staging/stlc45xx/stlc45xx.c: In function 'stlc45xx_probe':
| drivers/staging/stlc45xx/stlc45xx.c:2456: error: implicit declaration of function 'set_irq_type'
| make[6]: *** [drivers/staging/stlc45xx/stlc45xx.o] Error 1

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Defer flush and release operations to avoid deadlocks.
Arve Hjønnevåg [Mon, 6 Apr 2009 22:13:00 +0000 (15:13 -0700)]
Staging: binder: Defer flush and release operations to avoid deadlocks.

If a transaction that contains a file descriptor fails on a later object,
the new file descriptor needs to be closed. If this is a binder file
descriptor we would deadlock in flush. If there were no other references to
the file at this point release would also be called.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Prevent the wrong thread from adding a transaction to the stack.
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:59 +0000 (15:12 -0700)]
Staging: binder: Prevent the wrong thread from adding a transaction to the stack.

If a thread is part of a transaction stack, it is only allowed to make
another call if it was the target of the top transaction on the stack.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Cast to uintptr_t instead of size_t when aligning pointers
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:58 +0000 (15:12 -0700)]
Staging: binder: Cast to uintptr_t instead of size_t when aligning pointers

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Keep a reference to the files_struct while the driver is mmapped
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:57 +0000 (15:12 -0700)]
Staging: binder: Keep a reference to the files_struct while the driver is mmapped

This prevents breaking fget_light if a single threaded application
allows incoming file descriptors (in replies or on nodes).
Should also prevent inserting a file in the wrong files_struct if the
receving process execs in the middle of a transaction (between
task_get_unused_fd_flags and task_fd_install).

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Add more offset validation.
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:56 +0000 (15:12 -0700)]
Staging: binder: Add more offset validation.

Check that datasize is not smaller than one flat_binder_object.
Check that offsets are aligned.
Check that offsets_size is aligned.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: mmap fixes.
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:55 +0000 (15:12 -0700)]
Staging: binder: mmap fixes.

Only allow a binder file pointer to be mmapped once. The buffer management
code cannot deal with more then one area.
Also remove leftover mutex_unlock if mmap fails.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Don't create two proc entries with the same name if the driver is...
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:54 +0000 (15:12 -0700)]
Staging: binder: Don't create two proc entries with the same name if the driver is opened twice in one process.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: binder: Remove VM_EXEC check.
Arve Hjønnevåg [Mon, 6 Apr 2009 22:12:53 +0000 (15:12 -0700)]
Staging: binder: Remove VM_EXEC check.

Many platforms do not support mappings without VM_EXEC.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: aten2011: Clean up some tty bits
Alan Cox [Tue, 7 Apr 2009 17:43:43 +0000 (18:43 +0100)]
Staging: aten2011: Clean up some tty bits

Minor fixes for tty layer stuff in this driver

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2870: add ID for Sitecom WL-315
Daniele Napolitano [Wed, 1 Apr 2009 21:53:39 +0000 (14:53 -0700)]
Staging: rt2870: add ID for Sitecom WL-315

Signed-off-by: Daniele Napolitano <dnax88@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: line6: convert to snd_card_create()
Alexander Beregalov [Sun, 29 Mar 2009 15:59:13 +0000 (19:59 +0400)]
Staging: line6: convert to snd_card_create()

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: wlan-ng: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:31:28 +0000 (19:31 +0400)]
Staging: wlan-ng: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: sxg: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:30:46 +0000 (19:30 +0400)]
Staging: sxg: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: slicoss: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:30:08 +0000 (19:30 +0400)]
Staging: slicoss: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt3070: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:29:18 +0000 (19:29 +0400)]
Staging: rt3070: convert to netdev_ops

Also remove unused variable.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2870: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:28:11 +0000 (19:28 +0400)]
Staging: rt2870: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2860: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:27:21 +0000 (19:27 +0400)]
Staging: rt2860: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: otus: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:26:25 +0000 (19:26 +0400)]
Staging: otus: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: et131x: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:25:33 +0000 (19:25 +0400)]
Staging: et131x: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: epl: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:24:32 +0000 (19:24 +0400)]
Staging: epl: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: at76: convert to netdev_ops
Alexander Beregalov [Sun, 29 Mar 2009 15:23:34 +0000 (19:23 +0400)]
Staging: at76: convert to netdev_ops

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoWUSB: correct format of wusb_chid sysfs file
David Vrabel [Wed, 8 Apr 2009 17:36:30 +0000 (17:36 +0000)]
WUSB: correct format of wusb_chid sysfs file

Make the wusb_chid sysfs file match the ABI documentation.

Print all zeros if the WUSB host is stopped (instead of an empty file)
and end the file with a newline.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoWUSB: fix oops when completing URBs for disconnected devices
David Vrabel [Wed, 8 Apr 2009 17:36:32 +0000 (17:36 +0000)]
WUSB: fix oops when completing URBs for disconnected devices

Fix an oops in wusbhc_giveback_urb() if the wusb device had disconnected
while an urb was in progress. Also release the ref count obtained here.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoWUSB: disconnect all devices when stopping a WUSB HCD
David Vrabel [Wed, 8 Apr 2009 17:36:33 +0000 (17:36 +0000)]
WUSB: disconnect all devices when stopping a WUSB HCD

Make sure all WUSB devices are disconnected when stopping a WUSB HCD so
that we don't leak the devices' wusb_dev structures.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: whci-hcd: check return value of usb_hcd_link_urb_to_ep()
David Vrabel [Wed, 8 Apr 2009 17:36:31 +0000 (17:36 +0000)]
USB: whci-hcd: check return value of usb_hcd_link_urb_to_ep()

Check the return value of usb_hcd_link_urb_to_ep() and do not add the
urb to the ASL/PZL if it returns an error.

Omitting the check results in urbs that appear to be submitted
successfully but then cannot be unliked (because
usb_hcd_check_unlink_urb() returns an error).  This can cause khubd (for
example) to block forever in usb_kill_urb().

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: whci-hcd: provide a endpoint_reset method
David Vrabel [Wed, 8 Apr 2009 17:36:29 +0000 (17:36 +0000)]
USB: whci-hcd: provide a endpoint_reset method

Provide a endpoint_reset method to reset sequence number and current
window.  This QHead information can only be changed while the qset is
not in a schedule.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>