linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	davem@davemloft.net, kuba@kernel.org, sgoutham@marvell.com,
	lcherian@marvell.com, gakula@marvell.com, jerinj@marvell.com,
	sbhatta@marvell.com, Christina Jacob <cjacob@marvell.com>
Subject: Re: [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support
Date: Wed, 27 Jan 2021 14:26:26 +0100	[thread overview]
Message-ID: <YBFqAkQRig3oTdyd@lunn.ch> (raw)
In-Reply-To: <1611733552-150419-5-git-send-email-hkelam@marvell.com>

On Wed, Jan 27, 2021 at 01:15:49PM +0530, Hariprasad Kelam wrote:
> From: Christina Jacob <cjacob@marvell.com>
> 
> CGX LMAC, the physical interface support link configuration parameters
> like speed, auto negotiation, duplex  etc. Firmware saves these into
> memory region shared between firmware and this driver.
> 
> This patch adds mailbox handler set_link_mode, fw_data_get to
> configure and read these parameters.
> 
> Signed-off-by: Christina Jacob <cjacob@marvell.com>
> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/cgx.c    | 60 +++++++++++++++++++++-
>  drivers/net/ethernet/marvell/octeontx2/af/cgx.h    |  2 +
>  .../net/ethernet/marvell/octeontx2/af/cgx_fw_if.h  | 18 ++++++-
>  drivers/net/ethernet/marvell/octeontx2/af/mbox.h   | 21 ++++++++
>  .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    | 17 ++++++
>  5 files changed, 115 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> index b3ae84c..42ee67e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> @@ -658,6 +658,39 @@ static inline void cgx_link_usertable_init(void)
>  	cgx_lmactype_string[LMAC_MODE_USXGMII] = "USXGMII";
>  }
>  
> +static inline int cgx_link_usertable_index_map(int speed)
> +{

Hi Christina, Hariprasad

No inline functions in .c files please. Let the compiler decide.


> +	switch (speed) {
> +	case SPEED_10:
> +		return CGX_LINK_10M;
> +	case SPEED_100:
> +		return CGX_LINK_100M;
> +	case SPEED_1000:
> +		return CGX_LINK_1G;
> +	case SPEED_2500:
> +		return CGX_LINK_2HG;
> +	case SPEED_5000:
> +		return CGX_LINK_5G;
> +	case SPEED_10000:
> +		return CGX_LINK_10G;
> +	case SPEED_20000:
> +		return CGX_LINK_20G;
> +	case SPEED_25000:
> +		return CGX_LINK_25G;
> +	case SPEED_40000:
> +		return CGX_LINK_40G;
> +	case SPEED_50000:
> +		return CGX_LINK_50G;
> +	case 80000:
> +		return CGX_LINK_80G;
> +	case SPEED_100000:
> +		return CGX_LINK_100G;
> +	case SPEED_UNKNOWN:
> +		return CGX_LINK_NONE;
> +	}
> +	return CGX_LINK_NONE;
> +}
> +
>  static inline void link_status_user_format(u64 lstat,
>  					   struct cgx_link_user_info *linfo,
>  					   struct cgx *cgx, u8 lmac_id)

So it looks like previous reviews did not catch inline functions. So
lets say, no new inline functions.

     Andrew

  reply	other threads:[~2021-01-27 13:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  7:45 [Patch v2 net-next 0/7] ethtool support for fec and link configuration Hariprasad Kelam
2021-01-27  7:45 ` [Patch v2 net-next 1/7] octeontx2-af: forward error correction configuration Hariprasad Kelam
2021-01-27 20:15   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 2/7] octeontx2-af: Add new CGX_CMD to get PHY FEC statistics Hariprasad Kelam
2021-01-27 20:20   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 3/7] octeontx2-pf: ethtool fec mode support Hariprasad Kelam
2021-01-27 20:30   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support Hariprasad Kelam
2021-01-27 13:26   ` Andrew Lunn [this message]
2021-01-27 20:33   ` Willem de Bruijn
2021-01-27  7:45 ` [Patch v2 net-next 5/7] octeontx2-af: advertised link modes support on cgx Hariprasad Kelam
2021-01-27  7:45 ` [Patch v2 net-next 6/7] octeontx2-pf: ethtool physical link status Hariprasad Kelam
2021-01-27 13:51   ` Andrew Lunn
2021-01-27  7:45 ` [Patch v2 net-next 7/7] octeontx2-pf: ethtool physical link configuration Hariprasad Kelam
2021-01-30  9:38 [Patch v2 net-next 4/7] octeontx2-af: Physical link configuration support Hariprasad Kelam
2021-01-30  9:54 Hariprasad Kelam

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=YBFqAkQRig3oTdyd@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cjacob@marvell.com \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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).