From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758853AbcHDQSN (ORCPT ); Thu, 4 Aug 2016 12:18:13 -0400 Received: from mga11.intel.com ([192.55.52.93]:28796 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbcHDQSL convert rfc822-to-8bit (ORCPT ); Thu, 4 Aug 2016 12:18:11 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,470,1464678000"; d="scan'208";a="859776799" Subject: Re: [Intel-wired-lan] e1000e: PHY cann't be initialized correctly on some I218 controllers To: Denis Turischev , intel-wired-lan@lists.osuosl.org, Jeff Kirsher References: <579F407E.9090602@compulab.co.il> Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org From: Raanan Avargil Message-ID: <1e8f37ec-eda4-eb2d-64d2-e96a7aa71902@intel.com> Date: Thu, 4 Aug 2016 19:18:08 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <579F407E.9090602@compulab.co.il> Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/1/2016 15:28, Denis Turischev wrote: > There is an error "e1000e: probe of 0000:00:19.0 failed with error -3" > that can be observed after power-on on some I218 controllers. > Hardware reset and re-initialization fixes the issue. > > Signed-off-by: Denis Turischev > > diff -Nru linux-4.7.orig/drivers/net/ethernet/intel/e1000e/ich8lan.c linux-4.7/drivers/net/ethernet/intel/e1000e/ich8lan.c > --- linux-4.7.orig/drivers/net/ethernet/intel/e1000e/ich8lan.c 2016-07-24 22:23:50.000000000 +0300 > +++ linux-4.7/drivers/net/ethernet/intel/e1000e/ich8lan.c 2016-08-01 13:59:08.046563095 +0300 > @@ -155,6 +155,7 @@ > static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force); > static s32 e1000_setup_copper_link_pch_lpt(struct e1000_hw *hw); > static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state); > +static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw); > > static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) > { > @@ -459,8 +460,12 @@ > phy->id = e1000_phy_unknown; > > ret_val = e1000_init_phy_workarounds_pchlan(hw); > - if (ret_val) > - return ret_val; > + if (ret_val) { > + e1000_reset_hw_ich8lan(hw); > + ret_val = e1000_init_phy_workarounds_pchlan(hw); > + if (ret_val) > + return ret_val; > + } > > if (phy->id == e1000_phy_unknown) > switch (hw->mac.type) { > _______________________________________________ > Intel-wired-lan mailing list > Intel-wired-lan@lists.osuosl.org > http://lists.osuosl.org/mailman/listinfo/intel-wired-lan > It is hard to determine what is exactly the problem here and what causes the -3 error, but this is not the place to perform hw reset and retry to init the phy. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raanan Avargil Date: Thu, 4 Aug 2016 19:18:08 +0300 Subject: [Intel-wired-lan] e1000e: PHY cann't be initialized correctly on some I218 controllers In-Reply-To: <579F407E.9090602@compulab.co.il> References: <579F407E.9090602@compulab.co.il> Message-ID: <1e8f37ec-eda4-eb2d-64d2-e96a7aa71902@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On 8/1/2016 15:28, Denis Turischev wrote: > There is an error "e1000e: probe of 0000:00:19.0 failed with error -3" > that can be observed after power-on on some I218 controllers. > Hardware reset and re-initialization fixes the issue. > > Signed-off-by: Denis Turischev > > diff -Nru linux-4.7.orig/drivers/net/ethernet/intel/e1000e/ich8lan.c linux-4.7/drivers/net/ethernet/intel/e1000e/ich8lan.c > --- linux-4.7.orig/drivers/net/ethernet/intel/e1000e/ich8lan.c 2016-07-24 22:23:50.000000000 +0300 > +++ linux-4.7/drivers/net/ethernet/intel/e1000e/ich8lan.c 2016-08-01 13:59:08.046563095 +0300 > @@ -155,6 +155,7 @@ > static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force); > static s32 e1000_setup_copper_link_pch_lpt(struct e1000_hw *hw); > static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state); > +static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw); > > static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) > { > @@ -459,8 +460,12 @@ > phy->id = e1000_phy_unknown; > > ret_val = e1000_init_phy_workarounds_pchlan(hw); > - if (ret_val) > - return ret_val; > + if (ret_val) { > + e1000_reset_hw_ich8lan(hw); > + ret_val = e1000_init_phy_workarounds_pchlan(hw); > + if (ret_val) > + return ret_val; > + } > > if (phy->id == e1000_phy_unknown) > switch (hw->mac.type) { > _______________________________________________ > Intel-wired-lan mailing list > Intel-wired-lan at lists.osuosl.org > http://lists.osuosl.org/mailman/listinfo/intel-wired-lan > It is hard to determine what is exactly the problem here and what causes the -3 error, but this is not the place to perform hw reset and retry to init the phy. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.