]> err.no Git - linux-2.6/log
linux-2.6
17 years ago[CELL] spufs: fix array size of channel index
Jeremy Kerr [Fri, 20 Jul 2007 19:39:35 +0000 (21:39 +0200)]
[CELL] spufs: fix array size of channel index

Based on a fix from Masato Noguchi <Masato.Noguchi@jp.sony.com>.

Remove the (incorrect) array size declarations in the spufs channel
arrays, and use ARRAY_SIZE rather than hardcoded values.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: make sure context are scheduled again after spu_acquire_saved
Christoph Hellwig [Fri, 20 Jul 2007 19:39:34 +0000 (21:39 +0200)]
[CELL] spufs: make sure context are scheduled again after spu_acquire_saved

Currently a process is removed from the physical spu when spu_acquire_saved
is saved but never put back.  This patch adds a new spu_release_saved
that is to be paired with spu_acquire_saved and put the process back if
it has been in RUNNABLE state before.

Niether Jeremy not be are entirely happy about this exact patch because
it adds another spu_activate call outside of the owner thread, but I
feel this is the best short-term fix we can come up with.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: add spu stats in sysfs and ctx stat file in spufs
Andre Detsch [Fri, 20 Jul 2007 19:39:33 +0000 (21:39 +0200)]
[CELL] spufs: add spu stats in sysfs and ctx stat file in spufs

This patch exports per-context statistics in spufs as long as spu
statistics in sysfs.

It was formed by merging:
"spufs: add spu stats in sysfs"   From: Christoph Hellwig
"spufs: add stat file to spufs"   From: Christoph Hellwig
"spufs: fix libassist accounting" From: Jeremy Kerr
"spusched: fix spu utilization statistics" From: Luke Browning
And some adjustments by myself, after suggestions on cbe-oss-dev.

Having separate patches was making the review process harder
than it should, as we end up integrating spus and ctx statistics
accounting much more than it was on the first implementation.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: Remove spurious WARN_ON for spu_deactivate for NOSCHED contexts
Jeremy Kerr [Fri, 20 Jul 2007 19:39:32 +0000 (21:39 +0200)]
[CELL] spufs: Remove spurious WARN_ON for spu_deactivate for NOSCHED contexts

In 6cbf93960e64f313f6e247cbca7afaa50e3ee2c we added a WARN_ON for
calling spu_deactivate on contexts created with the SPU_CREATE_NOSCHED
flag. However, all NOSCHED contexts will need to be deactivated when
the context is destroyed, so this gives a spurious warning when any
NOSCHED context is closed.

This change removes the WARN_ON.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: Make signal-notification files readonly for NOSCHED contexts
Jeremy Kerr [Fri, 20 Jul 2007 19:39:31 +0000 (21:39 +0200)]
[CELL] spufs: Make signal-notification files readonly for NOSCHED contexts

Reading from the signal{1,2} files requires a spu_acquire_saved, so
make these files write-only for contexts created with
SPU_CREATE_NOSCHED.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: Avoid unexpectedly restaring MFC during context save
Kazunori Asayama [Fri, 20 Jul 2007 19:39:30 +0000 (21:39 +0200)]
[CELL] spufs: Avoid unexpectedly restaring MFC during context save

The current SPU context saving procedure in SPUFS unexpectedly
restarts MFC when halting decrementer, because MFC_CNTL[Dh] is set
without MFC_CNTL[Sm]. This bug causes, for example, saving broken DMA
queues. Here is a patch to fix the problem.

Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] spufs: remove section mismatch warning
Sebastian Siewior [Fri, 20 Jul 2007 19:39:29 +0000 (21:39 +0200)]
[CELL] spufs: remove section mismatch warning

WARNING: arch/powerpc/platforms/cell/spufs/spufs.o(.init.text+0x158): Section
mismatch: reference to .exit.text:.spu_sched_exit (between '.init_module' and
'.spu_sched_init')

was introduced by c99c1994a2bb9493b4ac372b2b6ee2606d291171
This patch removes the warning.

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] add support for MSI on Axon-based Cell systems
Michael Ellerman [Fri, 20 Jul 2007 19:39:28 +0000 (21:39 +0200)]
[CELL] add support for MSI on Axon-based Cell systems

This patch adds support for the setup and decoding of MSIs
on Axon-based Cell systems, using the MSIC mechanism.

This involves setting up an area of BE memory which the Axon
then uses as a FIFO for MSI messages. When one or more MSIs
are decoded by the MSIC we receive an interrupt on the MPIC,
and the MSI messages are written into the FIFO. At the moment
we use a 64KB FIFO, one per MSIC/BE.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] saving spus information for kexec crash
Andre Detsch [Fri, 20 Jul 2007 19:39:27 +0000 (21:39 +0200)]
[CELL] saving spus information for kexec crash

This patch adds support for investigating spus information after a
kernel crash event, through kdump vmcore file.
Implementation is based on xmon code, but the new functionality was
kept independent from xmon.

Signed-off-by: Lucio Jose Herculano Correia <luciojhc@br.ibm.com>
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] driver for DDR2 memory on AXON
Maxim Shchetynin [Fri, 20 Jul 2007 19:39:26 +0000 (21:39 +0200)]
[CELL] driver for DDR2 memory on AXON

The Axon bridge chip used on new Cell/B.E. based blade servers
comes with a DDR2 memory controller that can be used to
attach cheap memory modules, as opposed to the high-speed
XDR memory that is used by the CPU itself.

Since the memory controller does not participate in the
cache coherency protocol, we can not use the memory direcly
for Linux applications, but by providing a block device
it can be used for swap space, temporary file storage and
through the use of the direct_access block device operation
for mapping into user addresses, when it is mounted with
an appropriate file system.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] allow linux to map Cell regs on legacy SLOF tree.
Jean-Christophe DUBOIS [Fri, 20 Jul 2007 19:39:25 +0000 (21:39 +0200)]
[CELL] allow linux to map Cell regs on legacy SLOF tree.

The platforms missing the "cpus" property in the "be" node are mono-Cell
platforms such as CAB or Getaway.

Therefore it is possible to assume that if there is no "cpus" properties
under the "be" node then we can safely return the "device node" without
more checking. This is a bit hacky but ... it allows it to work on
these platforms.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Acked-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] fix cbe_thermal for legacy SLOF tree.
Jean-Christophe DUBOIS [Fri, 20 Jul 2007 19:39:24 +0000 (21:39 +0200)]
[CELL] fix cbe_thermal for legacy SLOF tree.

Previous patch changed based on Christian Krafft's comment.

On some legacy SLOF tree the generic code is unable to ioremap some Cell BE
registers. Therefore the "generic" functions are returning a NULL pointer,
triggering a crash on such platforms.

Let's handle this more gracefully.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Acked-by: Christian Kraff <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] fix cbe_cpufreq for legacy SLOF tree.
Jean-Christophe DUBOIS [Fri, 20 Jul 2007 19:39:23 +0000 (21:39 +0200)]
[CELL] fix cbe_cpufreq for legacy SLOF tree.

Previous patch changed based on Christian Krafft's comment.

On some legacy SLOF tree the generic code is unable to ioremap some Cell BE
registers. Therefore the "generic" functions are returning a NULL pointer,
triggering a crash on such platforms.

Let's handle this more gracefully.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Acked-by: Christian Kraff <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: reorganize code
Christian Krafft [Fri, 20 Jul 2007 19:39:22 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: reorganize code

This patch reorganizes the code of the driver into three files.
Two cbe_cpufreq_pmi.c and cbe_cpufreq_pervasive.c care about hardware.
cbe_cpufreq.c contains the logic.
There is no changed behaviour, except that the PMI related function
is now located in a seperate module cbe_cpufreq_pmi. This module
will be required by cbe_cpufreq, if CONFIG_CBE_CPUFREQ_PMI has been set.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: fix minor issues
Christian Krafft [Fri, 20 Jul 2007 19:39:21 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: fix minor issues

Minor issues have been fixed:
* added a missing call to of_node_put()
* signedness of a function parameter
* added some line breaks
* changed global pmi_frequency_limit to a
  per node pmi_slow_mode_limit array

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: fix initialization
Christian Krafft [Fri, 20 Jul 2007 19:39:20 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: fix initialization

This patch fixes the initialization of the cbe_cpufreq driver.
The code that initializes the PMI related functions was called per cpu:
* registering cpufreq notifier block
* registering a pmi handler

This ends in a bug that the notifier block gets called in an endless loop.
The initialization code is being put to the
module init code path by this patch. This way it only gets called once.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] cbe_cpufreq: fix latency measurement
Christian Krafft [Fri, 20 Jul 2007 19:39:19 +0000 (21:39 +0200)]
[CELL] cbe_cpufreq: fix latency measurement

This patch fixes the debug code that calculates the transition time when
changing the slow modes on a Cell BE cpu.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[CELL] pmi: remove support for mutiple devices.
Christian Krafft [Fri, 20 Jul 2007 19:39:18 +0000 (21:39 +0200)]
[CELL] pmi: remove support for mutiple devices.

The pmi driver got simplified by removing support for multiple devices.
As there is no more than one pmi device per maschine, there is no need to
specify the device for listening and sending messages.

This way the caller (cbe_cpufreq) doesn't need to scan the device tree.
When registering the handler on a board without a pmi
interface, pmi.c will just return -ENODEV.

The patch that fixed the breakage of cell_defconfig has been
broken out of the earlier version of this patch. So this is
the version that applies cleanly on top of it.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years agoKVM: MMU: Fix oopses with SLUB
Avi Kivity [Fri, 20 Jul 2007 05:18:27 +0000 (08:18 +0300)]
KVM: MMU: Fix oopses with SLUB

The kvm mmu uses page->private on shadow page tables; so does slub, and
an oops result.  Fix by allocating regular pages for shadows instead of
using slub.

Tested-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: x86 emulator: implement rdmsr and wrmsr
Avi Kivity [Tue, 17 Jul 2007 11:20:30 +0000 (14:20 +0300)]
KVM: x86 emulator: implement rdmsr and wrmsr

Allow real-mode emulation of rdmsr and wrmsr.  This allows smp Windows to
boot, presumably for its sipi trampoline.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: Fix memory slot management functions for guest smp
Avi Kivity [Tue, 17 Jul 2007 10:04:56 +0000 (13:04 +0300)]
KVM: Fix memory slot management functions for guest smp

The memory slot management functions were oriented against vcpu 0, where
they should be kvm-wide.  This causes hangs starting X on guest smp.

Fix by making the functions (and resultant tail in the mmu) non-vcpu-specific.
Unfortunately this reduces the efficiency of the mmu object cache a bit.  We
may have to revisit this later.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoKVM: MMU: Store nx bit for large page shadows
Avi Kivity [Tue, 10 Jul 2007 14:50:55 +0000 (17:50 +0300)]
KVM: MMU: Store nx bit for large page shadows

We need to distinguish between large page shadows which have the nx bit set
and those which don't.  The problem shows up when booting a newer smp Linux
kernel, where the trampoline page (which is in real mode, which uses the
same shadow pages as large pages) is using the same mapping as a kernel data
page, which is mapped using nx, causing kvm to spin on that page.

Signed-off-by: Avi Kivity <avi@qumranet.com>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/ofcons
Linus Torvalds [Fri, 20 Jul 2007 16:18:08 +0000 (09:18 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/ofcons

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/ofcons:
  Create drivers/of/platform.c
  Create linux/of_platorm.h
  [SPARC/64] Rename some functions like PowerPC
  Begin consolidation of of_device.h
  Begin to consolidate of_device.c
  Consolidate of_find_node_by routines
  Consolidate of_get_next_child
  Consolidate of_get_parent
  Consolidate of_find_property
  Consolidate of_device_is_compatible
  Start split out of common open firmware code
  Split out common parts of prom.h

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 20 Jul 2007 16:16:07 +0000 (09:16 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: appletouch - improve powersaving for Geyser3 devices
  Input: lifebook - fix an oops on Panasonic CF-18
  Input: document intended meaning of KEY_SWITCHVIDEOMODE
  Input: switch to using seq_list_xxx helpers
  Input: i8042 - give more trust to PNP data on i386
  Input: add driver for Fujitsu serial touchscreens
  Input: ads7846 - re-check pendown status before reporting events
  Input: ads7846 - introduce sample settling delay
  Input: xpad - add support for leds on xbox 360 pad

17 years agopata_cs5520: Fix probe bug regression introduced in 2.6.22
Alan Cox [Fri, 20 Jul 2007 14:36:31 +0000 (15:36 +0100)]
pata_cs5520: Fix probe bug regression introduced in 2.6.22

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linux Torvalds <torvalds@linux-foundation.org>
17 years agosplice: fix bad unlock_page() in error case
Jens Axboe [Fri, 20 Jul 2007 13:18:12 +0000 (15:18 +0200)]
splice: fix bad unlock_page() in error case

If add_to_page_cache_lru() fails, the page will not be locked. But
splice jumps to an error path that does a page release and unlock,
causing a BUG() in unlock_page().

Fix this by adding one more label that just releases the page. This bug
was actually triggered on EL5 by gurudas pai <gurudas.pai@oracle.com>
using fio.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: override sched_clock
Rusty Russell [Fri, 20 Jul 2007 12:15:01 +0000 (22:15 +1000)]
lguest: override sched_clock

Guests currently use the default scheduler clock: this means they
always use jiffies even if TSC is actually available.  It doesn't make
any noticeable difference here, but it's a better thing to do.

Also remove commented-out asm/sched-clock.h from -mm tree.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: trivial: We now have asm/processor-flags.h, so use it.
Rusty Russell [Fri, 20 Jul 2007 12:12:56 +0000 (22:12 +1000)]
lguest: trivial: We now have asm/processor-flags.h, so use it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolguest: fix sense if IF flag on interrupt injection
Rusty Russell [Fri, 20 Jul 2007 12:11:13 +0000 (22:11 +1000)]
lguest: fix sense if IF flag on interrupt injection

The sense of the IF bit is backwards in the host interrupt handling.

This means we always save "IF=1" on the stack when injecting an
interrupt.  It turns out this is almost always correct (unless the
guest is taking a page fault in an interrupt due to an unpopulated
vmalloc mapping), so went unnoticed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAFS: Use patched rxrpc_kernel_send_data() correctly
David Howells [Fri, 20 Jul 2007 09:59:41 +0000 (10:59 +0100)]
AFS: Use patched rxrpc_kernel_send_data() correctly

Fix afs_send_simple_reply() to accept a greater-than-zero return value from
rxrpc_kernel_send_data() as being a successful return rather than thinking it
an error and aborting the call.

rxrpc_kernel_send_data() previously returned zero incorrectly when it worked
successfully, but has been patched to return the number of bytes it
transmitted.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Fri, 20 Jul 2007 15:52:53 +0000 (08:52 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (26 commits)
  sh: intc - add support for SH7750 and its variants
  sh: Move entry point code to .text.head.
  sh: heartbeat: Shut up resource size warning.
  sh: update r2d defconfig and fix SH7751R pci compliation
  sh: Many symbol exports for nommu allmodconfig.
  sh: zero terminate 8250 platform data for r2d board
  sh: cpufreq: Fix up the build for SH-2.
  sh: Make on-chip DMA channel selection explicit.
  sh: Fix up CPU dependencies for on-chip DMAC.
  sh: cpufreq: clock framework support.
  sh: Support rate rounding for SH7722 FRQCR clocks.
  sh: Implement clk_round_rate() in the clock framework.
  sh: Fix up PCI section mismatch warnings.
  sh: Wire up fallocate() syscall.
  sh: intc - add support for 7780
  sh: intc - improve group support
  sh: Fix up SH-3 and SH-4 driver dependencies.
  sh: push-switch: Correct license string.
  sh: cpufreq: Fix driver dependencies and flag as broken.
  sh: IPR/INTC2 IRQ setup consolidation.
  ...

17 years agoMerge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
Linus Torvalds [Fri, 20 Jul 2007 15:52:06 +0000 (08:52 -0700)]
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (102 commits)
  [ALSA] version 1.0.14
  [ALSA] remove duplicate Logitech Quickcam USB ID in usbquirks.h
  [ALSA] hda-codec - Fix input with STAC92xx
  [ALSA] hda-intel: support for iMac 24'' released on 09/2006
  [ALSA] hda-codec - Add quirk for Asus P5LD2
  [ALSA] snd-ca0106: Add support for X-Fi Extreme Audio.
  [ALSA] snd-emu10k1:Enable E-Mu 1616m notebook firmware loading.
  [ALSA] snd-emu10k1: Initial support for E-Mu 1616 and 1616m.
  [ALSA] cs46xx - Fix PM resume
  [ALSA] hda: Enable SPDIF in/out on some stac9205 boards
  [ALSA] timer: check for incorrect device state in non-debug compiles, too
  [ALSA] snd-aoa-codec-onyx: fix typo
  [ALSA] hda-codec - Add quirks for HP dx2200/dx2250
  [ALSA] hda-codec - Rename HP model-specific quirks
  [ALSA] hda-codec - Add quirk for HP Samba
  [ALSA] hda-codec - Add LG LW20 line-in capture source
  [ALSA] usb-audio - Fix AC3 with M-Audio Audiophile USB
  [ALSA] hda: stac9202 mixer fix
  [ALSA] Make s3c24xx_i2s_set_clkdiv() change the correct bits
  [ALSA] hda-codec - Add LG LW20 si3054 modem id
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6
Linus Torvalds [Fri, 20 Jul 2007 15:51:11 +0000 (08:51 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6:
  sh64: Flag sh64_get_page() as __init_refok.
  sh64: Move entry point code to .text.head.
  sh64: Fix up PCI section mismatch warnings.
  sh64: Update cayman defconfig.
  sh64: Wire up fallocate() syscall.

17 years agoMerge branch 'cfq' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Fri, 20 Jul 2007 15:50:49 +0000 (08:50 -0700)]
Merge branch 'cfq' of git://git.kernel.dk/data/git/linux-2.6-block

* 'cfq' of git://git.kernel.dk/data/git/linux-2.6-block:
  cfq: Write-only stuff in CFQ data structures
  cfq: async queue allocation per priority

17 years agoarm: fix up handle_mm_fault changes
Nick Piggin [Fri, 20 Jul 2007 07:21:06 +0000 (09:21 +0200)]
arm: fix up handle_mm_fault changes

Update arm to use bitwise types for its VM_FAULT_ constants.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 20 Jul 2007 15:46:42 +0000 (08:46 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: (29 commits)
  libata: implement EH fast drain
  libata: schedule probing after SError access failure during autopsy
  libata: clear HOTPLUG flag after a reset
  libata: reorganize ata_ehi_hotplugged()
  libata: improve SCSI scan failure handling
  libata: quickly trigger SATA SPD down after debouncing failed
  libata: improve SATA PHY speed down logic
  The SATA controller device ID is different according to
  ahci: implement SCR_NOTIFICATION r/w
  ahci: make NO_NCQ handling more consistent
  libata: make ->scr_read/write callbacks return error code
  libata: implement AC_ERR_NCQ
  libata: improve EH report formatting
  sata_sil24: separate out sil24_do_softreset()
  sata_sil24: separate out sil24_exec_polled_cmd()
  sata_sil24: replace sil24_update_tf() with sil24_read_tf()
  ahci: separate out ahci_do_softreset()
  ahci: separate out ahci_exec_polled_cmd()
  ahci: separate out ahci_kick_engine()
  ahci: use deadline instead of fixed timeout for 1st FIS for SRST
  ...

17 years agoFix Lindent to not indent preprocessor comments so far
Matthew Wilcox [Fri, 20 Jul 2007 15:29:50 +0000 (09:29 -0600)]
Fix Lindent to not indent preprocessor comments so far

I recently ran Lindent over the AdvanSys driver and it moved the
comments on #else and #endif lines way over to the right:

#else                          /* ADVANSYS_DEBUG */

This doesn't match what I expect from kernel style, but it is
documented.  We just need another flag to indent to make this look like:

#else /* ADVANSYS_DEBUG */

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMemory leak in tpm_ascii_bios_measurements_open()
Jesper Juhl [Fri, 20 Jul 2007 07:31:48 +0000 (00:31 -0700)]
Memory leak in tpm_ascii_bios_measurements_open()

Coverity found a memory leak in tpm_ascii_bios_measurements_open().

If "read_log(log)" fails, then we may leak 'log' and
'log->bios_event_log'.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Seiji Munetoh <munetoh@jp.ibm.com>
Cc: Stefan Berger <stefanb@us.ibm.com>
Cc: Reiner Sailer <sailer@watson.ibm.com>
Cc: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68knommu: reformat show_cpuinfo()
Greg Ungerer [Fri, 20 Jul 2007 07:31:47 +0000 (00:31 -0700)]
m68knommu: reformat show_cpuinfo()

Reformat show_cpuinfo() to be consistent with normal coding style
(and rest of this file).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocr_backlight_probe() allocates too little storage for struct cr_panel
Jesper Juhl [Fri, 20 Jul 2007 07:31:47 +0000 (00:31 -0700)]
cr_backlight_probe() allocates too little storage for struct cr_panel

The Coverity checker noticed that we allocate too little storage for
"struct cr_panel *crp" in cr_backlight_probe().

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Thomas Hellstrom <thomas@tungstengraphics.com>
Cc: Alan Hourihane <alanh@tungstengraphics.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoasync_tx: fix kmap_atomic usage in async_memcpy
Dan Williams [Fri, 20 Jul 2007 07:31:46 +0000 (00:31 -0700)]
async_tx: fix kmap_atomic usage in async_memcpy

Andrew Morton:
[async_memcpy] is very wrong if both ASYNC_TX_KMAP_DST and
ASYNC_TX_KMAP_SRC can ever be set.  We'll end up using the same kmap
slot for both src add dest and we get either corrupted data or a BUG.

Evgeniy Polyakov:
Btw, shouldn't it always be kmap_atomic() even if flag is not set.
That pages are usual one returned by alloc_page().

So fix the usage of kmap_atomic and kill the ASYNC_TX_KMAP_DST and
ASYNC_TX_KMAP_SRC flags.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodpt_i2o depends on virt_to_bus
Stephen Rothwell [Fri, 20 Jul 2007 07:31:45 +0000 (00:31 -0700)]
dpt_i2o depends on virt_to_bus

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix some conversion overflows
Nick Piggin [Fri, 20 Jul 2007 07:31:45 +0000 (00:31 -0700)]
fix some conversion overflows

Fix page index to offset conversion overflows in buffer layer, ecryptfs,
and ocfs2.

It would be nice to convert the whole tree to page_offset, but for now
just fix the bugs.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomm: fix memory hotplug oops from ZONE_MOVABLE changes.
Paul Mundt [Fri, 20 Jul 2007 07:31:44 +0000 (00:31 -0700)]
mm: fix memory hotplug oops from ZONE_MOVABLE changes.

zone_movable_pfn is presently marked as __initdata and referenced from
adjust_zone_range_for_zone_movable(), which in turn is referenced by
zone_spanned_pages_in_node().  Both of these are __meminit annotated.  When
memory hotplug is enabled, this will oops on a hot-add, due to
zone_movable_pfn having been freed.

__meminitdata annotation gives the desired behaviour.

This will only impact platforms that enable both memory hotplug
and ARCH_POPULATES_NODE_MAP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoarch/i386/xen/events.c should #include <asm/xen/hypervisor.h>
Adrian Bunk [Fri, 20 Jul 2007 07:31:44 +0000 (00:31 -0700)]
arch/i386/xen/events.c should #include <asm/xen/hypervisor.h>

Every file should include the headers containing the prototypes for
its global functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoxen: disable vdso "nosegneg" on native boot
Roland McGrath [Fri, 20 Jul 2007 07:31:43 +0000 (00:31 -0700)]
xen: disable vdso "nosegneg" on native boot

One of the nice ideas behind paravirt is that CONFIG_XEN=y can be included
in a standard configuration and be no worse for native booting than as a
Xen guest.  The glibc feature that supports the vDSO "nosegneg" note is
designed specifically to make this easy.  You just have to flip one bit at
boot time.  This patch makes Xen flip the bit, so a CONFIG_XEN=y kernel on
bare hardware does not make glibc use the less-optimized library builds.

Signed-off-by: Roland McGrath <roland@redhat.com>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 20 Jul 2007 15:26:54 +0000 (08:26 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix two year old bug in early bootup asm.
  [SPARC64]: Update defconfig.
  [SPARC64]: Fix log message type in vio_create_one().
  [SPARC64]: Tweak assertions in sun4v_build_virq().
  [SPARC64]: Tweak kernel log messages in power_probe().
  [SPARC64]: Fix handling of multiple vdc-port nodes.
  [SPARC64]: Fix device type matching in VIO's devspec_show().
  [SPARC64]: Fix MODULE_DEVICE_TABLE() specification in VDC and VNET.
  [SPARC]: Add sys_fallocate() entries.
  [SPARC64]: Use orderly_poweroff().

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 20 Jul 2007 15:25:49 +0000 (08:25 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (44 commits)
  USB: drivers/usb/storage/dpcm.c whitespace cleanup
  USB: r8a66597-hcd: fixes some problem
  USB: change name of spinlock in hcd.c
  USB: move routines in hcd.c
  USB: misc: uss720: clean up urb->status usage
  USB: misc: usbtest: clean up urb->status usage
  USB: misc: usblcd: clean up urb->status usage
  USB: misc: phidgetmotorcontrol: clean up urb->status usage
  USB: misc: phidgetkit: clean up urb->status usage
  USB: misc: legousbtower: clean up urb->status usage
  USB: misc: ldusb: clean up urb->status usage
  USB: misc: iowarrior: clean up urb->status usage
  USB: misc: ftdi-elan: clean up urb->status usage
  USB: misc: auerswald: clean up urb->status usage
  USB: misc: appledisplay: clean up urb->status usage
  USB: misc: adtux: clean up urb->status usage
  USB: core: message: clean up urb->status usage
  USB: image: microtek: clean up urb->status usage
  USB: image: mdc800: clean up urb->status usage
  USB: storage: onetouch: clean up urb->status usage
  ...

17 years agofix gfp_t annotations for slub
Al Viro [Fri, 20 Jul 2007 15:18:06 +0000 (16:18 +0100)]
fix gfp_t annotations for slub

Since we have use like ~SLUB_DMA, we ought to have the type
set right in both cases.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoANSIfy a couple of functions in netfilter
Al Viro [Fri, 20 Jul 2007 15:15:28 +0000 (16:15 +0100)]
ANSIfy a couple of functions in netfilter

It's C, not C++...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix lguest misannotation
Al Viro [Fri, 20 Jul 2007 15:10:24 +0000 (16:10 +0100)]
Fix lguest misannotation

It's void __user *, not void * __user...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix up sky2 breakage
Al Viro [Fri, 20 Jul 2007 15:07:33 +0000 (16:07 +0100)]
Fix up sky2 breakage

Doing |= 1 << 19 to 16bit unsigned is not particulary useful;
that register is 32bit, unlike the ones dealt with in the rest of
function, so we need u32 variable here.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix buggered kmalloc() call argument order
Al Viro [Fri, 20 Jul 2007 15:03:40 +0000 (16:03 +0100)]
Fix buggered kmalloc() call argument order

Wrong order of arguments

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: exclude more unbuildable drivers
Al Viro [Fri, 20 Jul 2007 03:33:58 +0000 (04:33 +0100)]
m68k: exclude more unbuildable drivers

anything that wants working dma-mapping won't work
parport_pc won't work on m68k unless we have ISA

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomac89x0: missing __init
Al Viro [Fri, 20 Jul 2007 03:33:48 +0000 (04:33 +0100)]
mac89x0: missing __init

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: remove empty ->setup is several consoles
Al Viro [Fri, 20 Jul 2007 03:33:38 +0000 (04:33 +0100)]
m68k: remove empty ->setup is several consoles

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: missing __init
Al Viro [Fri, 20 Jul 2007 03:33:28 +0000 (04:33 +0100)]
m68k: missing __init

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: missing exports
Al Viro [Fri, 20 Jul 2007 03:33:18 +0000 (04:33 +0100)]
m68k: missing exports

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: use .text.head
Al Viro [Fri, 20 Jul 2007 03:33:08 +0000 (04:33 +0100)]
m68k: use .text.head

i.e. tell modpost that entry point code (that has to be outside
of .init.text for external reasons) is OK to refer to .init.*

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k iomem (based on Geert's tree + memcpy_... stuff)
Al Viro [Fri, 20 Jul 2007 03:32:58 +0000 (04:32 +0100)]
m68k iomem (based on Geert's tree + memcpy_... stuff)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agom68k: teach modpost about .m68_fixup
Al Viro [Fri, 20 Jul 2007 03:32:48 +0000 (04:32 +0100)]
m68k: teach modpost about .m68_fixup

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomore isa/eisa/pci-only drivers marked as such
Al Viro [Thu, 19 Jul 2007 23:24:22 +0000 (00:24 +0100)]
more isa/eisa/pci-only drivers marked as such

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolibata: implement EH fast drain
Tejun Heo [Mon, 16 Jul 2007 05:29:41 +0000 (14:29 +0900)]
libata: implement EH fast drain

In most cases, when EH is scheduled, all in-flight commands are
aborted causing EH to kick in immediately.  However, in some cases
(especially with PMP), it's unclear which commands are affected by the
error condition and although aborting all in-flight commands work, it
isn't optimal and may cause unnecessary disruption.  On the other
hand, waiting for in-flight commands to drain themselves can take up
to 30seconds.

This patch implements EH fast drain to handle such situations.  It
gives in-flight commands some time to finish up but doesn't wait for
too long.  After EH is scheduled, fast drain timer is started and if
no other completion occurs in ATA_EH_FASTDRAIN_INTERVAL all in-flight
commands are aborted.  If any completion occurred in the interval, the
port is given another interval to finish up itself.

Currently ATA_EH_FASTDRAIN_INTERVAL is 3 secs which should be enough
for finishing up most commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: schedule probing after SError access failure during autopsy
Tejun Heo [Mon, 16 Jul 2007 05:29:41 +0000 (14:29 +0900)]
libata: schedule probing after SError access failure during autopsy

If SError isn't accessible, EH can't tell whether hotplug has happened
or not.  Report SError read failure with AC_ERR_OTHER and schedule
probing with hardreset.  This will be mainly useful for PMPs.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: clear HOTPLUG flag after a reset
Tejun Heo [Mon, 16 Jul 2007 05:29:41 +0000 (14:29 +0900)]
libata: clear HOTPLUG flag after a reset

ATA_EHI_HOTPLUGGED is a hint for reset functions indicating the the
port might have gone through hotplug/unplug just before entering EH.
Reset functions modify their behaviors a bit to handle the situation
better - e.g. using longer debouncing delay.

Currently, once HOTPLUG is set, it isn't cleared till the end of EH.
This is unnecessary and makes EH take longer.  Clear the HOTPLUGGED
flag after a reset try (successful or not).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: reorganize ata_ehi_hotplugged()
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
libata: reorganize ata_ehi_hotplugged()

__ata_ehi_hotplugged() now has no users.  Regorganize
ata_ehi_hotplugged() such that a new function ata_ehi_schedule_probe()
deals with scheduling probing.  ata_ehi_hotplugged() calls it and
additionally marks hotplug specific flags.  ata_ehi_schedule_probe()
will be used laster.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: improve SCSI scan failure handling
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
libata: improve SCSI scan failure handling

SCSI scan may fail due to memory allocation failure even if EH is not
in progress.  Due to use of GFP_ATOMIC in SCSI scan path, allocation
failure isn't too rare especially while probing multiple devices at
once which is the case when a bunch of devices are connected to PMP.

This patch moves SCSI scan failure detetion logic from
ata_scsi_hotplug() to ata_scsi_scan_host() and implement synchronous
scan behavior.  The synchronous path sleeps briefly and repeats SCSI
scan if some devices aren't attached properly.  It contains robust
retry loop to minimize the chance of device misdetection during boot
and falls back to async retry if everything fails.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: quickly trigger SATA SPD down after debouncing failed
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
libata: quickly trigger SATA SPD down after debouncing failed

Debouncing failure is a good indicator of basic link problem.  Use
-EPIPE to indicate debouncing failure and make ata_eh_reset() invoke
sata_down_spd_limit() if the error occurs during reset.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: improve SATA PHY speed down logic
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
libata: improve SATA PHY speed down logic

sata_down_spd_limit() first reads the current SPD from SStatus and
limit the speed to the lower one of one below the current limit or one
below the current SPD in SStatus.  SPD may not be accessible or valid
when SPD down is requested making sata_down_spd_limit() fail when it's
most needed.

This patch makes the current SPD cached after each successful reset
and forces GEN I speed (1.5Gbps) if neither of SStatus or the cached
value is valid, so sata_down_spd_limit() is now guaranteed to lower
the speed limit if lower speed is available.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoThe SATA controller device ID is different according to
su henry [Fri, 20 Jul 2007 12:07:46 +0000 (08:07 -0400)]
The SATA controller device ID is different according to
the onchip SATA type set in the system BIOS:
Device                              Device ID
SATA in IDE mode             0x4390
SATA in AHCI mode           0x4391
SATA in non-raid5 driver     0x4392
SATA in raid5 driver           0x4393

Although the device ID is different, they use the same AHCI driver
.The attached file is the patch for adding these device
IDs for ATI SB700.

Signed-off-by: henry.su.ati@gmail.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: implement SCR_NOTIFICATION r/w
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
ahci: implement SCR_NOTIFICATION r/w

Make ahci_scr_read/write() handle SCR_NOTIFICATION if the controller
supports it.  Also, print "sntf" in the cap line if supported.

While at it, convert eight space into a tab in ahci_print_info().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: make NO_NCQ handling more consistent
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
ahci: make NO_NCQ handling more consistent

ahci_save_initial_config() is responsible for reading, screening the
host CAP register and storing the modified result into hpriv->cap for
the rest of the driver.  Move ATA_FLAG_NO_NCQ handling into
ahci_save_initial_config().  It's more consistent this way and the
rest of the driver can always refer to hpriv->cap to determine
configured capability.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: make ->scr_read/write callbacks return error code
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
libata: make ->scr_read/write callbacks return error code

Convert ->scr_read/write callbacks to return error code to better
indicate failure.  This will help handling of SCR_NOTIFICATION.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: implement AC_ERR_NCQ
Tejun Heo [Mon, 16 Jul 2007 05:29:40 +0000 (14:29 +0900)]
libata: implement AC_ERR_NCQ

When an NCQ command fails, all commands in flight are aborted and the
offending one is reported using log page 10h.  Depending on controller
characteristics and LLD implementation, all commands may appear as
having a device error due to shared TF status making it hard to
determine what's actually going on.

This patch adds AC_ERR_NCQ, marks the command reported by log page 10h
with it and print extra "<F>" after the error report for the command
to help distinguishing the offending command.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: improve EH report formatting
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
libata: improve EH report formatting

Requiring LLDs to format multiple error description messages properly
doesn't work too well.  Help LLDs a bit by making ata_ehi_push_desc()
insert ", " on each invocation.  __ata_ehi_push_desc() is the raw
version without the automatic separator.

While at it, make ehi_desc interface proper functions instead of
macros.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_sil24: separate out sil24_do_softreset()
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
sata_sil24: separate out sil24_do_softreset()

Separate out sil24_do_softreset() which takes @pmp as its last
argument.  This will be used to implement sil24_pmp_softreset().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_sil24: separate out sil24_exec_polled_cmd()
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
sata_sil24: separate out sil24_exec_polled_cmd()

Separate out sil24_exec_polled_cmd() from sil24_softreset().  This
will be used to implement sil24_pmp_read/write().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_sil24: replace sil24_update_tf() with sil24_read_tf()
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
sata_sil24: replace sil24_update_tf() with sil24_read_tf()

Replace sil24_update_tf() to sil24_read_tf() which reads TF into
passed int result TF argument and can read TFs of PMP links.  This
will be used by PMP support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: separate out ahci_do_softreset()
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
ahci: separate out ahci_do_softreset()

Separate out ahci_do_softreset() which takes @pmp as its last
argument.  This will be used to implement ahci_pmp_softreset().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: separate out ahci_exec_polled_cmd()
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
ahci: separate out ahci_exec_polled_cmd()

Separate out ahci_exec_polled_cmd() from ahci_softreset().  This will
be used to implement ahci_pmp_read/write().  ahci_exec_polled_cmd()
performs reset_engine before returning if the command fails (times
out).  This is to improve robustness.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: separate out ahci_kick_engine()
Tejun Heo [Mon, 16 Jul 2007 05:29:39 +0000 (14:29 +0900)]
ahci: separate out ahci_kick_engine()

Separate out stop_engine - CLO - start_engine sequence from
ahci_softreset() and ahci_clo() into ahci_reset_engine() and use it in
ahci_softreset() and ahci_post_internal_cmd().  The function will also
be used to prepare for and clean up after PMP register access
commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci: use deadline instead of fixed timeout for 1st FIS for SRST
Tejun Heo [Mon, 16 Jul 2007 05:29:38 +0000 (14:29 +0900)]
ahci: use deadline instead of fixed timeout for 1st FIS for SRST

Use deadline instead of fixed timeout for 1st FIS for SRST to improve
robustness of SRST.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: add @is_cmd to ata_tf_to_fis()
Tejun Heo [Mon, 16 Jul 2007 05:29:38 +0000 (14:29 +0900)]
libata: add @is_cmd to ata_tf_to_fis()

Add @is_cmd to ata_tf_to_fis().  This controls bit 7 of the second
byte which tells the device whether this H2D FIS is for a command or
not.  This cleans up ahci a bit and will be used by PMP.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] Fix reported task file values in sense data
Petr Vandrovec [Fri, 20 Jul 2007 11:44:44 +0000 (07:44 -0400)]
[libata] Fix reported task file values in sense data

ata_tf_read was setting HOB bit when lba48 command was submitted, but
was not clearing it before reading "normal" data.  As it is only place
which sets HOB bit in control register, and register reads should not
be affected by other bits, let's just clear it when we are done with
reading upper bytes so non-48bit commands do not have to touch ctl
at all.

pata_scc suffered from same problem...

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoCorrect comment in libata-sff.c
Dave Jones [Mon, 16 Jul 2007 15:23:03 +0000 (11:23 -0400)]
Correct comment in libata-sff.c

The filename in the file header is incorrect.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_scc.c: small fixes (Workaround for errata A308)
Akira Iguchi [Tue, 17 Jul 2007 03:10:17 +0000 (12:10 +0900)]
pata_scc.c: small fixes (Workaround for errata A308)

This patch fixes some issues of the previous patch:
- Use mode_filter() hook to limit ATAPI UDMA mode
- "data loss" warning message
- handling of udma_mask

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoahci.c: fix CONFIG_PM=n compilation
Alexey Dobriyan [Tue, 17 Jul 2007 19:48:48 +0000 (23:48 +0400)]
ahci.c: fix CONFIG_PM=n compilation

Commit df69c9c5438b4e396a64d42608b2a6c48a3e7475 moved only prototype of
out of CONFIG_PM. Move function out as well. Box seems to boot fine.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: add ST9160821AS 3.CLF to NONCQ blacklist
Tejun Heo [Fri, 20 Jul 2007 03:49:38 +0000 (12:49 +0900)]
libata: add ST9160821AS 3.CLF to NONCQ blacklist

Yay, the first one from Seagate.  3.ALC firmware is okay.  This was
reported by Sam Freed on bugzilla bug 8759.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Sam Freed <sam@freed.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_platform: Fix NULL pointer dereference
Magnus Damm [Fri, 20 Jul 2007 03:50:58 +0000 (12:50 +0900)]
pata_platform: Fix NULL pointer dereference

pata_platform: Fix NULL pointer dereference

pata_platform currently dereferences a NULL pointer in pata_platform_probe()
if pdev->dev.platform_data is set to NULL. This breakage was most likely
introduced by commit 5f45bc50976ee1f408f7171af155aec646655a37.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] sata_mv: minor cleanups
Jeff Garzik [Fri, 13 Jul 2007 21:06:45 +0000 (17:06 -0400)]
[libata] sata_mv: minor cleanups

* trim trailing whitespace
* document some flags, registers, and register bits
* fix locking around EDMA on/off and configuration
* continue replacing "constant OP var" with "var OP constant"
* use new pci_try_set_mwi()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] sata_mv: Micro-optimization and cleanups
Jeff Garzik [Fri, 13 Jul 2007 19:20:15 +0000 (15:20 -0400)]
[libata] sata_mv: Micro-optimization and cleanups

* Micro-optimization in the EDMA interrupt handling code
* s/EDMA_ERR_CRBQ_PAR/EDMA_ERR_CRQB_PAR/
* Document EDMA Error Interrupt Cause register bits

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosh: intc - add support for SH7750 and its variants
Magnus Damm [Fri, 20 Jul 2007 09:44:49 +0000 (18:44 +0900)]
sh: intc - add support for SH7750 and its variants

This patch converts the cpu specific 7750 setup code to use the
new intc controller. Many new vectors are added and multiple
processor variants including 7091, 7750, 7750s, 7750r, 7751 and
7751r should all have the correct vectors hooked up.

IRLM interrupts can be enabled using ipr_irq_enable_irlm() which
now is marked as __init.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years ago[ALSA] version 1.0.14
Jaroslav Kysela [Fri, 20 Jul 2007 09:13:35 +0000 (11:13 +0200)]
[ALSA] version 1.0.14

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] remove duplicate Logitech Quickcam USB ID in usbquirks.h
Jaroslav Kysela perex@suse.cz [Fri, 20 Jul 2007 08:42:56 +0000 (10:42 +0200)]
[ALSA] remove duplicate Logitech Quickcam USB ID in usbquirks.h

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] hda-codec - Fix input with STAC92xx
Takashi Iwai [Tue, 29 May 2007 16:01:06 +0000 (18:01 +0200)]
[ALSA] hda-codec - Fix input with STAC92xx

The recent fix for STAC92xx surround outputs broke the input pin
setting for shared line-in and mic jacks.  This patch fixes the
breakage.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] hda-intel: support for iMac 24'' released on 09/2006
Nicola Fagnani [Thu, 19 Jul 2007 21:28:52 +0000 (23:28 +0200)]
[ALSA] hda-intel: support for iMac 24'' released on 09/2006

Basic audio support for the iMac 24'' model released on 09/2006,
including
headphone jack detection with automatic speaker muting.
This iMac uses the Realtek ALC885 codec, not a Sigmatel one as in
other models.
Functionality has been tested for internal speakers, headphone and
microphone.

Signed-off-by: Nicola Fagnani <nicfagn@iol.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] hda-codec - Add quirk for Asus P5LD2
Claudio Matsuoka [Thu, 19 Jul 2007 21:18:32 +0000 (23:18 +0200)]
[ALSA] hda-codec - Add quirk for Asus P5LD2

Without the proper model setting, the Asus P5LD2 rear outputs remain
completely silent unlike other systems where the front speakers usually
work. This patch adds the P5LD2 to the quirk table.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] snd-ca0106: Add support for X-Fi Extreme Audio.
James Courtier-Dutton [Fri, 18 May 2007 19:35:50 +0000 (20:35 +0100)]
[ALSA] snd-ca0106: Add support for X-Fi Extreme Audio.

This card is just a normal SB Live 24bit,
but under a different marketing name.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] snd-emu10k1:Enable E-Mu 1616m notebook firmware loading.
James Courtier-Dutton [Sat, 14 Jul 2007 09:24:49 +0000 (10:24 +0100)]
[ALSA] snd-emu10k1:Enable E-Mu 1616m notebook firmware loading.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
17 years ago[ALSA] snd-emu10k1: Initial support for E-Mu 1616 and 1616m.
James Courtier-Dutton [Sat, 14 Jul 2007 01:18:26 +0000 (02:18 +0100)]
[ALSA] snd-emu10k1: Initial support for E-Mu 1616 and 1616m.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>