1. 26 11月, 2012 1 次提交
  2. 22 11月, 2012 1 次提交
    • A
      ACPI / PM: Introduce os_accessible flag for power_state · 1399dfcd
      Aaron Lu 提交于
      Currently we have valid flag to represent if this ACPI device power
      state is valid. A device power state is valid does not necessarily
      mean we, as OSPM, has a mean to put the device into that power state,
      e.g. D3 cold is always a valid power state for any ACPI device, but if
      there is no _PS3 or _PRx for this device, we can't really put that
      device into D3 cold power state. The same is true for D0 power state.
      
      So here comes the os_accessible flag, which is only set if the device
      has provided us the required means to put it into that power state,
      e.g. if we have _PS3 or _PRx, we can put the device into D3 cold state
      and thus, D3 cold power state's os_accessible flag will be set in this
      case.
      
      And a new wrapper inline function is added to be used to check if
      firmware has provided us a way to power off the device during runtime.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1399dfcd
  3. 16 11月, 2012 1 次提交
  4. 15 11月, 2012 11 次提交
    • R
      ACPI / PM: Fix build problem when CONFIG_ACPI or CONFIG_PM is not set · 5133375b
      Rafael J. Wysocki 提交于
      Commit e5cc8ef3 (ACPI / PM: Provide ACPI PM callback routines for
      subsystems) introduced a build problem occuring if CONFIG_ACPI is
      unset or CONFIG_PM is unset and errno.h is not included before
      acpi.h, because in that case ENODEV used in acpi.h is undefined.
      
      Fix the issue by making acpi.h include errno.h.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5133375b
    • D
      ACPI / PM: Fix build problem related to acpi_target_system_state() · 99926a8c
      David Rientjes 提交于
      Commit b87b49cd0efd ("ACPI / PM: Move device PM functions related to sleep
      states") declared acpi_target_system_state() for CONFIG_PM_SLEEP whereas
      it is only defined for CONFIG_ACPI_SLEEP, resulting in the following link
      error:
      
      drivers/built-in.o: In function `acpi_pm_device_sleep_wake':
      drivers/acpi/device_pm.c:342: undefined reference to `acpi_target_system_state'
      drivers/built-in.o: In function `acpi_dev_suspend_late':
      drivers/acpi/device_pm.c:501: undefined reference to `acpi_target_system_state'
      drivers/built-in.o: In function `acpi_pm_device_sleep_state':
      drivers/acpi/device_pm.c:221: undefined reference to `acpi_target_system_state'
      
      Define it only for CONFIG_ACPI_SLEEP and fallback to a dummy definition
      for other configs.
      
      [rjw: The problem only occurs for exotic .configs in which
       HIBERNATE_CALLBACKS is selected by XEN_SAVE_RESTORE and neither
       SUSPEND nor HIBERNATION is set.]
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      99926a8c
    • R
      ACPI / PM: Provide ACPI PM callback routines for subsystems · e5cc8ef3
      Rafael J. Wysocki 提交于
      Some bus types don't support power management natively, but generally
      there may be device nodes in ACPI tables corresponding to the devices
      whose bus types they are (under ACPI 5 those bus types may be SPI,
      I2C and platform).  If that is the case, standard ACPI power
      management may be applied to those devices, although currently the
      kernel has no means for that.
      
      For this reason, provide a set of routines that may be used as power
      management callbacks for such devices.  This may be done in three
      different ways.
      
       (1) Device drivers handling the devices in question may run
           acpi_dev_pm_attach() in their .probe() routines, which (on
           success) will cause the devices to be added to the general ACPI
           PM domain and ACPI power management will be used for them going
           forward.  Then, acpi_dev_pm_detach() may be used to remove the
           devices from the general ACPI PM domain if ACPI power management
           is not necessary for them any more.
      
       (2) The devices' subsystems may use acpi_subsys_runtime_suspend(),
           acpi_subsys_runtime_resume(), acpi_subsys_prepare(),
           acpi_subsys_suspend_late(), acpi_subsys_resume_early() as their
           power management callbacks in the same way as the general ACPI
           PM domain does that.
      
       (3) The devices' drivers may execute acpi_dev_suspend_late(),
           acpi_dev_resume_early(), acpi_dev_runtime_suspend(),
           acpi_dev_runtime_resume() from their power management callbacks
           as appropriate, if that's absolutely necessary, but it is not
           recommended to do that, because such drivers may not work
           without ACPI support as a result.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e5cc8ef3
    • R
      ACPI / PM: Move device PM functions related to sleep states · a6ae7594
      Rafael J. Wysocki 提交于
      Introduce helper function returning the target sleep state of the
      system and use it to move the remaining device power management
      functions from sleep.c to device_pm.c.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a6ae7594
    • R
      ACPI / PM: Provide device PM functions operating on struct acpi_device · 078eb126
      Rafael J. Wysocki 提交于
      If the caller of acpi_bus_set_power() already has a pointer to the
      struct acpi_device object corresponding to the device in question, it
      doesn't make sense for it to go through acpi_bus_get_device(), which
      may be costly, because it involves acquiring the global ACPI
      namespace mutex.
      
      For this reason, export the function operating on struct acpi_device
      objects used internally by acpi_bus_set_power(), so that it may be
      called instead of acpi_bus_set_power() in the above case, and change
      its name to acpi_device_set_power().
      
      Additionally, introduce two inline wrappers for checking ACPI PM
      capabilities of devices represented by struct acpi_device objects.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      078eb126
    • R
      ACPI / PM: Split device wakeup management routines · dee8370c
      Rafael J. Wysocki 提交于
      Two device wakeup management routines in device_pm.c and sleep.c,
      acpi_pm_device_run_wake() and acpi_pm_device_sleep_wake(), take a
      device pointer argument and use it to obtain the ACPI handle of the
      corresponding ACPI namespace node.  That handle is then used to get
      the address of the struct acpi_device object corresponding to the
      struct device passed as the argument.
      
      Unfortunately, that last operation may be costly, because it involves
      taking the global ACPI namespace mutex, so it shouldn't be carried
      out too often.  However, the callers of those routines usually call
      them in a row with acpi_pm_device_sleep_state() which also takes that
      mutex for the same reason, so it would be more efficient if they ran
      acpi_bus_get_device() themselves to obtain a pointer to the struct
      acpi_device object in question and then passed that pointer to the
      appropriate PM routines.
      
      To make that possible, split each of the PM routines mentioned above
      in two parts, one taking a struct acpi_device pointer argument and
      the other implementing the current interface for compatibility.
      
      Additionally, change acpi_pm_device_run_wake() to actually return
      an error code if there is an error while setting up runtime remote
      wakeup for the device.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dee8370c
    • R
      ACPI / PM: Move runtime remote wakeup setup routine to device_pm.c · cd7bd02d
      Rafael J. Wysocki 提交于
      The ACPI function for setting up devices to do runtime remote
      wakeup is now located in drivers/acpi/sleep.c, but
      drivers/acpi/device_pm.c is a more logical place for it, so move it
      there.
      
      No functional changes should result from this modification.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cd7bd02d
    • R
      ACPI / PM: Move device power state selection routine to device_pm.c · 86b3832c
      Rafael J. Wysocki 提交于
      The ACPI function for choosing device power state is now located
      in drivers/acpi/sleep.c, but drivers/acpi/device_pm.c is a more
      logical place for it, so move it there.
      
      However, instead of moving the function entirely, move its core only
      under a different name and with a different list of arguments, so
      that it is more flexible, and leave a wrapper around it in the
      original location.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      86b3832c
    • R
      ACPI / PM: Move routines for adding/removing device wakeup notifiers · ec2cd81c
      Rafael J. Wysocki 提交于
      ACPI routines for adding and removing device wakeup notifiers are
      currently defined in a PCI-specific file, but they will be necessary
      for non-PCI devices too, so move them to a separate file under
      drivers/acpi and rename them to indicate their ACPI origins.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ec2cd81c
    • R
      ACPI / PM: Fix device PM kernedoc comments and #ifdefs · bdda27fb
      Rafael J. Wysocki 提交于
      The kerneldoc comments for acpi_pm_device_sleep_state(),
      acpi_pm_device_run_wake(), and acpi_pm_device_sleep_wake() are
      outdated or otherwise inaccurate and/or don't follow the common
      kerneldoc patterns, so fix them.
      
      Additionally, notice that acpi_pm_device_run_wake() should be under
      CONFIG_PM_RUNTIME rather than under CONFIG_PM_SLEEP, so fix that too.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bdda27fb
    • R
      Merge branch 'pm-qos' into acpi-dev-pm · dea553e3
      Rafael J. Wysocki 提交于
      Material in the 'acpi-dev-pm' branch depends on 'pm-qos' commits.
      dea553e3
  5. 11 11月, 2012 4 次提交
    • L
      Linux 3.7-rc5 · 77b67063
      Linus Torvalds 提交于
      77b67063
    • L
      PM / QoS: Resume device before exposing/hiding PM QoS flags · 7e4d6844
      Lan Tianyu 提交于
      Since dev_pm_qos_add_request(), dev_pm_qos_update_request() and
      dev_pm_qos_remove_request() for PM QoS flags should not be invoked
      when device in RPM_SUSPENDED, add pm_runtime_get_sync() and pm_runtime_put()
      around these functions in dev_pm_qos_expose_flags() and
      dev_pm_qos_hide_flags().
      
      [rjw: Modified the subject and changelog to better reflect the code
       changes made.]
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7e4d6844
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b251f0f3
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "Bug fixes galore, mostly in drivers as is often the case:
      
        1) USB gadget and cdc_eem drivers need adjustments to their frame size
           lengths in order to handle VLANs correctly.  From Ian Coolidge.
      
        2) TIPC and several network drivers erroneously call tasklet_disable
           before tasklet_kill, fix from Xiaotian Feng.
      
        3) r8169 driver needs to apply the WOL suspend quirk to more chipsets,
           fix from Cyril Brulebois.
      
        4) Fix multicast filters on RTL_GIGA_MAC_VER_35 r8169 chips, from
           Nathan Walp.
      
        5) FDB netlink dumps should use RTM_NEWNEIGH as the message type, not
           zero.  From John Fastabend.
      
        6) Fix smsc95xx tx checksum offload on big-endian, from Steve
           Glendinning.
      
        7) __inet_diag_dump() needs to repsect and report the error value
           returned from inet_diag_lock_handler() rather than ignore it.
           Otherwise if an inet diag handler is not available for a particular
           protocol, we essentially report success instead of giving an error
           indication.  Fix from Cyrill Gorcunov.
      
        8) When the QFQ packet scheduler sees TSO/GSO packets it does not
           handle things properly, and in fact ends up corrupting it's
           datastructures as well as mis-schedule packets.  Fix from Paolo
           Valente.
      
        9) Fix oopser in skb_loop_sk(), from Eric Leblond.
      
        10) CXGB4 passes partially uninitialized datastructures in to FW
            commands, fix from Vipul Pandya.
      
        11) When we send unsolicited ipv6 neighbour advertisements, we should
            send them to the link-local allnodes multicast address, as per
            RFC4861.  Fix from Hannes Frederic Sowa.
      
        12) There is some kind of bug in the usbnet's kevent deferral
            mechanism, but more immediately when it triggers an uncontrolled
            stream of kernel messages spam the log.  Rate limit the error log
            message triggered when this problem occurs, as sending thousands
            of error messages into the kernel log doesn't help matters at all,
            and in fact makes further diagnosis more difficult.
      
            From Steve Glendinning.
      
        13) Fix gianfar restore from hibernation, from Wang Dongsheng.
      
        14) The netlink message attribute sizes are wrong in the ipv6 GRE
            driver, it was using the size of ipv4 addresses instead of ipv6
            ones :-) Fix from Nicolas Dichtel."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        gre6: fix rtnl dump messages
        gianfar: ethernet vanishes after restoring from hibernation
        usbnet: ratelimit kevent may have been dropped warnings
        ipv6: send unsolicited neighbour advertisements to all-nodes
        net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
        usb: gadget: g_ether: fix frame size check for 802.1Q
        cxgb4: Fix initialization of SGE_CONTROL register
        isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
        cxgb4: Initialize data structures before using.
        af-packet: fix oops when socket is not present
        pkt_sched: enable QFQ to support TSO/GSO
        net: inet_diag -- Return error code if protocol handler is missed
        net: bnx2x: Fix typo in bnx2x driver
        smsc95xx: fix tx checksum offload for big endian
        rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dump
        ptp: update adjfreq callback description
        r8169: allow multicast packets on sub-8168f chipset.
        r8169: Fix WoL on RTL8168d/8111d.
        drivers/net: use tasklet_kill in device remove/close process
        tipc: do not use tasklet_disable before tasklet_kill
      b251f0f3
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 2b1768f3
      Linus Torvalds 提交于
      Pull sparc fixes from David Miller:
       "Several build/bug fixes for sparc, including:
      
        1) Configuring a mix of static vs.  modular sparc64 crypto modules
           didn't work, remove an ill-conceived attempt to only have to build
           the device match table for these drivers once to fix the problem.
      
           Reported by Meelis Roos.
      
        2) Make the montgomery multiple/square and mpmul instructions actually
           usable in 32-bit tasks.  Essentially this involves providing 32-bit
           userspace with a way to use a 64-bit stack when it needs to.
      
        3) Our sparc64 atomic backoffs don't yield cpu strands properly on
           Niagara chips.  Use pause instruction when available to achieve
           this, otherwise use a benign instruction we know blocks the strand
           for some time.
      
        4) Wire up kcmp
      
        5) Fix the build of various drivers by removing the unnecessary
           blocking of OF_GPIO when SPARC.
      
        6) Fix unintended regression wherein of_address_to_resource stopped
           being provided.  Fix from Andreas Larsson.
      
        7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas
           Larsson."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
        sparc: Support atomic64_dec_if_positive properly.
        of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again
        sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
        sparc: Add sparc support for platform_get_irq()
        sparc: Allow OF_GPIO on sparc.
        qlogicpti: Fix build warning.
        sparc: Wire up sys_kcmp.
        sparc64: Improvde documentation and readability of atomic backoff code.
        sparc64: Use pause instruction when available.
        sparc64: Fix cpu strand yielding.
        sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.
      2b1768f3
  6. 10 11月, 2012 17 次提交
  7. 09 11月, 2012 5 次提交