From: Simon Horman <horms@kernel.org>
To: Jacky Chou <jacky_chou@aspeedtech.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, u.kleine-koenig@pengutronix.de,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ftgmac100: Get link speed and duplex for NC-SI
Date: Fri, 2 Aug 2024 16:48:38 +0100 [thread overview]
Message-ID: <20240802154838.GG2504122@kernel.org> (raw)
In-Reply-To: <20240802083332.2471281-1-jacky_chou@aspeedtech.com>
On Fri, Aug 02, 2024 at 04:33:32PM +0800, Jacky Chou wrote:
> The ethtool of this driver uses the phy API of ethtool
> to get the link information from PHY driver.
> Because the NC-SI is forced on 100Mbps and full duplex,
> the driver connects a fixed-link phy driver for NC-SI.
> The ethtool will get the link information from the
> fixed-link phy driver.
>
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
> ---
> drivers/net/ethernet/faraday/ftgmac100.c | 37 ++++++++++++++----------
> 1 file changed, 21 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index fddfd1dd5070..0c820997ef88 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -26,6 +26,7 @@
> #include <linux/of_net.h>
> #include <net/ip.h>
> #include <net/ncsi.h>
> +#include <linux/phy_fixed.h>
>
> #include "ftgmac100.h"
>
> @@ -50,6 +51,15 @@
> #define FTGMAC_100MHZ 100000000
> #define FTGMAC_25MHZ 25000000
>
> +/* For NC-SI to register a fixed-link phy device */
> +struct fixed_phy_status ncsi_phy_status = {
> + .link = 1,
> + .speed = SPEED_100,
> + .duplex = DUPLEX_FULL,
> + .pause = 0,
> + .asym_pause = 0
> +};
nit: This structure is only used in this file, so it should be static
> +
> struct ftgmac100 {
> /* Registers */
> struct resource *res;
--
pw-bot: cr
prev parent reply other threads:[~2024-08-02 15:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 8:33 [PATCH] net: ftgmac100: Get link speed and duplex for NC-SI Jacky Chou
2024-08-02 15:48 ` 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=20240802154838.GG2504122@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacky_chou@aspeedtech.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).