]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agofirewire: Clean up comment style.
Kristian Høgsberg [Tue, 8 May 2007 00:33:32 +0000 (20:33 -0400)]
firewire: Clean up comment style.

Drop filenames from file preamble, drop editor annotations and
use standard indent style for block comments.

Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed typo)
17 years agofirewire: Use lib/ implementation of CRC ITU-T.
Kristian Høgsberg [Tue, 8 May 2007 00:33:31 +0000 (20:33 -0400)]
firewire: Use lib/ implementation of CRC ITU-T.

With the CRC ITU-T implementation available in lib/ we can use that instead.

This also fixes a bug in the topology map crc computation.

Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed Kconfig)
17 years agoCRC ITU-T V.41
Ivo van Doorn [Mon, 12 Jun 2006 14:17:04 +0000 (16:17 +0200)]
CRC ITU-T V.41

This will add the CRC calculation according
to the CRC ITU-T V.41 to the kernel lib/ folder.

This code has been derived from the rt2x00 driver,
currently found only in the wireless-dev tree, but
this library is generic and could be used by more
drivers who currently use their own implementation.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Also useful for the new firewire stack.

Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years ago[S390] update default configuration.
Martin Schwidefsky [Thu, 10 May 2007 13:46:02 +0000 (15:46 +0200)]
[S390] update default configuration.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Kconfig: no wireless on s390.
Martin Schwidefsky [Thu, 10 May 2007 13:46:01 +0000 (15:46 +0200)]
[S390] Kconfig: no wireless on s390.

Hide the config menues for wireless on s390.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Kconfig: use common Kconfig files for s390.
Martin Schwidefsky [Thu, 10 May 2007 13:46:00 +0000 (15:46 +0200)]
[S390] Kconfig: use common Kconfig files for s390.

Disband drivers/s390/Kconfig, use the common Kconfig files. The s390
specific config options from drivers/s390/Kconfig are moved to the
respective common Kconfig files.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Kconfig: common config options for s390.
Martin Schwidefsky [Thu, 10 May 2007 13:45:59 +0000 (15:45 +0200)]
[S390] Kconfig: common config options for s390.

Disable some configuration options in the common Kconfig files that
are of no interest to a s390 machine. Enable hangcheck timer.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Kconfig: unwanted menus for s390.
Martin Schwidefsky [Thu, 10 May 2007 13:45:58 +0000 (15:45 +0200)]
[S390] Kconfig: unwanted menus for s390.

Disable some more menus in the configuration files that are of no
interest to a s390 machine.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Kconfig: menus with depends on HAS_IOMEM.
Martin Schwidefsky [Thu, 10 May 2007 13:45:57 +0000 (15:45 +0200)]
[S390] Kconfig: menus with depends on HAS_IOMEM.

Add "depends on HAS_IOMEM" to a number of menus to make them
disappear for s390 which does not have I/O memory.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Kconfig: refine depends statements.
Martin Schwidefsky [Thu, 10 May 2007 13:45:56 +0000 (15:45 +0200)]
[S390] Kconfig: refine depends statements.

Refine some depends statements to limit their visibility to the
environments that are actually supported.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Avoid compile warning.
Heiko Carstens [Thu, 10 May 2007 13:45:48 +0000 (15:45 +0200)]
[S390] Avoid compile warning.

arch/s390/mm/fault.c: In function `signal_return':
arch/s390/mm/fault.c:256: warning: unused variable `compat'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] qdio: re-add lost perf_stats.tl_runs change in qdio_handle_pci
Ursula Braun [Thu, 10 May 2007 13:45:47 +0000 (15:45 +0200)]
[S390] qdio: re-add lost perf_stats.tl_runs change in qdio_handle_pci

Statement has been inadvertently lost with commit
00c0c6466c66bdf05f2a3dcf59e6895179ea8b76.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Avoid sparse warnings.
Heiko Carstens [Thu, 10 May 2007 13:45:46 +0000 (15:45 +0200)]
[S390] Avoid sparse warnings.

Monthly sparse warning avoidance patch. Sigh.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
17 years ago[S390] dasd: Fix modular build.
Cornelia Huck [Thu, 10 May 2007 13:45:45 +0000 (15:45 +0200)]
[S390] dasd: Fix modular build.

Add missing export of dasd_generic_read_dev_chars().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] monreader inlining cleanup.
Martin Schwidefsky [Thu, 10 May 2007 13:45:44 +0000 (15:45 +0200)]
[S390] monreader inlining cleanup.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Make some structures and a function static.
Cornelia Huck [Thu, 10 May 2007 13:45:43 +0000 (15:45 +0200)]
[S390] cio: Make some structures and a function static.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Get rid of _ccw_device_get_device_number().
Cornelia Huck [Thu, 10 May 2007 13:45:42 +0000 (15:45 +0200)]
[S390] cio: Get rid of _ccw_device_get_device_number().

The function shouldn't have existed in the first place (not MSS-aware).
Introduce a new function ccw_device_get_id() that extracts the
ccw_dev_id structure of a ccw device and convert all users of
_ccw_device_get_device_number to ccw_device_get_id.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] fix subsystem removal fallout
Cornelia Huck [Thu, 10 May 2007 13:45:41 +0000 (15:45 +0200)]
[S390] fix subsystem removal fallout

This patch fixes compilation on s390 after the removal of
struct subsystem.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[POWERPC] Fix compile error with kexec and CONFIG_SMP=n
Paul Mackerras [Thu, 10 May 2007 12:17:18 +0000 (22:17 +1000)]
[POWERPC] Fix compile error with kexec and CONFIG_SMP=n

Commit 2f4dfe206a2fc07099dfad77a8ea2f4b4ae2140f moved the definition
of hard_smp_processor_id() for the UP case from include/linux/smp.h
to include/asm/smp.h.  However, include/linux/smp.h only includes
include/asm/smp.h in the SMP case, so code that wants to use
hard_smp_processor_id() has to include <asm/smp.h> explicitly to
be sure of getting the definition.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Split initrd logic out of early_init_dt_scan_chosen() to fix warning
Michael Ellerman [Thu, 10 May 2007 07:06:30 +0000 (17:06 +1000)]
[POWERPC] Split initrd logic out of early_init_dt_scan_chosen() to fix warning

If CONFIG_BLK_DEV_INITRD is not defined the prop variable in
early_init_dt_scan_chosen() is unused, causing a compiler warning.

So split the initrd logic into a separate function, allowing us to
declare prop only when we need it.

Built for both cases and booted with an initrd.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix warning in hpte_decode(), and generalize it
Paul Mackerras [Thu, 10 May 2007 05:28:44 +0000 (15:28 +1000)]
[POWERPC] Fix warning in hpte_decode(), and generalize it

This adds the necessary support to hpte_decode() to handle 1TB
segments and 16GB pages, and removes an uninitialized value
warning on avpn.

We don't have any code to generate HPTEs for 1TB segments or 16GB
pages yet, so this is mostly for completeness, and to fix the
warning.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years ago[POWERPC] Minor pSeries IOMMU debug cleanup
Michael Neuling [Thu, 10 May 2007 05:16:27 +0000 (15:16 +1000)]
[POWERPC] Minor pSeries IOMMU debug cleanup

pci is not initialized before being used here, so this debug print is
bogus at the current location.  Move it to where it makes sense.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] PS3: Fix sys manager build error
Geoff Levand [Wed, 9 May 2007 20:09:14 +0000 (06:09 +1000)]
[POWERPC] PS3: Fix sys manager build error

Fix a PS3 build error when CONFIG_PS3_SYS_MANAGER=n.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Assorted janitorial EEH cleanups
Linas Vepstas [Wed, 9 May 2007 16:38:11 +0000 (02:38 +1000)]
[POWERPC] Assorted janitorial EEH cleanups

Assorted minor cleanups to EEH code; -- use literals, use
kerneldoc format.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
 arch/powerpc/platforms/pseries/eeh.c        |   13 ++++++++++---
 arch/powerpc/platforms/pseries/eeh_driver.c |    7 ++++---
 include/asm-powerpc/ppc-pci.h               |   18 +++++++++++++++---
 3 files changed, 29 insertions(+), 9 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] We don't define CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
Stephen Rothwell [Wed, 9 May 2007 16:21:00 +0000 (02:21 +1000)]
[POWERPC] We don't define CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID

so this declaration is not needed.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pmu_sys_suspended is only defined for PPC32
Stephen Rothwell [Wed, 9 May 2007 16:19:51 +0000 (02:19 +1000)]
[POWERPC] pmu_sys_suspended is only defined for PPC32

thus we get a link error on ppc64 with CONFIG_PM=y.  This fixes it.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix incorrect calculation of I/O window addresses
Paul Mackerras [Wed, 9 May 2007 11:47:15 +0000 (21:47 +1000)]
[POWERPC] Fix incorrect calculation of I/O window addresses

My patch "Cope with PCI host bridge I/O window not starting at 0"
introduced a bug in the calculation of the virtual addresses for the
I/O windows of PCI host bridges other than the first, because it
didn't account for the fact that hose->io_resource gets offset so that
it reflects the range of global I/O port numbers assigned to the
bridge.  This fixes it and simplifies get_bus_io_range() in the
process.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] celleb: Update celleb_defconfig
Ishizaki Kou [Wed, 9 May 2007 07:41:16 +0000 (17:41 +1000)]
[POWERPC] celleb: Update celleb_defconfig

Updates for celleb_defconfig.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] celleb: Fix parsing of machine type hack command line option
Ishizaki Kou [Wed, 9 May 2007 07:38:03 +0000 (17:38 +1000)]
[POWERPC] celleb: Fix parsing of machine type hack command line option

This is a bugfix to install Fedora Core 6 by using kernel
command line 'celleb_machine_type_hack=CHRP'.

Yes, this is a one-character fix to add forgotten '='.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] celleb: Fix PCI config space accesses to subordinate buses
Ishizaki Kou [Wed, 9 May 2007 07:36:40 +0000 (17:36 +1000)]
[POWERPC] celleb: Fix PCI config space accesses to subordinate buses

Checking whether bus->self is NULL is not enough to know "bus" is the
primary bus.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] celleb: Fix support for multiple PCI domains
Ishizaki Kou [Wed, 9 May 2007 07:34:08 +0000 (17:34 +1000)]
[POWERPC] celleb: Fix support for multiple PCI domains

Celleb has multiple PCI host bridges (phbs).  Previous boot logic gives
non-overlapped bus IDs between PCI host bridges so you can identify
PHB by bus ID.  But newer boot logic gives same bus ID between PHBs (it
gives bus ID 0 as root bus.) So we have to set 'phb->buid' as
non-zero.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Wire up sys_utimensat
Stephen Rothwell [Wed, 9 May 2007 07:32:33 +0000 (17:32 +1000)]
[POWERPC] Wire up sys_utimensat

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMerge branch 'linux-2.6'
Paul Mackerras [Thu, 10 May 2007 11:08:37 +0000 (21:08 +1000)]
Merge branch 'linux-2.6'

17 years ago[SPARC64]: Use alloc_pci_dev() in PCI bus probes.
David S. Miller [Thu, 10 May 2007 09:16:27 +0000 (02:16 -0700)]
[SPARC64]: Use alloc_pci_dev() in PCI bus probes.

Otherwise MSI explodes because pci_msi_init_pci_dev() does not
get invoked.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoPull misc-for-upstream into release branch
Len Brown [Thu, 10 May 2007 08:06:12 +0000 (04:06 -0400)]
Pull misc-for-upstream into release branch

17 years ago[SPARC64]: Bump PROMINTR_MAX to 32.
David S. Miller [Thu, 10 May 2007 07:55:59 +0000 (00:55 -0700)]
[SPARC64]: Bump PROMINTR_MAX to 32.

Some devices have more than 15 which was the previous
setting.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix recursion in PROM tree building.
David S. Miller [Thu, 10 May 2007 07:53:29 +0000 (00:53 -0700)]
[SPARC64]: Fix recursion in PROM tree building.

Use iteration for scanning of PROM node siblings.

Based upon a patch by Greg Onufer, who found this bug.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoacpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC commands
Lennart Poettering [Fri, 4 May 2007 12:16:19 +0000 (14:16 +0200)]
acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC commands

The ACPI EC that is used in MSI laptops knows some non-standard
commands for changing the screen brighntess and a few other things,
which are used by the msi-laptop.c driver. Unfortunately for these
commands no GPE events for IBF and OBF are triggered. Since nowadays
the EC code uses the ec_intr=1 mode by default, this causes these
operations to timeout, although they don't fail. In result, all
operations that you can do with the msi-laptop.c driver take more or
less 1s to complete, which is awfully slow.

In one of the more recent kernels (2.6.20?) the EC subsystem has been
revamped. With that change the EC timeout has been increased. before
that increase the MSI EC accesses were slow -- but not *that* slow,
hence I took notice of this limitation of the MSI EC hardware only very
recently.

The standard EC operations on the MSI EC as defined in the ACPI spec
support GPE events properly.

The following patch adds a new argument "force_poll" to the
ec_transaction() function (and friends). If set to 1, the function
will poll for IBF/OBF even if ec_intr=1 is enabled. If set to 0 the
current behaviour is used. The msi-laptop driver is modified to make
use of this new flag, so that OBF/IBF is polled for the special MSI EC
transactions -- but only for them.

Signed-off-by: Lennart Poettering <mzxreary@0pointer.de>
Acked-by: Alexey Starikovskiy <aystarik@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoPull misc-for-upstream into release branch
Len Brown [Thu, 10 May 2007 06:50:09 +0000 (02:50 -0400)]
Pull misc-for-upstream into release branch

17 years agoPull asus into release branch
Len Brown [Thu, 10 May 2007 06:50:01 +0000 (02:50 -0400)]
Pull asus into release branch

17 years agoPull acpica into release branch
Len Brown [Thu, 10 May 2007 06:49:34 +0000 (02:49 -0400)]
Pull acpica into release branch

17 years agoPull bugzilla-8385 into release branch
Len Brown [Thu, 10 May 2007 06:49:21 +0000 (02:49 -0400)]
Pull bugzilla-8385 into release branch

17 years agoPull thermal into release branch
Len Brown [Thu, 10 May 2007 06:49:01 +0000 (02:49 -0400)]
Pull thermal into release branch

17 years agosony-laptop: rename SONY_LAPTOP_OLD to a more meaningful SONYPI_COMPAT
Mattia Dongili [Tue, 1 May 2007 02:19:53 +0000 (11:19 +0900)]
sony-laptop: rename SONY_LAPTOP_OLD to a more meaningful SONYPI_COMPAT

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoasus-laptop: version bump and lindent
Corentin Chary [Sun, 6 May 2007 12:48:22 +0000 (14:48 +0200)]
asus-laptop: version bump and lindent

Version bump, lindent, etc ..

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoasus-laptop: fix light sens init
Corentin Chary [Sun, 6 May 2007 12:47:29 +0000 (14:47 +0200)]
asus-laptop: fix light sens init

Fix a stupid light sens detection bug.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoasus-laptop: add GPS support
Corentin Chary [Sun, 6 May 2007 12:47:06 +0000 (14:47 +0200)]
asus-laptop: add GPS support

Just adds GPS support found in R2H thanks to Sam Lin.  It will
make a "gps" file in /sys/devices/platform/asus-laptop/.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoasus-laptop: notify ALL events
Corentin Chary [Sun, 6 May 2007 12:46:41 +0000 (14:46 +0200)]
asus-laptop: notify ALL events

We need to handle all events, because some dsdt use events >= 0x80

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years ago[POWERPC] CPM_UART: Removed __init from cpm_uart_init_portdesc to fix warning
Kumar Gala [Thu, 10 May 2007 04:44:58 +0000 (23:44 -0500)]
[POWERPC] CPM_UART: Removed __init from cpm_uart_init_portdesc to fix warning

cpm_uart_init_portdesc is referenced from non-init code and thus we were
getting the following warning:

WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:cpm_uart_init_portdesc from .text between 'cpm_uart_init' (at offset 0x18020) and 'cpm_uart_drv_remove'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] User rheap from arch/powerpc/lib
Kumar Gala [Thu, 10 May 2007 04:28:17 +0000 (23:28 -0500)]
[POWERPC] User rheap from arch/powerpc/lib

Removed rheap in arch/ppc/lib and changed build system to use the
one in arch/powerpc/lib.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Fix the PCI ranges in the MPC834x_MDS device tree.
Scott Wood [Tue, 1 May 2007 17:49:04 +0000 (12:49 -0500)]
[POWERPC] 83xx: Fix the PCI ranges in the MPC834x_MDS device tree.

The MPC834x_MDS device tree's PCI non-prefetchable MMIO range was
specified incorrectly.  Both the local and bus addresses start at
0x90000000.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Fix the PCI ranges in the MPC832x_MDS device tree.
Scott Wood [Tue, 1 May 2007 17:48:47 +0000 (12:48 -0500)]
[POWERPC] 83xx: Fix the PCI ranges in the MPC832x_MDS device tree.

The MPC832x_MDS device tree's PCI non-prefetchable MMIO range was
specified incorrectly.  Both the local and bus addresses start at
0x90000000.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] CPM_UART: cpm_uart_set_termios should take ktermios, not termios
Scott Wood [Tue, 8 May 2007 17:19:21 +0000 (12:19 -0500)]
[POWERPC] CPM_UART: cpm_uart_set_termios should take ktermios, not termios

This eliminates some warnings.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Change rheap functions to use ulongs instead of pointers
Timur Tabi [Tue, 8 May 2007 19:46:36 +0000 (14:46 -0500)]
[POWERPC] Change rheap functions to use ulongs instead of pointers

The rheap allocation functions return a pointer, but the actual value is based
on how the heap was initialized, and so it can be anything, e.g. an offset
into a buffer.  A ulong is a better representation of the value returned by
the allocation functions.

This patch changes all of the relevant rheap functions to use a unsigned long
integers instead of a pointer.  In case of an error, the value returned is
a negative error code that has been cast to an unsigned long.  The caller can
use the IS_ERR_VALUE() macro to check for this.

All code which calls the rheap functions is updated accordingly.  Macros
IS_MURAM_ERR() and IS_DPERR(), have been deleted in favor of IS_ERR_VALUE().

Also added error checking to rh_attach_region().

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 86xx: Enable the AC97 interface on 8641D board.
Jason Jin [Wed, 2 May 2007 21:53:38 +0000 (16:53 -0500)]
[POWERPC] 86xx: Enable the AC97 interface on 8641D board.

HD interface and AC97 interface share some pins and they are enabled at
the same time, In order to use AC97 interface, we need to disable the HD
interface first.

Signed-off-by:Jason Jin<jason.jin@freescale.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Move reg_booke.h to include/asm-powerpc
Becky Bruce [Wed, 9 May 2007 19:31:19 +0000 (14:31 -0500)]
[POWERPC] Move reg_booke.h to include/asm-powerpc

This patch moves a copy of reg_booke.h to include/asm-powerpc and fixes
up the ifdef protection.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Suppress warning when CONFIG_ options aren't defined
Kumar Gala [Thu, 10 May 2007 03:48:53 +0000 (22:48 -0500)]
[POWERPC] 83xx: Suppress warning when CONFIG_ options aren't defined

Suppress warning when CONFIG_PCI & CONFIG_QUICC_ENGINE is not defined

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] 83xx: Suppress warning when CONFIG_PCI is not defined
Li Yang [Thu, 10 May 2007 03:14:57 +0000 (11:14 +0800)]
[POWERPC] 83xx: Suppress warning when CONFIG_PCI is not defined

Suppress warning when CONFIG_PCI is not defined.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoACPICA: Lindent
Len Brown [Thu, 10 May 2007 03:34:35 +0000 (23:34 -0400)]
ACPICA: Lindent

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: created a dedicated workqueue for notify() execution
Alexey Starikovskiy [Thu, 10 May 2007 03:31:03 +0000 (23:31 -0400)]
ACPI: created a dedicated workqueue for notify() execution

HP nx6125/nx6325/... machines have a _GPE handler with an infinite
loop sending Notify() events to different ACPI subsystems.

Notify handler in ACPI driver is a C-routine, which may call ACPI
interpreter again to get access to some ACPI variables
(acpi_evaluate_xxx).
On these HP machines such an evaluation changes state of some variable
and lets the loop above break.

In the current ACPI implementation Notify requests are being deferred
to the same kacpid workqueue on which the above GPE handler with
infinite loop is executing. Thus we have a deadlock -- loop will
continue to spin, sending notify events, and at the same time
preventing these notify events from being run on a workqueue. All
notify events are deferred, thus we see increase in memory consumption
noticed by author of the thread. Also as GPE handling is bloked,
machines overheat. Eventually by external poll of the same
acpi_evaluate, kacpid is released and all the queued notify events are
free to run, thus 100% cpu utilization by kacpid for several seconds
or more.

To prevent all these horrors it's needed to not put notify events to
kacpid workqueue by either executing them immediately or putting them
on some other thread. It's dangerous to execute notify events in
place, as it will put several ACPI interpreter stacks on top of each
other (at least 4 in case of nx6125), thus causing kernel  stack
overflow.

First attempt to create a new thread was done by Peter Wainwright
He created a bunch of threads, which were stealing work from a kacpid
workqueue.
This patch appeared in 2.6.15 kernel shipped with Ubuntu 6.06 LTS.

Second attempt was done by me, I created a new thread for each Notify
event. This worked OK on HP nx machines, but broke Linus' Compaq
n620c, by producing threads with a speed what they stopped the machine
completely. Thus this patch was reverted from 18-rc2 as I remember.
I re-made the patch to create second workqueue just for notify events,
thus hopping it will not break Linus' machine. Patch was tested on the
same HP nx machines in #5534 and #7122, but I did not received reply
from Linus on a test patch sent to him.
Patch went to 19-rc and was rejected with much fanfare again.
There was 4th patch, which inserted schedule_timeout(1) into deferred
execution of kacpid, if we had any notify requests pending, but Linus
decided that it was too complex (involved either changes to workqueue
to see if it's empty or atomic inc/dec).
Now you see last variant which adds yield() to every GPE execution.

http://bugzilla.kernel.org/show_bug.cgi?id=5534
http://bugzilla.kernel.org/show_bug.cgi?id=8385

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoRevert "ACPICA: fix AML mutex re-entrancy"
Len Brown [Thu, 10 May 2007 03:01:59 +0000 (23:01 -0400)]
Revert "ACPICA: fix AML mutex re-entrancy"

This reverts commit c0d127b56937c3e72c2b1819161d2f6718eee877.

These changes to AML locking were made to allow
Notify handlers to be called on the stack
and not deadlock.  However, that scheme turns
out to be flawed and was reverted by the previous commit,
so this commit restores the locking to it previous design.

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoRevert "Execute AML Notify() requests on stack."
Len Brown [Thu, 10 May 2007 02:59:38 +0000 (22:59 -0400)]
Revert "Execute AML Notify() requests on stack."

This reverts commit 5f7748cf91558a5026ded5be93c5bf6c1ac34edf.

While that change fixed the HP
http://bugzilla.kernel.org/show_bug.cgi?id=5534

it broke the ACER:
http://bugzilla.kernel.org/show_bug.cgi?id=8385
which as AML that caused Linux go recursive
and stack fault.

So this commit by itself will restore the ACER
and again break the HP, which we'll fix another way.

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoRevert "ACPICA: revert "acpi_serialize" changes"
Len Brown [Thu, 10 May 2007 02:56:38 +0000 (22:56 -0400)]
Revert "ACPICA: revert "acpi_serialize" changes"

This reverts commit a8f4af6dc6600980885c594f52eecd60edd62013.
Thus restoring ACPICA's new acpi_serialize code.

This commit by itself may cause a regression, but
it is reverted in this order so that subsequent
reverts reverts under this one can be made
without conflict.

Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Thu, 10 May 2007 02:40:09 +0000 (19:40 -0700)]
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters
  IB: Put rlimit accounting struct in struct ib_umem
  IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules

17 years agoMerge branch 'usb-move' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Linus Torvalds [Thu, 10 May 2007 01:53:12 +0000 (18:53 -0700)]
Merge branch 'usb-move' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'usb-move' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  Move USB network drivers to drivers/net/usb.

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 10 May 2007 01:52:45 +0000 (18:52 -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:
  Doc Fix: remove mention of combined mode-related kernel parameters
  libata: fix kernel-doc parameters
  Fix pata_qdi.c probe code
  pata_scc: fix compilation
  sata_via: add missing PM hooks
  sata_nv: fix ADMA freeze/thaw/irq_clear issues
  pata_pcmcia.c: add card ident for jvc cdrom
  sata_promise: SATAII-150/300 TX4 port numbering fix
  sata_promise: fix another error decode regression
  libata-acpi: fix _GTF command protocol for ATAPI devices

17 years agoRevert "md: improve partition detection in md array"
Linus Torvalds [Thu, 10 May 2007 01:51:36 +0000 (18:51 -0700)]
Revert "md: improve partition detection in md array"

This reverts commit 5b479c91da90eef605f851508744bfe8269591a0.

Quoth Neil Brown:

  "It causes an oops when auto-detecting raid arrays, and it doesn't
   seem easy to fix.

   The array may not be 'open' when do_md_run is called, so
   bdev->bd_disk might be NULL, so bd_set_size can oops.

   This whole approach of opening an md device before it has been
   assembled just seems to get more and more painful.  I think I'm going
   to have to come up with something clever to provide both backward
   comparability with usage expectation, and sane integration into the
   rest of the kernel."

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMove USB network drivers to drivers/net/usb.
Jeff Garzik [Thu, 10 May 2007 01:31:55 +0000 (21:31 -0400)]
Move USB network drivers to drivers/net/usb.

It is preferable to group drivers by usage (net, scsi, ATA, ...) than
by bus.  When reviewing drivers, the [PCI|USB|PCMCIA|...] maintainer
is probably less qualified on networking issues than a networking
maintainer.  Also, from a practical standpoint, chips often
appear on multiple buses, which is why we do not put drivers into
drivers/pci/net.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoDoc Fix: remove mention of combined mode-related kernel parameters
Jesse Barnes [Tue, 1 May 2007 21:34:39 +0000 (14:34 -0700)]
Doc Fix: remove mention of combined mode-related kernel parameters

Looks like you removed the combined_mode quirk (yay!) but didn't update
kernel-parameters.txt...  might confuse people.  Here's a patch to remove
mention of it from the documentation.

Signed-off-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: fix kernel-doc parameters
Randy Dunlap [Wed, 2 May 2007 00:35:55 +0000 (17:35 -0700)]
libata: fix kernel-doc parameters

Warning(linux-2.6.21-git4//drivers/ata/libata-core.c:904): No description found for parameter 'new_sectors'
Warning(linux-2.6.21-git4//drivers/ata/libata-core.c:941): No description found for parameter 'new_sectors'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoFix pata_qdi.c probe code
Samuel Thibault [Thu, 3 May 2007 09:30:25 +0000 (11:30 +0200)]
Fix pata_qdi.c probe code

There is a small typo in the probe code of pata_qdi.c, here is a patch.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_scc: fix compilation
Alexey Dobriyan [Thu, 3 May 2007 19:44:59 +0000 (23:44 +0400)]
pata_scc: fix compilation

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_via: add missing PM hooks
Tejun Heo [Fri, 4 May 2007 13:30:34 +0000 (15:30 +0200)]
sata_via: add missing PM hooks

For some reason, sata_via is missing PM hooks.  Add them.  Spotted by
Jeroen Janssen <jeroen.janssen@gmail.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jeroen Janssen <jeroen.janssen@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_nv: fix ADMA freeze/thaw/irq_clear issues
Robert Hancock [Sat, 5 May 2007 21:36:36 +0000 (15:36 -0600)]
sata_nv: fix ADMA freeze/thaw/irq_clear issues

This patch fixes some problems with ADMA-capable controllers with
regard to freeze, thaw and irq_clear libata callbacks. Freeze and
thaw didn't switch the ADMA-specific interrupts on or off, and more
critically the irq_clear function didn't respect the restriction that
the notifier clear registers for both ports have to be written at
the same time even when only one port is being cleared. This could
result in timeouts on one port when error handling (i.e. as a result
of hotplug) occurred on the other port.

As well, this fixes some issues in the interrupt handler: we shouldn't
check any ADMA status if the port has ADMA switched off because of
an ATAPI device, and it also checks to see if any ADMA interrupt has
been raised even when we are in port-register mode.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_pcmcia.c: add card ident for jvc cdrom
Richard Kennedy [Tue, 8 May 2007 14:20:56 +0000 (15:20 +0100)]
pata_pcmcia.c: add card ident for jvc cdrom

update pata_pcmcia to add card ident for JVC MP-CDX1 cdrom drive
card info:
PRODID_1="KME"
PRODID_2="KXLC005"
PRODID_3="00"
MANFID=0032,2904

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_promise: SATAII-150/300 TX4 port numbering fix
Mikael Pettersson [Sun, 6 May 2007 20:14:01 +0000 (22:14 +0200)]
sata_promise: SATAII-150/300 TX4 port numbering fix

There is a known problem with sata_promise on SATAII-150/300 TX4
controller cards: it enumerates drives in an order that differs
from the port numbers printed on the controller cards. However,
Promise's BIOS and Linux driver both get the order right.

I investigated Promise's Linux driver (v1.01.0.23), and found
that it explicitly changes the mapping from logical port number
to ATA engine MMIO address on the SATAII TX4 cards. It does this
on all SATAII TX4 cards, without inspecting revision etc. The
SATAII TX2plus cards continue to use the same mapping that was
used for the first-generation chips.

This patch updates sata_promise to use the new port number to
ATA engine mapping on SATAII TX4 cards, which fixes the drive
enumeration order problem on those cards. Tested on several
1st and 2nd generation TX2plus and TX4 chips.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_promise: fix another error decode regression
Mikael Pettersson [Sun, 6 May 2007 20:12:31 +0000 (22:12 +0200)]
sata_promise: fix another error decode regression

The sata_promise error decode update changed pdc_host_intr()
to return and not complete the qc after detecting an error.
Unfortunately not completing the qc:s causes them to always
time out on error, which is wrong and has nasty side-effects.

This patch updates pdc_error_intr() to call ata_port_abort(),
similar to ahci and sata_sil24. Doing this is important as it
makes EH see the original error and not a bogus timeout.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata-acpi: fix _GTF command protocol for ATAPI devices
Tejun Heo [Sun, 22 Apr 2007 17:06:46 +0000 (02:06 +0900)]
libata-acpi: fix _GTF command protocol for ATAPI devices

_GTF command is never ATA_PROT_ATAPI_NODATA whether the device is
ATAPI or not.  It's always ATA_PROT_NODATA.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoatl1: add netconsole support
Alexey Dobriyan [Wed, 9 May 2007 14:52:35 +0000 (18:52 +0400)]
atl1: add netconsole support

Copied from b44 driver, but it works:

netconsole: device eth0 not up yet, forcing it
atl1: eth0 link is up 100 Mbps full duplex
netconsole: network logging started

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoFix hang on IBM Token Ring PCMCIA card ejection
Paul Walmsley [Wed, 9 May 2007 16:47:16 +0000 (10:47 -0600)]
Fix hang on IBM Token Ring PCMCIA card ejection

Ejecting a PCMCIA IBM Token Ring card that has not had its dev->open()
called will reliably trigger an uninitialized spinlock oops when
spinlock debugging is enabled. The system then hangs, occasionally
softlockup oopsing.  Apparently ibmtr.c:tok_interrupt() doesn't expect
to be called before tok_open(), but tok_interrupt() gets called anyway
when the card is ejected.  So, set an already-existing flag which
causes tok_interrupt() to bail out early upon card ejection. Tested by
inserting and removing the PCMCIA card several times.

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoskge: default WOL should be magic only (rev2)
Stephen Hemminger [Tue, 8 May 2007 20:36:20 +0000 (13:36 -0700)]
skge: default WOL should be magic only (rev2)

By default, the skge driver now enables wake on magic and wake on PHY.
This is a bad default (bug), wake on PHY means machine will never shutdown
if connected to a switch.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>a
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
Jeff Garzik [Wed, 9 May 2007 22:54:49 +0000 (18:54 -0400)]
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Wed, 9 May 2007 22:41:31 +0000 (15:41 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: fix PIO setup on resume for ATAPI devices
  ide: legacy PCI bus order probing fixes
  ide: add ide_proc_register_port()
  ide: add "initializing" argument to ide_register_hw()
  ide: cable detection fixes (take 2)
  ide: move IDE settings handling to ide-proc.c
  ide: split off ioctl handling from IDE settings (v2)
  ide: make /proc/ide/ optional
  ide: add ide_tune_dma() helper
  ide: rework the code for selecting the best DMA transfer mode (v3)
  ide: fix UDMA/MWDMA/SWDMA masks (v3)

17 years agoMerge git://git.linux-nfs.org/pub/linux/nfs-2.6
Linus Torvalds [Wed, 9 May 2007 22:29:58 +0000 (15:29 -0700)]
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6

* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  NFS: Kill the obsolete NFS_PARANOIA
  NFS: use __set_current_state()
  sunrpc: fix crash in rpc_malloc()
  NFS: Clean up NFSv4 XDR error message
  NFS: NFS client underestimates how large an NFSv4 SETATTR reply can be
  SUNRPC: Fix pointer arithmetic bug recently introduced in rpc_malloc/free
  NFS: Remove redundant check in nfs_check_verifier()
  NFS: Fix a jiffie wraparound issue

17 years agoide: fix PIO setup on resume for ATAPI devices
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:11 +0000 (00:01 +0200)]
ide: fix PIO setup on resume for ATAPI devices

PIO should be restored also for ATAPI devices during resume, fix it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: legacy PCI bus order probing fixes
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:11 +0000 (00:01 +0200)]
ide: legacy PCI bus order probing fixes

IDE PCI host drivers should register themselves with IDE core only when
IDE driver is built-in, otherwise (IDE driver is modular and thus IDE PCI
host drivers are also modular) the code has no effect and just complicates
the probing.

Fix it by adding new config option CONFIG_IDEPCI_PCIBUS (defined only when
needed and invisible to the user) and covering by #ifdef/#endif the code
in question.  It turned out that "ide=reverse" was silently accepted but did
nothing in case when IDE driver was modular, this is fixed now.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_proc_register_port()
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:11 +0000 (00:01 +0200)]
ide: add ide_proc_register_port()

* create_proc_ide_interfaces() tries to add /proc entries for every probed
  and initialized IDE port, replace it by ide_proc_register_port() which does
  it only for the given port (also rename destroy_proc_ide_interface() to
  ide_proc_unregister_port() for consistency)

* convert {create,destroy}_proc_ide_interface[s]() users to use new functions

* pmac driver depended on proc_ide_create() to add /proc port entries, fix it

* au1xxx-ide, swarm and cs5520 drivers depended indirectly on ide-generic
  driver (CONFIG_IDE_GENERIC=y) to add port /proc entries, fix them

* there is now no need to add /proc entries for IDE ports in proc_ide_create()
  so don't do it

* proc_ide_create() needs now to be called before drivers are probed - fix it,
  while at it make proc_ide_create() create /proc "ide" directory

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add "initializing" argument to ide_register_hw()
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:10 +0000 (00:01 +0200)]
ide: add "initializing" argument to ide_register_hw()

Add "initializing" argument to ide_register_hw() and use it instead of ide.c
wide variable of the same name.  Update all users of ide_register_hw()
accordingly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: cable detection fixes (take 2)
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:10 +0000 (00:01 +0200)]
ide: cable detection fixes (take 2)

Tejun's recent eighty_ninty_three() fix has inspired me to do more thorough
review of the cable detection code...

* print user-friendly warning about limiting the maximum transfer speed
  to UDMA33 (and the reason behind it) when 80-wire cable is not detected,
  also while at it cleanup eighty_ninty_three() a bit

* use eighty_ninty_three() in ide_ata66_check(), this actually fixes 3 bugs:
  - bit 14 (word 93 validity check) == 1 && bit 13 (80-wire cable test) == 1
    were used as 80-wire cable present test for CONFIG_IDEDMA_IVB=n case
    (please see FIXME comment in eighty_ninty_three() for more details)
  - CONFIG_IDEDMA_IVB=y/n cases were interchanged
  - check for SATA devices was missing

* remove private cable warnings from pdc_202xx{old,new} drivers now that core
  code provides this functionality (plus, in pdc202xx_new case the test could
  give false warnings for ATAPI devices because pdc202xx_new driver doesn't
  even support ATAPI DMA)

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: move IDE settings handling to ide-proc.c
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:10 +0000 (00:01 +0200)]
ide: move IDE settings handling to ide-proc.c

* move
__ide_add_setting()
ide_add_setting()
__ide_remove_setting()
auto_remove_settings()
ide_find_setting_by_name()
ide_read_setting()
ide_write_setting()
set_xfer_rate()
ide_add_generic_settings()
ide_register_subdriver()
ide_unregister_subdriver()

  from ide.c to ide-proc.c

* set_{io_32bit,pio_mode,using_dma}() cannot be marked static now, fix it

* rename ide_[un]register_subdriver() to ide_proc_[un]register_driver(),
  update device drivers to use new names

* add CONFIG_IDE_PROC_FS=n versions of ide_proc_[un]register_driver()
  and ide_add_generic_settings()

* make ide_find_setting_by_name(), ide_{read,write}_setting()
  and ide_{add,remove}_proc_entries() static

* cover IDE settings code in device drivers with CONFIG_IDE_PROC_FS #ifdef,
  also while at it cover with CONFIG_IDE_PROC_FS #ifdef ide_driver_t.proc

* remove bogus comment from ide.h

* cover with CONFIG_IDE_PROC_FS #ifdef .proc and .settings in ide_drive_t

Besides saner code this patch results in the IDE core smaller by ~2 kB
(on x86-32) and IDE disk driver by ~1 kB (ditto) when CONFIG_IDE_PROC_FS=n.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: split off ioctl handling from IDE settings (v2)
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:10 +0000 (00:01 +0200)]
ide: split off ioctl handling from IDE settings (v2)

* do write permission and min/max checks in ide_procset_t functions

* ide-disk.c: drive->id is always available so cleanup "multcount" setting
  accordingly

* ide-disk.c: "address" setting was incorrectly defined as type TYPE_INTA,
  fix it by using type TYPE_BYTE and updating ide_drive_t->adressing field,
  the bug didn't trigger because this IDE setting uses custom ->set function

* ide.c: add set_ksettings() for handling HDIO_SET_KEEPSETTINGS ioctl

* ide.c: add set_unmaskirq() for handling HDIO_SET_UNMASKINTR ioctl

* handle ioctls directly in generic_ide_ioclt() and idedisk_ioctl()
  instead of using IDE settings to deal with them

* remove no longer needed ide_find_setting_by_ioctl() and {read,write}_ioctl
  fields from ide_settings_t, also remove now unused TYPE_INTA handling

v2:
* add missing EXPORT_SYMBOL_GPL(ide_setting_sem) needed now for ide-disk

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: make /proc/ide/ optional
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:09 +0000 (00:01 +0200)]
ide: make /proc/ide/ optional

All important information/features should be already available through
sysfs and ioctl interfaces.

Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
disabling it makes IDE driver ~5 kB smaller (on x86-32).

While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
and remove no longer needed #ifdefs.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_tune_dma() helper
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:09 +0000 (00:01 +0200)]
ide: add ide_tune_dma() helper

After reworking the code responsible for selecting the best DMA
transfer mode it is now possible to add generic ide_tune_dma() helper.

Convert some IDE PCI host drivers to use it (the ones left need more work).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: rework the code for selecting the best DMA transfer mode (v3)
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:08 +0000 (00:01 +0200)]
ide: rework the code for selecting the best DMA transfer mode (v3)

Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.

* add ide_hwif_t.udma_filter hook for filtering UDMA mask
  (use it in alim15x3, hpt366, siimage and serverworks drivers)
* add ide_max_dma_mode() for finding best DMA mode for the device
  (loosely based on some older libata-core.c code)
* convert ide_dma_speed() users to use ide_max_dma_mode()
* make ide_rate_filter() take "ide_drive_t *drive" as an argument instead
  of "u8 mode" and teach it to how to use UDMA mask to do filtering
* use ide_rate_filter() in hpt366 driver
* remove no longer needed ide_dma_speed() and *_ratemask()
* unexport eighty_ninty_three()

v2:
* rename ->filter_udma_mask to ->udma_filter
  [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]

v3:
* updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space
  originated transfer mode change requests when 100MHz clock is used)

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: fix UDMA/MWDMA/SWDMA masks (v3)
Bartlomiej Zolnierkiewicz [Wed, 9 May 2007 22:01:07 +0000 (00:01 +0200)]
ide: fix UDMA/MWDMA/SWDMA masks (v3)

* use 0x00 instead of 0x80 to disable ->{ultra,mwdma,swdma}_mask
* add udma_mask field to ide_pci_device_t and use it to initialize
  ->ultra_mask in aec62xx, cmd64x, pdc202xx_{new,old} and piix drivers
* fix UDMA masks to match with chipset specific *_ratemask()
  (alim15x3, hpt366, serverworks and siimage drivers need UDMA mask
   filtering method - done in the next patch)

v2:
* piix: fix cable detection for 82801AA_1 and 82372FB_1
  [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
* cmd64x: use hwif->cds->udma_mask
  [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
* aec62xx: fix newly introduced bug - check DMA status not command register
  [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]

v3:
* piix: use hwif->cds->udma_mask
  [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoNFS: Kill the obsolete NFS_PARANOIA
Jesper Juhl [Thu, 26 Apr 2007 07:29:02 +0000 (00:29 -0700)]
NFS: Kill the obsolete NFS_PARANOIA

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: use __set_current_state()
Milind Arun Choudhary [Thu, 26 Apr 2007 07:29:03 +0000 (00:29 -0700)]
NFS: use __set_current_state()

use __set_current_state(TASK_*) instead of current->state = TASK_*, in fs/nfs

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agosunrpc: fix crash in rpc_malloc()
Peter Zijlstra [Wed, 9 May 2007 06:30:11 +0000 (08:30 +0200)]
sunrpc: fix crash in rpc_malloc()

While the comment says:
 * To prevent rpciod from hanging, this allocator never sleeps,
 * returning NULL if the request cannot be serviced immediately.

The function does not actually check for NULL pointers being returned.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: Clean up NFSv4 XDR error message
Chuck Lever [Tue, 8 May 2007 22:23:28 +0000 (18:23 -0400)]
NFS: Clean up NFSv4 XDR error message

Make it more useful for debugging purposes.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: NFS client underestimates how large an NFSv4 SETATTR reply can be
Chuck Lever [Tue, 8 May 2007 22:23:28 +0000 (18:23 -0400)]
NFS: NFS client underestimates how large an NFSv4 SETATTR reply can be

The maximum size of an NFSv4 SETATTR compound reply should include the
GETATTR operation that we send.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>