1. 02 12月, 2011 3 次提交
    • R
      PM / Domains: Rework system suspend callback routines (v2) · d23b9b00
      Rafael J. Wysocki 提交于
      The current generic PM domains code attempts to use the generic
      system suspend operations along with the domains' device stop/start
      routines, which requires device drivers to assume that their
      system suspend/resume (and hibernation/restore) callbacks will always
      be used with generic PM domains.  However, in theory, the same
      hardware may be used in devices that don't belong to any PM domain,
      in which case it would be necessary to add "fake" PM domains to
      satisfy the above assumption.  Also, the domain the hardware belongs
      to may not be handled with the help of the generic code.
      
      To allow device drivers that may be used along with the generic PM
      domains code of more flexibility, add new device callbacks,
      .suspend(), .suspend_late(), .resume_early(), .resume(), .freeze(),
      .freeze_late(), .thaw_early(), and .thaw(), that can be supplied by
      the drivers in addition to their "standard" system suspend and
      hibernation callbacks.  These new callbacks, if defined, will be used
      by the generic PM domains code for the handling of system suspend and
      hibernation instead of the "standard" ones.  This will allow drivers
      to be designed to work with generic PM domains as well as without
      them.
      
      For backwards compatibility, introduce default implementations of the
      new callbacks for PM domains that will execute pm_generic_suspend(),
      pm_generic_suspend_noirq(), pm_generic_resume_noirq(),
      pm_generic_resume(), pm_generic_freeze(), pm_generic_freeze_noirq(),
      pm_generic_thaw_noirq(), and pm_generic_thaw(), respectively, for the
      given device if its driver doesn't define those callbacks.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      d23b9b00
    • R
      PM / Domains: Introduce "save/restore state" device callbacks · ecf00475
      Rafael J. Wysocki 提交于
      The current PM domains code uses device drivers' .runtime_suspend()
      and .runtime_resume() callbacks as the "save device state" and
      "restore device state" operations, which may not be appropriate in
      general, because it forces drivers to assume that they always will
      be used with generic PM domains.  However, in theory, the same
      hardware may be used in devices that don't belong to any PM
      domain, in which case it would be necessary to add "fake" PM
      domains to satisfy the above assumption.  It also may be located in
      a PM domain that's not handled with the help of the generic code.
      
      To allow device drivers that may be used along with the generic PM
      domains code of more flexibility, introduce new device callbacks,
      .save_state() and .restore_state(), that can be supplied by the
      drivers in addition to their "standard" runtime PM callbacks.  This
      will allow the drivers to be designed to work with generic PM domains
      as well as without them.
      
      For backwards compatibility, introduce default .save_state() and
      .restore_state() callback routines for PM domains that will execute
      a device driver's .runtime_suspend() and .runtime_resume() callbacks,
      respectively, for the given device if the driver doesn't provide its
      own implementations of .save_state() and .restore_state().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ecf00475
    • R
      PM / Domains: Make it possible to use per-device domain callbacks · d5e4cbfe
      Rafael J. Wysocki 提交于
      The current generic PM domains code requires that the same .stop(),
      .start() and .active_wakeup() device callback routines be used for
      all devices in the given domain, which is inflexible and may not
      cover some specific use cases.  For this reason, make it possible to
      use device specific .start()/.stop() and .active_wakeup() callback
      routines by adding corresponding callback pointers to struct
      generic_pm_domain_data.  Add a new helper routine,
      pm_genpd_register_callbacks(), that can be used to populate
      the new per-device callback pointers.
      
      Modify the shmobile's power domains code to allow drivers to add
      their own code to be run during the device stop and start operations
      with the help of the new callback pointers.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NMagnus Damm <damm@opensource.se>
      d5e4cbfe
  2. 30 11月, 2011 2 次提交
    • E
      IB: Fix RCU lockdep splats · 580da35a
      Eric Dumazet 提交于
      Commit f2c31e32 ("net: fix NULL dereferences in check_peer_redir()")
      forgot to take care of infiniband uses of dst neighbours.
      
      Many thanks to Marc Aurele who provided a nice bug report and feedback.
      Reported-by: NMarc Aurele La France <tsi@ualberta.ca>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: <stable@kernel.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      580da35a
    • M
      IB/ipoib: Prevent hung task or softlockup processing multicast response · 3874397c
      Mike Marciniszyn 提交于
      This following can occur with ipoib when processing a multicast reponse:
      
          BUG: soft lockup - CPU#0 stuck for 67s! [ib_mad1:982]
          Modules linked in: ...
          CPU 0:
          Modules linked in: ...
          Pid: 982, comm: ib_mad1 Not tainted 2.6.32-131.0.15.el6.x86_64 #1 ProLiant DL160 G5
          RIP: 0010:[<ffffffff814ddb27>]  [<ffffffff814ddb27>] _spin_unlock_irqrestore+0x17/0x20
          RSP: 0018:ffff8802119ed860  EFLAGS: 00000246
          0000000000000004 RBX: ffff8802119ed860 RCX: 000000000000a299
          RDX: ffff88021086c700 RSI: 0000000000000246 RDI: 0000000000000246
          RBP: ffffffff8100bc8e R08: ffff880210ac229c R09: 0000000000000000
          R10: ffff88021278aab8 R11: 0000000000000000 R12: ffff8802119ed860
          R13: ffffffff8100be6e R14: 0000000000000001 R15: 0000000000000003
          FS:  0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
          CR2: 00000000006d4840 CR3: 0000000209aa5000 CR4: 00000000000406f0
          DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
          DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
          Call Trace:
          [<ffffffffa032c247>] ? ipoib_mcast_send+0x157/0x480 [ib_ipoib]
          [<ffffffff8100bc8e>] ? apic_timer_interrupt+0xe/0x20
          [<ffffffff8100bc8e>] ? apic_timer_interrupt+0xe/0x20
          [<ffffffffa03283d4>] ? ipoib_path_lookup+0x124/0x2d0 [ib_ipoib]
          [<ffffffffa03286fc>] ? ipoib_start_xmit+0x17c/0x430 [ib_ipoib]
          [<ffffffff8141e758>] ? dev_hard_start_xmit+0x2c8/0x3f0
          [<ffffffff81439d0a>] ? sch_direct_xmit+0x15a/0x1c0
          [<ffffffff81423098>] ? dev_queue_xmit+0x388/0x4d0
          [<ffffffffa032d6b7>] ? ipoib_mcast_join_finish+0x2c7/0x510 [ib_ipoib]
          [<ffffffffa032dab8>] ? ipoib_mcast_sendonly_join_complete+0x1b8/0x1f0 [ib_ipoib]
          [<ffffffffa02a0946>] ? mcast_work_handler+0x1a6/0x710 [ib_sa]
          [<ffffffffa015f01e>] ? ib_send_mad+0xfe/0x3c0 [ib_mad]
          [<ffffffffa00f6c93>] ? ib_get_cached_lmc+0xa3/0xb0 [ib_core]
          [<ffffffffa02a0f9b>] ? join_handler+0xeb/0x200 [ib_sa]
          [<ffffffffa029e4fc>] ? ib_sa_mcmember_rec_callback+0x5c/0xa0 [ib_sa]
          [<ffffffffa029e79c>] ? recv_handler+0x3c/0x70 [ib_sa]
          [<ffffffffa01603a4>] ? ib_mad_completion_handler+0x844/0x9d0 [ib_mad]
          [<ffffffffa015fb60>] ? ib_mad_completion_handler+0x0/0x9d0 [ib_mad]
          [<ffffffff81088830>] ? worker_thread+0x170/0x2a0
          [<ffffffff8108e160>] ? autoremove_wake_function+0x0/0x40
          [<ffffffff810886c0>] ? worker_thread+0x0/0x2a0
          [<ffffffff8108ddf6>] ? kthread+0x96/0xa0
          [<ffffffff8100c1ca>] ? child_rip+0xa/0x20
      
      Coinciding with stack trace is the following message:
      
          ib0: ib_address_create failed
      
      The code below in ipoib_mcast_join_finish() will note the above
      failure in the address handle but otherwise continue:
      
                      ah = ipoib_create_ah(dev, priv->pd, &av);
                      if (!ah) {
                              ipoib_warn(priv, "ib_address_create failed\n");
                      } else {
      
      The while loop at the bottom of ipoib_mcast_join_finish() will attempt
      to send queued multicast packets in mcast->pkt_queue and eventually
      end up in ipoib_mcast_send():
      
              if (!mcast->ah) {
                      if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE)
                              skb_queue_tail(&mcast->pkt_queue, skb);
                      else {
                              ++dev->stats.tx_dropped;
                              dev_kfree_skb_any(skb);
                      }
      
      My read is that the code will requeue the packet and return to the
      ipoib_mcast_join_finish() while loop and the stage is set for the
      "hung" task diagnostic as the while loop never sees a non-NULL ah, and
      will do nothing to resolve.
      
      There are GFP_ATOMIC allocates in the provider routines, so this is
      possible and should be dealt with.
      
      The test that induced the failure is associated with a host SM on the
      same server during a shutdown.
      
      This patch causes ipoib_mcast_join_finish() to exit with an error
      which will flush the queued mcast packets.  Nothing is done to unwind
      the QP attached state so that subsequent sends from above will retry
      the join.
      Reviewed-by: NRam Vepa <ram.vepa@qlogic.com>
      Reviewed-by: NGary Leshner <gary.leshner@qlogic.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@qlogic.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3874397c
  3. 29 11月, 2011 6 次提交
  4. 28 11月, 2011 3 次提交
  5. 27 11月, 2011 2 次提交
  6. 25 11月, 2011 1 次提交
    • L
      hwmon: Remove redundant spi driver bus initialization · b52fabca
      Lars-Peter Clausen 提交于
      In ancient times it was necessary to manually initialize the bus field of an
      spi_driver to spi_bus_type. These days this is done in spi_register_driver(),
      so we can drop the manual assignment.
      
      The patch was generated using the following coccinelle semantic patch:
      // <smpl>
      @@
      identifier _driver;
      @@
      struct spi_driver _driver = {
      	.driver = {
      -		.bus = &spi_bus_type,
      	},
      };
      // </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Cc: lm-sensors@lm-sensors.org
      Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      b52fabca
  7. 24 11月, 2011 4 次提交
  8. 23 11月, 2011 10 次提交
  9. 22 11月, 2011 4 次提交
  10. 21 11月, 2011 1 次提交
  11. 20 11月, 2011 1 次提交
    • M
      drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS · e70f224c
      Marek Olšák 提交于
      This adds a new optional chunk to the CS ioctl that specifies optional flags
      to the CS parser. Why this is useful is explained below. Note that some regs
      no longer need the NOP relocation packet if this feature is enabled.
      Tested on r300g and r600g with this flag disabled and enabled.
      
      Assume there are two contexts sharing the same mipmapped tiled texture.
      One context wants to render into the first mipmap and the other one
      wants to render into the last mipmap. As you probably know, the hardware
      has a MACRO_SWITCH feature, which turns off macro tiling for small mipmaps,
      but that only applies to samplers.
      (at least on r300-r500, though later hardware likely behaves the same)
      
      So we want to just re-set the tiling flags before rendering (writing
      packets), right? ... No. The contexts run in parallel, so they may
      set the tiling flags simultaneously and then fire their command streams
      also simultaneously. The last one setting the flags wins, the other one
      loses.
      
      Another problem is when one context wants to render into the first and
      the last mipmap in one CS. Impossible. It must flush before changing
      tiling flags and do the rendering into the smaller mipmaps in another CS.
      
      Yet another problem is that writing copy_blit in userspace would be a mess
      involving re-setting tiling flags to please the kernel, and causing races
      with other contexts at the same time.
      
      The only way out of this is to send tiling flags with each CS, ideally
      with each relocation. But we already do that through the registers.
      So let's just use what we have in the registers.
      Signed-off-by: NMarek Olšák <maraeo@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e70f224c
  12. 19 11月, 2011 3 次提交
    • R
      staging: fix more ET131X build errors · c9fb041f
      Randy Dunlap 提交于
      ET131X is a network device, so it should depend on
      NETDEVICES.  (This part won't be needed when the driver
      moves to drivers/net/.)  It also uses PHYLIB interfaces,
      so it should select PHYLIB.  Fixes these build errors:
      
      ERROR: "phy_connect" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_find_first" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_register" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_alloc" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_stop" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_start" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_free" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_unregister" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_print_status" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_ethtool_gset" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_ethtool_sset" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_mii_ioctl" [drivers/staging/et131x/et131x.ko] undefined!
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Acked-by: N: Mark Einon <mark.einon@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c9fb041f
    • R
      staging: et131x depends on NET · 0337510f
      Randy Dunlap 提交于
      ET131X uses netdev interfaces so it should depend on NET.
      
      Fixes these build errors:
      ERROR: "ethtool_op_get_link" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "eth_validate_addr" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "register_netdev" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_connect" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_find_first" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_register" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_alloc" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "alloc_etherdev_mqs" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "netif_device_detach" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_stop" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "netif_device_attach" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_start" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "free_netdev" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_free" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "mdiobus_unregister" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "unregister_netdev" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "__netif_schedule" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_print_status" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "dev_kfree_skb_any" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "dev_alloc_skb" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "netif_rx" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "eth_type_trans" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "skb_put" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_ethtool_gset" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_ethtool_sset" [drivers/staging/et131x/et131x.ko] undefined!
      ERROR: "phy_mii_ioctl" [drivers/staging/et131x/et131x.ko] undefined!
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0337510f
    • R
      staging: slicoss depends on NET · 07de7a5e
      Randy Dunlap 提交于
      The slicoss driver uses network interfaces so it should depend
      on NET.  Fixes the following build errors:
      
      ERROR: "eth_change_mtu" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "eth_validate_addr" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "register_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "alloc_etherdev_mqs" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "__netif_schedule" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "netif_rx" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "eth_type_trans" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "skb_put" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "skb_pull" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "__alloc_skb" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "free_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "unregister_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "consume_skb" [drivers/staging/slicoss/slicoss.ko] undefined!
      ERROR: "dev_kfree_skb_irq" [drivers/staging/slicoss/slicoss.ko] undefined!
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Lior Dotan <liodot@gmail.com>
      Cc: Christopher Harrer <charrer@alacritech.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      07de7a5e