]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoMerge branch 'i7300_idle' into test
Len Brown [Thu, 23 Oct 2008 03:28:36 +0000 (23:28 -0400)]
Merge branch 'i7300_idle' into test

15 years agoMerge branch 'fujitsu' into test
Len Brown [Thu, 23 Oct 2008 03:28:33 +0000 (23:28 -0400)]
Merge branch 'fujitsu' into test

15 years agoMerge branch 'fadt-test' into test
Len Brown [Thu, 23 Oct 2008 03:28:03 +0000 (23:28 -0400)]
Merge branch 'fadt-test' into test

15 years agoMerge branch 'eeepc' into test
Len Brown [Thu, 23 Oct 2008 03:28:01 +0000 (23:28 -0400)]
Merge branch 'eeepc' into test

15 years agoMerge branch 'ec' into test
Len Brown [Thu, 23 Oct 2008 03:27:59 +0000 (23:27 -0400)]
Merge branch 'ec' into test

15 years agoMerge branch 'dock' into test
Len Brown [Thu, 23 Oct 2008 03:25:26 +0000 (23:25 -0400)]
Merge branch 'dock' into test

Conflicts:
drivers/acpi/osl.c

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge branch 'cpuidle' into test
Len Brown [Thu, 23 Oct 2008 03:20:05 +0000 (23:20 -0400)]
Merge branch 'cpuidle' into test

15 years agoMerge branch 'bugzilla-11481' into test
Len Brown [Thu, 23 Oct 2008 03:20:02 +0000 (23:20 -0400)]
Merge branch 'bugzilla-11481' into test

15 years agoMerge branch 'bugzilla-10503' into test
Len Brown [Thu, 23 Oct 2008 03:20:01 +0000 (23:20 -0400)]
Merge branch 'bugzilla-10503' into test

15 years agoMerge branch 'bugzilla-10237' into test
Len Brown [Thu, 23 Oct 2008 03:19:59 +0000 (23:19 -0400)]
Merge branch 'bugzilla-10237' into test

15 years agoMerge branch 'asus-cleanup' into test
Len Brown [Thu, 23 Oct 2008 03:19:57 +0000 (23:19 -0400)]
Merge branch 'asus-cleanup' into test

15 years agoMerge branch 'acpica' into test
Len Brown [Thu, 23 Oct 2008 03:19:51 +0000 (23:19 -0400)]
Merge branch 'acpica' into test

15 years agoMerge branch 'bugfixes' into test
Len Brown [Thu, 23 Oct 2008 03:19:50 +0000 (23:19 -0400)]
Merge branch 'bugfixes' into test

15 years agoMerge branch 'acer-wmi' into test
Len Brown [Thu, 23 Oct 2008 03:19:47 +0000 (23:19 -0400)]
Merge branch 'acer-wmi' into test

15 years agoMerge branch 'FW_BUG' into test
Len Brown [Thu, 23 Oct 2008 03:19:45 +0000 (23:19 -0400)]
Merge branch 'FW_BUG' into test

15 years agoACPICA: Update version to 20080926
Bob Moore [Sat, 27 Sep 2008 05:39:20 +0000 (13:39 +0800)]
ACPICA: Update version to 20080926

Update version to 20080926.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Add support for zero-length buffer-to-string conversions
Bob Moore [Sat, 27 Sep 2008 05:27:51 +0000 (13:27 +0800)]
ACPICA: Add support for zero-length buffer-to-string conversions

Allow zero length strings during interpreter buffer-to-string
conversions. For example, during the ToDecimalString and
ToHexString operaters, as well as implicit conversions. Fiodor
Suietov.  ACPICA BZ 585.

http://www.acpica.org/bugzilla/show_bug.cgi?id=585

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: New: Validation for predefined ACPI methods/objects
Bob Moore [Sun, 28 Sep 2008 07:26:17 +0000 (15:26 +0800)]
ACPICA: New: Validation for predefined ACPI methods/objects

Validates predefined ACPI objects that appear in the namespace,
at the time they are evaluated. The argument count and the type of
the returned object are validated. The purpose of this validation
is to detect problems with the BIOS-exposed predefined ACPI objects
before the results are returned to the ACPI-related drivers.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix for implicit return compatibility
Lin Ming [Sat, 27 Sep 2008 04:01:12 +0000 (12:01 +0800)]
ACPICA: Fix for implicit return compatibility

Predicate can be used for an implicit return value.
This change improves the implicit return mechanism to be more
compatible with the MS interpreter.

http://www.acpica.org/bugzilla/show_bug.cgi?id=349

Below AML code from http://bugzilla.kernel.org/show_bug.cgi?id=10686

Store(0x07D6, OSYS)
Method (_CRT, 0, Serialized)
{
    If (LLess (OSYS, 0x07D6))
    {
If (LEqual (\_SB.TJ85, Zero))
{
    Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
}
Else
{
    Return (Add (0x0AAC, Multiply (TP85, 0x0A)))
}
    }
}

Previously _CRT returns 0x07D6, now it returns 0 (predicate value of LLess)

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fixed a couple memory leaks associated with "implicit return"
Lin Ming [Sat, 27 Sep 2008 03:50:24 +0000 (11:50 +0800)]
ACPICA: Fixed a couple memory leaks associated with "implicit return"

Fixed a couple memory leaks associated with "implicit return" objects
when the AML Interpreter slack mode is enabled.

http://www.acpica.org/bugzilla/show_bug.cgi?id=349

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Optimize buffer allocation procedure
Bob Moore [Sat, 27 Sep 2008 03:34:48 +0000 (11:34 +0800)]
ACPICA: Optimize buffer allocation procedure

Eliminate duplicate code.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix possible memory leak, error exit path
Lin Ming [Sat, 27 Sep 2008 03:29:57 +0000 (11:29 +0800)]
ACPICA: Fix possible memory leak, error exit path

Fixed two possible memory leaks in the error exit paths of
acpi_ut_update_objerct_reference() and
acpi_ut_walk_package_tree()
These functions are similar in that they use a stack of state objects in
order to eliminate recursion. The stack must be fully deallocated
if an error occurs.

http://www.acpica.org/bugzilla/show_bug.cgi?id=383

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix fault after mem allocation failure in AML parser
Lin Ming [Sat, 27 Sep 2008 03:28:46 +0000 (11:28 +0800)]
ACPICA: Fix fault after mem allocation failure in AML parser

Fixes a crash if a memory allocation fails during the Op completion
routine acpi_ps_complete_this_op().

http://www.acpica.org/bugzilla/show_bug.cgi?id=492

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Remove unused ACPI register bit definition
Lin Ming [Sat, 27 Sep 2008 03:26:59 +0000 (11:26 +0800)]
ACPICA: Remove unused ACPI register bit definition

Removed the ACPI_BITREG_WAKE_ENABLE definition and entry in the
global register table. This bit does not exist and is unused.

http://www.acpica.org/bugzilla/show_bug.cgi?id=442

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Update version to 20080829
Bob Moore [Sat, 27 Sep 2008 03:14:04 +0000 (11:14 +0800)]
ACPICA: Update version to 20080829

Update version to 20080829.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix possible memory leak in acpi_ns_get_external_pathname
Bob Moore [Sat, 27 Sep 2008 03:12:36 +0000 (11:12 +0800)]
ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname

Fixes a memory leak in the error exit path.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Cleanup for internal Reference Object
Bob Moore [Sat, 27 Sep 2008 03:08:41 +0000 (11:08 +0800)]
ACPICA: Cleanup for internal Reference Object

Fix some sloppiness in the Reference object. No longer use AML
opcodes to differentiate the types, introduce new reference
Class. Cleanup the debug output code.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Update comments - no functional changes
Bob Moore [Sat, 27 Sep 2008 02:42:02 +0000 (10:42 +0800)]
ACPICA: Update comments - no functional changes

Some formatting and spelling fixes.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Update for Reference ACPI_OPERAND_OBJECT
Bob Moore [Sat, 27 Sep 2008 02:40:39 +0000 (10:40 +0800)]
ACPICA: Update for Reference ACPI_OPERAND_OBJECT

1) Add new field for use by DdbHandle (Value)
2) Use ACPI_CAST_INDIRECT_PTR to eliminate strict type warnings
3) Cleanup debug output

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Reduce error to warning for incorrect method arg count
Lin Ming [Sat, 27 Sep 2008 02:38:07 +0000 (10:38 +0800)]
ACPICA: Reduce error to warning for incorrect method arg count

Previously aborted with error if too few arguments were passed to
a control method via the external ACPICA interface. Now issue a
warning instead and continue. Handles the case where the method
inadvertently declares too many arguments, but does not actually
use the extra ones.  Applies mainly to the predefined methods.

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

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Disallow evaluation of named object types with no value
Bob Moore [Sat, 27 Sep 2008 02:29:31 +0000 (10:29 +0800)]
ACPICA: Disallow evaluation of named object types with no value

Return AE_TYPE for objects that have no value and therefore
evaluation is undefined: Device, Event, Mutex, Region, Thermal,
and Scope.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Remove obsolete exception codes
Bob Moore [Sat, 27 Sep 2008 02:28:07 +0000 (10:28 +0800)]
ACPICA: Remove obsolete exception codes

Removed 10 exception codes (and corresponding name strings)
that were obsolete for various reasons.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Add namespace node to operand object union
Bob Moore [Sat, 27 Sep 2008 02:22:09 +0000 (10:22 +0800)]
ACPICA: Add namespace node to operand object union

Add ACPI_NAMESPACE_NODE to the ACPI_OPERAND_OBJECT in order to
simplify code that accepts both of these objects. A common type
field is used to differentiate them.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Remove obsolete debug levels (WARN and ERROR)
Bob Moore [Sun, 28 Sep 2008 07:00:47 +0000 (15:00 +0800)]
ACPICA: Remove obsolete debug levels (WARN and ERROR)

Removed ACPI_DB_WARN and ACPI_DB_ERROR. These debug levels were
made obsolete by the ACPI_WARNING and ACPI_ERROR/ACPI_EXCEPTION
interfaces.  Also added ACPI_DB_EVENTS to correspond with the
existing ACPI_LV_EVENTS.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk
Lin Ming [Sun, 28 Sep 2008 06:51:56 +0000 (14:51 +0800)]
ACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk

ACPI_DB_ERROR and ACPI_DB_WARN were removed from ACPICA core.
So replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk(KERN_ERR PREFIX ...)
and ACPI_DEBUG_PRINT((ACPI_DB_WARN, ...) with printk(KERN_WARNING PREFIX ...)

We do not use ACPI_ERROR/ACPI_WARNING since they're not exported, see
-------------------------------------------------------------
commit 6468463abd7051fcc29f3ee7c931f9bbbb26f5a4
Author: Len Brown <len.brown@intel.com>
Date:   Mon Jun 26 23:41:38 2006 -0400

    ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)

Signed-off-by: Len Brown <len.brown@intel.com>
-------------------------------------------------------------

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: add preemption point after each opcode parse
Alexey Starikovskiy [Thu, 25 Sep 2008 17:40:30 +0000 (21:40 +0400)]
ACPICA: add preemption point after each opcode parse

Reference: http://marc.info/?l=linux-acpi&m=122236382701062&w=2

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Update version to 20080729
Bob Moore [Mon, 4 Aug 2008 03:15:11 +0000 (11:15 +0800)]
ACPICA: Update version to 20080729

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: x2APIC support: changes for MADT and SRAT ACPI tables
Bob Moore [Mon, 4 Aug 2008 02:42:47 +0000 (10:42 +0800)]
ACPICA: x2APIC support: changes for MADT and SRAT ACPI tables

Support for the x2APIC. There are 2 new subtables for the MADT and
one new subtable for the SRAT. Includes disassembler and acpisrc
support. Data from the Intel 64 Architecture x2APIC Specification,
June 2008.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Improve object conversion error messages
Bob Moore [Mon, 4 Aug 2008 02:41:29 +0000 (10:41 +0800)]
ACPICA: Improve object conversion error messages

Better error messages during object conversion from internal
to the external ACPI_OBJECT. Used for external calls to
acpi_evaluate_object.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Add function to decode reference obj types to strings
Bob Moore [Mon, 4 Aug 2008 02:40:09 +0000 (10:40 +0800)]
ACPICA: Add function to decode reference obj types to strings

Created for improved error messages.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Update version to 20080701
Bob Moore [Mon, 4 Aug 2008 02:12:31 +0000 (10:12 +0800)]
ACPICA: Update version to 20080701

Update version to 20080701.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Return method arg count from acpi_get_object_info
Bob Moore [Fri, 4 Jul 2008 02:53:58 +0000 (10:53 +0800)]
ACPICA: Return method arg count from acpi_get_object_info

Also update the debugger so that the correct number of arguments is
passed to the method. Prevents a warning message from the debugger.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Cleanup macro definition file.
Bob Moore [Mon, 4 Aug 2008 01:54:17 +0000 (09:54 +0800)]
ACPICA: Cleanup macro definition file.

Removed unused macros. Ensure that multiple parameters always have a space
after a comma. Cleanup some comments.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix warning for 64-bit build
Bob Moore [Fri, 15 Aug 2008 02:32:59 +0000 (04:32 +0200)]
ACPICA: Fix warning for 64-bit build

Fixes warning from exconfig.c on 64-bit build.

AK: This actually was fixed earlier in Linux, this just syncs with
AK: the version of the fix that went into the ACPCA codebase

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Add function to dereference returned reference objects
Lin Ming [Mon, 4 Aug 2008 05:22:10 +0000 (13:22 +0800)]
ACPICA: Add function to dereference returned reference objects

Examines the return object from a call to acpi_evaluate_object.
Any Index or RefOf references are automatically dereferenced in
an attempt to return something useful (these reference types
cannot be converted into an external ACPI_OBJECT.)
Lin Ming, Bob Moore.

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

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Return status from global init function
Yi Yang [Mon, 4 Aug 2008 02:30:09 +0000 (10:30 +0800)]
ACPICA: Return status from global init function

Return status from acpi_ut_init_globals. This is used by both
the kernel subsystem and the utilities such as iASL compiler.
The function could possibly fail when the caches are initialized.
Yang Yi.

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix table compare code, length then data
Bob Moore [Fri, 4 Jul 2008 02:57:51 +0000 (10:57 +0800)]
ACPICA: Fix table compare code, length then data

Split the ACPI table compare. First check that the lengths match
exactly. Then compare the data.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Fix wrong resource descriptor length for 64-bit build
Bob Moore [Fri, 4 Jul 2008 02:56:13 +0000 (10:56 +0800)]
ACPICA: Fix wrong resource descriptor length for 64-bit build

The "minimal" descriptors such as EndTag are calculated as 12
bytes long, but the actual length in the internal descriptor is
16 because of the round-up to 8 on 64-bit build.

http://www.acpica.org/bugzilla/show_bug.cgi?id=728

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Allow same ACPI table to be loaded/unloaded more than once
Bob Moore [Fri, 4 Jul 2008 02:48:43 +0000 (10:48 +0800)]
ACPICA: Allow same ACPI table to be loaded/unloaded more than once

Without this change, a table cannot be loaded again once it has
been loaded/unloaded one time. The current mechanism does not
unregister a table upon an unload. During a load, if the same
table is found, this no longer returns an exception.

http://www.acpica.org/bugzilla/show_bug.cgi?id=722

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Add check for invalid handle in acpi_get_object_info
Fiodor Suietov [Fri, 4 Jul 2008 02:18:34 +0000 (10:18 +0800)]
ACPICA: Add check for invalid handle in acpi_get_object_info

Return AE_BAD_PARAMETER if input handle is invalid.

http://www.acpica.org/bugzilla/show_bug.cgi?id=474

Signed-off-by: Fiodor Suietov <fiodor.f.suietov@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPICA: Copy dynamically loaded tables to local buffer
Dennis Noordsij [Fri, 15 Aug 2008 01:37:58 +0000 (09:37 +0800)]
ACPICA: Copy dynamically loaded tables to local buffer

Previously, dynamically loaded tables were simply mapped, but on some machines
this memory is corrupted after suspend. Now copy the table to a local buffer.
For OpRegion case, added checksum verify. Use the table length from the table header,
not the region length. For Buffer case, use the table length also.

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

Signed-off-by: Dennis Noordsij <dennis.noordsij@helsinki.fi>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agosh: sh7785 pinmux support
Magnus Damm [Thu, 23 Oct 2008 02:30:10 +0000 (11:30 +0900)]
sh: sh7785 pinmux support

This patch implements pinmux tables for the sh7785 processor.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosata_via: load DEVICE register when CTL changes
Tejun Heo [Tue, 21 Oct 2008 15:45:57 +0000 (00:45 +0900)]
sata_via: load DEVICE register when CTL changes

VIA controllers clear DEVICE register when IEN changes.  Make sure
DEVICE is updated along with CTL.

This change is separated from Joseph Chan's larger patch.

  http://thread.gmane.org/gmane.linux.kernel.commits.mm/40640

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: set device class to NONE if phys_offline
Tejun Heo [Tue, 21 Oct 2008 15:31:34 +0000 (00:31 +0900)]
libata: set device class to NONE if phys_offline

Reset methods don't have access to phys link status for slave links
and may incorrectly indicate device presence causing unnecessary probe
failures for unoccupied links.  This patch clears device class to NONE
during post-reset processing if phys link is offline.

As on/offlineness semantics is strictly defined and used in multiple
places by the core layer, this won't change behavior for drivers which
don't use slave links.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata-eh: fix slave link EH action mask handling
Tejun Heo [Tue, 21 Oct 2008 11:37:21 +0000 (20:37 +0900)]
libata-eh: fix slave link EH action mask handling

Slave link action mask is transferred to master link and all the EH
actions are taken by the master link.  ata_eh_about_to_do() and
ata_eh_done() are called with ATA_EH_ALL_ACTIONS to clear the slave
link actions during transfer.  This always sets ATA_PFLAG_RECOVERED
flag causing spurious "EH complete" messages.

Don't set ATA_PFLAG_RECOVERED for slave link actions.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: transfer EHI control flags to slave ehc.i
Tejun Heo [Tue, 21 Oct 2008 05:26:39 +0000 (14:26 +0900)]
libata: transfer EHI control flags to slave ehc.i

ATA_EHI_NO_AUTOPSY and ATA_EHI_QUIET are used to control the behavior
of EH.  As only the master link is visible outside EH, these flags are
set only for the master link although they should also apply to the
slave link, which causes spurious EH messages during probe and
suspend/resume.

This patch transfers those two flags to slave ehc.i before performing
slave autopsy and reporting.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata-sff: fix ata_sff_post_internal_cmd()
Tejun Heo [Mon, 20 Oct 2008 04:10:21 +0000 (13:10 +0900)]
libata-sff: fix ata_sff_post_internal_cmd()

ata_sff_post_internal_cmd() needs to grab port lock before calling
ata_bmdma_stop() and also need to clear hsm_task_state.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: initialize port_task when !CONFIG_ATA_SFF
Tejun Heo [Mon, 20 Oct 2008 04:11:56 +0000 (13:11 +0900)]
libata: initialize port_task when !CONFIG_ATA_SFF

ap->port_task was not initialized if !CONFIG_ATA_SFF later triggering
lockdep warning.  Make sure it's initialized.

Reported by Larry Finger.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago9p: fix sparse warnings
Eric Van Hensbergen [Wed, 22 Oct 2008 23:54:47 +0000 (18:54 -0500)]
9p: fix sparse warnings

Several sparse warnings were introduced by patches accepted during the merge
window which weren't caught.  This patch fixes those warnings.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
15 years ago9p: rdma: RDMA Transport Support for 9P
Tom Tucker [Wed, 22 Oct 2008 23:47:39 +0000 (18:47 -0500)]
9p: rdma: RDMA Transport Support for 9P

This patch implements the RDMA transport provider for 9P. It allows
mounts to be performed over iWARP and IB capable network interfaces.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Latchesar Ionkov <lionkov@lanl.gov>
15 years ago9p: fix format warning
Eric Van Hensbergen [Wed, 22 Oct 2008 23:48:45 +0000 (18:48 -0500)]
9p: fix format warning

This patch fixes a format warning which appears on 64-bit builds.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
15 years ago9p: fix debug build error
Eric Van Hensbergen [Wed, 22 Oct 2008 23:47:40 +0000 (18:47 -0500)]
9p: fix debug build error

Fixes build problem with 9p when building with debug disabled.
Also contains some fixes for warnings which pop up when
CONFIG_NET_9P_DEBUG is disabled.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
15 years agoPCI hotplug: fix logic in Compaq hotplug controller bus speed setup
Julia Lawall [Wed, 22 Oct 2008 23:44:00 +0000 (16:44 -0700)]
PCI hotplug: fix logic in Compaq hotplug controller bus speed setup

The pattern !E && !E->fld is nonsensical.  The patch below updates this
according to the assumption that && should be ||.  But perhaps another
solution was intended.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@disable and_comm@
expression E;
identifier fld;
@@

- !E && !E->fld
+ !E || !E->fld
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: don't export linux/io.h from pci.h
Stephen Rothwell [Wed, 22 Oct 2008 02:39:55 +0000 (13:39 +1100)]
PCI: don't export linux/io.h from pci.h

Move the include of io.h down into the #ifdef __KERNEL__ protected
region.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: PCI_QUIRKS depends on PCI
Geert Uytterhoeven [Wed, 22 Oct 2008 06:53:25 +0000 (08:53 +0200)]
PCI: PCI_QUIRKS depends on PCI

commit 3d137310245e4cdc3e8c8ba1bea2e145a87ae8e3 ("PCI: allow quirks to be
compiled out") introduced CONFIG_PCI_QUIRKS, which now shows up in each
and every .config.  Fix this by making it depend on PCI.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI hotplug: pciehp: poll data link layer link active
Kenji Kaneshige [Wed, 22 Oct 2008 05:31:44 +0000 (14:31 +0900)]
PCI hotplug: pciehp: poll data link layer link active

This patch adds polling mechanism for Data Link Layer Link Active bit
after turning power on, instead of waiting for 1000 msec. This reduces
reduce the unnecessary long wait.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI hotplug: pciehp: fix possible memory leak in pcie_init
Kenji Kaneshige [Wed, 22 Oct 2008 05:30:15 +0000 (14:30 +0900)]
PCI hotplug: pciehp: fix possible memory leak in pcie_init

Fix the error paths in pcie_init to avoid leaking memory.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: Workaround invalid P2P bridge bus numbers
Benjamin Herrenschmidt [Mon, 20 Oct 2008 23:06:29 +0000 (10:06 +1100)]
PCI: Workaround invalid P2P bridge bus numbers

Some firmware fail to properly configure P2P bridges, leaving them
with invalid bus numbers. In some cases, this happens on some embedded
4xx boards as the result of the kernel allocating different bus space
than the firmware does to host bridges while not setting
pcibios_assign_all_busses() for various reasons. In other cases, it can
just be bogus firmware.

This adds some sanity checking to the PCI probing code. If a bridge is
found whose primary bus number doesn't match the bus it's sitting on,
or whose secondary bus number not strictly above it's primary bus
number, then the bridge bus numbers are deconfigured in the first pass
of pci_scan_bridge() to be re-assigned in the second pass.

Tested-by: "Ayman El-Khashab" <AymanE@tanisys.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI Hotplug: fakephp: add duplicate slot name debugging
Alex Chiang [Mon, 20 Oct 2008 23:42:03 +0000 (17:42 -0600)]
PCI Hotplug: fakephp: add duplicate slot name debugging

The PCI core now manages slot names on behalf of slot detection
and slot hotplug drivers, including the handling of duplicate
slot names.

We can use the fakephp driver to help test the new functionality.
Add a 'dup_slots' module param to force fakephp to create multiple
slots with the same name. We can then verify that the PCI core
correctly renamed the slots.

sapphire:/sys/bus/pci/slots # modprobe fakephp dup_slots
sapphire:/sys/bus/pci/slots # ls
fake    fake-10  fake-3  fake-5  fake-7  fake-9
fake-1  fake-2   fake-4  fake-6  fake-8

Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: Hotplug core: remove 'name'
Alex Chiang [Mon, 20 Oct 2008 23:41:58 +0000 (17:41 -0600)]
PCI: Hotplug core: remove 'name'

Now that the PCI core manages the 'name' for each individual
hotplug driver, and all drivers (except rpaphp) have been converted
to use hotplug_slot_name(), there is no need for the PCI hotplug
core to drag around its own copy of name either.

Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: shcphp: remove 'name' parameter
Alex Chiang [Mon, 20 Oct 2008 23:41:53 +0000 (17:41 -0600)]
PCI: shcphp: remove 'name' parameter

We do not need to manage our own name parameter, especially since
the PCI core can change it on our behalf, in the case of duplicate
slot names.

Remove 'name' from shpchp's version of struct slot.

This change also removes the unused struct task_event from the
slot structure.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: SGI Hotplug: stop managing bss_hotplug_slot->name
Alex Chiang [Mon, 20 Oct 2008 23:41:48 +0000 (17:41 -0600)]
PCI: SGI Hotplug: stop managing bss_hotplug_slot->name

We no longer need to manage our version of hotplug_slot->name
since the PCI and hotplug core manage it on our behalf.

Update the sn_hp_slot_private_alloc() interface to fill in
the correct name for us, as that function already has all
the parameters needed to determine the name.

Cc: kristen.c.accardi@intel.com
Cc: jpk@sgi.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: rpaphp: kmalloc/kfree slot->name directly
Alex Chiang [Mon, 20 Oct 2008 23:41:43 +0000 (17:41 -0600)]
PCI: rpaphp: kmalloc/kfree slot->name directly

rpaphp tends to use slot->name directly everywhere, and doesn't
ever need slot->hotplug_slot->name.

struct hotplug_slot->name is going away, so convert rpaphp directly
manipulate its own slot->name everywhere, and don't bother touching
slot->hotplug_slot->name.

Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: pciehp: remove 'name' parameter
Alex Chiang [Mon, 20 Oct 2008 23:41:38 +0000 (17:41 -0600)]
PCI: pciehp: remove 'name' parameter

We do not need to manage our own name parameter, especially since
the PCI core can change it on our behalf, in the case of duplicate
slot names.

Remove 'name' from pciehp's version of struct slot, and remove
unused 'task_list' as well.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: ibmphp: stop managing hotplug_slot->name
Alex Chiang [Mon, 20 Oct 2008 23:41:33 +0000 (17:41 -0600)]
PCI: ibmphp: stop managing hotplug_slot->name

We no longer need to manage our version of hotplug_slot->name
since the PCI and hotplug core manage it on our behalf.

Now, we simply advise the PCI core of the name that we would
like, and let the core take care of the rest.

Additionally, slightly rearrange the members of struct slot
so they are naturally aligned to eliminate holes.

Cc: jbarnes@virtuousgeek.org
Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: fakephp: remove 'name' parameter
Alex Chiang [Mon, 20 Oct 2008 23:41:28 +0000 (17:41 -0600)]
PCI: fakephp: remove 'name' parameter

Remove 'name' from fakephp's struct dummy_slot, as the PCI core
will now manage our slot name for us.

Cc: jbarnes@virtuousgeek.org
Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI, PCI Hotplug: introduce slot_name helpers
Alex Chiang [Mon, 20 Oct 2008 23:41:07 +0000 (17:41 -0600)]
PCI, PCI Hotplug: introduce slot_name helpers

In preparation for cleaning up the various hotplug drivers
such that they don't have to manage their own 'name' parameters
anymore, we provide the following convenience functions:

pci_slot_name()
hotplug_slot_name()

These helpers will be used by individual hotplug drivers.

Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: cpqphp: stop managing hotplug_slot->name
Alex Chiang [Mon, 20 Oct 2008 23:41:22 +0000 (17:41 -0600)]
PCI: cpqphp: stop managing hotplug_slot->name

We no longer need to manage our version of hotplug_slot->name
since the PCI and hotplug core manage it on our behalf.

Now, we simply advise the PCI core of the name that we would
like, and let the core take care of the rest.

Cc: jbarnes@virtuousgeek.org
Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: cpci_hotplug: stop managing hotplug_slot->name
Alex Chiang [Mon, 20 Oct 2008 23:41:17 +0000 (17:41 -0600)]
PCI: cpci_hotplug: stop managing hotplug_slot->name

We no longer need to manage our version of hotplug_slot->name
since the PCI and hotplug core manage it on our behalf.

Now, we simply advise the PCI core of the name that we would
like, and let the core take care of the rest.

Cc: kristen.c.accardi@intel.com
Cc: scottm@somanetworks.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: acpiphp: remove 'name' parameter
Alex Chiang [Mon, 20 Oct 2008 23:41:12 +0000 (17:41 -0600)]
PCI: acpiphp: remove 'name' parameter

We do not need to manage our own name parameter, especially since
the PCI core can change it on our behalf, in the case of duplicate
slot names.

Remove 'name' from acpiphp's version of struct slot.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: prevent duplicate slot names
Alex Chiang [Mon, 20 Oct 2008 23:41:02 +0000 (17:41 -0600)]
PCI: prevent duplicate slot names

Prevent callers of pci_create_slot() from registering slots with
duplicate names. This condition occurs most often when PCI hotplug
drivers are loaded on platforms with broken firmware that assigns
identical names to multiple slots.

We now rename these duplicate slots on behalf of the user.

If firmware assigns the name N to multiple slots, then:

The first registered slot is assigned N
The second registered slot is assigned N-1
The third registered slot is assigned N-2
etc.

This is the permanent fix mentioned in earlier commits d6a9e9b4 and
167e782e (shpchp/pciehp: Rename duplicate slot name...).

We take advantage of the new 'hotplug' parameter in pci_create_slot()
to prevent a slot create/rename race between hotplug drivers and
detection drivers.

Scenario A:
hotplug driver                  detection driver
--------------                  ----------------
pci_create_slot(hotplug=set)
pci_create_slot(hotplug=NULL)

The hotplug driver creates the slot with its desired name, and then
releases the semaphore. Now, the detection driver tries to create
the same slot, but it already exists. We don't care about renaming,
so return the existing slot.

Scenario B:
hotplug driver                  detection driver
--------------                  ----------------
pci_create_slot(hotplug=NULL)
pci_create_slot(hotplug=set)

The detection driver creates the slot with name "X". Then the hotplug
driver tries to create the same slot, but wants the name "Y" instead.
We detect that we're trying to create the same slot and that we also
want a rename, so rename the slot to "Y" and return.

Scenario C:
hotplug driver                  hotplug driver
--------------                  ----------------
pci_create_slot(hotplug=set)
pci_create_slot(hotplug=set)

Two separate hotplug drivers are attempting to claim the slot and
are passing valid hotplug_slot args to pci_create_slot(). We detect
that the slot already has a ->hotplug callback, prevent a rename,
and return -EBUSY.

Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI Hotplug: serialize pci_hp_register and pci_hp_deregister
Kenji Kaneshige [Mon, 20 Oct 2008 23:40:57 +0000 (17:40 -0600)]
PCI Hotplug: serialize pci_hp_register and pci_hp_deregister

Convert the pci_hotplug_slot_list_lock, which only protected the
list of hotplug slots, to a pci_hp_mutex which now protects both
interfaces.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: update pci_create_slot() to take a 'hotplug' param
Alex Chiang [Mon, 20 Oct 2008 23:40:52 +0000 (17:40 -0600)]
PCI: update pci_create_slot() to take a 'hotplug' param

Slot detection drivers can co-exist with hotplug drivers. The names
of the detected/claimed slots may be different depending on module
load order.

For legacy reasons, we need to allow hotplug drivers to override
the slot name if a detection driver is loaded first (and they find
the same slots).

Creating and overriding slot names should be an atomic operation,
otherwise you get a locking nightmare as various drivers race to
call pci_create_slot().

pci_create_slot() is already serialized by grabbing the pci_bus_sem.

We update the API and add a 'hotplug' param, which is:

set if the caller is a hotplug driver
NULL if the caller is a detection driver

pci_create_slot() does not actually use the 'hotplug' parameter in this
patch. A later patch will add the logic that uses it.

Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: rename pci_update_slot_number to pci_renumber_slot
Alex Chiang [Mon, 20 Oct 2008 23:40:47 +0000 (17:40 -0600)]
PCI: rename pci_update_slot_number to pci_renumber_slot

The GPL exported symbol pci_update_slot_number has been renamed to
pci_renumber_slot. Some of the safety checks were unnecessary and
were removed.

Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI Hotplug core: add 'name' param pci_hp_register interface
Alex Chiang [Mon, 20 Oct 2008 23:40:42 +0000 (17:40 -0600)]
PCI Hotplug core: add 'name' param pci_hp_register interface

Update pci_hp_register() to take a const char *name parameter.

The motivation for this is to clean up the individual hotplug
drivers so that each one does not have to manage its own name.
The PCI core should be the place where we manage the name.

We update the interface and all callsites first, in a
"no functional change" manner, and clean up the drivers later.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoRemove PCI hotplug core MAINTAINERS entry
Jesse Barnes [Tue, 21 Oct 2008 19:01:27 +0000 (12:01 -0700)]
Remove PCI hotplug core MAINTAINERS entry

Per discussion w/Kristen at the LPC PCI BoF, the core hotplug code doesn't
really need a separate maintainer, so remove the entry (but leave the driver
specific ones).

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: include io.h in pci.h so that ioremap_nocache is defined
Jesse Barnes [Tue, 21 Oct 2008 17:09:05 +0000 (10:09 -0700)]
PCI: include io.h in pci.h so that ioremap_nocache is defined

Ingo pointed out that the m32r build was broken by pci_ioremap.  It looks like
some files include pci.h w/o including io.h.  The latter defines ioremap_* if
present, so it makes sense to include it in pci.h now that we have pci_ioremap
there.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: add support for function level reset
Sheng Yang [Tue, 21 Oct 2008 09:38:25 +0000 (17:38 +0800)]
PCI: add support for function level reset

Sometimes, it's necessary to enable software's ability to quiesce and
reset endpoint hardware with function-level granularity, so provide
support for it.

The patch implement Function Level Reset(FLR) feature following PCI-e
spec. And this is the first step. We would add more generic method, like
D0/D3, to allow more devices support this function.

The patch contains two functions. pcie_reset_function() is the new
driver API, and, contains some action to quiesce a device.  The other
function is a helper:  pcie_execute_reset_function() just executes the
reset for a particular device function.

Current the usage model is in KVM. Function reset is necessary for
assigning device to a guest, or moving it between partitions.

For Function Level Reset(FLR), please refer to PCI Express spec chapter
6.6.2.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoPCI: Fix reference counting bug
Matthew Wilcox [Tue, 21 Oct 2008 01:13:08 +0000 (19:13 -0600)]
PCI: Fix reference counting bug

pci_get_subsys() will decrement the reference count of the device that
it starts searching from.  Unfortunately, the pci_find_device() interface
will already have decremented the reference count of the device earlier,
so the device will end up losing all reference counts and be freed.

We can fix this by incrementing the reference count of the device to
start searching from before calling pci_get_subsys().

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoACPI/PCI: Set support bit for MSI in support field of _OSC
Taku Izumi [Fri, 17 Oct 2008 04:52:51 +0000 (13:52 +0900)]
ACPI/PCI: Set support bit for MSI in support field of _OSC

Currently linux doesn't have any code to set the "MSI supported" bit in
Support Fireld of _OSC. This patch adds the code for that.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoACPI/PCI: Fix return value of acpi_cuery_osc()
Taku Izumi [Fri, 17 Oct 2008 04:51:53 +0000 (13:51 +0900)]
ACPI/PCI: Fix return value of acpi_cuery_osc()

If acpi_query_osc() returns other than AE_OK, __pci_osc_support_set()
stops scanning ACPI objects to evaluate _OSC. This prevents subsequent
_OSCs from being evaluated if some of root bridge doesn't have _OSC, for
example. So acpi_query_osc() should return always AE_OK to evaluate all
_OSC.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoACPI/PCI: Always query _OSC control field in pci_osc_control_set()
Taku Izumi [Fri, 17 Oct 2008 04:51:00 +0000 (13:51 +0900)]
ACPI/PCI: Always query _OSC control field in pci_osc_control_set()

In current pci_osc_control_set() implementation, once the _OSC control
field is queried, it is never queried again. But the query result can
change depending on the _OSC support field. For example, if PCI Express
Native Hot Plug control depends on ASPM support on a certain platform, a
PCI Express Native Hot Plug Control query would fail before the ASPM
driver was loaded, but it would succeed if the ASPM driver was loaded
first.  Therefore, pci_osc_control_set() should query the _OSC control
field every time.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoACPI/PCI: Change pci_osc_control_set() to query control bits first
Taku Izumi [Fri, 17 Oct 2008 04:49:46 +0000 (13:49 +0900)]
ACPI/PCI: Change pci_osc_control_set() to query control bits first

Current pci_osc_control_set() evaluates _OSC without query for control
bits, unless __pci_osc_support_set() is called beforehand. But as
strongly recommended in PCI firmware specification, it should query
control bits first.

This patch changes pci_osc_control_set() to query control bits first
even if __pci_osc_support_set() is not called beforehand.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoACPI/PCI: Fix possible race condition on _OSC evaluation
Taku Izumi [Fri, 17 Oct 2008 04:48:36 +0000 (13:48 +0900)]
ACPI/PCI: Fix possible race condition on _OSC evaluation

Fix possible race condition on _OSC evaluation.

Current _OSC evaluation code has possible race condition because it
maniputes osc_data linked list or its contents without any lock
mechanism.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoMerge branches 'cma', 'cxgb3', 'ehca', 'ipoib', 'mad', 'mlx4' and 'nes' into for...
Roland Dreier [Wed, 22 Oct 2008 22:56:41 +0000 (15:56 -0700)]
Merge branches 'cma', 'cxgb3', 'ehca', 'ipoib', 'mad', 'mlx4' and 'nes' into for-next

15 years agoIB/ehca: Reject dynamic memory add/remove when ehca adapter is present
Stefan Roscher [Wed, 22 Oct 2008 22:54:38 +0000 (15:54 -0700)]
IB/ehca: Reject dynamic memory add/remove when ehca adapter is present

Since the ehca device driver does not support dynamic memory add and
remove operations, the driver must explicitly reject such requests in
order to prevent unpredictable behaviors related to existing memory
regions that cover all of memory being used by InfiniBand protocols in
the kernel.

The solution (for now at least) is to add a memory notifier to the
ehca device driver and if a request for dynamic memory add or remove
comes in, ehca will always reject it.  The user can add or remove
memory by hot-removing the ehca adapter, performing the memory
operation, and then hot-adding the ehca adapter back.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter
Stefan Roscher [Wed, 22 Oct 2008 22:52:31 +0000 (15:52 -0700)]
IB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter

Because ehca adapters can differ in the maximum number of QPs and CQs
we have to save the maximum number of these ressources per adapter and
not globally per ehca driver. This fix introduces 2 new members to the
shca structure to store the maximum value for QPs and CQs per adapter.

The module parameters are now used as initial values for those
variables.  If a user selects an invalid number of CQs or QPs we don't
print an error any longer, instead we will inform the user with a
warning and set the values to the respective maximum supported by the
HW.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIPoIB: Set netdev offload features properly for child (VLAN) interfaces
Or Gerlitz [Wed, 22 Oct 2008 22:49:49 +0000 (15:49 -0700)]
IPoIB: Set netdev offload features properly for child (VLAN) interfaces

Child devices were created without any offload features set, fix this by
moving the code that computes the features into generic function which is
now called through non-child and child device creation.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
-- v1 has a bug where the 'result' flag in ipoib_vlan_add may be used uninitialized
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIPoIB: Clean up ethtool support
Or Gerlitz [Wed, 22 Oct 2008 22:49:29 +0000 (15:49 -0700)]
IPoIB: Clean up ethtool support

Add a get_rx_csum method.  Remove the driver's own get_tso method, as
the ethtool kernel code uses the default one if nothing is provided.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agomlx4_core: Add Ethernet PCI device IDs
Yevgeny Petrilin [Wed, 22 Oct 2008 22:48:03 +0000 (15:48 -0700)]
mlx4_core: Add Ethernet PCI device IDs

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>