1. 18 Feb, 2009 3 commits
    • Ingo Molnar's avatar
      timers: add mod_timer_pending() · 74019224
      Ingo Molnar authored
      Impact: new timer API
      
      Based on an idea from Martin Josefsson with the help of
      Patrick McHardy and Stephen Hemminger:
      
      introduce the mod_timer_pending() API which is a mod_timer()
      offspring that is an invariant on already removed timers.
      
      (regular mod_timer() re-activates non-pending timers.)
      
      This is useful for the networking code in that it can
      allow unserialized mod_timer_pending() timer-forwarding
      calls, but a single del_timer*() will stop the timer
      from being reactivated again.
      
      Also while at it:
      
      - optimize the regular mod_timer() path some more, the
        timer-stat and a debug check was needlessly duplicated
        in __mod_timer().
      
      - make the exports come straight after the function, as
        most other exports in timer.c already did.
      
      - eliminate __mod_timer() as an external API, change the
        users to mod_timer().
      
      The regular mod_timer() code path is not impacted
      significantly, due to inlining optimizations and due to
      the simplifications.
      
      Based-on-patch-from: Stephen Hemminger <shemminger@vyatta.com>
      Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: netdev@vger.kernel.org
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      74019224
    • Zlatko Calusic's avatar
    • Rafael J. Wysocki's avatar
      USB/PCI: Fix resume breakage of controllers behind cardbus bridges · 3494252d
      Rafael J. Wysocki authored
      If a USB PCI controller is behind a cardbus bridge, we are trying to
      restore its configuration registers too early, before the cardbus
      bridge is operational.  To fix this, call pci_restore_state() from
      usb_hcd_pci_resume() and remove usb_hcd_pci_resume_early() which is
      no longer necessary (the configuration spaces of USB controllers that
      are not behind cardbus bridges will be restored by the PCI PM core
      with interrupts disabled anyway).
      
      This patch fixes the regression from 2.6.28 tracked as
      http://bugzilla.kernel.org/show_bug.cgi?id=12659
      
      [ Side note: the proper long-term fix is probably to just force the
        unplug event at suspend time instead of doing a plug/unplug at resume
        time, but this patch is fine regardless  - Linus ]
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reported-by: default avatarMiles Lane <miles.lane@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3494252d
  2. 17 Feb, 2009 37 commits