sfrench/cifs-2.6.git
16 years agopower: Fix sizeof(PAGE_SIZE) typo
OGAWA Hirofumi [Wed, 23 May 2007 20:58:00 +0000 (13:58 -0700)]
power: Fix sizeof(PAGE_SIZE) typo

Fix sizeof(PAGE_SIZE) typo.  It should be just PAGE_SIZE for zeroing the
swsusp_header.

Signed-off-by: OGAWA Hirofumi <hogawa@miraclelinux.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMisc: phantom, take care of pci posting
Jiri Slaby [Wed, 23 May 2007 20:57:59 +0000 (13:57 -0700)]
Misc: phantom, take care of pci posting

phantom, take care of pci posting

thanks to akpm for pointing this out

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agophantom: move to unlocked_ioctl
Jiri Slaby [Wed, 23 May 2007 20:57:58 +0000 (13:57 -0700)]
phantom: move to unlocked_ioctl

phantom's ioctl is often (4000 times a sec or so) invoked, don't acquire
BKL and block other processes.

Signed-off-by: Jiri Slaby <xslaby@phantom.fi.muni.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosimplify cleanup_workqueue_thread()
Oleg Nesterov [Wed, 23 May 2007 20:57:57 +0000 (13:57 -0700)]
simplify cleanup_workqueue_thread()

cleanup_workqueue_thread() and cwq_should_stop() are overcomplicated.

Convert the code to use kthread_should_stop/kthread_stop as was
suggested by Gautham and Srivatsa.

In particular this patch removes the (unlikely) busy-wait loop from the
exit path, it was a temporary and ugly kludge (if not a bug).

Note: the current code was designed to solve another old problem:
work->func can't share locks with hotplug callbacks.  I think this could
be done, see

http://marc.info/?l=linux-kernel&m=116905366428633

but this needs some more complications to preserve CPU affinity of
cwq->thread during cpu_up().  A freezer-based hotplug looks more
appealing.

[akpm@linux-foundation.org: make it more tolerant of gcc borkenness]
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Zilvinas Valinskas <zilvinas@wilibox.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoChar: cyclades, fix deadlock
Jiri Slaby [Wed, 23 May 2007 20:57:56 +0000 (13:57 -0700)]
Char: cyclades, fix deadlock

An omitted unlock.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSLUB Debug: fix check for super sized slabs (>512k 64bit, >256k 32bit)
Christoph Lameter [Wed, 23 May 2007 20:57:56 +0000 (13:57 -0700)]
SLUB Debug: fix check for super sized slabs (>512k 64bit, >256k 32bit)

The check for super sized slabs where we can no longer move the free
pointer behind the object for debugging purposes etc is accessing a
field that is not setup yet.  We must use objsize here since the size of
the slab has not been determined yet.

The effect of this is that a global slab shrink via "slabinfo -s" will
show errors about offsets being wrong if booted with slub_debug.
Potentially there are other troubles with huge slabs under slub_debug
because the calculated free pointer offset is truncated.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofix unused setup_nr_node_ids
Miklos Szeredi [Wed, 23 May 2007 20:57:55 +0000 (13:57 -0700)]
fix unused setup_nr_node_ids

mm/page_alloc.c:931: warning: 'setup_nr_node_ids' defined but not used

This is now the only (!) compiler warning I get in my UML build :)

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofuse: delete inode on drop
Miklos Szeredi [Wed, 23 May 2007 20:57:54 +0000 (13:57 -0700)]
fuse: delete inode on drop

When inode is dropped (no more references) delete it from cache.

There's not much point in keeping it cached, when a new lookup will refresh
the attributes anyway.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofuse: generic_write_checks() for direct_io
Miklos Szeredi [Wed, 23 May 2007 20:57:54 +0000 (13:57 -0700)]
fuse: generic_write_checks() for direct_io

This fixes O_APPEND in direct IO mode.  Also checks writes against file size
limits, notably rlimits.

Reported by Greg Bruno.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouselib: add missing MNT_NOEXEC check
Christoph Hellwig [Wed, 23 May 2007 20:57:53 +0000 (13:57 -0700)]
uselib: add missing MNT_NOEXEC check

We don't allow loading ELF shared library from noexec points so the
same should apply to sys_uselib aswell.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ulrich Drepper <drepper@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMissing 'const' from reiserfs MIN_KEY declaration.
David Woodhouse [Wed, 23 May 2007 20:57:52 +0000 (13:57 -0700)]
Missing 'const' from reiserfs MIN_KEY declaration.

In stree.c, MIN_KEY is declared const. The extern declaration in dir.c
doesn't match...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoimxfb: fix memory hole
Sascha Hauer [Wed, 23 May 2007 20:57:52 +0000 (13:57 -0700)]
imxfb: fix memory hole

info->pseudo_palette was previously kmalloced.  Do not overwrite it afterwards

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoimxfb: remove ifdefs
Sascha Hauer [Wed, 23 May 2007 20:57:51 +0000 (13:57 -0700)]
imxfb: remove ifdefs

Here are some small fixes for the imxfb framebuffer driver:

 - remove ifndef for MX1FS2 platform which is not present in the kernel.
 - REV, CLS, PS and SPL_SPR are only needed with some sharp displays.
   Only setup the corresponding io pins when such a display is connected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agops3fb: use FB_SYS_* instead of FB_CFB_*
Geert Uytterhoeven [Wed, 23 May 2007 20:57:50 +0000 (13:57 -0700)]
ps3fb: use FB_SYS_* instead of FB_CFB_*

ps3fb: Use the FB_SYS_* operations instead of the FB_CFB_* operations as the
actual frame buffer memory is part of system RAM

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agow100fb: fix compile warnings
Richard Purdie [Wed, 23 May 2007 20:57:49 +0000 (13:57 -0700)]
w100fb: fix compile warnings

Fix compile warnings from w100fb.c.  Attribute registration failure doesn't
stop the driver working so just warn about it.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopm3fb: various fixes
Krzysztof Helt [Wed, 23 May 2007 20:57:48 +0000 (13:57 -0700)]
pm3fb: various fixes

 - fix 16-bit RGBA 4444 and 5551 modes (use fbset -rgba to set them)
 - kill wmb() after each register write by PM3_SLOW_WRITE_REG
 - kill inaccurate comments (leftovers from skeletonfb.c)
 - kill PCI class restriction, now it is more general and shorter
 - white spaces and other minor fixes and source reducing

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopm2fb: RDAC_WR barriers clean up
Krzysztof Helt [Wed, 23 May 2007 20:57:47 +0000 (13:57 -0700)]
pm2fb: RDAC_WR barriers clean up

This patch fixes a possible barriers problem in RDAC_WR functions, then
remove redudant ones.

It also removes one unneeded register load from blitter function().

Signed-off-by: Krzysztof.Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: cleanup of sparc FB options
Krzysztof Helt [Wed, 23 May 2007 20:57:46 +0000 (13:57 -0700)]
fbdev: cleanup of sparc FB options

This patch puts all SBUS/UPA selection under one option "SBUS/UPA
framebuffers" and moves all sparc specific drivers next to them in one group.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi: potential memleak in spidev_ioctl
Florin Malita [Wed, 23 May 2007 20:57:45 +0000 (13:57 -0700)]
spi: potential memleak in spidev_ioctl

'ioc' should be deallocated if __copy_from_user fails (found by Coverity
- CID 1644).

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agooptimize compat_core_sys_select() by a using stack space for small fd sets
Badari Pulavarty [Wed, 23 May 2007 20:57:45 +0000 (13:57 -0700)]
optimize compat_core_sys_select() by a using stack space for small fd sets

Optimize select by a using stack space for small fd sets.
core_sys_select() already has this optimization.  This is for compat
version.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorecalc_sigpending_tsk fixes
Roland McGrath [Wed, 23 May 2007 20:57:44 +0000 (13:57 -0700)]
recalc_sigpending_tsk fixes

Steve Hawkes discovered a problem where recalc_sigpending_tsk was called in
do_sigaction but no signal_wake_up call was made, preventing later signals
from waking up blocked threads with TIF_SIGPENDING already set.

In fact, the few other calls to recalc_sigpending_tsk outside the signals
code are also subject to this problem in other race conditions.

This change makes recalc_sigpending_tsk private to the signals code.  It
changes the outside calls, as well as do_sigaction, to use the new
recalc_sigpending_and_wake instead.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: <Steve.Hawkes@motorola.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAvoid zero size allocation in cache_k8_northbridges()
Ben Collins [Wed, 23 May 2007 20:57:43 +0000 (13:57 -0700)]
Avoid zero size allocation in cache_k8_northbridges()

kmalloc for flush_words resulted in zero size allocation when no
k8_northbridges existed.  Short circuit the code path for this case.

Also remove uneeded zeroing of num_k8_northbridges just after checking if
it is zero.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocumentation: fix the explanation of Kconfig files
Robert P. J. Day [Wed, 23 May 2007 20:57:42 +0000 (13:57 -0700)]
Documentation: fix the explanation of Kconfig files

Fix the obvious errors in the explanation of Kconfig files.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoprohibit rcutorture from being compiled into the kernel
Paul E. McKenney [Wed, 23 May 2007 20:57:41 +0000 (13:57 -0700)]
prohibit rcutorture from being compiled into the kernel

There have been a number of instances where people have accidentally compiled
rcutorture into the kernel (CONFIG_RCU_TORTURE_TEST=y), which has never been
useful, and has often resulted in great frustration.

The attached patch prohibits rcutorture from being compiled into the
kernel.  It may be excluded altogether or compiled as a module.  People
wishing to have rcutorture hammer their machine immediately upon boot
are free to hand-edit lib/Kconfig.debug to remove the "depends on m"
line.

Thanks to Randy Dunlap for the trick that makes this work.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Josh Triplett <josh@kernel.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: improve PTRACE_SYSEMU checking
Jeff Dike [Wed, 23 May 2007 20:57:40 +0000 (13:57 -0700)]
uml: improve PTRACE_SYSEMU checking

Make the PTRACE_SYSEMU checking more robust.  It will make sure that system
call numbers are reported correctly.  If there is a problem, it will disable
PTRACE_SYSEMU use and use PTRACE_SYSCALL instead.

Thanks to Balaji G for helping reproduce this problem.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi/spidev: check message size before copying
Domen Puncer [Wed, 23 May 2007 20:57:39 +0000 (13:57 -0700)]
spi/spidev: check message size before copying

Message size needs to be checked before copying, or bad things could
happen.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocapability.h warning fix
Andrew Morton [Wed, 23 May 2007 20:57:39 +0000 (13:57 -0700)]
capability.h warning fix

include/linux/capability.h:397: warning: "struct task_struct" declared inside parameter list
include/linux/capability.h:397: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogenhd: send async notification on media change
Kristen Carlson Accardi [Wed, 23 May 2007 20:57:38 +0000 (13:57 -0700)]
genhd: send async notification on media change

Send an uevent to user space to indicate that a media change event has
occurred.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogenhd: expose AN to user space
Kristen Carlson Accardi [Wed, 23 May 2007 20:57:38 +0000 (13:57 -0700)]
genhd: expose AN to user space

Allow user space to determine if a disk supports Asynchronous Notification of
media changes.  This is done by adding a new sysfs file "capability_flags",
which is documented in (insert file name).  This sysfs file will export all
disk capabilities flags to user space.  We also define a new flag to define
the media change notification capability.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoNOHZ: Rate limit the local softirq pending warning output
Thomas Gleixner [Wed, 23 May 2007 20:57:37 +0000 (13:57 -0700)]
NOHZ: Rate limit the local softirq pending warning output

The warning in the NOHZ code, which triggers when a CPU goes idle with
softirqs pending can fill up the logs quite quickly.  Rate limit the output
until we found the root cause of that problem.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi doc update: describe clock mode bits
David Brownell [Wed, 23 May 2007 20:57:36 +0000 (13:57 -0700)]
spi doc update: describe clock mode bits

Update the SPI documentation to cover a few points that have proven to be
confusing or unclear; most notably the two clock mode bits.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agompc52xx_psc_spi: fix it for CONFIG_PPC_MERGE
Domen Puncer [Wed, 23 May 2007 20:57:32 +0000 (13:57 -0700)]
mpc52xx_psc_spi: fix it for CONFIG_PPC_MERGE

Fix mpc5200 PSC SPI driver to actually work for CONFIG_PPC_MERGE
 - s/mpc52xx/mpc5200/, as this was changed in device tree some time ago
 - fix spi id detection

The move from 'ppc' to 'powerpc' didn't quite match the latest
kernel.org code.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Acked-by: Dragos Carp <dragos.carp@toptica.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofuse: fix mknod of regular file
Miklos Szeredi [Wed, 23 May 2007 20:57:32 +0000 (13:57 -0700)]
fuse: fix mknod of regular file

The wrong lookup flag was tested in ->create() causing havoc (error or
Oops) when a regular file was created with mknod() in a fuse filesystem.

Thanks to J. Cameijo Cerdeira for the report.

Kernels 2.6.18 onward are affected.  Please apply to -stable as well.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSLUB Debug: Fix object size calculation
Christoph Lameter [Wed, 23 May 2007 20:57:31 +0000 (13:57 -0700)]
SLUB Debug: Fix object size calculation

The object size calculation is wrong if !CONFIG_SLUB_DEBUG because the
#ifdef CONFIG_SLUB_DEBUG is now switching off the size adjustments for
DESTROY_BY_RCU and ctor.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoIgnore bogus ACPI info for offline CPUs
Thomas Gleixner [Wed, 23 May 2007 20:57:30 +0000 (13:57 -0700)]
Ignore bogus ACPI info for offline CPUs

Booting a SMP kernel with maxcpus=1 on a SMP system leads to a hard hang,
because ACPI ignores the maxcpus setting and sends timer broadcast info for
the offline CPUs.  This results in a stuck for ever call to
smp_call_function_single() on an offline CPU.

Ignore the bogus information and print a kernel error to remind ACPI
folks to fix it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofreezer: move frozen_process() to kernel/power/process.c
Gautham R Shenoy [Wed, 23 May 2007 20:57:29 +0000 (13:57 -0700)]
freezer: move frozen_process() to kernel/power/process.c

Other than refrigerator, no one else calls frozen_process().  So move it from
include/linux/freezer.h to kernel/power/process.c.

Also, since a task can be marked as frozen by itself, we don't need to pass
the (struct task_struct *p) parameter to frozen_process().

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofreezer: fix PF_NOFREEZE vs freezeable race
Gautham R Shenoy [Wed, 23 May 2007 20:57:28 +0000 (13:57 -0700)]
freezer: fix PF_NOFREEZE vs freezeable race

This patch fixes the race pointed out by Oleg Nesterov.

* Freezer marks a thread as freezeable.
* The thread now marks itself PF_NOFREEZE, but it will be frozen on
  on calling try_to_freeze(). Thus the task is frozen, even though it doesn't
  want to.
* Subsequent thaw_processes() will also fail to thaw the task since it is
  marked PF_NOFREEZE.

Avoid this problem by checking the task's PF_NOFREEZE status in
frozen_processes() before marking the task as frozen.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofreezer: fix kthread_create vs freezer theoretical race
Oleg Nesterov [Wed, 23 May 2007 20:57:27 +0000 (13:57 -0700)]
freezer: fix kthread_create vs freezer theoretical race

kthread() sleeps in TASK_INTERRUPTIBLE state waiting for the first wakeup.  In
theory, this wakeup may come from freeze_process()->signal_wake_up(), so the
task can disappear even before kthread_create() sets its ->comm.

Change kthread() to use TASK_UNINTERRUPTIBLE.

[akpm@linux-foundation.org: s/BUG_ON/WARN_ON+recover]
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofreezer: take kernel_execve into consideration
Rafael J. Wysocki [Wed, 23 May 2007 20:57:26 +0000 (13:57 -0700)]
freezer: take kernel_execve into consideration

Kernel threads can become userland processes by calling kernel_execve().

In particular, this may happen right after the try_to_freeze_tasks()
called with FREEZER_USER_SPACE has returned, so try_to_freeze_tasks()
needs to take userspace processes into consideration even if it is
called with FREEZER_KERNEL_THREADS.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofreezer: fix vfork problem
Rafael J. Wysocki [Wed, 23 May 2007 20:57:25 +0000 (13:57 -0700)]
freezer: fix vfork problem

Currently try_to_freeze_tasks() has to wait until all of the vforked processes
exit and for this reason every user can make it fail.  To fix this problem we
can introduce the additional process flag PF_FREEZER_SKIP to be used by tasks
that do not want to be counted as freezable by the freezer and want to have
TIF_FREEZE set nevertheless.  Then, this flag can be set by tasks using
sys_vfork() before they call wait_for_completion(&vfork) and cleared after
they have woken up.  After clearing it, the tasks should call try_to_freeze()
as soon as possible.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofreezer: close potential race between refrigerator and thaw_tasks
Rafael J. Wysocki [Wed, 23 May 2007 20:57:24 +0000 (13:57 -0700)]
freezer: close potential race between refrigerator and thaw_tasks

If the freezing of tasks fails and a task is preempted in refrigerator()
before calling frozen_process(), then thaw_tasks() may run before this task is
frozen.  In that case the task will freeze and no one will thaw it.

To fix this race we can call freezing(current) in refrigerator() along with
frozen_process(current) under the task_lock() which also should be taken in
the error path of try_to_freeze_tasks() as well as in thaw_process().
Moreover, if thaw_process() additionally clears TIF_FREEZE for tasks that are
not frozen, we can be sure that all tasks are thawed and there are no pending
"freeze" requests after thaw_tasks() has run.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoide serverworks warning fixes
Andrew Morton [Thu, 24 May 2007 00:42:39 +0000 (02:42 +0200)]
ide serverworks warning fixes

gcc-4.3:

drivers/ide/pci/serverworks.c: In function 'svwks_tune_chipset':
drivers/ide/pci/serverworks.c:176: warning: overflow in implicit constant conversion
drivers/ide/pci/serverworks.c:190: warning: overflow in implicit constant conversion
drivers/ide/pci/serverworks.c:211: warning: overflow in implicit constant conversion
drivers/ide/pci/serverworks.c:212: warning: overflow in implicit constant conversion

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMatch DMA blacklist entries between ide-dma.c and libata-core.c
Junio C Hamano [Thu, 24 May 2007 00:42:38 +0000 (02:42 +0200)]
Match DMA blacklist entries between ide-dma.c and libata-core.c

There are a few entries in ata_device_blacklist[] in libata-core.c
marked with HORKAGE_NODMA but are missing from drive_blacklist[]
in ide-dma.c.  This patch makes the lists in sync.

Also remove a duplicated entry for "SanDisk SDP3B-64".

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoAdd two missing chipsets to drivers/ide/ide-proc.c
Mika Kukkonen [Thu, 24 May 2007 00:42:38 +0000 (02:42 +0200)]
Add two missing chipsets to drivers/ide/ide-proc.c

Compiling with '-Wswitch-enum' I noticed following:

  CC      drivers/ide/ide-proc.o
drivers/ide/ide-proc.c: In function Ã¢\80\98proc_ide_read_imodelâ\80\99:
drivers/ide/ide-proc.c:54: warning: enumeration value Ã¢\80\98ide_etrax100â\80\99 not handled in switch
drivers/ide/ide-proc.c:54: warning: enumeration value Ã¢\80\98ide_acornâ\80\99 not handled in switch

How about the following patch?

Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE
Alan Cox [Thu, 24 May 2007 00:42:38 +0000 (02:42 +0200)]
ide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE

It turns out from customer reports to Red Hat and some PCI dumps that the
MegaIDE in RAID mode doesn't provide the drive tuning data that the
serverworks driver expects but sometimes does provide something that
fools the code.

For the RAID class case skip the oem setup and don't trust the BIOS data.
We then tune from scratch and this sorts it out. (This has been confirmed
on an afflicted IBM blade)

[libata serverworks.c never trusts the BIOS in the first place so is
accidentally immune]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoadd the IDE device ID for ATI SB700
Henry Su [Thu, 24 May 2007 00:42:37 +0000 (02:42 +0200)]
add the IDE device ID for ATI SB700

Add the IDE device ID to atiixp_pci_tbl struct in atiixp.c for ATI SB700.

From: Henry Su <henry.su@amd.com>
Signed-off-by: Luugi Marsan <luugi.marsan@amd.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 23 May 2007 15:16:24 +0000 (08:16 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [RTNETLINK]: Remove remains of wireless extensions over rtnetlink
  [RTNETLINK]: Allow changing of subsets of netdevice flags in rtnl_setlink
  [AF_RXRPC]: Make call state names available if CONFIG_PROC_FS=n
  [AF_RXRPC]: AF_RXRPC depends on IPv4
  [IPSEC]: Fix warnings with casting int to pointer

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 23 May 2007 15:12:54 +0000 (08:12 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (29 commits)
  USB: Add support for Olimex arm-usb-ocd JTAG interface serial port
  USB: Add support for Sierra Wireless Aircard 595U
  USB: ldusb bugfix
  USB: ftdi_sio: Add USB Product Id for OpenDCC
  USB: fix ratelimit call semantics
  USB: handle errors in power/level attribute
  USB: make the autosuspend workqueue thread freezable
  USB: Fix USB OHCI Subvendor for Toshiba Portege 4000
  USB: usblp: Use correct DMA address in case of probe error
  USB: Fix debug output of ark3116
  USB: Onetouch - switch to using input_dev->dev.parent
  USB: don't try to kzalloc 0 bytes
  USB: remove short initial timeout for device descriptor fetch
  USB: Deref URB after usbmon is done with it
  USB: Remove duplicate IDs from option card driver
  USB: auerswald: fix file release handler
  USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning
  USB: set the correct Interrupt interval in usb_bulk_msg
  USB: New device PID for ftdi_sio driver
  USB: remove unneeded WARN_ON
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 23 May 2007 15:11:43 +0000 (08:11 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ads7846 - SPI_CPHA mode bugfix
  Input: ads7846 - document that it handles tsc2046 too
  Input: input-polldev - add module info
  Input: ucb1x00-ts - remove commented out code
  Input: ucb1400_ts - use sched_setscheduler()
  Input: ALPS - force stream mode
  Input: iforce - minor clean-ups
  Input: iforce - fix force feedback not working
  Input: adbhid - do not access input_dev->private directly
  Input: logips2pp - add type 72 (PS/2 TrackMan Marble)

16 years agoUSB: Add support for Olimex arm-usb-ocd JTAG interface serial port
Tony Lindgren [Sat, 5 May 2007 01:23:24 +0000 (18:23 -0700)]
USB: Add support for Olimex arm-usb-ocd JTAG interface serial port

This patch adds support for the serial port on Olimex arm-usb-ocd
JTAG interface.

The device appears as two serial ports, but the first one is reserved
for the JTAG interface. The JTAG interface can be used with OpenOCD
from userspace. For more information, please see:

http://openocd.berlios.de/web/
http://www.olimex.com/dev/arm-usb-ocd.html

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Add support for Sierra Wireless Aircard 595U
Danny Budik [Fri, 4 May 2007 20:09:37 +0000 (16:09 -0400)]
USB: Add support for Sierra Wireless Aircard 595U

This patch adds support for the newly released Aircard 595U EVDO
modem to the Sierra Wireless driver (sierra.c) in kernel 2.6.21.

I suspect that my mailer may be mangling patches so let me know and
I'll try to resend it.

From: Danny Budik <dbudik@ist-traffic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ldusb bugfix
Oliver Neukum [Fri, 4 May 2007 07:23:40 +0000 (09:23 +0200)]
USB: ldusb bugfix

This patch fixes a problem reported with consecutive reads in the ldusb
driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ftdi_sio: Add USB Product Id for OpenDCC
Guido Scholz [Tue, 8 May 2007 17:52:41 +0000 (19:52 +0200)]
USB: ftdi_sio: Add USB Product Id for OpenDCC

USB product id registration for the OpenDCC (www.opendcc.de)
model railway central unit. Applies to 2.6.21.1.

Signed-off-by: Guido Scholz <guido.scholz@bayernline.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix ratelimit call semantics
Alan Stern [Tue, 22 May 2007 15:48:17 +0000 (11:48 -0400)]
USB: fix ratelimit call semantics

This patch (as910) fixes a ratelimit modification so that the
original error-handling path will be followed even when the log-rate
limitation kicks in.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: handle errors in power/level attribute
Alan Stern [Tue, 22 May 2007 15:38:19 +0000 (11:38 -0400)]
USB: handle errors in power/level attribute

This patch (as906) improves the error handling for the USB power/level
attribute file.  If an error occurs, the original power-level settings
will be restored.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: make the autosuspend workqueue thread freezable
Alan Stern [Tue, 22 May 2007 13:38:39 +0000 (09:38 -0400)]
USB: make the autosuspend workqueue thread freezable

This patch (as881b) makes the ksuspend_usb_wq workqueue freezable.  We
don't want a rogue workqueue thread running around, unexpectedly
suspending or resuming USB devices in the middle of a system sleep
transition.

This fixes Bugzilla #8498.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix USB OHCI Subvendor for Toshiba Portege 4000
Andrey Borzenkov [Sat, 19 May 2007 21:23:28 +0000 (14:23 -0700)]
USB: Fix USB OHCI Subvendor for Toshiba Portege 4000

This fixes a bug in an OHCI quirk handler for Portege 4000; the
Subvendor is 0x1179 (PCI_VENDOR_ID_TOSHIBA)
not 0x102f (PCI_VENDOR_ID_TOSHIBA_2)

bugid 8510

00:02.0 USB Controller [0c03]: ALi Corporation USB 1.1 Controller
[10b9:5237] (rev 03) (prog-if 10 [OHCI])
        Subsystem: Toshiba America Info Systems Unknown device [1179:0004]
        Flags: bus master, medium devsel, latency 64, IRQ 11
        Memory at f7eff000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: usblp: Use correct DMA address in case of probe error
Pete Zaitcev [Tue, 22 May 2007 03:52:44 +0000 (20:52 -0700)]
USB: usblp: Use correct DMA address in case of probe error

Looks like the error path had a copy-paste error. The normal exit path
uses correct URB already.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix debug output of ark3116
Jan Engelhardt [Thu, 17 May 2007 15:16:44 +0000 (17:16 +0200)]
USB: Fix debug output of ark3116

Fix debug output. Previously, it would output "0xFFFFFFB0" on 32-bit
archs (and probably "0xFFFFFFFFFFFFFFB0" on 64-bits), because buf is
taken as signed char, which is promoted to signed int, while %x always
expects an unsigned int.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Onetouch - switch to using input_dev->dev.parent
Dmitry Torokhov [Tue, 8 May 2007 04:31:30 +0000 (00:31 -0400)]
USB: Onetouch - switch to using input_dev->dev.parent

In preparation for struct class_device -> struct device input
core conversion, switch to using input_dev->dev.parent when
specifying device position in sysfs tree.

Also, do not access input_dev->private directly, use helpers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: don't try to kzalloc 0 bytes
Alan Stern [Tue, 15 May 2007 21:40:37 +0000 (17:40 -0400)]
USB: don't try to kzalloc 0 bytes

This patch (as907) prevents us from trying to allocate 0 bytes
when an interface has no endpoint descriptors.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove short initial timeout for device descriptor fetch
Alan Stern [Fri, 11 May 2007 14:19:04 +0000 (10:19 -0400)]
USB: remove short initial timeout for device descriptor fetch

This patch (as905) removes a micro-optimization from the hub port
initialization code.  Previously we had been using a short timeout on
the first attempt the read the device descriptor; now we will use the
standard timeout length.

It's not clear that the short timeout ever provided any benefit.  And
now we know of one case where it actually hurts: The device can't meet
the short timeout and then it gets terminally confused.

This fixes Bugzilla #8444.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Deref URB after usbmon is done with it
Pete Zaitcev [Sat, 12 May 2007 05:00:29 +0000 (22:00 -0700)]
USB: Deref URB after usbmon is done with it

I haven't personally run across an oops because of this, but I feel safer
with this fix in place.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Remove duplicate IDs from option card driver
Ben Collins [Wed, 16 May 2007 20:49:54 +0000 (16:49 -0400)]
USB: Remove duplicate IDs from option card driver

Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: auerswald: fix file release handler
Andrew Morton [Fri, 11 May 2007 06:04:14 +0000 (23:04 -0700)]
USB: auerswald: fix file release handler

If this down_interruptible() does fail due to signal_pending() then the state
of the driver will get trashed in interesting ways, because userspace cannot
and will not retry the close().

Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning
Li Yang [Sat, 28 Apr 2007 06:07:32 +0000 (14:07 +0800)]
USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning

Change PORT_WIDTH bit for UMTI_WIDE mode and fix a compile warning
introduced in last revision.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: set the correct Interrupt interval in usb_bulk_msg
Alan Stern [Mon, 23 Apr 2007 21:30:32 +0000 (17:30 -0400)]
USB: set the correct Interrupt interval in usb_bulk_msg

This patch (as902) fixes a mistake I introduced into usb_bulk_msg().
usb_fill_int_urb() already does the bit-shifting calculation for
high-speed Interrupt intervals; it shouldn't be done twice.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
16 years agoUSB: New device PID for ftdi_sio driver
Neil \"Superna\" ARMSTRONG [Wed, 25 Apr 2007 18:34:28 +0000 (20:34 +0200)]
USB: New device PID for ftdi_sio driver

Hello,

I need to use MaxStream's PKG-U modules which includes a ftdi sio chipset for
usb2serial communication, here are the patches for handling Maxstream's modules.

The VID & PID to use with the open-source driver are provided on the CD-ROM
bundled with the modules.

From: Neil Superna ARMSTRONG <superna@na-prod.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove unneeded WARN_ON
Alan Stern [Thu, 5 Apr 2007 20:07:44 +0000 (16:07 -0400)]
USB: remove unneeded WARN_ON

This patch (as883) removes an out-of-date WARN_ON from the main HCD
endpoint-disable routine.  The warning is triggered whenever an
endpoint is disabled while the root hub is suspended.  In the past
that may not have been legal, but it definitely is legal now.  Merely
unbinding a USB driver will do it.

Furthermore, I've never seen any occurrences of this warning that
really did signal an actual bug or error condition.  At this point it
has outlived its purpose.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
16 years agoUSB: more autosuspend timer stuff
Alan Stern [Thu, 5 Apr 2007 20:03:49 +0000 (16:03 -0400)]
USB: more autosuspend timer stuff

This patch (as879) ties up some loose ends from an earlier patch.
These are things I didn't think to include at the time but which
clearly belonged there.

If an autosuspend fails because driver activity races with
the autosuspend call, restart the autosuspend timer.

When a device is resumed by an external request, it counts
as device activity and should update the last_busy time so
that the next autoresume won't occur immediately.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoEHCI: fix problem with BIOS handoff
Alan Stern [Thu, 5 Apr 2007 20:06:53 +0000 (16:06 -0400)]
EHCI: fix problem with BIOS handoff

This patch (as882) fixes a problem with the EHCI BIOS handoff.  On my
machine, the BIOS configures the controller and the handoff fails,
leaving the controller configured.  During resume-from-disk, this
confuses ehci-hcd into thinking that the controller has not been
tampered with.

The problem is fixed by turning off the Configured Flag whenever a
BIOS handoff is attempted, whether it succeeds or not.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: address FIXME in usbnet w.r.t drivers claiming multiple interfaces
Oliver Neukum [Mon, 30 Apr 2007 08:37:44 +0000 (01:37 -0700)]
USB: address FIXME in usbnet w.r.t drivers claiming multiple interfaces

This fixes the issue of drivers claiming multiple interfaces. Operations
are stopped as soon as an interface is suspend and resumed only as
all interfaces have been resumed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove usb DocBook warnings
David Brownell [Mon, 30 Apr 2007 02:51:05 +0000 (19:51 -0700)]
USB: remove usb DocBook warnings

This just removes some warnings generated by the Docbook tools when
turning USB (host and peripheral side) kerneldoc into HTML; they're
all about missing ID attributes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: handle more rndis_host oddities
David Brownell [Sun, 29 Apr 2007 17:09:47 +0000 (10:09 -0700)]
USB: handle more rndis_host oddities

Workaround another device firmware bug, wherein CDC descriptors get
placed in a wrong place never previously observed in the wild.

Fix a bug where a seeming RNDIS device returns a bogus response during
device initialization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix more ftdi-elan/u132-hcd #include lossage
David Brownell [Sun, 29 Apr 2007 17:21:14 +0000 (10:21 -0700)]
USB: fix more ftdi-elan/u132-hcd #include lossage

Partial fix for bogosity in the ftdi-elan and u132-hcd drivers ... these
have no business including with the internals of other drivers, much less
doing so in a broken way!!

A previous patch resolved one build fix, this resolves another...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb-storage: ignore Sitecom WL-117 USB-WLAN
Matthew Davidson [Tue, 1 May 2007 00:15:01 +0000 (01:15 +0100)]
usb-storage: ignore Sitecom WL-117 USB-WLAN

The Sitecom WL-117 is another "driverless" ZD1211 device where the virtual
windows driver CD must be ejected before the WLAN device appears.

zd1211rw takes care of the ejecting, but usb-storage must be told not to claim
the device.

From: Matthew Davidson <mj.davidson@gmail.com>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove useless check in mos7840 found by coverity
Oliver Neukum [Wed, 2 May 2007 08:17:50 +0000 (10:17 +0200)]
USB: remove useless check in mos7840 found by coverity

this useless check should be removed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix omninet memory leak found by coverity
Oliver Neukum [Wed, 2 May 2007 08:33:10 +0000 (10:33 +0200)]
USB: fix omninet memory leak found by coverity

the transfer of allocating the descriptor in attach and no longer in open
was incomplete resulting in a memory leak coverity spotted. This fix
is against the patch set you posted.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoInput: ads7846 - SPI_CPHA mode bugfix
Semih Hazar [Wed, 23 May 2007 03:35:12 +0000 (23:35 -0400)]
Input: ads7846 - SPI_CPHA mode bugfix

In commit [1] the SPI mode is set to 1, but it should be 0.  As stated
in the commit, ads784x samples the data on the rising edge.  SPI mode 1
samples on the falling edge [2] though.

The root cause of this is a bug in the omap_uwire code, which treats
CPHA=1 incorrectly; so these two bugs cancel each other out on one
of the main regression test platforms for this driver.

[1] kernel.org GIT 7937e86a70235e1584486654687dc9908a11e00a
[2] http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: ads7846 - document that it handles tsc2046 too
David Brownell [Wed, 23 May 2007 03:28:40 +0000 (23:28 -0400)]
Input: ads7846 - document that it handles tsc2046 too

The TSC2046 is an updated version of the ADS7846 ... mention that in
the Kconfig helptext and driver source.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: input-polldev - add module info
Eric Piel [Wed, 23 May 2007 03:28:03 +0000 (23:28 -0400)]
Input: input-polldev - add module info

This is required to load it as a module, as GPL-compatible
license is necessary to use workqueues.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: ucb1x00-ts - remove commented out code
Dmitry Torokhov [Tue, 15 May 2007 03:52:22 +0000 (23:52 -0400)]
Input: ucb1x00-ts - remove commented out code

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: ucb1400_ts - use sched_setscheduler()
Satoru Takeuchi [Tue, 15 May 2007 03:52:07 +0000 (23:52 -0400)]
Input: ucb1400_ts - use sched_setscheduler()

Fix Philips UCB1400 driver to use sched_setscheduler() instead of setting
the fields of task_struct directly.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: ALPS - force stream mode
Dmitry Torokhov [Tue, 15 May 2007 03:51:54 +0000 (23:51 -0400)]
Input: ALPS - force stream mode

ALPS appears to need SETSTREAM command after reset, otherwise it
does not produce any data. Now that we do not request stream mode
by default individual drivers need to take care of it.

[Jason Riedy <ejr@cs.berkeley.edu> - fix oops]

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: iforce - minor clean-ups
Johann Deneux [Mon, 14 May 2007 04:09:33 +0000 (00:09 -0400)]
Input: iforce - minor clean-ups

Signed-off-by: Johann Deneux <johann.deneux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: iforce - fix force feedback not working
Johann Deneux [Mon, 14 May 2007 04:09:28 +0000 (00:09 -0400)]
Input: iforce - fix force feedback not working

Use an interrupt URB to send force-feedback data to the device
instead of a bulk URB. This was broken since 2.6.18.

Signed-off-by: Johann Deneux <johann.deneux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Wed, 23 May 2007 01:15:14 +0000 (18:15 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c-s3c2410: Fix build warning
  i2c-tiny-usb: Fix truncated adapter name
  i2c: Legacy i2c drivers shouldn't issue uevents

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Wed, 23 May 2007 00:26:18 +0000 (17:26 -0700)]
Merge /pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix dreamcast build for IRQ changes.
  sh: Fix clock multiplier on SH7722.
  sh: Wire up kdump crash kernel exec in die().
  sh: sr.bl toggling around idle sleep.
  sh: disable genrtc support.
  fs: Kill sh dependency for binfmt_flat.
  sh: Disable psw support for R7785RP.
  sh: Fix page size alignment in __copy_user_page().
  sh: Fix up various compile warnings for SE boards.
  sh: Wire up signalfd/timerfd/eventfd syscalls.
  sh: revert addition of page fault notifiers
  spelling fixes: arch/sh/
  input: hp680_ts compile fixes.
  sh: landisk: Header cleanups.
  sh: landisk: rtc-rs5c313 support.
  sh: Kill off pmb slab cache destructor.
  sh: Fix up psw build rules for r7780rp.
  sh: Shut up compiler warnings in __do_page_fault().

16 years ago[RTNETLINK]: Remove remains of wireless extensions over rtnetlink
Patrick McHardy [Wed, 23 May 2007 00:00:49 +0000 (17:00 -0700)]
[RTNETLINK]: Remove remains of wireless extensions over rtnetlink

Remove some unused variables and function arguments related to the
recently removed wireless extensions over rtnetlink.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[RTNETLINK]: Allow changing of subsets of netdevice flags in rtnl_setlink
Patrick McHardy [Wed, 23 May 2007 00:00:01 +0000 (17:00 -0700)]
[RTNETLINK]: Allow changing of subsets of netdevice flags in rtnl_setlink

rtnl_setlink doesn't allow to change subsets of the flags, just to override
the set entirely by a new one. This means that for simply setting a device
up or down userspace first needs to query the current flags, change it and
send the changed flags back, which is racy and needlessly complicated.

Mask the flags using ifi_change since this is what it is intended for.
For backwards compatibility treat ifi_change == 0 as ~0 (even though it
seems quite unlikely that anyone has been using this so far).

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Tue, 22 May 2007 23:47:51 +0000 (16:47 -0700)]
Merge branch 'master' of ssh:///linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (5691): Ov7670: reset clkrc in rgb565 mode
  V4L/DVB (5690): Cafe_ccic: Properly power down the sensor
  V4L/DVB (5680): Tuner-simple.c fix suport for SECAM with FI1216MF
  V4L/DVB (5630): Dvb-core: Handle failures to create devices
  V4L/DVB (5639a): Fix dst usage count
  V4L/DVB (5670): Adding new fields to v4l2_pix_format broke the ABI, reverted that change
  V4L/DVB (5640): Fix: em28xx shouldn't be selecting VIDEO_BUF
  V4L/DVB (5639): Fix Kconfig dependencies for ivtv

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 22 May 2007 23:46:29 +0000 (16:46 -0700)]
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:
  [IA64] fix kmalloc(0) in arch/ia64/pci/pci.c
  [IA64] Only unwind non-running tasks.
  [IA64] Improve unwind checking.
  [IA64] Yet another section mismatch warning
  [IA64] Fix bogus messages about system calls not implemented.

16 years ago[AF_RXRPC]: Make call state names available if CONFIG_PROC_FS=n
David Howells [Tue, 22 May 2007 23:14:24 +0000 (16:14 -0700)]
[AF_RXRPC]: Make call state names available if CONFIG_PROC_FS=n

Make the call state names array available even if CONFIG_PROC_FS is
disabled as it's used in other places (such as debugging statements)
too.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AF_RXRPC]: AF_RXRPC depends on IPv4
David Howells [Tue, 22 May 2007 23:13:49 +0000 (16:13 -0700)]
[AF_RXRPC]: AF_RXRPC depends on IPv4

Add a dependency for CONFIG_AF_RXRPC on CONFIG_INET.  This fixes this
error:

net/built-in.o: In function `rxrpc_get_peer':
(.text+0x42824): undefined reference to `ip_route_output_key'

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Fix warnings with casting int to pointer
Herbert Xu [Tue, 22 May 2007 23:12:26 +0000 (16:12 -0700)]
[IPSEC]: Fix warnings with casting int to pointer

This patch adds some casts to shut up the warnings introduced by my
last patch that added a common interator function for xfrm algorightms.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoV4L/DVB (5691): Ov7670: reset clkrc in rgb565 mode
Jonathan Corbet [Tue, 22 May 2007 03:39:00 +0000 (00:39 -0300)]
V4L/DVB (5691): Ov7670: reset clkrc in rgb565 mode

A bug in the ov7670 sensor causes it to introduce noise unless the CLKRC
register is rewritten *after* setting the image mode.  Naturally,
resetting CLKRC in this way will cause other modes to fail.  So
carefully poke the register only when indicated.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (5690): Cafe_ccic: Properly power down the sensor
Jonathan Corbet [Tue, 22 May 2007 03:37:58 +0000 (00:37 -0300)]
V4L/DVB (5690): Cafe_ccic: Properly power down the sensor

The proper method for powering down the sensor on OLPC systems has
changed somewhat; in particular, the sensor must be powered down
completely (rather than simply told to power down) or the associated
"camera active" LED will stay on.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (5680): Tuner-simple.c fix suport for SECAM with FI1216MF
matthieu castet [Mon, 21 May 2007 14:15:09 +0000 (11:15 -0300)]
V4L/DVB (5680): Tuner-simple.c fix suport for SECAM with FI1216MF

Allow to use SECAM-BG with the FI1216MF tuner.

The selection is done with the secam=B module argument.

The default behaviour should be the same as before.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (5630): Dvb-core: Handle failures to create devices
Simon Arlott [Sun, 6 May 2007 23:56:14 +0000 (20:56 -0300)]
V4L/DVB (5630): Dvb-core: Handle failures to create devices

dvb-core is not started early enough when device drivers that use dvb are
compiled in so dvb_register_device fails (silently) since dvb_class is
NULL, this runs dvb_init using subsys_initcall instead of module_init.

dvb_register_device will now check the return value of class_device_create.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (5639a): Fix dst usage count
Manu Abraham [Sun, 13 May 2007 15:23:43 +0000 (12:23 -0300)]
V4L/DVB (5639a): Fix dst usage count

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>