linux-2.6-microblaze.git
17 years agosched: optimize vruntime based scheduling
Ingo Molnar [Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)]
sched: optimize vruntime based scheduling

optimize vruntime based scheduling.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: move sched_feat() definitions
Ingo Molnar [Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)]
sched: move sched_feat() definitions

move sched_feat() definitions so that it can be used sooner by generic
code too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: introduce se->vruntime
Ingo Molnar [Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)]
sched: introduce se->vruntime

introduce se->vruntime as a sum of weighted delta-exec's, and use that
as the key into the tree.

the idea to use absolute virtual time as the basic metric of scheduling
has been first raised by William Lee Irwin, advanced by Tong Li and first
prototyped by Roman Zippel in the "Really Fair Scheduler" (RFS) patchset.

also see:

   http://lkml.org/lkml/2007/9/2/76

for a simpler variant of this patch.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: clean up calc_weighted()
Ingo Molnar [Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)]
sched: clean up calc_weighted()

clean up calc_weighted() - we always use the normalized shift so
it's not needed to pass that in. Also, push the non-nice0 branch
into the function.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: speed up update_load_add/_sub()
Ingo Molnar [Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)]
sched: speed up update_load_add/_sub()

speed up update_load_add/_sub() by not delaying the division - this
reduces CPU pipeline dependencies.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: uninline __enqueue_entity()/__dequeue_entity()
Ingo Molnar [Mon, 15 Oct 2007 15:00:04 +0000 (17:00 +0200)]
sched: uninline __enqueue_entity()/__dequeue_entity()

suggested by Roman Zippel: uninline __enqueue_entity() and
__dequeue_entity().

this reduces code size:

      text    data     bss     dec     hex filename
     25385    2386      16   27787    6c8b sched.o.before
     25257    2386      16   27659    6c0b sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: simplify SCHED_FEAT_* code
Peter Zijlstra [Mon, 15 Oct 2007 15:00:03 +0000 (17:00 +0200)]
sched: simplify SCHED_FEAT_* code

Peter Zijlstra suggested to simplify SCHED_FEAT_* checks via the
sched_feat(x) macro.

No code changed:

   text    data     bss     dec     hex filename
   38895    3550      24   42469    a5e5 sched.o.before
   38895    3550      24   42469    a5e5 sched.o.after

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: cleanup: simplify cfs_rq_curr() methods
Ingo Molnar [Mon, 15 Oct 2007 15:00:03 +0000 (17:00 +0200)]
sched: cleanup: simplify cfs_rq_curr() methods

cleanup: simplify cfs_rq_curr() methods - now that the cfs_rq->curr
pointer is unconditionally present, remove the wrappers.

  kernel/sched.o:
      text    data     bss     dec     hex filename
     11784     224    2012   14020    36c4 sched.o.before
     11784     224    2012   14020    36c4 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: track cfs_rq->curr on !group-scheduling too
Ingo Molnar [Mon, 15 Oct 2007 15:00:03 +0000 (17:00 +0200)]
sched: track cfs_rq->curr on !group-scheduling too

Noticed by Roman Zippel: use cfs_rq->curr in the !group-scheduling
case too. Small micro-optimization and cleanup effect:

   text    data     bss     dec     hex filename
   36269    3482      24   39775    9b5f sched.o.before
   36177    3486      24   39687    9b07 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: remove precise CPU load calculations #2
Ingo Molnar [Mon, 15 Oct 2007 15:00:03 +0000 (17:00 +0200)]
sched: remove precise CPU load calculations #2

continued removal of precise CPU load calculations.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: remove precise CPU load
Ingo Molnar [Mon, 15 Oct 2007 15:00:03 +0000 (17:00 +0200)]
sched: remove precise CPU load

CPU load calculations are statistical anyway, and there's little benefit
from having it calculated on every scheduling event. So remove this code,
it gets rid of a divide from the scheduler wakeup and context-switch
fastpath.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: remove stat_gran
Ingo Molnar [Mon, 15 Oct 2007 15:00:03 +0000 (17:00 +0200)]
sched: remove stat_gran

remove the stat_gran code - it was disabled by default and it causes
unnecessary overhead.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: use constants if !CONFIG_SCHED_DEBUG
Ingo Molnar [Mon, 15 Oct 2007 15:00:02 +0000 (17:00 +0200)]
sched: use constants if !CONFIG_SCHED_DEBUG

use constants if !CONFIG_SCHED_DEBUG.

this speeds up the code and reduces code-size:

    text    data     bss     dec     hex filename
   27464    3014      16   30494    771e sched.o.before
   26929    3010      20   29959    7507 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: uniform tunings
Ingo Molnar [Mon, 15 Oct 2007 15:00:02 +0000 (17:00 +0200)]
sched: uniform tunings

use the same defaults on both UP and SMP.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: debug: track maximum 'slice'
Ingo Molnar [Mon, 15 Oct 2007 15:00:02 +0000 (17:00 +0200)]
sched: debug: track maximum 'slice'

track the maximum amount of time a task has executed while
the CPU load was at least 2x. (i.e. at least two nice-0
tasks were runnable)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: small sched_debug cleanup
Ingo Molnar [Mon, 15 Oct 2007 15:00:02 +0000 (17:00 +0200)]
sched: small sched_debug cleanup

small kernel/sched_debug.c cleanup - break up
multi-variable assignment.

no code changed:

   text    data     bss     dec     hex filename
   38869    3550      24   42443    a5cb sched.o.before
   38869    3550      24   42443    a5cb sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: use list_for_each_entry_safe() in __wake_up_common()
Matthias Kaehlcke [Mon, 15 Oct 2007 15:00:02 +0000 (17:00 +0200)]
sched: use list_for_each_entry_safe() in __wake_up_common()

Use list_for_each_entry_safe() instead of list_for_each_safe() in
__wake_up_common()

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: resched task in task_new_fair()
Ingo Molnar [Mon, 15 Oct 2007 15:00:02 +0000 (17:00 +0200)]
sched: resched task in task_new_fair()

to get full child-runs-first semantics make sure the parent is
rescheduled.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosched: fix sysctl_sched_child_runs_first flag
Ingo Molnar [Mon, 15 Oct 2007 15:00:01 +0000 (17:00 +0200)]
sched: fix sysctl_sched_child_runs_first flag

fix the sched_child_runs_first flag: always call into ->task_new()
if we are on the same CPU, as SCHED_OTHER tasks depend on it for
correct initial setup.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoFix compile while compiling drivers/mmc/host/mmc_spi.o with !BLOCK
David Brownell [Sun, 14 Oct 2007 21:50:25 +0000 (14:50 -0700)]
Fix compile while compiling drivers/mmc/host/mmc_spi.o with !BLOCK

Make sure the mmc_spi driver can build without CONFIG_BLOCK.
Issue noted by "Avuton Olrich" <avuton@gmail.com> and randconfig.

While that won't be a common configuration, sometimes embedded
boards use SDIO to interface WLAN or Bluetooth chips (vs some
parallel interface), and don't provide an MMC/SD socket for use
with flash memory cards.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86
Linus Torvalds [Sun, 14 Oct 2007 23:47:05 +0000 (16:47 -0700)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86:
  x86: force timer broadcast on late AMD C1E detection
  x86: move local APIC timer init to the end of start_secondary()
  clockevents: introduce force broadcast notifier
  x86: fix missing include for vsyscall

17 years agosky2: reboot fix
Stephen Hemminger [Sun, 14 Oct 2007 20:25:22 +0000 (13:25 -0700)]
sky2: reboot fix

The call to napi_disable() in the PCI shutdown handler is problematic,
and is aggravated by the new NAPI.
Also, make sure watchdog timer doesn't go off.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86: force timer broadcast on late AMD C1E detection
Thomas Gleixner [Sun, 14 Oct 2007 20:57:45 +0000 (22:57 +0200)]
x86: force timer broadcast on late AMD C1E detection

The 64bit SMP bootup is slightly different to the 32bit one. It enables
the boot CPU local APIC timer before all CPUs are brought up. Some AMD C1E
systems have the C1E feature flag only set in the secondary CPU. Due to
the early enable of the boot CPU local APIC timer the APIC timer is
registered as a fully functional device. When we detect the wreckage during
the bringup of the secondary CPU, we need to force the boot CPU into
broadcast mode.

Check the C1E caused APIC timer disable, when the secondary APIC timer is
initialized. If the boot CPU APIC timer was registered as a functional
clock event device, then fix this up and utilize the
CLOCK_EVT_NOTIFY_BROADCAST_FORCE mechanism to force the already
registered boot CPU APIC timer into broadcast mode.

Tested by force injecting the failure mode.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: move local APIC timer init to the end of start_secondary()
Thomas Gleixner [Sun, 14 Oct 2007 20:57:45 +0000 (22:57 +0200)]
x86: move local APIC timer init to the end of start_secondary()

Preparatory patch for the AMD C1E wreckage fixup.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoclockevents: introduce force broadcast notifier
Thomas Gleixner [Sun, 14 Oct 2007 20:57:45 +0000 (22:57 +0200)]
clockevents: introduce force broadcast notifier

The 64bit SMP bootup is slightly different to the 32bit one. It enables
the boot CPU local APIC timer before all CPUs are brought up. Some AMD C1E
systems have the C1E feature flag only set in the secondary CPU. Due to
the early enable of the boot CPU local APIC timer the APIC timer is
registered as a fully functional device. When we detect the wreckage during
the bringup of the secondary CPU, we need to force the boot CPU into
broadcast mode.

Add a new notifier reason and implement the force broadcast in the clock
events layer.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agox86: fix missing include for vsyscall
Dave Jones [Sun, 14 Oct 2007 20:57:45 +0000 (22:57 +0200)]
x86: fix missing include for vsyscall

 > Maybe I just picked a bad time to try, but...
 >
 > arch/x86/kernel/alternative.c: In function 'apply_alternatives':
 > arch/x86/kernel/alternative.c:191: error: 'VSYSCALL_START' undeclared (first use in this function)
 > arch/x86/kernel/alternative.c:191: error: (Each undeclared identifier is reported only once
 > arch/x86/kernel/alternative.c:191: error: for each function it appears in.)
 > arch/x86/kernel/alternative.c:191: error: 'VSYSCALL_END' undeclared (first use in this function)
 > make[1]: *** [arch/x86/kernel/alternative.o] Error 1
 > make: *** [arch/x86/kernel] Error 2

Try this.

Include missing header for vsyscall.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Sun, 14 Oct 2007 19:50:19 +0000 (12:50 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: (53 commits)
  hwmon: (vt8231) fix sparse warning
  hwmon: (sis5595) fix sparse warning
  hwmon: (w83627hf) don't assume bank 0
  hwmon: (w83627hf) Fix setting fan min right after driver load
  hwmon: (w83627hf) De-macro sysfs callback functions
  hwmon: Add new combined driver for FSC chips
  hwmon: (ibmpex) Release IPMI user if hwmon registration fails
  hwmon: (dme1737) Add sch311x support
  hwmon: (dme1737) group functions logically
  hwmon: (dme1737) cleanups
  hwmon: IBM power meter driver
  hwmon: (coretemp) Add support for Celeron 4xx
  hwmon: (lm87) Disable VID when it should be
  hwmon: (w83781d) Add individual alarm and beep files
  hwmon: VRM is not read from registers
  MAINTAINERS: update hwmon subsystem git trees
  hwmon: Fix the code examples in documentation
  hwmon: update sysfs interface document - error handling
  hwmon: (thmc50) Fix a debug message
  hwmon: (thmc50) Don't create temp3 if not enabled
  ...

17 years agohisax: hfc_usb: update to current CVS version
Martin Bachem [Sun, 14 Oct 2007 16:10:30 +0000 (18:10 +0200)]
hisax: hfc_usb: update to current CVS version

- killed paranoid NULL Pointer check
- human readable LED states
- support for "Eicon DIVA USB 4.0" (0x071d/0x1005)

Signed-off-by: Martin Bachem <info@colognechip.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoipg: endianness fixes
Al Viro [Sun, 14 Oct 2007 18:41:29 +0000 (19:41 +0100)]
ipg: endianness fixes

if your mask is host-endian, you should apply it after le64_to_cpu();
if it's little-endian - before.  Doing both (for the same mask and
little-endian value) is broken.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoipg: endianness annotations
Al Viro [Sun, 14 Oct 2007 18:41:19 +0000 (19:41 +0100)]
ipg: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix endianness bug in inet_lro
Al Viro [Sun, 14 Oct 2007 18:41:09 +0000 (19:41 +0100)]
fix endianness bug in inet_lro

all uses of and almost all assignments to lro_desc->tcp_ack assume that it's
net-endian; one converts net-endian to host-endian and sticks it in
lro_desc->tcp_ack.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoinet_lro: trivial endianness annotations
Al Viro [Sun, 14 Oct 2007 18:40:59 +0000 (19:40 +0100)]
inet_lro: trivial endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agohamradio: ->hard_header() takes packet type in host-endian
Al Viro [Sun, 14 Oct 2007 18:40:49 +0000 (19:40 +0100)]
hamradio: ->hard_header() takes packet type in host-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore tulip endianness annotations
Al Viro [Sun, 14 Oct 2007 18:40:39 +0000 (19:40 +0100)]
more tulip endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoibm_newemac annotations (iomem, NULL noise)
Al Viro [Sun, 14 Oct 2007 18:36:10 +0000 (19:36 +0100)]
ibm_newemac annotations (iomem, NULL noise)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoendianness annotations in arm io.h
Al Viro [Sun, 14 Oct 2007 18:36:00 +0000 (19:36 +0100)]
endianness annotations in arm io.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore low-hanging fruits - kernel, fs, lib signedness
Al Viro [Sun, 14 Oct 2007 18:35:50 +0000 (19:35 +0100)]
more low-hanging fruits - kernel, fs, lib signedness

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore trivial signedness fixes in drivers
Al Viro [Sun, 14 Oct 2007 18:35:40 +0000 (19:35 +0100)]
more trivial signedness fixes in drivers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosignedness: module_param_array nump argument
Al Viro [Sun, 14 Oct 2007 18:35:30 +0000 (19:35 +0100)]
signedness: module_param_array nump argument

... should be unsigned int

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolong vs. unsigned long - low-hanging fruits in drivers
Al Viro [Sun, 14 Oct 2007 18:35:20 +0000 (19:35 +0100)]
long vs. unsigned long - low-hanging fruits in drivers

deal with signedness of the stuff passed to set_bit() et.al.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofrv: missing casts in cmpxchg()
Al Viro [Sun, 14 Oct 2007 18:35:10 +0000 (19:35 +0100)]
frv: missing casts in cmpxchg()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosynclink_gt endianness annotations
Al Viro [Sun, 14 Oct 2007 18:34:30 +0000 (19:34 +0100)]
synclink_gt endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoendian-clean in_le64/out_le64
Al Viro [Sun, 14 Oct 2007 18:35:00 +0000 (19:35 +0100)]
endian-clean in_le64/out_le64

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofs/partitions/sun.c endianness annotations
Al Viro [Sun, 14 Oct 2007 18:34:50 +0000 (19:34 +0100)]
fs/partitions/sun.c endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofw-cdev __user annotations
Al Viro [Sun, 14 Oct 2007 18:34:40 +0000 (19:34 +0100)]
fw-cdev __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agompc5200_wdt: __user annotations
Al Viro [Sun, 14 Oct 2007 18:34:20 +0000 (19:34 +0100)]
mpc5200_wdt: __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomm/migrate.c __user annotation
Al Viro [Sun, 14 Oct 2007 18:34:10 +0000 (19:34 +0100)]
mm/migrate.c __user annotation

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix breakage in sctp getsockopt
Al Viro [Sun, 14 Oct 2007 18:21:20 +0000 (19:21 +0100)]
fix breakage in sctp getsockopt

copy_to_user() into on-stack array

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoremove duplicate initializer (macvlan)
Al Viro [Sun, 14 Oct 2007 18:22:59 +0000 (19:22 +0100)]
remove duplicate initializer (macvlan)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoskb->tail in ibm_newemac should be skb_tail_pointer()
Al Viro [Sun, 14 Oct 2007 18:20:30 +0000 (19:20 +0100)]
skb->tail in ibm_newemac should be skb_tail_pointer()

... since that sucker is not 32bit-only and on 64bit skb->tail is an
offset, not a pointer.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agohwmon: (vt8231) fix sparse warning
Mark M. Hoffman [Sun, 14 Oct 2007 19:00:24 +0000 (15:00 -0400)]
hwmon: (vt8231) fix sparse warning

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: (sis5595) fix sparse warning
Mark M. Hoffman [Sun, 14 Oct 2007 18:57:35 +0000 (14:57 -0400)]
hwmon: (sis5595) fix sparse warning

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Sun, 14 Oct 2007 16:03:42 +0000 (09:03 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (21 commits)
  HID: hidraw_connect() memleak fix
  HID: add hidraw interface
  USB HID: provide hook for hidraw write()
  HID: hiddev: Add 32bit ioctl compatibilty
  HID: Add GeneralTouch touchscreen to the blacklist
  HID: add support for Microsoft Wireless Laser Keyboard 6000
  Input: add KEY_LOGOFF
  USBHID: report descriptor fix for MacBook JIS keyboard
  HID: trivial fixes in hid-debug
  HID: fix input mapping for Microsoft Ergonomic Keyboard
  HID: use hid-plff driver for GreenAsia 0e8f:0003 devices
  USBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 display
  HID: enable hiddev for the SantaRosa MacBookPro IR receiver
  USBHID: add CM109 device to blacklist
  HID: Report usage codes of keys as EV_MSC scancode events
  HID: ignore all non-LED usages in output fields in hid-input
  HID: fix whitespace damage
  HID: add support for Thrustmaster FGT Force Feedback wheel
  HID: minimal autosuspend support for USB HID devices
  HID: add support for Microsoft Natural Ergonomic Keyboard 4000
  ...

17 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Sun, 14 Oct 2007 16:02:40 +0000 (09:02 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  [MTD] fix mtdconcat for subpage-write NAND
  [MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.
  [MTD] [OneNAND] Return only negative error codes
  [MTD] [OneNAND] Synchronize block locking operations
  UBI: return correct error code
  UBI: remove useless inlines
  UBI: fix atomic LEB change problems
  UBI: use byte hexdump
  UBI: do not use vmalloc on I/O path
  UBI: allocate memory with GFP_NOFS
  UBI: use linux print_hex_dump(), not home-grown one
  UBI: don't use array index before testing if it is negative
  UBI: add more prints
  UBI: fix sparse warnings
  UBI: fix leak in ubi_scan_erase_peb

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sun, 14 Oct 2007 15:59:48 +0000 (08:59 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (23 commits)
  [SPARC64]: virt_to_real_irq_table --> virt_irq_table
  [SPARC64]: virt_irq --> bucket mapping no longer necessary
  [SPARC64]: Kill ugly __bucket() macro.
  [SPARC64]: Kill ugly __irq_ino() macro.
  [SPARC64]: Only use bypass accesses to INO buckets.
  [SPARC64]: Update defconfig.
  [SPARC64]: Use sun4v VIRQ interfaces as intended.
  [SPARC64]: Allocate ivector_table dynamically.
  [SPARC64]: Access ivector_table[] using physical addresses.
  [SPARC64]: Make IVEC pointers 64-bit.
  [SPARC64]: Fix register usage in xor_raid_4().
  [SPARC64]: Kill pci_memspace_mask.
  [SPARC64]: Consolidate MSI support code.
  [SPARC/64]: Move of_platform_driver initialisations: arch/sparc{,64}.
  [SPARC64]: Fix bugs in SYSV IPC handling in 64-bit processes.
  [SPARC/64]: Prepare to remove of_platform_driver name.
  [SPARC32]: Add irqflags.h to sparc32 and use it from generic code.
  [SPARC64]: beautify vmlinux.lds
  [SPARC]: beautify vmlinux.lds
  [SPARC64]: Enable MSI on sun4u Fire PCI-E controllers.
  ...

17 years agompc52xx-uart: fix compile warning (format type mismatch)
Grant Likely [Sun, 14 Oct 2007 04:37:02 +0000 (22:37 -0600)]
mpc52xx-uart: fix compile warning (format type mismatch)

Trivial compile warning fix

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agompc52xx-ata: fix compile warning (unused variable)
Grant Likely [Sun, 14 Oct 2007 04:36:57 +0000 (22:36 -0600)]
mpc52xx-ata: fix compile warning (unused variable)

Trivial unused variable fix

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoXilinxFB: typo bugfix
Grant Likely [Sun, 14 Oct 2007 04:13:32 +0000 (22:13 -0600)]
XilinxFB: typo bugfix

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoLite5200 shouldn't mess with ROOT_DEV
Grant Likely [Sun, 14 Oct 2007 04:13:27 +0000 (22:13 -0600)]
Lite5200 shouldn't mess with ROOT_DEV

There is no good reason for board platform code to mess with the ROOT_DEV.
Remove it from all in-tree platforms except powermac

This is a follow on to commit 745e1027751acbc1f14f8bbef378b491242b9c83.
The original patch had this change to lite5200.c, but it got dropped in
the psycho madness that is the 2.6.24 merge window.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore uevent fallout (drivers/base/memory.c)
Al Viro [Sun, 14 Oct 2007 05:53:45 +0000 (06:53 +0100)]
more uevent fallout (drivers/base/memory.c)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomissing include in ssb
Al Viro [Sun, 14 Oct 2007 04:51:51 +0000 (05:51 +0100)]
missing include in ssb

Using readw() and friends => needs to pull io.h and not all targets are
doing that via indirect chains.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agotypo in ibm_newemac/rgmii.c
Al Viro [Sun, 14 Oct 2007 04:50:12 +0000 (05:50 +0100)]
typo in ibm_newemac/rgmii.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouevent environment changes fallout
Al Viro [Sun, 14 Oct 2007 04:46:09 +0000 (05:46 +0100)]
uevent environment changes fallout

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'master' of git://git.infradead.org/~dedekind/ubi-2.6
David Woodhouse [Sun, 14 Oct 2007 13:29:00 +0000 (14:29 +0100)]
Merge branch 'master' of git://git.infradead.org/~dedekind/ubi-2.6

17 years agoMerge branch 'hidraw' into for-linus
Jiri Kosina [Sun, 14 Oct 2007 12:47:56 +0000 (14:47 +0200)]
Merge branch 'hidraw' into for-linus

17 years agoHID: hidraw_connect() memleak fix
Mariusz Kozlowski [Thu, 27 Sep 2007 09:24:55 +0000 (11:24 +0200)]
HID: hidraw_connect() memleak fix

It looks like hidraw_connect() is leaking memory in case of failure.
Also it should return -ENOMEM when kzalloc fails.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: add hidraw interface
Jiri Kosina [Mon, 14 May 2007 07:57:40 +0000 (09:57 +0200)]
HID: add hidraw interface

hidraw is an interface that is going to obsolete hiddev one
day.

Many userland applications are using libusb instead of using
kernel-provided hiddev interface. This is caused by various
reasons - the HID parser in kernel doesn't handle all the
HID hardware on the planet properly, some devices might require
its own specific quirks/drivers, etc.

hiddev interface tries to do its best to parse all the received
reports properly, and presents only parsed usages into userspace.
This is however often not enough, and that's the reason why
many userland applications just don't use hiddev at all, and
rather use libusb to read raw USB events and process them on
their own.

Another drawback of hiddev is that it is USB-specific.

hidraw interface provides userspace readers with really raw HID
reports, no matter what the low-level transport layer is (USB/BT),
and gives the userland applications all the freedom to process
the HID reports in a way they wish to.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUSB HID: provide hook for hidraw write()
Jiri Kosina [Mon, 14 May 2007 07:54:30 +0000 (09:54 +0200)]
USB HID: provide hook for hidraw write()

Add hook in usbhid for write() callback from hidraw. Sends the
report to the device through control pipe.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years ago[MTD] fix mtdconcat for subpage-write NAND
Chris Paulson-Ellis [Fri, 12 Oct 2007 09:54:06 +0000 (10:54 +0100)]
[MTD] fix mtdconcat for subpage-write NAND

This allows the mtdconcat driver to work with NAND flash devices that
support sub-page writes.

Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.
Adrian Hunter [Fri, 12 Oct 2007 07:34:01 +0000 (10:34 +0300)]
[MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.

When the erase callback performs some other action on the flash, it's
highly likely to deadlock unless we actually release the chip lock
before calling it.

This patch mirrors that same change already done for NAND.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [OneNAND] Return only negative error codes
Adrian Hunter [Fri, 12 Oct 2007 07:19:38 +0000 (10:19 +0300)]
[MTD] [OneNAND] Return only negative error codes

The OneNAND driver was confusing JFFS2 by returning positive error
codes.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years ago[MTD] [OneNAND] Synchronize block locking operations
Adrian Hunter [Fri, 12 Oct 2007 07:19:26 +0000 (10:19 +0300)]
[MTD] [OneNAND] Synchronize block locking operations

Ensure OneNAND's block locking operations are synchronized
like all other operations.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoHID: hiddev: Add 32bit ioctl compatibilty
Philip Langdale [Sun, 14 Oct 2007 10:03:58 +0000 (12:03 +0200)]
HID: hiddev: Add 32bit ioctl compatibilty

The hiddev driver currently lacks 32bit ioctl compatibility, so
if you're running with a 64bit kernel and 32bit userspace, it won't
work.

I'm pretty sure that the only thing missing is a compat_ioctl
implementation as all structs have fixed size fields.

With this change I can use revoco to configure my MX Revolution mouse.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: Add GeneralTouch touchscreen to the blacklist
Ilya Frolov [Thu, 11 Oct 2007 12:21:23 +0000 (14:21 +0200)]
HID: Add GeneralTouch touchscreen to the blacklist

GeneralTouch touchscreens are handled by usbtouchscreen driver,
make sure HID ignores them.

Signed-off-by: Ilya Frolov <zeylie@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: add support for Microsoft Wireless Laser Keyboard 6000
Khelben Blackstaff [Thu, 4 Oct 2007 08:35:41 +0000 (10:35 +0200)]
HID: add support for Microsoft Wireless Laser Keyboard 6000

This keyboard emits a few usages that are not handled properly by
hid-input.

Changed IS_MS_NEK4K macro to IS_MS_KB to reflect the addition
of another keyboard.

Signed-off-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoInput: add KEY_LOGOFF
Khelben Blackstaff [Thu, 4 Oct 2007 08:32:03 +0000 (10:32 +0200)]
Input: add KEY_LOGOFF

HUT 1.12 defines Logoff usage 0x19c in Consumer page. There are
keyboards out there emitting this usage code (for example Microsoft
Wireless Laser Keyboard 6000). Add this key so that HID code could
map usages to it.

Signed-off-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUSBHID: report descriptor fix for MacBook JIS keyboard
Tomoya Adachi [Wed, 3 Oct 2007 21:27:49 +0000 (23:27 +0200)]
USBHID: report descriptor fix for MacBook JIS keyboard

This patch fixes the problem, that Japanese MacBook doesn't recognize some keys
like '\'(yen, or backslash), '|'(pipe), and '_'(underscore).

It is due to that MacBook JIS keyboard (jp106) sends wrong report descriptor.
It saids "logical maximum = 0x65", so Keyboard.0089 is mapped to Key.Unknown,
while it should be accepted as Key.Yen.

Signed-off-by: Tomoya Adachi <adachi@il.is.s.u-tokyo.ac.jp>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: trivial fixes in hid-debug
Joe Perches [Wed, 26 Sep 2007 14:29:53 +0000 (16:29 +0200)]
HID: trivial fixes in hid-debug

- added KERN_DEBUG to output lines
- fixed preffered -> preferred typo
- added const to char *'s

Also, exported symbol hid_resolv_event is unused by the current
kernel tree and perhaps should be removed.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: fix input mapping for Microsoft Ergonomic Keyboard
Jiri Kosina [Tue, 25 Sep 2007 14:32:08 +0000 (16:32 +0200)]
HID: fix input mapping for Microsoft Ergonomic Keyboard

Special keys 1-5 on Microsoft Ergonomic Keyboard were mistakenly
mapped to buttons, which doesn't make a lot of sense. Fix this
mapping to KEY_F{13,18}.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: use hid-plff driver for GreenAsia 0e8f:0003 devices
Anssi Hannula [Wed, 19 Sep 2007 14:13:20 +0000 (16:13 +0200)]
HID: use hid-plff driver for GreenAsia 0e8f:0003 devices

Add 0e8f:0003 into the list of devices supported by the hid-plff
force feedback driver. These devices identify themselves as
"GreenAsia Inc.    USB Joystick     " and can be either adapters or
actual game controllers. The testing was done with a Köng Gaming
gamepad.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUSBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 display
Mike Crowe [Fri, 14 Sep 2007 08:18:07 +0000 (10:18 +0200)]
USBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 display

Use HID_QUIRK_NOGET for the ELO TS2700 touch screen USB HID device in
order to avoid a timeout during initialisation.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: enable hiddev for the SantaRosa MacBookPro IR receiver
Stelian Pop [Tue, 11 Sep 2007 21:34:55 +0000 (23:34 +0200)]
HID: enable hiddev for the SantaRosa MacBookPro IR receiver

The infrared remote receiver found in the SantaRosa MacBookPro
laptops (MacBookPro3,1) need to be forced to expose a HIDDEV
interface (instead of HIDINPUT) so that lirc can access it using
the 'macmini' driver.

The patch below adds the required quirk for forcing the HIDDEV
interface to be activated (HID_QUIRK_HIDDEV) and introduces a new
quirk which forces the HIDINPUT interface to be ignored
(HID_QUIRK_IGNORE_HIDINPUT).

Note that Apple calls this receiver 'IRController4' (info taken
from Apple's driver Info.plist). Older Mac{Book,Mini,Pro}s seem
to all use the 'IRController1' device (USB id 05ac:8240) which
doesn't need those quirks.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUSBHID: add CM109 device to blacklist
Alfred E. Heggestad [Wed, 29 Aug 2007 13:53:03 +0000 (15:53 +0200)]
USBHID: add CM109 device to blacklist

There is a separate driver cm109 for handling this device.

Signed-off-by: Alfred E. Heggestad <aeh@db.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: Report usage codes of keys as EV_MSC scancode events
Jiri Kosina [Mon, 20 Aug 2007 10:13:34 +0000 (12:13 +0200)]
HID: Report usage codes of keys as EV_MSC scancode events

Current HID layer does not report usage codes to the input layer. This feature
was previously removed, because it caused unnecessary storm of events in cases
of positioning devices, etc.

This patch adds reporting of usage codes as EV_MSC events only for key events.
We issue the EV_MSC event only if the state of the key corresponding to the
given code has changed, so that we don't report usages that are sent in every
report even if the state hasn't changed (for example Shift/Caps Lock/...
states as sent by various keyboards).

This functionality is required at least by KeyTouch in order to provide
convenient means for remapping the usage codes.

Cc: Marvin Raaijmakers <marvin.nospam@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: ignore all non-LED usages in output fields in hid-input
Jiri Kosina [Sat, 11 Aug 2007 21:39:42 +0000 (23:39 +0200)]
HID: ignore all non-LED usages in output fields in hid-input

We have to ignore all non-LED usages in output fields if the
report descriptor of the device specifies any. If we don't do
so, the devices which contain the same usages both in input and
output reports with different parameters will mess things up. In
hid-input, we currently care only for the input usages, with exception
for LEDs. All other output usages should be properly handled by
appropriate force-feedback driver.

Fixes auto-calibration for Saitek Cyborg Evo Force joystick.

Reported-by: Renato Golin <rengolin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: fix whitespace damage
Jiri Kosina [Thu, 9 Aug 2007 12:04:56 +0000 (14:04 +0200)]
HID: fix whitespace damage

Fixes some trivial whitespace damage in hid-input.c

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: add support for Thrustmaster FGT Force Feedback wheel
Dmitry Torokhov [Mon, 30 Jul 2007 12:56:26 +0000 (14:56 +0200)]
HID: add support for Thrustmaster FGT Force Feedback wheel

Rework thrustmaster force-feedback module to support devices having
different types of force feedback effects. Add signatures of
Thrustmaster FGT Rumble Force and Thrustmaster FGT Force Feedback
wheels to the list of devices dupported by the module.

Parts of the patch were lifted off a simalar patch by
Anssi Hannula <anssi.hannula@gmail.com>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: minimal autosuspend support for USB HID devices
Oliver Neukum [Wed, 11 Jul 2007 12:48:58 +0000 (14:48 +0200)]
HID: minimal autosuspend support for USB HID devices

Autosuspend for USB HID devices remains problematic as far as mice
and keyboards are concerned. While I am working on a grand solution,
here's a minimalist patch that works for those devices not continously
in use.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoHID: add support for Microsoft Natural Ergonomic Keyboard 4000
Jiri Kosina [Thu, 9 Aug 2007 11:24:11 +0000 (13:24 +0200)]
HID: add support for Microsoft Natural Ergonomic Keyboard 4000

This keyboard emits a few usages that are not handled properly by
hid-input.

The usages from MSVENDOR page are colliding with Chicony Tactical
Pad device, so we have to distinguish in runtime. Ugly ...

Also, the buttons 1-5 have to be handled in a non-standard way,
as they are emitted by the keyboard in a bitfield-like fashion, but
the field is not presented as bit-field by the keyboard. The keys can't
be pressed simultaneously, so the handling we have is correct.

This patch also extends hid_keyboard[] with KPLeftParenthesis and
KPRightParenthesis as defined by Keyboard page in HUT 1.12. The
corresponding usages are also emitted by this keyboard.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoInput: add KEY_SPELLCHECK
Jiri Kosina [Wed, 8 Aug 2007 15:19:08 +0000 (17:19 +0200)]
Input: add KEY_SPELLCHECK

HUT 1.12 defines Spell Check usage 0x1ab in Consumer page. There are
keyboards out there emitting this usage code (for example Microsoft
Natural Ergonomic Keyboard 4000). Add this key so that HID code could
map usages to it.

Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
17 years agoUBI: return correct error code
Artem Bityutskiy [Sun, 14 Oct 2007 10:01:58 +0000 (13:01 +0300)]
UBI: return correct error code

Fix the following warning:

drivers/mtd/ubi/eba.c: In function 'ubi_eba_init_scan':
drivers/mtd/ubi/eba.c:1116: warning: 'err' may be used uninitialized in this function

Pointed-to-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: remove useless inlines
Artem Bityutskiy [Thu, 13 Sep 2007 11:48:20 +0000 (14:48 +0300)]
UBI: remove useless inlines

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: fix atomic LEB change problems
Artem Bityutskiy [Thu, 13 Sep 2007 11:28:14 +0000 (14:28 +0300)]
UBI: fix atomic LEB change problems

When the UBI device is nearly full, i.e. all LEBs are mapped, we have
only one spare LEB left - the one we reserved for WL purposes. Well,
I do not count the LEBs which were reserved for bad PEB handling -
suppose NOR flash for simplicity. If an "atomic LEB change operation"
is run, and the WL unit is moving a LEB, we have no spare LEBs to
finish the operation and fail, which is not good. Moreover, if there
are 2 or more simultanious "atomic LEB change" requests, only one of
them has chances to succeed, the other will fail with -ENOSPC. Not
good either.

This patch does 2 things:
1. Reserves one PEB for the "atomic LEB change" operation.
2. Serealize the operations so that only on of them may run
   at a time (by means of a mutex).

Pointed-to-by: Brijesh Singh <brijesh.s.singh@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: use byte hexdump
Artem Bityutskiy [Wed, 29 Aug 2007 11:56:20 +0000 (14:56 +0300)]
UBI: use byte hexdump

More handy since word hexdump prints in host endian.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: do not use vmalloc on I/O path
Artem Bityutskiy [Wed, 29 Aug 2007 11:51:52 +0000 (14:51 +0300)]
UBI: do not use vmalloc on I/O path

Similar reason as in case of the previous patch: it causes
deadlocks if a filesystem with writeback support works on top
of UBI. So pre-allocate needed buffers when attaching MTD device.
We also need mutexes to protect the buffers, but they do not
cause much contantion because they are used in recovery, torture,
and WL copy routines, which are called seldom.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: allocate memory with GFP_NOFS
Artem Bityutskiy [Tue, 28 Aug 2007 18:29:32 +0000 (21:29 +0300)]
UBI: allocate memory with GFP_NOFS

Use GFP_NOFS flag when allocating memory on I/O path, because otherwise
we may deadlock the filesystem which works on top of us. We observed
the deadlocks with UBIFS. Example:

VFS->FS lock a lock->UBI->kmalloc()->VFS writeback->FS locks the same
lock again.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: use linux print_hex_dump(), not home-grown one
Artem Bityutskiy [Tue, 7 Aug 2007 20:34:20 +0000 (23:34 +0300)]
UBI: use linux print_hex_dump(), not home-grown one

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: don't use array index before testing if it is negative
Jesper Juhl [Fri, 3 Aug 2007 23:25:26 +0000 (01:25 +0200)]
UBI: don't use array index before testing if it is negative

I can't find anything guaranteeing that 'ubi_num' cannot be <0 in
drivers/mtd/ubi/kapi.c::ubi_open_volume(), and in fact the code
even tests for that and errors out if so. Unfortunately the test
for "ubi_num < 0" happens after we've already used 'ubi_num' as
an array index - bad thing to do if it is negative.
This patch moves the test earlier in the function and then moves
the indexing using that variable after the check. A bit safer :-)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: add more prints
Artem Bityutskiy [Sun, 22 Jul 2007 19:32:51 +0000 (22:32 +0300)]
UBI: add more prints

I hit those situations and found out lack of print messages. Add more prints
when erase problems occur.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
17 years agoUBI: fix sparse warnings
Artem Bityutskiy [Sun, 22 Jul 2007 12:25:02 +0000 (15:25 +0300)]
UBI: fix sparse warnings

Fix "symbol shadows an earlier one" warnings. Although they are harmless
but it does not hurt to fix them and make sparse happy.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>