All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: Luca Boccassi <bluca@debian.org>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY
Date: Fri, 2 Nov 2018 14:11:50 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E70611532DEB42@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20181101140413.18665-1-bluca@debian.org>



> -----Original Message-----
> From: Luca Boccassi [mailto:bluca@debian.org]
> Sent: Thursday, November 1, 2018 9:04 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Luca
> Boccassi <bluca@debian.org>; stable@dpdk.org
> Subject: [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY
> 
> ixgbe_identify_phy_x550em() was missing the code to handle unidentified
> PHY that has been there in 82599 so it was not able to complete initialization
> of ixgbe sequence if no sfp plugged in.
> Port it over to return an appropriate type and complete init sequence
> properly.
> 
> Fixes: d2e72774e58c ("ixgbe/base: support X550")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: refresh to remove merge conflict with master
> 
>  drivers/net/ixgbe/base/ixgbe_x550.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c
> b/drivers/net/ixgbe/base/ixgbe_x550.c
> index f7b98af52..83b394861 100644
> --- a/drivers/net/ixgbe/base/ixgbe_x550.c
> +++ b/drivers/net/ixgbe/base/ixgbe_x550.c
> @@ -315,13 +315,21 @@ STATIC void ixgbe_setup_mux_ctl(struct ixgbe_hw
> *hw)
>   */
>  STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)  {
> +	s32 status;
> +
>  	hw->mac.ops.set_lan_id(hw);
> 
>  	ixgbe_read_mng_if_sel_x550em(hw);
> 
>  	switch (hw->device_id) {
>  	case IXGBE_DEV_ID_X550EM_A_SFP:
> -		return ixgbe_identify_sfp_module_X550em(hw);
> +		status = ixgbe_identify_sfp_module_X550em(hw);
> +		/* Set PHY type none if no PHY detected */
> +		if (hw->phy.type == ixgbe_phy_unknown) {
> +			hw->phy.type = ixgbe_phy_none;
> +			return IXGBE_SUCCESS;
> +		}

Why this can't be handled at caller, why we replace phy_unknown by phy_none only for x550?

> +		return status;
>  	case IXGBE_DEV_ID_X550EM_X_SFP:
>  		/* set up for CS4227 usage */
>  		ixgbe_setup_mux_ctl(hw);
> @@ -329,8 +337,13 @@ STATIC s32 ixgbe_identify_phy_x550em(struct
> ixgbe_hw *hw)
>  		/* Fallthrough */
> 
>  	case IXGBE_DEV_ID_X550EM_A_SFP_N:
> -		return ixgbe_identify_sfp_module_X550em(hw);
> -		break;
> +		status = ixgbe_identify_sfp_module_X550em(hw);
> +		/* Set PHY type none if no PHY detected */
> +		if (hw->phy.type == ixgbe_phy_unknown) {
> +			hw->phy.type = ixgbe_phy_none;
> +			return IXGBE_SUCCESS;
> +		}
> +		return status;
>  	case IXGBE_DEV_ID_X550EM_X_KX4:
>  		hw->phy.type = ixgbe_phy_x550em_kx4;
>  		break;
> --
> 2.19.1

  parent reply	other threads:[~2018-11-02 14:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 17:09 [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-08-15 17:09 ` [PATCH 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-09-26 10:22 ` [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-11-01 14:04 ` Luca Boccassi
2018-11-01 14:04   ` [PATCH 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-01 14:41   ` [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-11-02 14:11   ` Zhang, Qi Z [this message]
2018-11-02 15:21     ` Luca Boccassi
2018-11-02 16:49       ` Zhang, Qi Z
2018-11-02 17:08         ` [dpdk-stable] " Luca Boccassi
2018-11-02 15:18 ` [PATCH v3 " Luca Boccassi
2018-11-02 15:18   ` [PATCH v3 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-05 17:41   ` [PATCH v3 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Zhang, Qi Z
2018-11-05 18:08     ` [dpdk-stable] " Luca Boccassi
2018-11-05 18:18     ` Chas Williams
2018-11-06 23:31       ` Zhang, Qi Z
2018-11-07 12:55         ` Luca Boccassi
2018-11-07 18:27           ` Zhang, Qi Z
2018-11-09 13:18             ` [dpdk-stable] " Luca Boccassi
2018-11-20 11:28               ` Luca Boccassi
2018-11-20 11:27   ` [PATCH v4] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-20 19:52     ` Zhang, Qi Z
2018-11-20 21:08       ` [dpdk-stable] " Luca Boccassi
2018-11-22 17:54         ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=039ED4275CED7440929022BC67E70611532DEB42@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.