DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>, <dev@dpdk.org>
Subject: Re: [PATCH 6/9] net/ngbe: add support to custom PHY interfaces
Date: Tue, 8 Feb 2022 17:41:04 +0000	[thread overview]
Message-ID: <364cf5b8-d20e-8825-52c1-f8efca740826@intel.com> (raw)
In-Reply-To: <20220208101129.69173-7-jiawenwu@trustnetic.com>

On 2/8/2022 10:11 AM, Jiawen Wu wrote:
> Support sub_device ID 61/62/64 for YT8521S SFP, and 51/52 for M88E1512
> PHY.
> 
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>

<...>

> @@ -69,6 +69,10 @@ New Features
>     * Added AES-XCBC support in lookaside protocol (IPsec) for CN9K & CN10K.
>     * Added AES-CMAC support in CN9K & CN10K.
>   
> +* **Updated Wangxun ngbe driver.**
> +
> +  * Added support for devices of custom PHY interfaces.
> +

"Custom PHY" is vague, should we provide more details on added PHY interfaces,
like code names etc....

<...>

> @@ -1815,11 +1816,23 @@ s32 ngbe_set_mac_type(struct ngbe_hw *hw)
>   	case NGBE_SUB_DEV_ID_EM_MVL_RGMII:
>   		hw->phy.media_type = ngbe_media_type_copper;
>   		hw->mac.type = ngbe_mac_em;
> +		hw->mac.link_type = ngbe_link_copper;
> +		break;
> +	case NGBE_SUB_DEV_ID_EM_RTL_YT8521S_SFP:
> +		hw->phy.media_type = ngbe_media_type_copper;
> +		hw->mac.type = ngbe_mac_em;
> +		hw->mac.link_type = ngbe_link_fiber;
>   		break;
>   	case NGBE_SUB_DEV_ID_EM_MVL_SFP:
>   	case NGBE_SUB_DEV_ID_EM_YT8521S_SFP:
>   		hw->phy.media_type = ngbe_media_type_fiber;
>   		hw->mac.type = ngbe_mac_em;
> +		hw->mac.link_type = ngbe_link_fiber;
> +		break;
> +	case NGBE_SUB_DEV_ID_EM_MVL_MIX:
> +		hw->phy.media_type = ngbe_media_type_unknown;
> +		hw->mac.type = ngbe_mac_em;
> +		hw->mac.link_type = ngbe_media_type_unknown;

This gives build error [1] because assigned enum type is wrong, is this
copy/paste error?

  ../drivers/net/ngbe/base/ngbe_hw.c: In function ‘ngbe_set_mac_type’:
  ../drivers/net/ngbe/base/ngbe_hw.c:1835:35: error: implicit conversion from ‘enum ngbe_media_type’ to ‘enum ngbe_link_type’ [-Werror=enum-conversion]
   1835 |                 hw->mac.link_type = ngbe_media_type_unknown;
        |


[1]
http://mails.dpdk.org/archives/test-report/2022-February/257750.html


<...>

> +s32 ngbe_check_phy_mode_mvl(struct ngbe_hw *hw)
> +{
> +	u16 value = 0;
> +
> +	/* select page 18 reg 20 */
> +	ngbe_write_phy_reg_mdi(hw, MVL_PAGE_SEL, 0, 18);
> +	ngbe_read_phy_reg_mdi(hw, MVL_GEN_CTL, 0, &value);
> +	if (MVL_GEN_CTL_MODE(value) == MVL_GEN_CTL_MODE_COPPER) {
> +		/* mode select to RGMII-to-copper */
> +		hw->phy.type = ngbe_phy_mvl;
> +		hw->phy.media_type = ngbe_media_type_copper;
> +		hw->mac.link_type = ngbe_link_copper;
> +	} else if (MVL_GEN_CTL_MODE(value) == MVL_GEN_CTL_MODE_FIBER) {
> +		/* mode select to RGMII-to-sfi */
> +		hw->phy.type = ngbe_phy_mvl_sfi;
> +		hw->phy.media_type = ngbe_media_type_fiber;
> +		hw->mac.link_type = ngbe_link_fiber;
> +	} else {
> +		DEBUGOUT("marvell 88E1512 mode %x is not supported.\n", value);

'DEBUGOUT' already adds '\n' as far as I can see, it log add double line.

There are multiple usages in this patch.

  reply	other threads:[~2022-02-08 17:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 10:11 [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-02-08 10:11 ` [PATCH 1/9] net/ngbe: fix failed to receive packets Jiawen Wu
2022-02-08 10:11 ` [PATCH 2/9] net/ngbe: fix link interrupt sometimes lost Jiawen Wu
2022-02-08 10:11 ` [PATCH 3/9] net/ngbe: fix Tx pending Jiawen Wu
2022-02-08 17:38   ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 4/9] net/ngbe: fix RxTx packet statistics Jiawen Wu
2022-02-08 17:38   ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 5/9] net/ngbe: optimize the PHY initialization process Jiawen Wu
2022-02-08 17:39   ` Ferruh Yigit
2022-02-09  2:38     ` Jiawen Wu
2022-02-08 10:11 ` [PATCH 6/9] net/ngbe: add support to custom PHY interfaces Jiawen Wu
2022-02-08 17:41   ` Ferruh Yigit [this message]
2022-02-09  6:17     ` Jiawen Wu
2022-02-08 10:11 ` [PATCH 7/9] net: add LED OEM support for wangxun devices Jiawen Wu
2022-02-08 17:41   ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 8/9] net/txgbe: fix to set link up and down Jiawen Wu
2022-02-08 10:11 ` [PATCH 9/9] net/txgbe: fix KR auto-negotiation Jiawen Wu

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=364cf5b8-d20e-8825-52c1-f8efca740826@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiawenwu@trustnetic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).