1. 27 10月, 2010 1 次提交
  2. 19 7月, 2010 1 次提交
  3. 07 4月, 2009 1 次提交
  4. 07 1月, 2009 1 次提交
  5. 17 10月, 2008 2 次提交
  6. 11 10月, 2008 3 次提交
  7. 17 7月, 2008 2 次提交
    • B
      PNP: convert resource options to single linked list · 1f32ca31
      Bjorn Helgaas 提交于
      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: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NRene Herman <rene.herman@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1f32ca31
    • B
      PNP: replace pnp_resource_table with dynamically allocated resources · aee3ad81
      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: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      aee3ad81
  8. 29 4月, 2008 2 次提交
  9. 17 10月, 2007 1 次提交
  10. 24 8月, 2007 1 次提交
  11. 27 7月, 2007 2 次提交
  12. 20 7月, 2007 1 次提交
  13. 09 5月, 2007 2 次提交
    • B
      PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI) · 8f81dd14
      Bjorn Helgaas 提交于
      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: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Keith Owens <kaos@ocs.com.au>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: Matthieu CASTET <castet.matthieu@free.fr>
      Cc: Jean Tourrilhes <jt@hpl.hp.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Ville Syrjala <syrjala@sci.fi>
      Cc: Russell King <rmk+serial@arm.linux.org.uk>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8f81dd14
    • D
      init dma masks in pnp_dev · 2e17c550
      David Brownell 提交于
      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: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Adam Belay <abelay@novell.com>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e17c550
  14. 07 11月, 2005 1 次提交
    • A
      [PATCH] drivers/pnp/: cleanups · b449f63c
      Adrian Bunk 提交于
      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: NAdrian Bunk <bunk@stusta.de>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b449f63c
  15. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4