1. 11 8月, 2011 1 次提交
  2. 04 8月, 2011 2 次提交
  3. 10 6月, 2011 4 次提交
    • B
      e1000e: Clear host wakeup bit on 82577/8 without touching PHY page 800 · 3ebfc7c9
      Bruce Allan 提交于
      The Host Wakeup Active bit in the PHY Port General Configuration register
      (page 769 register 17) must be cleared after every PHY reset to prevent an
      unexpected wake signal from the PHY. Originally, this was accomplished by
      simply reading the PHY Wakeup Control register on page 800 which clears the
      Host Wakeup Active bit as a side-effect. Unfortunately, a hardware bug on
      the 82577 and 82578 PHY can cause unexpected behavior when registers on
      page 800 are accessed while in gigabit mode.
      
      This patch changes the remaining instances when the Host Wakeup Active bit
      needs to be cleared while possibly in gigabit mode by accessing the Port
      General Configuration register directly instead of accessing any register
      on page 800.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Tested-by: NJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3ebfc7c9
    • B
      e1000e: access multiple PHY registers on same page at the same time · 2b6b168d
      Bruce Allan 提交于
      Doing a PHY page select can take a long time, relatively speaking. This
      can cause a significant delay when updating a number of PHY registers on
      the same page by unnecessarily setting the page for each PHY access. For
      example when going to Sx, all the PHY wakeup registers (WUC, RAR[], MTA[],
      SHRAR[], IP4AT[], IP6AT[], etc.) on 82577/8/9 need to be updated which
      takes a long time which can cause issues when suspending.
      
      This patch introduces new PHY ops function pointers to allow callers to
      set the page directly and do any number of PHY accesses on that page.
      This feature is currently only implemented for 82577, 82578 and 82579
      PHYs for both the normally addressed registers as well as the special-
      case addressing of the PHY wakeup registers on page 800. For the latter
      registers, the existing function for accessing the wakeup registers has
      been divided up into three- 1) enable access to the wakeup register page,
      2) perform the register access and 3) disable access to the wakeup register
      page. The two functions that enable/disable access to the wakeup register
      page are necessarily available to the caller so that the caller can restore
      the value of the Port Control (a.k.a. Wakeup Enable) register after the
      wakeup register accesses are done.
      
      All instances of writing to multiple PHY registers on the same page are
      updated to use this new method and to acquire any PHY locking mechanism
      before setting the page and performing the register accesses, and release
      the locking mechanism afterward.
      
      Some affiliated magic number cleanup is done as well.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Tested-by: NJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2b6b168d
    • B
      e1000e: log when swflag is cleared unexpectedly on ICH/PCH devices · c5caf482
      Bruce Allan 提交于
      Since EXTCNF_CTRL.SWFLAG (used in the ownership arbitration of shared
      resources, e.g. the PHY shared between the s/w, f/w, and h/w clients)
      can be cleared by any of those clients, log a debug message when
      software attempts to clear it and it is already cleared unexpectedly.
      And since the swflag is cleared by a hardware reset, the driver does
      not need to do that, but the mutex acquired when the bit is set must
      still be cleared.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c5caf482
    • B
      e1000e: 82579 intermittently disabled during S0->Sx · 99730e4c
      Bruce Allan 提交于
      When repeatedly cycling Sx->S0 states with the network cable unplugged,
      the 82579 PHY may not initialize as expected and may require a full power
      cycle to recover functionality to the device.  Workaround this by testing
      access of the PHY registers after resuming; if that returns unexpected
      results toggle the LANPHYPC signal to power cycle the PHY.
      
      This is implemented in the new function e1000_resume_workarounds_pchlan()
      which calls another new function, e1000_toggle_lanphypc_value_ich8lan(),
      which has been created to reduce code duplication (same functionality
      required by a previous workaround).  Also, e1000e_disable_gig_wol_ich8lan
      is now e1000_suspend_workarounds_ich8lan to better reflect what it does.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      99730e4c
  4. 27 4月, 2011 1 次提交
  5. 14 4月, 2011 1 次提交
  6. 11 3月, 2011 3 次提交
  7. 24 1月, 2011 1 次提交
  8. 14 1月, 2011 1 次提交
  9. 10 1月, 2011 3 次提交
  10. 25 12月, 2010 1 次提交
  11. 11 12月, 2010 2 次提交
  12. 02 11月, 2010 1 次提交
  13. 01 10月, 2010 1 次提交
  14. 23 9月, 2010 6 次提交
  15. 30 6月, 2010 1 次提交
  16. 24 6月, 2010 1 次提交
  17. 19 6月, 2010 6 次提交
  18. 14 5月, 2010 1 次提交
    • J
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches 提交于
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      
      It also does not remove null void functions with return.
      
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      
      with some cleanups by hand.
      
      Compile tested x86 allmodconfig only.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4b77097
  19. 13 5月, 2010 3 次提交
    • B
      e1000e: Fix/cleanup PHY reset code for ICHx/PCHx · e98cac44
      Bruce Allan 提交于
      i) Fixes a bug where e1000_sw_lcd_config_ich8lan() was calling
      e1000_lan_init_done_ich8lan() to poll the STATUS.LAN_INIT_DONE bit to
      make sure the MAC had completed the PHY configuration.  However,
      e1000_lan_init_done_ich8lan() had already been called in one of the two
      places where PHY reset occurs for ICHx/PCHx parts, which caused the second
      call to busy-wait for 150 msec because the LAN_INIT_DONE bit had already
      been checked and cleared.
      
      ii) Cleanup the two separate PHY reset code paths, i.e. the full-chip reset
      in e1000_reset_hw_ich8lan() and the PHY-only reset in
      e1000_phy_hw_reset_ich8lan().  There was duplicate code in both paths to be
      performed post-reset that are now combined into one new function -
      e1000_post_phy_reset_ich8lan().  This cleanup also included moving the
      clearing of the PHY Reset Asserted bit in the STATUS register (now done for
      all ICH/PCH parts) and the check for the indication from h/w that basic
      configuration has completed back to where it previously was in
      e1000_get_cfg_done_ich8lan().
      
      iii) Corrected a few comments
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e98cac44
    • B
      e1000e: move settting of flow control refresh timer to link setup code · a305595b
      Bruce Allan 提交于
      The flow control refresh timer value needs to be saved off so that it can
      be programmed into the approrpiate register when applicable but without a
      reset, e.g. when changing flow control parameters via ethtool.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a305595b
    • B
      e1000e: fix checks for manageability enabled and management pass-through · a65a4a0d
      Bruce Allan 提交于
      The mac->arc_subsystem was being incorrectly used to flag whether or not
      manageability was enabled when it should only be used to state whether the
      ARC (Host interface) subsystem is available on a particular MAC _and_ only
      valid when any manageability is enabled. The ARC subsystem is currently
      only available on 80003es2lan and 82573 parts supported by the driver.
      
      A new flag, has_fwsm, is introduced to be used when checking if
      manageability is enabled but only on parts that acutally have an FWSM
      register. While the above parts have an FWSM register, there are other
      parts that have FWSM but do not have support for the ARC subsystem,
      namely 82571/2 and ICHx/PCH.
      
      And then there are parts that have manageability, but do not have either
      FWSM register or support for the ARC subsystem - these are 82574 and 82583.
      
      For 80003es2lan, 82571/2/3 and ICH/PCH parts, this patch makes no
      functional changes, it only corrects the usage of the manageability flags.
      For 82574 and 82583, it fixes the incorrect accesses of the non-existent
      FWSM register and ARC subsystem as well as corrects the check for
      management pass-through.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a65a4a0d