1. 17 7月, 2008 2 次提交
    • B
      PNPACPI: keep disabled resources when parsing current config · 5acf9141
      Bjorn Helgaas 提交于
      When we parse a device's _CRS data (the current resource settings),
      we should keep track of everything we find, even if it's currently
      disabled or invalid.
      
      This is what we already do for ISAPNP and PNPBIOS, and it helps
      keep things matched up when we subsequently re-encode resources.
      For example, consider a device with (mem, irq0, irq1, io), where
      irq0 is disabled.  If we drop irq0 when parsing the _CRS, we will
      mistakenly put irq1 in the irq0 slot when we encode resources
      for an _SRS call.
      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>
      5acf9141
    • 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
  2. 12 6月, 2008 3 次提交
  3. 29 4月, 2008 18 次提交
  4. 24 4月, 2008 1 次提交
  5. 27 3月, 2008 1 次提交
  6. 07 2月, 2008 1 次提交
  7. 18 1月, 2008 1 次提交
  8. 13 1月, 2008 1 次提交
    • L
      pnpacpi: print resource shortage message only once · 66a21736
      Len Brown 提交于
      pnpacpi: exceeded the max number of IO resources: 40
      
      While this message is a real error and should thus
      remain KERN_ERR (even a new dmesg line is seen as a regression
      by some, since it was not printed in 2.6.23...) it is certainly
      impolite to print this warning 50 times should you happen to
      have the oddball system with 90 io resources under a device...
      
      So print the warning just once.
      
      In 2.6.25 we'll get rid of the limits altogether
      and these warnings will vanish with them.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=9535Signed-off-by: NLen Brown <len.brown@intel.com>
      66a21736
  9. 30 11月, 2007 1 次提交
  10. 20 11月, 2007 2 次提交
  11. 17 10月, 2007 1 次提交
  12. 24 8月, 2007 3 次提交
  13. 27 7月, 2007 2 次提交
  14. 09 3月, 2007 1 次提交
  15. 14 12月, 2006 1 次提交
  16. 19 10月, 2006 1 次提交
    • V
      Fix DMA resource allocation in ACPIPnP · ccc4c7bb
      Vojtech Pavlik 提交于
      The ACPIPnP implementation had the understanding of Linux resource flags very
      wrong, resulting in a nonfunctional implementation of DMA resource
      allocation.
      
      This was usually not a problem, since almost no on-board PnP devices use ISA
      DMA, with the exception of ECP parallel ports. Even with that, parallel port
      DMA is preconfigured by the BIOS, so this routine isn't normally called.
      
      Except in the case where somebody does 'rmmod parport_pc; modprobe
      parport_pc', where the rmmod case disables the ECP parallel port resources,
      and they need to be enabled again to initialize the module. This didn't
      work, resulting in a non-printing printer.
      
      The application doing exactly the above to force reprobing of printers is
      the YaST printer module. Thus without this fix YaST wedged the printer when
      configuring it, and was not able to print a test page.
      Reported-by: NRalf Flaxa <rf@suse.de>
      Reproduced-by: NJiri Dluhos <jdluhos@suse.cz>
      Signed-off-by: NVojtech Pavlik <vojtech@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      ccc4c7bb