1. 25 2月, 2012 8 次提交
  2. 24 2月, 2012 28 次提交
  3. 23 2月, 2012 4 次提交
    • M
      tg3: Create timer helper functions · 21f7638e
      Matt Carlson 提交于
      This patch seeks to clean up the timer related code.  It begins by
      moving one-time timer setup code from tg3_open() to tg3_init_one().
      It then creates a function that encapsulates the code needed to start
      the timer.  A tg3_timer_stop() function was added for parity.  Finally,
      this patch moves all the timer functions to a more suitable location.
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21f7638e
    • M
      tg3: Clear RECOVERY_PENDING with reset_task_cancel · c7101359
      Matt Carlson 提交于
      If an error happens in the tx completion thread, tg3_reset_task will be
      scheduled and TX_RECOVERY_PENDING will be set.  The TX_RECOVERY_PENDING
      flag causes tg3_poll[_msix] to return early before doing much of its
      work.  Tg3_reset_task() gets canceled when the configuration of the
      device is changing, which always results in a chip reset.  When this
      happens, the TX_RECOVERY_PENDING flag may be left set, which would
      unnecessarily hinder tg3_poll from doing work.  This patch fixes the
      problem.
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7101359
    • M
      tg3: Remove SPEED_UNKNOWN checks · d13ba512
      Matt Carlson 提交于
      tg3_phy_copper_begin() has code that configures the link
      advertisements through the use of the link_config.speed and
      link_config.duplex members.  The driver does not internally use these
      members in this way, nor is it (currently) permitted via the ethtool
      interface.  This patch removes the dead code.
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d13ba512
    • M
      tg3: Fix link check in tg3_adjust_link · 34655ad6
      Matt Carlson 提交于
      The tg3 driver tried to detect link changes by comparing the tg3 local
      active_speed member with SPEED_UNKNOWN (or formerly SPEED_INVALID).
      This check is not correct, since phylib will never set its speed member
      to either of these two values.  The code only appeared to work because
      tg3 initializes active_speed to SPEED_INVALID during tg3_init_one.  This
      patch introduces a new "old_link" tg3 member and then compares the
      phy_device's link member against it to detect link state changes.
      Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34655ad6