1. 17 7月, 2008 5 次提交
    • B
      PNP: make resource option structures private to PNP subsystem · a1802c42
      Bjorn Helgaas 提交于
      Nothing outside the PNP subsystem should need access to a
      device's resource options, so this patch moves the option
      structure declarations to a private header file.
      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>
      a1802c42
    • B
      PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM · 08c9f262
      Bjorn Helgaas 提交于
      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: 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>
      08c9f262
    • B
      PNP: add pnp_possible_config() -- can a device could be configured this way? · 57fd51a8
      Bjorn Helgaas 提交于
      As part of a heuristic to identify modem devices, 8250_pnp.c
      checks to see whether a device can be configured at any of the
      legacy COM port addresses.
      
      This patch moves the code that traverses the PNP "possible resource
      options" from 8250_pnp.c to the PNP subsystem.  This encapsulation
      is important because a future patch will change the implementation
      of those resource options.
      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>
      57fd51a8
    • 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
    • B
      PNP: make pnp_{port,mem,etc}_start(), et al work for invalid resources · 20bfdbba
      Bjorn Helgaas 提交于
      Some callers use pnp_port_start() and similar functions without
      making sure the resource is valid.  This patch makes us fall
      back to returning the initial values if the resource is not
      valid or not even present.
      
      This mostly preserves the previous behavior, where we would just
      return the initial values set by pnp_init_resource_table().  The
      original 2.6.25 code didn't range-check the "bar", so it would
      return garbage if the bar exceeded the table size.  This code
      returns sensible values instead.
      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>
      20bfdbba
  2. 30 4月, 2008 1 次提交
  3. 29 4月, 2008 11 次提交
  4. 11 4月, 2008 1 次提交
    • B
      pnp: increase number of devices supported per protocol · 544451a1
      Bjorn Helgaas 提交于
      Increase the PNP "number of devices" limit.  We currently use an unsigned
      char, which limits us to 256 devices per protocol.  This patch changes that to
      an unsigned int.
      
      Not all backends can take advantage of this: we limit ISAPNP to 10 devices in
      isapnp_cfg_begin(), and PNPBIOS is limited to 256 devices because the BIOS
      interfaces use a one-byte device node number.
      
      But there is no limit on the number of PNPACPI devices we may have.  Large HP
      Integrity machines have more than 256, which causes the current "unsigned char
      number" to wrap around.  This causes errors like this:
      
          pnp: PnP ACPI init
          kobject_add failed for 00:00 with -EEXIST, don't try to register things with the same name in the same directory.
      
          Call Trace:
           [<a000000100010720>] show_stack+0x40/0xa0
           [<a0000001000107b0>] dump_stack+0x30/0x60
           [<a0000001001dbdf0>] kobject_add+0x290/0x2c0
           [<a0000001002bfd40>] device_add+0x160/0x860
           [<a0000001002c0470>] device_register+0x30/0x60
           [<a00000010026ba70>] __pnp_add_device+0x130/0x180
           [<a00000010026bb70>] pnp_add_device+0xb0/0xe0
           [<a0000001007f2730>] pnpacpi_add_device+0x510/0x5a0
           [<a0000001007f2810>] pnpacpi_add_device_handler+0x50/0x80
      
      This patch increases the limit to fix this PNPACPI problem.  It should not
      have any adverse effect on ISAPNP or PNPBIOS because their limits are still
      enforced in the backends.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      544451a1
  5. 23 3月, 2008 1 次提交
  6. 07 2月, 2008 1 次提交
  7. 03 2月, 2008 1 次提交
  8. 28 12月, 2007 1 次提交
    • L
      increase PNP_MAX_PORT to 40 from 24 · 2c838197
      Len Brown 提交于
      a7839e96
      (PNP: increase the maximum number of resources)
      increased PNP_MAX_PORT to 24 from 8.
      It also added a test and a complaint when a
      machine exceeded the limit, causing:
      
      pnpacpi: exceeded the max number of IO resources: 24
      
      http://bugzilla.kernel.org/show_bug.cgi?id=9535
      
      We should have been squawking about this all along,
      as this is a potentially serious issue.
      
      For now, simply burn some dynamic bytes and
      increase the limit by another 16 to 40.
      There is no guarantee that this will satisfy
      every system on Earth.  It probably will not,
      but it should be an improvement.
      
      In the future, PNPACPI should allocate resource
      structures as needed, rather than max-sized arrays.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2c838197
  9. 30 11月, 2007 1 次提交
  10. 17 10月, 2007 1 次提交
  11. 27 7月, 2007 2 次提交
  12. 22 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. 12 2月, 2007 1 次提交
  15. 28 6月, 2006 1 次提交
  16. 03 1月, 2006 2 次提交
  17. 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
  18. 08 9月, 2005 1 次提交
  19. 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