12 Jan, 2011

1 commit


27 Oct, 2010

1 commit


25 Oct, 2010

1 commit


02 Oct, 2010

1 commit


01 Oct, 2010

1 commit

  • ACPI devices are often involved in address space conflicts with PCI devices,
    so I think it's worth logging the resources they use. Otherwise we have to
    depend on lspnp or groping around in sysfs to find them.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

19 Jul, 2010

1 commit

  • This patch (as1354) adds remote-wakeup support to the pnpacpi driver.
    The new can_wakeup method also allows other PNP protocol drivers
    (pnpbios or iaspnp) to add wakeup support, but I don't know enough
    about how they work to actually do it.

    Signed-off-by: Alan Stern
    Reviewed-by: Bjorn Helgaas
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     

07 Apr, 2009

1 commit


07 Jan, 2009

1 commit


23 Oct, 2008

1 commit


17 Oct, 2008

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits)
    UIO: Fix mapping of logical and virtual memory
    UIO: add automata sercos3 pci card support
    UIO: Change driver name of uio_pdrv
    UIO: Add alignment warnings for uio-mem
    Driver core: add bus_sort_breadthfirst() function
    NET: convert the phy_device file to use bus_find_device_by_name
    kobject: Cleanup kobject_rename and !CONFIG_SYSFS
    kobject: Fix kobject_rename and !CONFIG_SYSFS
    sysfs: Make dir and name args to sysfs_notify() const
    platform: add new device registration helper
    sysfs: use ilookup5() instead of ilookup5_nowait()
    PNP: create device attributes via default device attributes
    Driver core: make bus_find_device_by_name() more robust
    usb: turn dev_warn+WARN_ON combos into dev_WARN
    debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
    debug: Introduce a dev_WARN() function
    sysfs: fix deadlock
    device model: Do a quickcheck for driver binding before doing an expensive check
    Driver core: Fix cleanup in device_create_vargs().
    Driver core: Clarify device cleanup.
    ...

    Linus Torvalds
     
  • There's no point in printing some ancient version number forever.

    Signed-off-by: Adrian Bunk
    Acked-by: Rene Herman
    Acked-by: Bjorn Helgaas
    Acked-by: Adam M Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • This creates the attributes before the uevent is sent.

    Signed-off-by: Drew Moseley
    Acked-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Drew Moseley
     

11 Oct, 2008

3 commits

  • pnp_dbg() is equivalent to dev_dbg() except that we can turn it
    on at boot-time with the "pnp.debug" kernel parameter, so we don't
    have to build a new kernel image.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • This adds the core function pnp_dbg() and a new config option to
    enable it.

    The PNP core debugging messages can be enabled at boot-time with the
    "pnp.debug" kernel parameter.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • Use scnprintf() to build up a buffer of PNP IDs to print. This
    makes the printk atomic and helps get rid of an #ifdef.

    Also remove an "#ifdef DEBUG" from some debug functions. The
    functions only produce debug output, so it's OK to run the
    function and just have the output be dropped at the end.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andi Kleen
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

17 Jul, 2008

2 commits

  • ISAPNP, PNPBIOS, and ACPI describe the "possible resource settings" of
    a device, i.e., the possibilities an OS bus driver has when it assigns
    I/O port, MMIO, and other resources to the device.

    PNP used to maintain this "possible resource setting" information in
    one independent option structure and a list of dependent option
    structures for each device. Each of these option structures had lists
    of I/O, memory, IRQ, and DMA resources, for example:

    dev
    independent options
    ind-io0 -> ind-io1 ...
    ind-mem0 -> ind-mem1 ...
    ...
    dependent option set 0
    dep0-io0 -> dep0-io1 ...
    dep0-mem0 -> dep0-mem1 ...
    ...
    dependent option set 1
    dep1-io0 -> dep1-io1 ...
    dep1-mem0 -> dep1-mem1 ...
    ...
    ...

    This data structure was designed for ISAPNP, where the OS configures
    device resource settings by writing directly to configuration
    registers. The OS can write the registers in arbitrary order much
    like it writes PCI BARs.

    However, for PNPBIOS and ACPI devices, the OS uses firmware interfaces
    that perform device configuration, and it is important to pass the
    desired settings to those interfaces in the correct order. The OS
    learns the correct order by using firmware interfaces that return the
    "current resource settings" and "possible resource settings," but the
    option structures above doesn't store the ordering information.

    This patch replaces the independent and dependent lists with a single
    list of options. For example, a device might have possible resource
    settings like this:

    dev
    options
    ind-io0 -> dep0-io0 -> dep1->io0 -> ind-io1 ...

    All the possible settings are in the same list, in the order they
    come from the firmware "possible resource settings" list. Each entry
    is tagged with an independent/dependent flag. Dependent entries also
    have a "set number" and an optional priority value. All dependent
    entries must be assigned from the same set. For example, the OS can
    use all the entries from dependent set 0, or all the entries from
    dependent set 1, but it cannot mix entries from set 0 with entries
    from set 1.

    Prior to this patch PNP didn't keep track of the order of this list,
    and it assigned all independent options first, then all dependent
    ones. Using the example above, that resulted in a "desired
    configuration" list like this:

    ind->io0 -> ind->io1 -> depN-io0 ...

    instead of the list the firmware expects, which looks like this:

    ind->io0 -> depN-io0 -> ind-io1 ...

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andi Kleen
    Acked-by: Rene Herman
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • 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
    Signed-off-by: Len Brown
    Signed-off-by: Andi Kleen

    Bjorn Helgaas
     

29 Apr, 2008

2 commits

  • There are no remaining references to the PNP_MAX_* constants or
    the pnp_resource_table structure outside of the PNP core. Make
    them private to the PNP core.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • Add pnp_alloc_dev() to allocate a struct pnp_dev and fill in the
    protocol, instance number, and initial PNP ID. Now it is always
    valid to use dev_printk() on any pnp_dev pointer.

    Signed-off-by: Bjorn Helgaas
    Acked-By: Rene Herman
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

17 Oct, 2007

1 commit


24 Aug, 2007

1 commit

  • Remove some null pointer checks. Null pointers in these areas indicate
    programming errors, and I think it's better to oops immediately rather
    than return an error that is easily ignored.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Adam Belay
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

27 Jul, 2007

2 commits

  • These are manual fixups after running Lindent. No functional change.

    Signed-off-by: Bjorn Helgaas
    Cc: Len Brown
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • Run Lindent on all PNP source files.

    Produced by:

    $ quilt new pnp-lindent
    $ find drivers/pnp -name \*.[ch] | xargs quilt add
    $ quilt add include/linux/{pnp.h,pnpbios.h}
    $ scripts/Lindent drivers/pnp/*.c drivers/pnp/*/*.c include/linux/pnp*.h
    $ quilt refresh --sort

    Signed-off-by: Bjorn Helgaas
    Cc: Len Brown
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

09 May, 2007

2 commits

  • This series converts i386 and x86_64 legacy serial ports to be platform
    devices and prevents probing for them if we have PNP.

    This prevents double discovery, where a device was found both by the legacy
    probe and by 8250_pnp.

    This also prevents the serial driver from claiming IRDA devices (unless they
    have a UART PNP ID). The serial legacy probe sometimes assumed the wrong IRQ,
    so the user had to use "setserial" to fix it.

    Removing the need for setserial to make IRDA devices work seems good, but it
    does break some things. In particular, you may need to keep setserial from
    poking legacy UART stuff back in by doing something like "dpkg-reconfigure
    setserial" with the "kernel" option. Otherwise, the setserial-discovered
    "UART" will claim resources and prevent the IRDA driver from loading.

    This patch:

    If we can discover devices using PNP, we can skip some legacy probes. This
    flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and
    should tell us about builtin devices.

    Signed-off-by: Bjorn Helgaas
    Cc: Keith Owens
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Matthieu CASTET
    Cc: Jean Tourrilhes
    Cc: Matthew Garrett
    Cc: Ville Syrjala
    Cc: Russell King
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • PNP now initializes device dma masks, which prevents oopses when generic
    dma calls are made using pnp device nodes.

    This assumes PNP only uses ISA DMA, with 24 bit addresses; and that it's
    safe to init those masks for all devices (rather than finding out which
    devices have been assigned DMA channels, and handling only those).

    Signed-off-by: David Brownell
    Cc: Adam Belay
    Cc: Jaroslav Kysela
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

07 Nov, 2005

1 commit

  • This patch contains the following possible cleanups:
    - make needlessly global code static
    - #if 0 the following unused global function:
    - core.c: pnp_remove_device
    - #if 0 the following unneeded EXPORT_SYMBOL's:
    - card.c: pnp_add_card
    - card.c: pnp_remove_card
    - card.c: pnp_add_card_device
    - card.c: pnp_remove_card_device
    - card.c: pnp_add_card_id
    - core.c: pnp_register_protocol
    - core.c: pnp_unregister_protocol
    - core.c: pnp_add_device
    - core.c: pnp_remove_device
    - pnpacpi/core.c: pnpacpi_protocol
    - driver.c: pnp_add_id
    - isapnp/core.c: isapnp_read_byte
    - manager.c: pnp_auto_config_dev
    - resource.c: pnp_register_dependent_option
    - resource.c: pnp_register_independent_option
    - resource.c: pnp_register_irq_resource
    - resource.c: pnp_register_dma_resource
    - resource.c: pnp_register_port_resource
    - resource.c: pnp_register_mem_resource

    Note that this patch #if 0's exactly one functions and removes no
    functions. Most it does is the #if 0 of EXPORT_SYMBOL's, so if any modular
    code will use any of them, re-adding will be trivial.

    Modular ISAPnP might be interesting in some cases, but this is more legacy
    code. If someone would work on it to sort all the issues out (starting
    with the point that most users of __ISAPNP__ will have to be fixed)
    re-enabling the required EXPORT_SYMBOL's won't be hard for him.

    Signed-off-by: Adrian Bunk
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds