1. 12 7月, 2007 3 次提交
    • M
      [TG3]: Fix irq_sync race condition. · 46966545
      Michael Chan 提交于
      Gagan Arneja <gaagaan@gmail.com> pointed out that tg3_reset_task()
      could potentially race with another thread calling tg3_full_lock()
      such as the ethtool_set_xxx() functions.  This may trigger the
      BUG_ON() in tg3_irq_quiesce() or cause the irq_sync flag to be out-
      of-sync.
      
      I think the easiest way to fix this is to get the tp->lock first
      before setting the irq_sync flag.  This is safe to do because the
      tp->lock is never grabbed by the irq handler.  This change will
      guarantee that the irq_sync flag updates will be serialized.  We also
      have to change one spot to call tg3_netif_start() (which clears the
      irq_sync flag) before releasing the tp->lock.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46966545
    • P
      [RTNETLINK]: rtnl_link: allow specifying initial device address · 0e06877c
      Patrick McHardy 提交于
      Drivers need to validate the initial addresses in their netlink attribute
      validation function or manually reject them if they can't support this.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e06877c
    • P
      [RTNETLINK]: rtnl_link API simplification · 2d85cba2
      Patrick McHardy 提交于
      All drivers need to unregister their devices in the module unload function.
      While doing so they must hold the rtnl and atomically unregister the
      rtnl_link ops as well. This makes the rtnl_link_unregister function that
      takes the rtnl itself completely useless.
      
      Provide default newlink/dellink functions, make __rtnl_link_unregister and
      rtnl_link_unregister unregister all devices with matching rtnl_link_ops and
      change the existing users to take advantage of that.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d85cba2
  2. 11 7月, 2007 37 次提交