mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jacky Chou <jacky_chou@aspeedtech.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"jacob.e.keller@intel.com" <jacob.e.keller@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: 回覆: [net] net: ftgmac100: corrcet the phy interface of NC-SI mode
Date: Mon, 14 Oct 2024 15:22:15 +0200	[thread overview]
Message-ID: <44575610-70e1-48cf-ac19-3edef0b7a58f@lunn.ch> (raw)
In-Reply-To: <SEYPR06MB51349C634A15F932ED0ECF4F9D442@SEYPR06MB5134.apcprd06.prod.outlook.com>

On Mon, Oct 14, 2024 at 02:23:40AM +0000, Jacky Chou wrote:
> Hi Andrew,
> 
> Thanks for the review.
> 
> > > In NC-SI specification, NC-SI is using RMII, not MII.
> > >
> > > Fixes: e24a6c874601 ("net: ftgmac100: Get link speed and duplex for
> > > NC-SI")
> > > Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
> > > ---
> > >  drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
> > > b/drivers/net/ethernet/faraday/ftgmac100.c
> > > index ae0235a7a74e..85fea13b2879 100644
> > > --- a/drivers/net/ethernet/faraday/ftgmac100.c
> > > +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> > > @@ -1913,7 +1913,7 @@ static int ftgmac100_probe(struct platform_device
> > *pdev)
> > >  			goto err_phy_connect;
> > >  		}
> > >  		err = phy_connect_direct(netdev, phydev, ftgmac100_adjust_link,
> > > -					 PHY_INTERFACE_MODE_MII);
> > > +					 PHY_INTERFACE_MODE_RMII);
> > >  		if (err) {
> > >  			dev_err(&pdev->dev, "Connecting PHY failed\n");
> > >  			goto err_phy_connect;
> > 
> > I'm a but confused here. Please could you expand the commit message. When i
> > look at the code:
> > 
> > 		phydev = fixed_phy_register(PHY_POLL, &ncsi_phy_status, NULL);
> > 		err = phy_connect_direct(netdev, phydev, ftgmac100_adjust_link,
> > 					 PHY_INTERFACE_MODE_MII);
> > 		if (err) {
> > 			dev_err(&pdev->dev, "Connecting PHY failed\n");
> > 			goto err_phy_connect;
> > 		}
> > 
> > The phy being connected to is a fixed PHY. So the interface mode should not
> > matter, at least to the PHY, since there is no physical PHY. Does the MAC driver
> > get this value returned to it, e.g. as part of ftgmac100_adjust_link, and the
> > MAC then configures itself into the wrong interface mode?
> > 
> > For a patch with a Fixes: it is good to describe the problem the user sees.
> 
> Although it is connected to a fixed PHY and do not care what interface mode is, 
> the driver still configures the correct interface.
> 
> In the ftgmac100 driver, the MAC driver does not actually need to know the interface mode 
> connecting the MAC and PHY.
> The driver just needs to get some information from the PHY, like speed, duplex and so on, to 
> configure the MAC.
> 
> Perhaps it is not matter on PHY interface to MAC, it should correct to the correct interface mode 
> for code.

So nothing is actually broken which a user would notice. So please
drop the Fixes: tag, and submit this for net-next.

     Andrew

      reply	other threads:[~2024-10-14 13:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  8:28 Jacky Chou
2024-10-12 18:29 ` Andrew Lunn
2024-10-14  2:23   ` 回覆: " Jacky Chou
2024-10-14 13:22     ` Andrew Lunn [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=44575610-70e1-48cf-ac19-3edef0b7a58f@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacky_chou@aspeedtech.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®