safe/jmp/linux-2.6
14 years agovideo: includecheck fix: da8xx-fb.c
Jaswinder Singh Rajput [Wed, 7 Oct 2009 23:32:25 +0000 (16:32 -0700)]
video: includecheck fix: da8xx-fb.c

fix the following 'make includecheck' warning:

  drivers/video/da8xx-fb.c: linux/device.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovideo: includecheck fix: msm, mddi.c
Jaswinder Singh Rajput [Wed, 7 Oct 2009 23:32:24 +0000 (16:32 -0700)]
video: includecheck fix: msm, mddi.c

fix the following 'make includecheck' warning:

  drivers/video/msm/mddi.c: linux/delay.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofs: includecheck fix: proc, kcore.c
Jaswinder Singh Rajput [Wed, 7 Oct 2009 23:32:24 +0000 (16:32 -0700)]
fs: includecheck fix: proc, kcore.c

fix the following 'make includecheck' warning:

  fs/proc/kcore.c: linux/mm.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: includecheck fix: vmalloc.c
Jaswinder Singh Rajput [Wed, 7 Oct 2009 23:32:23 +0000 (16:32 -0700)]
mm: includecheck fix: vmalloc.c

fix the following 'make includecheck' warning:

  mm/vmalloc.c: linux/highmem.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoksm: more on default values
Hugh Dickins [Wed, 7 Oct 2009 23:32:22 +0000 (16:32 -0700)]
ksm: more on default values

Adjust the max_kernel_pages default to a quarter of totalram_pages,
instead of nr_free_buffer_pages() / 4: the KSM pages themselves come from
highmem, and even on a 16GB PAE machine, 4GB of KSM pages would only be
pinning 32MB of lowmem with their rmap_items, so no need for the more
obscure calculation (nor for its own special init function).

There is no way for the user to switch KSM on if CONFIG_SYSFS is not
enabled, so in that case default run to KSM_RUN_MERGE.

Update KSM Documentation and Kconfig to reflect the new defaults.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Izik Eidus <ieidus@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Thu, 8 Oct 2009 11:00:02 +0000 (13:00 +0200)]
Merge branch 'fix/misc' into for-linus

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Thu, 8 Oct 2009 10:59:58 +0000 (12:59 +0200)]
Merge branch 'fix/hda' into for-linus

14 years agoALSA: ice1724: increase SPDIF and independent stereo buffer sizes
Robert Hancock [Thu, 8 Oct 2009 02:19:21 +0000 (20:19 -0600)]
ALSA: ice1724: increase SPDIF and independent stereo buffer sizes

Increase the default and maximum PCM buffer prellocation size for ice1724's
SPDIF and independent stereo pair outputs to 256K, which is the hardware's
maximum supported size. This allows a reduction in interrupt rate and
potentially power usage when an application is not latency-critical.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: opl3: circular locking in the snd_opl3_note_on() and snd_opl3_note_off()
Krzysztof Helt [Wed, 7 Oct 2009 20:51:34 +0000 (22:51 +0200)]
ALSA: opl3: circular locking in the snd_opl3_note_on() and snd_opl3_note_off()

Fix following circular locking in the opl3 driver.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.32-rc3 #87
-------------------------------------------------------
swapper/0 is trying to acquire lock:
 (&opl3->voice_lock){..-...}, at: [<cca748fe>] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]

but task is already holding lock:
 (&opl3->sys_timer_lock){..-...}, at: [<cca75169>] snd_opl3_timer_func+0x19/0xc0 [snd_opl3_synth]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (&opl3->sys_timer_lock){..-...}:
       [<c02461d5>] validate_chain+0xa25/0x1040
       [<c0246aca>] __lock_acquire+0x2da/0xab0
       [<c024731a>] lock_acquire+0x7a/0xa0
       [<c044c300>] _spin_lock_irqsave+0x40/0x60
       [<cca75046>] snd_opl3_note_on+0x686/0x790 [snd_opl3_synth]
       [<cca68912>] snd_midi_process_event+0x322/0x590 [snd_seq_midi_emul]
       [<cca74245>] snd_opl3_synth_event_input+0x15/0x20 [snd_opl3_synth]
       [<cca4dcc0>] snd_seq_deliver_single_event+0x100/0x200 [snd_seq]
       [<cca4de07>] snd_seq_deliver_event+0x47/0x1f0 [snd_seq]
       [<cca4e50b>] snd_seq_dispatch_event+0x3b/0x140 [snd_seq]
       [<cca5008c>] snd_seq_check_queue+0x10c/0x120 [snd_seq]
       [<cca5037b>] snd_seq_enqueue_event+0x6b/0xe0 [snd_seq]
       [<cca4e0fd>] snd_seq_client_enqueue_event+0xdd/0x100 [snd_seq]
       [<cca4eb7a>] snd_seq_write+0xea/0x190 [snd_seq]
       [<c02827b6>] vfs_write+0x96/0x160
       [<c0282c9d>] sys_write+0x3d/0x70
       [<c0202c45>] syscall_call+0x7/0xb

-> #0 (&opl3->voice_lock){..-...}:
       [<c02467e6>] validate_chain+0x1036/0x1040
       [<c0246aca>] __lock_acquire+0x2da/0xab0
       [<c024731a>] lock_acquire+0x7a/0xa0
       [<c044c300>] _spin_lock_irqsave+0x40/0x60
       [<cca748fe>] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
       [<cca751f0>] snd_opl3_timer_func+0xa0/0xc0 [snd_opl3_synth]
       [<c022ac46>] run_timer_softirq+0x166/0x1e0
       [<c02269e8>] __do_softirq+0x78/0x110
       [<c0226ac6>] do_softirq+0x46/0x50
       [<c0226e26>] irq_exit+0x36/0x40
       [<c0204bd2>] do_IRQ+0x42/0xb0
       [<c020328e>] common_interrupt+0x2e/0x40
       [<c021092f>] apm_cpu_idle+0x10f/0x290
       [<c0201b11>] cpu_idle+0x21/0x40
       [<c04443cd>] rest_init+0x4d/0x60
       [<c055c835>] start_kernel+0x235/0x280
       [<c055c066>] i386_start_kernel+0x66/0x70

other info that might help us debug this:

2 locks held by swapper/0:
 #0:  (&opl3->tlist){+.-...}, at: [<c022abd0>] run_timer_softirq+0xf0/0x1e0
 #1:  (&opl3->sys_timer_lock){..-...}, at: [<cca75169>] snd_opl3_timer_func+0x19/0xc0 [snd_opl3_synth]

stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.32-rc3 #87
Call Trace:
 [<c0245188>] print_circular_bug+0xc8/0xd0
 [<c02467e6>] validate_chain+0x1036/0x1040
 [<c0247f14>] ? check_usage_forwards+0x54/0xd0
 [<c0246aca>] __lock_acquire+0x2da/0xab0
 [<c024731a>] lock_acquire+0x7a/0xa0
 [<cca748fe>] ? snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
 [<c044c300>] _spin_lock_irqsave+0x40/0x60
 [<cca748fe>] ? snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
 [<cca748fe>] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
 [<c044c307>] ? _spin_lock_irqsave+0x47/0x60
 [<cca751f0>] snd_opl3_timer_func+0xa0/0xc0 [snd_opl3_synth]
 [<c022ac46>] run_timer_softirq+0x166/0x1e0
 [<c022abd0>] ? run_timer_softirq+0xf0/0x1e0
 [<cca75150>] ? snd_opl3_timer_func+0x0/0xc0 [snd_opl3_synth]
 [<c02269e8>] __do_softirq+0x78/0x110
 [<c044c0fd>] ? _spin_unlock+0x1d/0x20
 [<c025915f>] ? handle_level_irq+0xaf/0xe0
 [<c0226ac6>] do_softirq+0x46/0x50
 [<c0226e26>] irq_exit+0x36/0x40
 [<c0204bd2>] do_IRQ+0x42/0xb0
 [<c024463c>] ? trace_hardirqs_on_caller+0x12c/0x180
 [<c020328e>] common_interrupt+0x2e/0x40
 [<c0208d88>] ? default_idle+0x38/0x50
 [<c021092f>] apm_cpu_idle+0x10f/0x290
 [<c0201b11>] cpu_idle+0x21/0x40
 [<c04443cd>] rest_init+0x4d/0x60
 [<c055c835>] start_kernel+0x235/0x280
 [<c055c210>] ? unknown_bootoption+0x0/0x210
 [<c055c066>] i386_start_kernel+0x66/0x70

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from MIXER...
Pavel Hofman [Tue, 6 Oct 2009 14:04:11 +0000 (16:04 +0200)]
ALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from MIXER to PCM type

* PLEASE NOTE - this change requires the corresponding update of
  envy24control for ice1712 - kind of an ABI change.
* The "Multi Track Peak" control is read-only level meters indicator.
* The control is VERY confusing to most users since it is currently displayed
  in regular mixers. E.g. alsamixer ignores its read-only status
  and allows changing the levels with keys which makes no sense.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agocfq-iosched: avoid probable slice overrun when idling
Corrado Zoccolo [Thu, 8 Oct 2009 06:43:32 +0000 (08:43 +0200)]
cfq-iosched: avoid probable slice overrun when idling

If the average think time is larger than the remaining time slice
for any given queue, don't allow it to idle. A succesful idle also
means that we need to dispatch and complete a request, so if we don't
even have time left for the idle process, we would overrun the slice
in any case.

Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoBlackfin: convert to GENERIC_HARDIRQS_NO__DO_IRQ
Michael Hennerich [Wed, 30 Sep 2009 07:54:40 +0000 (07:54 +0000)]
Blackfin: convert to GENERIC_HARDIRQS_NO__DO_IRQ

Blackfin already sets proper flow handlers on all IRQs, and we don't rely
on __do_IRQ, therefore we can simply select GENERIC_HARDIRQS_NO__DO_IRQ.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop all simple-gpio board resources
Mike Frysinger [Mon, 28 Sep 2009 19:14:39 +0000 (19:14 +0000)]
Blackfin: drop all simple-gpio board resources

The simple-gpio has been replaced by the gpio sysfs interface, so drop the
unused simple-gpio resources from all Blackfin boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: fix framebuffer mmap bug for nommu
Thomas Chou [Sun, 27 Sep 2009 07:38:01 +0000 (15:38 +0800)]
Blackfin: fix framebuffer mmap bug for nommu

The patch added a special get_unmapped_area for framebuffer which
was hooked to the file ops in drivers/video/fbmem.c.

This is needed since v2.6.29-rc1 where nommu vma management was
updated, and mmap of framebuffer caused kernel BUG panic. You may turn
on "Debug the global anon/private NOMMU mapping region tree" config to
such message.

As Documentation/nommu-mmap.txt said,
"To provide shareable character device support, a driver must provide
a file->f_op->get_unmapped_area() operation. The mmap() routines will
call this to get a proposed address for the mapping."

With this change, user space should call mmap for framebuffer using
shared map. Or it can try shared map first, then private map if
failed. This shared map usage is now consistent between mmu and nommu.

The sys_ file may not be a good place for this patch. But there is a
similar one for sparc. I tested a similar patch on nios2nommu, though
I don't have a blackfin board to test.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: includecheck fix: mach-bf548, ezkit.c
Jaswinder Singh Rajput [Thu, 24 Sep 2009 10:38:09 +0000 (16:08 +0530)]
Blackfin: includecheck fix: mach-bf548, ezkit.c

Fix the following 'make includecheck' warning:

  arch/blackfin/mach-bf548/boards/ezkit.c: linux/input.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop cs_change_per_word setting
Mike Frysinger [Wed, 23 Sep 2009 20:56:10 +0000 (20:56 +0000)]
Blackfin: drop cs_change_per_word setting

Structs get initialized to 0 already, and we want to punt this field, so
scrub it from all of our boards.

Reported-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf533-ezkit: convert to physmap/jedec_probe
Mike Frysinger [Wed, 23 Sep 2009 02:23:04 +0000 (22:23 -0400)]
Blackfin: bf533-ezkit: convert to physmap/jedec_probe

Now that the common jedec_probe supports the ST PSD4256G6V, no need to
use the custom stm_flash driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert adv7393 resources to new i2c framework
Michael Hennerich [Tue, 22 Sep 2009 13:10:09 +0000 (13:10 +0000)]
Blackfin: convert adv7393 resources to new i2c framework

Now that the driver has been updated, convert the board resources to the
new i2c framework for managing slaves.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoMerge branch 'drm-next' of ../drm-next into drm-linus
Dave Airlie [Thu, 8 Oct 2009 04:03:05 +0000 (14:03 +1000)]
Merge branch 'drm-next' of ../drm-next into drm-linus

conflict in radeon since new init path merged with vga arb code.

Conflicts:
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_asic.h
drivers/gpu/drm/radeon/radeon_device.c

14 years agotracing: user local buffer variable for trace branch tracer
Steven Rostedt [Thu, 8 Oct 2009 01:53:41 +0000 (21:53 -0400)]
tracing: user local buffer variable for trace branch tracer

Just using the tr->buffer for the API to trace_buffer_lock_reserve
is not good enough. This is because the tr->buffer may change, and we
do not want to commit with a different buffer that we reserved from.

This patch uses a local variable to hold the buffer that was used to
reserve and commit with.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: fix warning on kernel/trace/trace_branch.c andtrace_hw_branches.c
Zhenwen Xu [Thu, 8 Oct 2009 01:21:46 +0000 (09:21 +0800)]
tracing: fix warning on kernel/trace/trace_branch.c andtrace_hw_branches.c

fix warnings that caused the API change of trace_buffer_lock_reserve()
change files: kernel/trace/trace_hw_branch.c
              kernel/trace/trace_branch.c

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
LKML-Reference: <20091008012146.GA4170@helight>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agodrm/radeon/kms: fix vline register for second head.
Dave Airlie [Thu, 8 Oct 2009 01:32:49 +0000 (11:32 +1000)]
drm/radeon/kms: fix vline register for second head.

Both r100/r600 had this wrong, use the macro to extract the register
to relocate.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/r600: avoid assigning vb twice in blit code
Robert Noland [Mon, 5 Oct 2009 15:56:44 +0000 (11:56 -0400)]
drm/r600: avoid assigning vb twice in blit code

There is no need to assign vb before you know that space is available.

[agd5f: adapted for kernel tree.]

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon: use list_for_each_entry instead of list_for_each
Dave Airlie [Wed, 7 Oct 2009 23:28:19 +0000 (09:28 +1000)]
drm/radeon: use list_for_each_entry instead of list_for_each

This is just a cleanup of the list macro usage.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Fix AGP support for R600/RV770 family (v2)
Jerome Glisse [Tue, 6 Oct 2009 17:04:30 +0000 (19:04 +0200)]
drm/radeon/kms: Fix AGP support for R600/RV770 family (v2)

For AGP to work unmapped access must cover VRAM & AGP as
AGP is treated like VRAM by the GPU (ie physical address).
This patch properly setup the virtual memory system aperture
to cover AGP if AGP is enabled. It seems that there is memory
corruption after resume when using AGP (RV770 seems unaffected
thought). Version 2 just fix merge issue with updated AGP
fallback patch.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Fallback to non AGP when acceleration fails to initialize (v2)
Jerome Glisse [Tue, 6 Oct 2009 17:04:29 +0000 (19:04 +0200)]
drm/radeon/kms: Fallback to non AGP when acceleration fails to initialize (v2)

When GPU acceleration is not working with AGP try to fallback to non
AGP GART (either PCI or PCIE GART). This should make KMS failure on
AGP less painfull. We still need to find out what is wrong when AGP
fails but at least user have a lot of more chances to get a working
configuration with acceleration. This patch also cleanup R600/RV770
fallback path so they use same code as others asics. Version 2
factorize agp disabling logic to avoid code duplication and bugs.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Fix RS600/RV515/R520/RS690 IRQ
Jerome Glisse [Wed, 7 Oct 2009 09:08:22 +0000 (11:08 +0200)]
drm/radeon/kms: Fix RS600/RV515/R520/RS690 IRQ

Bad generated header file leaded to use wrong register
to check IRQ status and acknowledge them. Fix the header
and use proper registers.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branches 'cxgb3', 'misc' and 'mlx4' into for-next
Roland Dreier [Wed, 7 Oct 2009 23:03:32 +0000 (16:03 -0700)]
Merge branches 'cxgb3', 'misc' and 'mlx4' into for-next

14 years agoRDMA/addr: Fix resolution of local IPv6 addresses
David J. Wilder [Wed, 7 Oct 2009 23:03:18 +0000 (16:03 -0700)]
RDMA/addr: Fix resolution of local IPv6 addresses

This patch allows a local IPv6 address to be resolved by rdma_cm.

To reproduce the problem:

 $ rping -s -v -a ::0  &
 $ rping -c -v -a <IPv6 address local to this system>
 rdma_resolve_addr error -1

Local IPv6 address was obtained with "ip addr show ib0"

Addresses: https://bugs.openfabrics.org/show_bug.cgi?id=1759
Signed-off-by: David Wilder <dwilder@us.ibm.com>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoRDMA/cxgb3: Handle NULL inetdev pointer in iwch_query_port()
Steve Wise [Wed, 7 Oct 2009 22:51:07 +0000 (15:51 -0700)]
RDMA/cxgb3: Handle NULL inetdev pointer in iwch_query_port()

in_dev_get() can return NULL.  If it does, iwch_query_port() will crash.
Handle the NULL case by mapping it to port state INIT.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agomlx4_core: Add 40GigE device ID
Yevgeny Petrilin [Wed, 7 Oct 2009 22:46:49 +0000 (15:46 -0700)]
mlx4_core: Add 40GigE device ID

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoRDMA/iwcm: Don't call provider reject func with irqs disabled
Steve Wise [Wed, 7 Oct 2009 22:38:12 +0000 (15:38 -0700)]
RDMA/iwcm: Don't call provider reject func with irqs disabled

In commit cb58160e ("RDMA/iwcm: Reject the connection when the cm_id
is destroyed") a call to the provider's reject handler was added to
destroy_cm_id() to fix a provider endpoint leak.  This call needs to
be done with interrupts enabled.  So unlock and relock around this
call.  This is safe because:

1) the provider will do nothing with this endpoint until the iwcm either
   accepts or rejects.
2) the lock is only released after the iwcm state is changed, so an
   errant iwcm app that is destroying -and- rejecting the connection
   concurrently will get a failure on one of the calls.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoIB: Fix typo in udev rule documentation
Bart Van Assche [Wed, 7 Oct 2009 22:35:55 +0000 (15:35 -0700)]
IB: Fix typo in udev rule documentation

The proper syntax for udev rules is KERNEL==... instead of KERNEL=...

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
Reported-by: Lukasz Jurewicz <lukasz.jurewicz@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
14 years agoftrace: check for failure for all conversions
Steven Rostedt [Wed, 7 Oct 2009 20:57:56 +0000 (16:57 -0400)]
ftrace: check for failure for all conversions

Due to legacy code from back when the dynamic tracer used a daemon,
only core kernel code was checking for failures. This is no longer
the case. We must check for failures any time we perform text modifications.

Cc: stable@kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: correct module boundaries for ftrace_release
jolsa@redhat.com [Wed, 7 Oct 2009 17:00:35 +0000 (19:00 +0200)]
tracing: correct module boundaries for ftrace_release

When the module is about the unload we release its call records.
The ftrace_release function was given wrong values representing
the module core boundaries, thus not releasing its call records.

Plus making ftrace_release function module specific.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
LKML-Reference: <1254934835-363-3-git-send-email-jolsa@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agofutex: fix requeue_pi key imbalance
Darren Hart [Wed, 7 Oct 2009 18:46:54 +0000 (11:46 -0700)]
futex: fix requeue_pi key imbalance

If futex_wait_requeue_pi() wakes prior to requeue, we drop the
reference to the source futex_key twice, once in
handle_early_requeue_pi_wakeup() and once on our way out.

Remove the drop from the handle_early_requeue_pi_wakeup() and keep
the get/drops together in futex_wait_requeue_pi().

Reported-by: Helge Bahmann <hcb@chaoticmind.net>
Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
Cc: Helge Bahmann <hcb@chaoticmind.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Dinakar Guniguntala <dino@in.ibm.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: stable-2.6.31 <stable@kernel.org>
LKML-Reference: <4ACCE21E.5030805@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agotracing: fix transposed numbers of lock_depth and preempt_count
Steven Rostedt [Sun, 27 Sep 2009 11:02:07 +0000 (07:02 -0400)]
tracing: fix transposed numbers of lock_depth and preempt_count

The lock_depth and preempt_count numbers in the latency format is
transposed.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agocfq-iosched: apply bool value where we return 0/1
Jens Axboe [Wed, 7 Oct 2009 18:02:57 +0000 (20:02 +0200)]
cfq-iosched: apply bool value where we return 0/1

Saves 16 bytes of text, woohoo. But the more important point is
that it makes the code more readable when returning bool for 0/1
cases.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocfq-iosched: fix think time allowed for seekers
Corrado Zoccolo [Wed, 7 Oct 2009 17:51:54 +0000 (19:51 +0200)]
cfq-iosched: fix think time allowed for seekers

CFQ enables idle only for processes that think less than the allowed
idle time. Since idle time is lower for seeky queues, we should use the
correct value in the comparison.

Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoPCI: Prevent AER driver from being loaded on non-root port PCIE devices
Kenji Kaneshige [Wed, 7 Oct 2009 16:28:56 +0000 (09:28 -0700)]
PCI: Prevent AER driver from being loaded on non-root port PCIE devices

A bug was seen on boards using a PLX 8518 switch device which advertises
AER on each of it's transparent bridges. The AER driver was loaded for
each bridge and this driver tried to access the AER source ID register
whenever an interrupt occured on the shared PCI INTX lines. The source
ID register does not exist on non root port PCIE device's  which
advertise AER and trying to access this register causes a unsupported
request error on the bridge. Thus, when the next interrupt occurs,
another error is found and the non existent source ID register is
accessed again, and so it goes on.

The result is a spammed dmesg with unsupported request PCI express
errors on the bridge device that the AER driver is loaded against.

Reported-by: Malcolm Crossley <malcolm.crossley2@gefanuc.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tested-by: Malcolm Crossley <malcolm.crossley2@gefanuc.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: get larger bridge ranges when space is available
Yinghai Lu [Sun, 13 Sep 2009 22:57:10 +0000 (15:57 -0700)]
PCI: get larger bridge ranges when space is available

Found one system:
[   71.120590] pci 0000:40:05.0: scanning behind bridge, config 4f4a40, pass 0
[   71.138283] PCI: Scanning bus 0000:4a
[   71.140341] pci 0000:4a:00.0: found [15b3:6278] class 000c06 header type 00
[   71.157173] pci 0000:4a:00.0: reg 10 64bit mmio: [0x000000-0x0fffff]
[   71.161697] pci 0000:4a:00.0: reg 18 64bit mmio pref: [0x000000-0x7fffff]
[   71.179403] pci 0000:4a:00.0: reg 20 64bit mmio pref: [0x000000-0xfffffff]
[   71.185366] pci 0000:4a:00.0: calling quirk_resource_alignment+0x0/0x1dd
[   71.200846] pci 0000:4a:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[   71.219623] PCI: Fixups for bus 0000:4a
[   71.222194] pci 0000:40:05.0: bridge 32bit mmio: [0xcf000000-0xcf0fffff]
[   71.238662] pci 0000:40:05.0: bridge 64bit mmio pref: [0xcd800000-0xcdffffff]
[   71.255793] PCI: Bus scan for 0000:4a returning with max=4a

Device needs a big pref mmio, but BIOS doesn't allocate mmio to it aside
from a small MMIO range.  Later, the kernel will not allocate resources to
that to the device:
[   99.574030] pci 0000:4a:00.0: BAR 4: can't allocate mem resource [0xd0000000-0xcdffffff]
[   99.580102] pci 0000:4a:00.0: BAR 2: got res [0xcd800000-0xcdffffff] bus [0xcd800000-0xcdffffff] flags 0x12120c
[   99.602307] pci 0000:4a:00.0: BAR 2: moved to bus [0xcd800000-0xcdffffff] flags 0x12120c
[   99.615991] pci 0000:4a:00.0: BAR 0: got res [0xcf000000-0xcf0fffff] bus [0xcf000000-0xcf0fffff] flags 0x120204
[   99.634499] pci 0000:4a:00.0: BAR 0: moved to bus [0xcf000000-0xcf0fffff] flags 0x120204
[   99.654318] pci 0000:40:05.0: PCI bridge, secondary bus 0000:4a
[   99.658766] pci 0000:40:05.0:   IO window: disabled
[   99.675478] pci 0000:40:05.0:   MEM window: 0xcf000000-0xcf0fffff
[   99.681663] pci 0000:40:05.0:   PREFETCH window: 0x000000cd800000-0x000000cdffffff

So try to get a big range in the pci bridge if there is no child using
that range.  With the patch we get:
[   99.104525] pci 0000:4a:00.0: BAR 4: got res [0xfc080000000-0xfc08fffffff] bus [0xfc080000000-0xfc08fffffff] flags 0x12120c
[   99.123624] pci 0000:4a:00.0: BAR 4: moved to bus [0xfc080000000-0xfc08fffffff] flags 0x12120c
[   99.131977] pci 0000:4a:00.0: BAR 2: got res [0xfc090000000-0xfc0907fffff] bus [0xfc090000000-0xfc0907fffff] flags 0x12120c
[   99.149788] pci 0000:4a:00.0: BAR 2: moved to bus [0xfc090000000-0xfc0907fffff] flags 0x12120c
[   99.169248] pci 0000:4a:00.0: BAR 0: got res [0xc0200000-0xc02fffff] bus [0xc0200000-0xc02fffff] flags 0x120204
[   99.189508] pci 0000:4a:00.0: BAR 0: moved to bus [0xc0200000-0xc02fffff] flags 0x120204
[   99.206402] pci 0000:40:05.0: PCI bridge, secondary bus 0000:4a
[   99.210637] pci 0000:40:05.0:   IO window: disabled
[   99.224856] pci 0000:40:05.0:   MEM window: 0xc0200000-0xc03fffff
[   99.230019] pci 0000:40:05.0:   PREFETCH window: 0x000fc080000000-0x000fc097ffffff

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: pci.c: fix kernel-doc notation
Randy Dunlap [Thu, 17 Sep 2009 22:28:22 +0000 (15:28 -0700)]
PCI: pci.c: fix kernel-doc notation

Fix kernel-doc notation (& warnings) in pci/pci.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI quirk: TI XIO200a erroneously reports support for fast b2b transfers
Gabe Black [Tue, 6 Oct 2009 14:19:45 +0000 (09:19 -0500)]
PCI quirk: TI XIO200a erroneously reports support for fast b2b transfers

This quirk will disable fast back to back transfer on the secondary bus
segment of the TI Bridge.

Signed-off-by: Gabe Black <gabe.black@ni.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoamd64_edac: beef up DRAM error injection
Borislav Petkov [Thu, 24 Sep 2009 09:05:30 +0000 (11:05 +0200)]
amd64_edac: beef up DRAM error injection

When injecting DRAM ECC errors (F3xBC_x8), EccVector[15:0] is a bitmask
of which bits should be error injected when written to and holds the
payload of 16-bit DRAM word when read, respectively.

Add /sysfs members to show the DRAM ECC section/word/vector.

Fail wrong injection values entered over /sysfs instead of truncating
them.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix DRAM base and limit extraction
Borislav Petkov [Tue, 22 Sep 2009 14:48:37 +0000 (16:48 +0200)]
amd64_edac: fix DRAM base and limit extraction

On Fam10h and above, F1x[1, 0][7C:40] are DRAM Base/Limit registers
which specify the destination node of a DRAM address. Those address
boundaries are being extracted into ->dram_base[] and ->dram_limit[].
Correct the extraction masks to match the respective address bits.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix chip select handling
Borislav Petkov [Mon, 21 Sep 2009 12:35:51 +0000 (14:35 +0200)]
amd64_edac: fix chip select handling

Different processor families support a different number of chip selects.
Handle this in a family-dependent way with the proper values assigned at
init time (see amd64_set_dct_base_and_mask).

Remove _DCSM_COUNT defines since they're used at one place and originate
from public documentation.

CC: Keith Mannthey <kmannth@us.ibm.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: simple fix to allow reporting of CECC errors
Keith Mannthey [Fri, 18 Sep 2009 12:35:23 +0000 (14:35 +0200)]
amd64_edac: simple fix to allow reporting of CECC errors

This allows the errors to be further decoded and mapped to csrows.
Tested with ECC debug dimms and an Rev F cpu based system.

Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix K8 intlv_sel check
Borislav Petkov [Fri, 18 Sep 2009 10:39:19 +0000 (12:39 +0200)]
amd64_edac: fix K8 intlv_sel check

The check when DRAM interleaving is enabled should be done against the
pvt->dram_IntlvSel field and not against the ->dram_limit.

Simplify first loop and fixup printk formatting while at it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix interleave enable tests
Borislav Petkov [Fri, 18 Sep 2009 10:27:27 +0000 (12:27 +0200)]
amd64_edac: fix interleave enable tests

The pvt->dram_IntlvEn saves the 3 "Interleave Enable" bits already
right-shifted by 8 so the check in find_mc_by_sys_addr() by shifting the
values to the left 8 bits is wrong.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix DRAM base and limit address extraction
Borislav Petkov [Fri, 18 Sep 2009 10:12:46 +0000 (12:12 +0200)]
amd64_edac: fix DRAM base and limit address extraction

K8 DRAM base and limit addresses from F1x40 +8*i and F1x44 + 8*i, where
i in (0..7) are both bits 39-24 and therefore the shifting should be
done by 24 and not by 8.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoamd64_edac: fix driver instance lookup table allocation
Borislav Petkov [Mon, 21 Sep 2009 11:23:34 +0000 (13:23 +0200)]
amd64_edac: fix driver instance lookup table allocation

Allocate memory statically for 8-node machines max for simplicity
instead of relying on MAX_NUMNODES which is 0 on !CONFIG_NUMA builds.

Spotted by Jan Beulich.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
14 years agoALSA: hda - Fix yet another auto-mic bug in ALC268
Takashi Iwai [Wed, 7 Oct 2009 13:12:27 +0000 (15:12 +0200)]
ALSA: hda - Fix yet another auto-mic bug in ALC268

Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing.  Otherwise the indices for
int/ext mics aren't set properly.

Reference: Novell bnc#544899
http://bugzilla.novell.com/show_bug.cgi?id=544899

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoARM: 5729/1: ep93xx: define EP93XX_*_PHYS_BASE with macros
Hartley Sweeten [Fri, 25 Sep 2009 16:54:31 +0000 (17:54 +0100)]
ARM: 5729/1: ep93xx: define EP93XX_*_PHYS_BASE with macros

Change the #define's for the EP93XX_*_PHYS_BASE addresses to use
macros for easier readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5751/1: ep93xx/micro9: Add Micro9-Slim
Hubert Feurstein [Wed, 7 Oct 2009 07:41:01 +0000 (08:41 +0100)]
ARM: 5751/1: ep93xx/micro9: Add Micro9-Slim

Add Contec Micro9-Slim support

Cc: Ryan Mallon <ryan@bluewatersys.com>
Requires: 5750/1
Signed-off-by: Hubert Feurstein <hubert.feurstein@contec.at>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5750/1: ep93xx/micro9: Update platform code
Hubert Feurstein [Wed, 7 Oct 2009 07:39:09 +0000 (08:39 +0100)]
ARM: 5750/1: ep93xx/micro9: Update platform code

Update Contec Micro9 platform code

Cc: Ryan Mallon <ryan@bluewatersys.com>
Requires: 5749/1
Signed-off-by: Hubert Feurstein <hubert.feurstein@contec.at>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5749/1: ep93xx/micro9: Update maintainer
Hubert Feurstein [Wed, 7 Oct 2009 07:36:07 +0000 (08:36 +0100)]
ARM: 5749/1: ep93xx/micro9: Update maintainer

Update Contec Micro9 maintainer and add entry in MAINTAINERS

Cc: Ryan Mallon <ryan@bluewatersys.com>
Requires: 5744/1
Signed-off-by: Hubert Feurstein <hubert.feurstein@contec.at>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Manfred Gruber <m.gruber@tirol.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5752/1: SA1100: fix building of h3100
Dmitry Artamonow [Wed, 7 Oct 2009 09:48:26 +0000 (10:48 +0100)]
ARM: 5752/1: SA1100: fix building of h3100

Both iPaqs h3100 and h3600 currently share the same source
file - h3600.c  But Makefile builds it only if CONFIG_SA1100_H3600
selected, so selecting just CONFIG_SA1100_H3100 results in
"no machine record defined" message and aborted compilation.

Fix it.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5748/1: bcmring: fix build warning messages
Leo Chen [Tue, 6 Oct 2009 18:30:40 +0000 (19:30 +0100)]
ARM: 5748/1: bcmring: fix build warning messages

Fix the warning messages during kernel build for bcmring.

Signed-off-by: Leo Hao Chen <leochen@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5747/1: Fix the start_pg value in free_memmap()
Catalin Marinas [Tue, 6 Oct 2009 16:57:22 +0000 (17:57 +0100)]
ARM: 5747/1: Fix the start_pg value in free_memmap()

If sparsemem is enabled, the start_pfn passed to the free_memmap()
function corresponds to an area of memory not known to the kernel and
pfn_to_page returns a wrong value. The (start_pfn - 1), however, is
known to the kernel.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5746/1: Handle possible translation errors in ARMv6/v7 coherent_user_range
Catalin Marinas [Tue, 6 Oct 2009 16:57:09 +0000 (17:57 +0100)]
ARM: 5746/1: Handle possible translation errors in ARMv6/v7 coherent_user_range

This is needed because applications using the sys_cacheflush system call
can pass a memory range which isn't mapped yet even though the
corresponding vma is valid. The patch also adds unwinding annotations
for correct backtraces from the coherent_user_range() functions.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5745/1: Change ep93xx gpio_irq static inlines to macros
Hartley Sweeten [Mon, 5 Oct 2009 22:15:32 +0000 (23:15 +0100)]
ARM: 5745/1: Change ep93xx gpio_irq static inlines to macros

From: Ryan Mallon <ryan@bluewatersys.com>

Change the gpio_to_irq and irq_to_gpio static inline functions to
macros so that they can be used in variable initialisers.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5744/1: ep93xx: add remaining phys offset selections
Hartley Sweeten [Mon, 5 Oct 2009 18:34:43 +0000 (19:34 +0100)]
ARM: 5744/1: ep93xx: add remaining phys offset selections

This adds the missing Kconfig options for the first SDRAM bank address
on ep93xx boards.

Cc: Hubert Feurstein <(address hidden)>
Signed-off-by: H Hartley Sweeten <(address hidden)>
Acked-by: Ryan Mallon <(address hidden)>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoRevert "Revert "ide: try to use PIO Mode 0 during probe if possible""
Bartlomiej Zolnierkiewicz [Tue, 6 Oct 2009 12:27:45 +0000 (12:27 +0000)]
Revert "Revert "ide: try to use PIO Mode 0 during probe if possible""

This reverts commit 24df31acaff8465d797f0006437b45ad0f2a5cb1.

The root cause of reported system hangs was (now fixed) sis5513 bug
and not "ide: try to use PIO Mode 0 during probe if possible" change
(commit 6029336426a2b43e4bc6f4a84be8789a047d139e) so the revert was
incorrect (it simply replaced one regression with the other one).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosis5513: fix PIO setup for ATAPI devices
Bartlomiej Zolnierkiewicz [Tue, 6 Oct 2009 14:46:05 +0000 (14:46 +0000)]
sis5513: fix PIO setup for ATAPI devices

Clear prefetch setting before potentially (re-)enabling it in
config_drive_art_rwp() so the transition of the device type on
the port from ATA to ATAPI (i.e. during warm-plug operation)
is handled correctly.

This is a really old bug (it probably goes back to very early
days of the driver) but it was only affecting warm-plug operation
until the recent "ide: try to use PIO Mode 0 during probe if
possible" change (commit 6029336426a2b43e4bc6f4a84be8789a047d139e).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tested-by: David Fries <david@fries.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNOHZ: update idle state also when NOHZ is inactive
Eero Nurkkala [Wed, 7 Oct 2009 08:54:26 +0000 (11:54 +0300)]
NOHZ: update idle state also when NOHZ is inactive

Commit f2e21c9610991e95621a81407cdbab881226419b had unfortunate side
effects with cpufreq governors on some systems.

If the system did not switch into NOHZ mode ts->inidle is not set when
tick_nohz_stop_sched_tick() is called from the idle routine. Therefor
all subsequent calls from irq_exit() to tick_nohz_stop_sched_tick()
fail to call tick_nohz_start_idle(). This results in bogus idle
accounting information which is passed to cpufreq governors.

Set the inidle flag unconditionally of the NOHZ active state to keep
the idle time accounting correct in any case.

[ tglx: Added comment and tweaked the changelog ]

Reported-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Steven Noonan <steven@uplinklabs.net>
Cc: stable@kernel.org
LKML-Reference: <1254907901.30157.93.camel@eenurkka-desktop>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agoethoc: limit the number of buffers to 128
Thomas Chou [Tue, 6 Oct 2009 03:25:25 +0000 (03:25 +0000)]
ethoc: limit the number of buffers to 128

Only 128 buffer descriptors are supported in the core. Limit the
number in case we have more memory.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethoc: use system memory as buffer
Thomas Chou [Sun, 4 Oct 2009 23:33:20 +0000 (23:33 +0000)]
ethoc: use system memory as buffer

This patch enabled the ethoc to allocate system memory as buffer
when there is no dedicated buffer memory.

Some hardware designs may not have dedicated buffer memory such as
on chip or off chip SRAM. In this case, only one memory resource is
supplied in the platform data instead of two. Then a DMA buffer can
be allocated from system memory and used for the transfer.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethoc: align received packet to make IP header at word boundary
Thomas Chou [Sun, 4 Oct 2009 23:33:19 +0000 (23:33 +0000)]
ethoc: align received packet to make IP header at word boundary

The packet buffer is allocated at 4 bytes boundary, but the IP header
length and version bits is located at byte 14. These bit fields access
as 32 bits word and caused exception on processors that do not support
unaligned access.

The patch adds 2 bytes offset to make the bit fields word aligned.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethoc: fix buffer address mapping
Thomas Chou [Sun, 4 Oct 2009 23:33:18 +0000 (23:33 +0000)]
ethoc: fix buffer address mapping

The pointer address in buffer descriptors is physical address. The
pointer that processor used to access packet is virtual address.

Though the higher bits of pointer address used by the MAC may be
truncated to zero in special case, it is not always true in larger
designs.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethoc: fix typo to compute number of tx descriptors
Thomas Chou [Sun, 4 Oct 2009 23:33:17 +0000 (23:33 +0000)]
ethoc: fix typo to compute number of tx descriptors

It should be max() instead of min(). Use 1/4 of available
descriptors for tx, and there should be at least 2 tx
descriptors.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoau1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()
roel kluin [Tue, 6 Oct 2009 09:54:18 +0000 (09:54 +0000)]
au1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()

in update_rx_stats() the RX_OVERLEN bit is set twice, replace it by RX_RUNT.
in au1000_rx() the RX_MISSED_FRAME bit was tested a few lines earlier already

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: Fix Unlikely(x) > y
Roel Kluin [Tue, 6 Oct 2009 19:34:39 +0000 (19:34 +0000)]
netxen: Fix Unlikely(x) > y

The closing parenthesis was not on the right location.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopasemi_mac: ethtool get settings fix
Valentine Barshak [Mon, 5 Oct 2009 03:27:56 +0000 (03:27 +0000)]
pasemi_mac: ethtool get settings fix

Not all pasemi mac interfaces can have a phy attached.
For example, XAUI has no phy and phydev is NULL for it.
In this case ethtool get settings causes kernel crash.
Fix it by returning -EOPNOTSUPP if there's no PHY attached.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoadd maintainer for network drop monitor kernel service
Neil Horman [Mon, 5 Oct 2009 03:56:55 +0000 (03:56 +0000)]
add maintainer for network drop monitor kernel service

I was getting ribbed about this earlier, so I figured I'd make it
official.  Add myself as the maintainer of the drop monitor bits, so
people don't just gripe at Dave when it breaks (I'm sure it will never
break, but just in case :) ).

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Fix phylib locking strategy
Matt Carlson [Mon, 5 Oct 2009 17:55:29 +0000 (17:55 +0000)]
tg3: Fix phylib locking strategy

Felix Radensky noted that chip resets were generating stack trace dumps.
This is because the driver is attempting to acquire the mdio bus mutex
while holding the tp->lock spinlock.  The fix is to change the code such
that every phy access takes the tp->lock spinlock instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agorndis_host: support ETHTOOL_GPERMADDR
John W. Linville [Tue, 6 Oct 2009 11:05:42 +0000 (11:05 +0000)]
rndis_host: support ETHTOOL_GPERMADDR

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofutex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions
Anton Blanchard [Wed, 7 Oct 2009 00:13:58 +0000 (11:13 +1100)]
futex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions

Looks like a typo, FUTEX_WAKE_BITS should be FUTEX_WAIT_BITSET.

Signed-off-by: Anton Blanchard <anton@samba.org>
LKML-Reference: <20091007001358.GE16073@kryten>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agoipv4: arp_notify address list bug
Stephen Hemminger [Wed, 7 Oct 2009 10:18:17 +0000 (03:18 -0700)]
ipv4: arp_notify address list bug

This fixes a bug with arp_notify.

If arp_notify is enabled, kernel will crash if address is changed
and no IP address is assigned.
  http://bugzilla.kernel.org/show_bug.cgi?id=14330

Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoBlackfin: fix missed cache config renames
Graf Yang [Tue, 22 Sep 2009 04:55:28 +0000 (04:55 +0000)]
Blackfin: fix missed cache config renames

Looks like the big Kconfig cache split/rename missed one spot in the SMP
cache lock headers.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cplbinfo: drop d_path() hacks
Mike Frysinger [Mon, 21 Sep 2009 16:12:05 +0000 (16:12 +0000)]
Blackfin: cplbinfo: drop d_path() hacks

The cplbinfo was using d_path() to figure out which cpu/cplb was being
parsed.  As Al pointed out, this isn't exactly reliable as it assumes the
static VFS path to be unchanged, and it's just poor form.  So use the
proc_create_data() to properly (and internally) pass the exact cpu/cplb
requested to the parser function.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: asm/irq.h: pull in mach/anomaly.h for anomaly defines
Mike Frysinger [Mon, 21 Sep 2009 01:42:52 +0000 (01:42 +0000)]
Blackfin: asm/irq.h: pull in mach/anomaly.h for anomaly defines

The asm/irq.h header uses anomaly defines, but doesn't make sure to
explicitly include the anomaly header for them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: BF51x: add PTP MMR defines
Barry Song [Thu, 17 Sep 2009 07:50:23 +0000 (07:50 +0000)]
Blackfin: BF51x: add PTP MMR defines

14 years agoBlackfin: mass clean up of copyright/licensing info
Robin Getz [Thu, 24 Sep 2009 14:11:24 +0000 (14:11 +0000)]
Blackfin: mass clean up of copyright/licensing info

Bill Gatliff & David Brownell pointed out we were missing some
copyrights, and licensing terms in some of the files in
./arch/blackfin, so this fixes things, and cleans them up.

It also removes:
 - verbose GPL text(refer to the top level ./COPYING file)
 - file names (you are looking at the file)
 - bug url (it's in the ./MAINTAINERS file)
 - "or later" on GPL-2, when we did not have that right

It also allows some Blackfin-specific assembly files to be under a BSD
like license (for people to use them outside of Linux).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: convert to use arch_gettimeoffset()
john stultz [Wed, 16 Sep 2009 04:17:19 +0000 (21:17 -0700)]
Blackfin: convert to use arch_gettimeoffset()

Convert Blackfin to use GENERIC_TIME via the arch_getoffset()
infrastructure, reducing the amount of arch specific code we need to
maintain.

I've taken my best swing at converting this, but I'm not 100% confident
I got it right.  My cross-compiler is now out of date (gcc4.2) so I
wasn't able to check if it compiled. Any assistance from arch
maintainers or testers to get this merged would be great.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agorcu: Place root rcu_node structure in separate lockdep class
Paul E. McKenney [Wed, 7 Oct 2009 04:48:18 +0000 (21:48 -0700)]
rcu: Place root rcu_node structure in separate lockdep class

Before this patch, all of the rcu_node structures were in the same lockdep
class, so that lockdep would complain when rcu_preempt_offline_tasks()
acquired the root rcu_node structure's lock while holding one of the leaf
rcu_nodes' locks.

This patch changes rcu_init_one() to use a separate
spin_lock_init() for the root rcu_node structure's lock than is
used for that of all of the rest of the rcu_node structures, which
puts the root rcu_node structure's lock in its own lockdep class.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12548908983277-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Make hot-unplugged CPU relinquish its own RCU callbacks
Paul E. McKenney [Wed, 7 Oct 2009 04:48:17 +0000 (21:48 -0700)]
rcu: Make hot-unplugged CPU relinquish its own RCU callbacks

The current interaction between RCU and CPU hotplug requires that
RCU block in CPU notifiers waiting for callbacks to drain.

This can be greatly simplified by having each CPU relinquish its
own callbacks, and for both _rcu_barrier() and CPU_DEAD notifiers
to adopt all callbacks that were previously relinquished.

This change also eliminates the possibility of certain types of
hangs due to the previous practice of waiting for callbacks to be
invoked from within CPU notifiers.  If you don't every wait, you
cannot hang.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1254890898456-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Move rcu_barrier() to rcutree
Paul E. McKenney [Wed, 7 Oct 2009 04:48:16 +0000 (21:48 -0700)]
rcu: Move rcu_barrier() to rcutree

Move the existing rcu_barrier() implementation to rcutree.c,
consistent with the fact that the rcu_barrier() implementation is
tied quite tightly to the RCU implementation.

This opens the way to simplify and fix rcutree.c's rcu_barrier()
implementation in a later patch.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12548908982563-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agogigaset: add kerneldoc comments
Tilman Schmidt [Tue, 6 Oct 2009 12:19:01 +0000 (12:19 +0000)]
gigaset: add kerneldoc comments

Add kerneldoc comments to some functions in the Gigaset driver.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: correct debugging output selection
Tilman Schmidt [Tue, 6 Oct 2009 12:18:56 +0000 (12:18 +0000)]
gigaset: correct debugging output selection

Dump payload data consistently only when DEBUG_STREAM_DUMP debug bit
is set.

Impact: debugging aid
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: improve error recovery
Tilman Schmidt [Tue, 6 Oct 2009 12:18:51 +0000 (12:18 +0000)]
gigaset: improve error recovery

When the Gigaset base stops responding, try resetting the USB
connection to recover.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: fix device ERROR response handling
Tilman Schmidt [Tue, 6 Oct 2009 12:18:46 +0000 (12:18 +0000)]
gigaset: fix device ERROR response handling

Clear out pending command that got rejected with 'ERROR' response.
This fixes the bug where unloading the driver module would hang
with the message: "gigaset: not searching scheduled commands: busy"
after a device communication error.

Impact: error handling bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: announce if built with debugging
Tilman Schmidt [Tue, 6 Oct 2009 12:18:41 +0000 (12:18 +0000)]
gigaset: announce if built with debugging

Mention in the driver load announcement whether the driver was built
with debugging messages enabled, to facilitate support.

Impact: informational message
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: handle isoc frame errors more gracefully
Tilman Schmidt [Tue, 6 Oct 2009 12:18:36 +0000 (12:18 +0000)]
gigaset: handle isoc frame errors more gracefully

Don't drop the remainder of an URB if an isochronous frame has an error.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: linearize skb
Tilman Schmidt [Tue, 6 Oct 2009 12:18:31 +0000 (12:18 +0000)]
gigaset: linearize skb

The code of the Gigaset driver assumes that sk_buff-s coming
from the ISDN4Linux subsystem are always linear. Explicitly
calling skb_linearize() is cheap if they are, but much more
robust in case they ever aren't.

Impact: robustness improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: fix reject/hangup handling
Tilman Schmidt [Tue, 6 Oct 2009 12:18:26 +0000 (12:18 +0000)]
gigaset: fix reject/hangup handling

Signal D channel disconnect in a few cases where it was missed,
including when an incoming call is disconnected before it was
accepted.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: make capidrv module parameter "debugmode" writeable
Tilman Schmidt [Tue, 6 Oct 2009 12:18:15 +0000 (12:18 +0000)]
isdn: make capidrv module parameter "debugmode" writeable

Being able to change the debugmode module parameter of capidrv on the
fly is quite useful for debugging and doesn't do any harm.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: avoid races in capidrv
Tilman Schmidt [Tue, 6 Oct 2009 12:18:10 +0000 (12:18 +0000)]
isdn: avoid races in capidrv

In several places, capidrv sends a CAPI message to the ISDN
device and then updates its internal state accordingly.
If the response message from the device arrives before the
state is updated, it may be rejected or processed incorrectly.
Avoid these races by updating the state before emitting the
message.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: accept CAPI Informational Info values as success
Tilman Schmidt [Tue, 6 Oct 2009 12:18:05 +0000 (12:18 +0000)]
isdn: accept CAPI Informational Info values as success

Info values in the 0x00xx range are defined in the CAPI standard
as "Informational, message processed successfully". Therefore a
CONNECT_B3_CONF message with an Info value in that range should
open an NCCI just as with Info==0.

Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoDocumentation: expand isdn/INTERFACE.CAPI document
Tilman Schmidt [Tue, 6 Oct 2009 12:18:00 +0000 (12:18 +0000)]
Documentation: expand isdn/INTERFACE.CAPI document

- Note that send_message() may be called in interrupt context.
- Describe the storage of CAPI messages and payload data in SKBs.
- Add more details to the description of the _cmsg structure.
- Describe kernelcapi debugging output.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrm/radeon: Fix setting of bits
Roel Kluin [Tue, 6 Oct 2009 19:48:40 +0000 (21:48 +0200)]
drm/radeon: Fix setting of bits

Duplicate bits set

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>