History log of /linux/drivers/pnp/interface.c (Results 251 – 275 of 348)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d5ebde6e 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: support optional IRQ resources

This patch adds an IORESOURCE_IRQ_OPTIONAL flag for use when
assigning resources to a device. If the flag is set and we are
unable to assign an IRQ to the device

PNP: support optional IRQ resources

This patch adds an IORESOURCE_IRQ_OPTIONAL flag for use when
assigning resources to a device. If the flag is set and we are
unable to assign an IRQ to the device, we can leave the IRQ
disabled but allow the overall resource allocation to succeed.

Some devices request an IRQ, but can run without an IRQ
(possibly with degraded performance). This flag lets us run
the device without the IRQ instead of just leaving the
device disabled.

This is a reimplementation of this previous change by Rene
Herman <rene.herman@gmail.com>:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b73a223661ed137c5d3d2635f954382e94f5a43

I reimplemented this for two reasons:
- to prepare for converting all resource options into a single linked
list, as opposed to the per-resource-type lists we have now, and
- to preserve the order and number of resource options.

In PNPBIOS and ACPI, we configure a device by giving firmware a
list of resource assignments. It is important that this list
has exactly the same number of resources, in the same order,
as the "template" list we got from the firmware in the first
place.

The problem of a sound card MPU401 being left disabled for want of
an IRQ was reported by Uwe Bugla <uwe.bugla@gmx.de>.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>

show more ...


# 169aaffe 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: increase I/O port & memory option address sizes

ACPI Address Space Descriptors can be up to 64 bits wide.
We should keep track of the whole thing when parsing resource
options, so this patch ch

PNP: increase I/O port & memory option address sizes

ACPI Address Space Descriptors can be up to 64 bits wide.
We should keep track of the whole thing when parsing resource
options, so this patch changes PNP port and mem option
fields from "unsigned short" and "unsigned int" to
"resource_size_t".

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>

show more ...


# 7aefff51 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: introduce pnp_irq_mask_t typedef

This adds a typedef for the IRQ bitmap, which should cause
no functional change, but will make it easier to pass a
pointer to a bitmap to pnp_register_irq_resou

PNP: introduce pnp_irq_mask_t typedef

This adds a typedef for the IRQ bitmap, which should cause
no functional change, but will make it easier to pass a
pointer to a bitmap to pnp_register_irq_resource().

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>

show more ...


# 08c9f262 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM

PNP previously defined PNP_PORT_FLAG_16BITADDR and PNP_PORT_FLAG_FIXED
in a private header file, but put those flags in struct

PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM

PNP previously defined PNP_PORT_FLAG_16BITADDR and PNP_PORT_FLAG_FIXED
in a private header file, but put those flags in struct resource.flags
fields. Better to make them IORESOURCE_IO_* flags like the existing
IRQ, DMA, and MEM flags.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>

show more ...


# b72ee1f1 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: whitespace/coding style fixes

No functional change; just make a couple declarations
consistent with the rest of the file.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: And

PNP: whitespace/coding style fixes

No functional change; just make a couple declarations
consistent with the rest of the file.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>

show more ...


# f61ed7e3 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: dont sort by type in /sys/.../resources

Rather than stepping through all IO resources, then stepping through
all MMIO resources, etc., we can just iterate over the resource list
once directly.

PNP: dont sort by type in /sys/.../resources

Rather than stepping through all IO resources, then stepping through
all MMIO resources, etc., we can just iterate over the resource list
once directly.

This can change the order in /sys, e.g.,

# cat /sys/devices/pnp0/00:07/resources # OLD
state = active
io 0x3f8-0x3ff
irq 4

# cat /sys/devices/pnp0/00:07/resources # NEW
state = active
irq 4
io 0x3f8-0x3ff

The old code artificially sorted resources by type; the new code
just lists them in the order we read them from the ISAPNP hardware
or the BIOS.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>

show more ...


# aee3ad81 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: replace pnp_resource_table with dynamically allocated resources

PNP used to have a fixed-size pnp_resource_table for tracking the
resources used by a device. This table often overflowed, so we

PNP: replace pnp_resource_table with dynamically allocated resources

PNP used to have a fixed-size pnp_resource_table for tracking the
resources used by a device. This table often overflowed, so we've
had to increase the table size, which wastes memory because most
devices have very few resources.

This patch replaces the table with a linked list of resources where
the entries are allocated on demand.

This removes messages like these:

pnpacpi: exceeded the max number of IO resources
00:01: too many I/O port resources

References:

http://bugzilla.kernel.org/show_bug.cgi?id=9535
http://bugzilla.kernel.org/show_bug.cgi?id=9740
http://lkml.org/lkml/2007/11/30/110

This patch also changes the way PNP uses the IORESOURCE_UNSET,
IORESOURCE_AUTO, and IORESOURCE_DISABLED flags.

Prior to this patch, the pnp_resource_table entries used the flags
like this:

IORESOURCE_UNSET
This table entry is unused and available for use. When this flag
is set, we shouldn't look at anything else in the resource structure.
This flag is set when a resource table entry is initialized.

IORESOURCE_AUTO
This resource was assigned automatically by pnp_assign_{io,mem,etc}().

This flag is set when a resource table entry is initialized and
cleared whenever we discover a resource setting by reading an ISAPNP
config register, parsing a PNPBIOS resource data stream, parsing an
ACPI _CRS list, or interpreting a sysfs "set" command.

Resources marked IORESOURCE_AUTO are reinitialized and marked as
IORESOURCE_UNSET by pnp_clean_resource_table() in these cases:

- before we attempt to assign resources automatically,
- if we fail to assign resources automatically,
- after disabling a device

IORESOURCE_DISABLED
Set by pnp_assign_{io,mem,etc}() when automatic assignment fails.
Also set by PNPBIOS and PNPACPI for:

- invalid IRQs or GSI registration failures
- invalid DMA channels
- I/O ports above 0x10000
- mem ranges with negative length

After this patch, there is no pnp_resource_table, and the resource list
entries use the flags like this:

IORESOURCE_UNSET
This flag is no longer used in PNP. Instead of keeping
IORESOURCE_UNSET entries in the resource list, we remove
entries from the list and free them.

IORESOURCE_AUTO
No change in meaning: it still means the resource was assigned
automatically by pnp_assign_{port,mem,etc}(), but these functions
now set the bit explicitly.

We still "clean" a device's resource list in the same places,
but rather than reinitializing IORESOURCE_AUTO entries, we
just remove them from the list.

Note that IORESOURCE_AUTO entries are always at the end of the
list, so removing them doesn't reorder other list entries.
This is because non-IORESOURCE_AUTO entries are added by the
ISAPNP, PNPBIOS, or PNPACPI "get resources" methods and by the
sysfs "set" command. In each of these cases, we completely free
the resource list first.

IORESOURCE_DISABLED
In addition to the cases where we used to set this flag, ISAPNP now
adds an IORESOURCE_DISABLED resource when it reads a configuration
register with a "disabled" value.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>

show more ...


# 87e4acf3 28-Jun-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: remove pnp_resource.index

We used pnp_resource.index to keep track of which ISAPNP configuration
register a resource should be written to. We needed this only to
handle the case where a regist

PNP: remove pnp_resource.index

We used pnp_resource.index to keep track of which ISAPNP configuration
register a resource should be written to. We needed this only to
handle the case where a register is disabled but a subsequent register
in the same set is enabled.

Rather than explicitly maintaining the pnp_resource.index, this patch
adds a resource every time we read an ISAPNP configuration register
and marks the resource as IORESOURCE_DISABLED when appropriate. This
makes the position in the pnp_resource_table always correspond to the
config register index.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>

show more ...


# a8931ef3 11-Jul-2008 David Woodhouse <David.Woodhouse@intel.com>

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6


# a8cac817 03-Jul-2008 Ingo Molnar <mingo@elte.hu>

Merge commit 'v2.6.26-rc8' into x86/mce


Revision tags: v2.6.26-rc8
# 009b9fc9 23-Jun-2008 Ingo Molnar <mingo@elte.hu>

Merge branch 'linus' into x86/threadinfo


Revision tags: v2.6.26-rc7
# 7aaaec38 16-Jun-2008 Ingo Molnar <mingo@elte.hu>

Merge branch 'linus' into x86/kconfig


# d939d285 16-Jun-2008 Ingo Molnar <mingo@elte.hu>

Merge branch 'linus' into x86/irq


# fd2c17e1 16-Jun-2008 Ingo Molnar <mingo@elte.hu>

Merge branch 'linus' into x86/timers


# 064a32d8 16-Jun-2008 Ingo Molnar <mingo@elte.hu>

Merge branch 'linus' into x86/memtest


# 28638ea4 16-Jun-2008 Ingo Molnar <mingo@elte.hu>

Merge branch 'linus' into x86/nmi

Conflicts:

arch/x86/kernel/nmi_32.c


Revision tags: v2.6.26-rc6, v2.6.26-rc5, v2.6.26-rc4
# 2d4b3f37 20-May-2008 Jiri Kosina <jkosina@suse.cz>

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6


# c203e45f 19-May-2008 Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>

Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus


Revision tags: v2.6.26-rc3
# b4ef290d 18-May-2008 Thomas Gleixner <tglx@linutronix.de>

Merge branch 'linus' into x86/pat


# 538f0fd0 17-May-2008 Thomas Gleixner <tglx@linutronix.de>

Merge branch 'linus' into x86/gart


# 0e50a4c6 17-May-2008 Thomas Gleixner <tglx@linutronix.de>

Merge branch 'linus' into x86/pebs


# fcff474e 16-May-2008 Paul Mackerras <paulus@samba.org>

Merge branch 'linux-2.6' into powerpc-next


# 63fe46da 15-May-2008 David S. Miller <davem@davemloft.net>

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/iwlwifi/iwl-4965-rs.c
drivers/net/wireless/rt2x00/rt61pci.c


# f2a5f24a 12-May-2008 Bjorn Helgaas <bjorn.helgaas@hp.com>

PNP: set IRQ index in sysfs "set irq" interface

We have to set the ISAPNP register index when setting an IRQ via the sysfs
interface. We already do it for IO, MEM, and DMA resources; I just missed

PNP: set IRQ index in sysfs "set irq" interface

We have to set the ISAPNP register index when setting an IRQ via the sysfs
interface. We already do it for IO, MEM, and DMA resources; I just missed the
IRQ one.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

show more ...


Revision tags: v2.6.26-rc2
# 2a5f2e3e 09-May-2008 Paul Mackerras <paulus@samba.org>

Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge


1...<<11121314