1. 10 Jun, 2011 5 commits
    • Bruce Allan's avatar
      e1000e: access multiple PHY registers on same page at the same time · 2b6b168d
      Bruce Allan authored
      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: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2b6b168d
    • Bruce Allan's avatar
      e1000e: do not schedule the Tx queue until ready · 400484fa
      Bruce Allan authored
      Start the Tx queue when the interface is brought up in e1000e_up() but do
      not schedule the queue until link is up as detected in the watchdog task
      which sets netif_carrier_on.
      
      Also flush the descriptors and clean the Tx and Rx rings before resetting
      the hardware when bringing the interface down otherwise there is a small
      window where the watchdog task can be triggered with netif_carrier_off
      and the Tx ring not yet empty which causes an additional and unnecessary
      reset.
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      400484fa
    • Bruce Allan's avatar
      e1000e: log when swflag is cleared unexpectedly on ICH/PCH devices · c5caf482
      Bruce Allan authored
      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: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c5caf482
    • Bruce Allan's avatar
      e1000e: 82579 intermittently disabled during S0->Sx · 99730e4c
      Bruce Allan authored
      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: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      99730e4c
    • Bruce Allan's avatar
      e1000e: disable far-end loopback mode on ESB2 · d9b24135
      Bruce Allan authored
      The ESB2 LAN includes a debug feature that enables far-end loopback (FELB)
      of the SerDes/Kumeran interface.  This feature is activated when receiving
      a sequence of symbols that includes a reserved codeword.  On a perfect
      link, FELB would never be activated.  In the presence of bit errors, there
      is a very small, but non-zero, probability of FELB being activated.
      
      If the FELB is activated, the SerDes link becomes non-functional and must
      be reset.  It could also corrupt the switching tables in the switch since
      the ESB2 is transmitting packets with a different source MAC address.
      
      This patch disables the FELB feature.
      Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d9b24135
  2. 09 Jun, 2011 35 commits