public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine•com>
To: Mengyuan Lou <mengyuanlou@net-swift•com>
Cc: netdev@vger•kernel.org, Jakub Kicinski <kuba@kernel•org>,
	"Russell King (Oracle)" <linux@armlinux•org.uk>,
	"David S. Miller" <davem@davemloft•net>,
	Paolo Abeni <pabeni@redhat•com>,
	Eric Dumazet <edumazet@google•com>,
	Heiner Kallweit <hkallweit1@gmail•com>,
	Andrew Lunn <andrew@lunn•ch>, Jiawen Wu <jiawenwu@trustnetic•com>
Subject: Re: [PATCH net-next 1/2] net: ngbe: add ncsi_enable flag for wangxun nics
Date: Tue, 25 Jul 2023 14:13:41 +0200	[thread overview]
Message-ID: <ZL+8dXjEmw9gyiBB@corigine.com> (raw)
In-Reply-To: <20207E0578DCE44C+20230724092544.73531-3-mengyuanlou@net-swift.com>

On Mon, Jul 24, 2023 at 05:24:59PM +0800, Mengyuan Lou wrote:

+ Jakub Kicinski, "Russell King (Oracle)", "David S. Miller", Paolo Abeni,
  Eric Dumazet, Heiner Kallweit, Andrew Lunn, Jiawen Wu

  Please use ./scripts/get_maintainer.pl --git-min-percent 25 this.patch
  to determine the CC list for Networking patches

> Add ncsi_enabled flag to struct netdev to indicate wangxun
> nics which support NCSI.

This patch adds ncsi_enabled to struct net_device.
Which does raise the question of if other NICs support NCSI,
and if so how they do so without this field.

This patch also renames an existing field in struct wx.
This is not reflected in the patch description.

> Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift•com>
> ---
>  drivers/net/ethernet/wangxun/libwx/wx_type.h  | 2 +-
>  drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 5 +++--
>  include/linux/netdevice.h                     | 3 +++
>  3 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_type.h b/drivers/net/ethernet/wangxun/libwx/wx_type.h
> index 1de88a33a698..1b932e66044e 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_type.h
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_type.h
> @@ -851,7 +851,7 @@ struct wx {
>  	struct phy_device *phydev;
>  
>  	bool wol_hw_supported;
> -	bool ncsi_enabled;
> +	bool ncsi_hw_supported;
>  	bool gpio_ctrl;
>  	raw_spinlock_t gpio_lock;
>  
> diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> index 2b431db6085a..e42e4dd26700 100644
> --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> @@ -63,8 +63,8 @@ static void ngbe_init_type_code(struct wx *wx)
>  		       em_mac_type_mdi;
>  
>  	wx->wol_hw_supported = (wol_mask == NGBE_WOL_SUP) ? 1 : 0;
> -	wx->ncsi_enabled = (ncsi_mask == NGBE_NCSI_MASK ||
> -			   type_mask == NGBE_SUBID_OCP_CARD) ? 1 : 0;
> +	wx->ncsi_hw_supported = (ncsi_mask == NGBE_NCSI_MASK ||
> +				 type_mask == NGBE_SUBID_OCP_CARD) ? 1 : 0;
>  
>  	switch (type_mask) {
>  	case NGBE_SUBID_LY_YT8521S_SFP:
> @@ -639,6 +639,7 @@ static int ngbe_probe(struct pci_dev *pdev,
>  	netdev->wol_enabled = !!(wx->wol);
>  	wr32(wx, NGBE_PSR_WKUP_CTL, wx->wol);
>  	device_set_wakeup_enable(&pdev->dev, wx->wol);
> +	netdev->ncsi_enabled = wx->ncsi_hw_supported;
>  
>  	/* Save off EEPROM version number and Option Rom version which
>  	 * together make a unique identify for the eeprom
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index b828c7a75be2..dfa14e4c8e95 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -2024,6 +2024,8 @@ enum netdev_ml_priv_type {
>   *
>   *	@wol_enabled:	Wake-on-LAN is enabled
>   *
> + *	@ncsi_enabled:	NCSI is enabled.
> + *
>   *	@threaded:	napi threaded mode is enabled
>   *
>   *	@net_notifier_list:	List of per-net netdev notifier block
> @@ -2393,6 +2395,7 @@ struct net_device {
>  	struct lock_class_key	*qdisc_tx_busylock;
>  	bool			proto_down;
>  	unsigned		wol_enabled:1;
> +	unsigned		ncsi_enabled:1;
>  	unsigned		threaded:1;
>  
>  	struct list_head	net_notifier_list;
> -- 
> 2.41.0
> 
> 

      parent reply	other threads:[~2023-07-25 12:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230724092544.73531-1-mengyuanlou@net-swift.com>
2023-07-24  9:24 ` [PATCH net-next 1/2] net: ngbe: add ncsi_enable flag for wangxun nics Mengyuan Lou
2023-07-25 23:22   ` Jakub Kicinski
2023-07-26  1:59     ` mengyuanlou
2023-07-26  2:44       ` Jakub Kicinski
2023-07-26  3:12         ` mengyuanlou
2023-07-26  3:23           ` Jakub Kicinski
2023-07-24  9:24 ` [PATCH net-next 2/2] net: phy: add keep_data_connection to struct phydev Mengyuan Lou
2023-07-25 12:05   ` Simon Horman
2023-07-25 13:12     ` Russell King (Oracle)
2023-07-26  2:35       ` mengyuanlou
2023-07-26  8:10         ` Russell King (Oracle)
2023-07-26  8:54         ` Andrew Lunn
2023-07-26 16:08           ` Jakub Kicinski
2023-07-26 16:43             ` Andrew Lunn
2023-07-26 18:29               ` Jakub Kicinski
2023-07-28  9:27                 ` mengyuanlou
2023-07-28  9:48                   ` Andrew Lunn
2023-07-28 15:11                     ` Jakub Kicinski
2023-07-25 12:13   ` Simon Horman [this message]

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=ZL+8dXjEmw9gyiBB@corigine.com \
    --to=simon.horman@corigine$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=hkallweit1@gmail$(echo .)com \
    --cc=jiawenwu@trustnetic$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=mengyuanlou@net-swift$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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