mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Luo Jie <quic_luoj@quicinc.com>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] net: phy: at803x: support qca8081 1G chip type
Date: Wed, 5 Jul 2023 01:24:44 +0200	[thread overview]
Message-ID: <66a5f898-e3fd-460a-b604-bb11a000e4e9@lunn.ch> (raw)
In-Reply-To: <20230704090016.7757-2-quic_luoj@quicinc.com>

On Tue, Jul 04, 2023 at 05:00:15PM +0800, Luo Jie wrote:
> The qca8081 1G chip version does not support 2.5 capability, which
> is distinguished from qca8081 2.5G chip according to the bit0 of
> register mmd7.0x901d.
> 
> The fast retrain and master slave seed configs are only needed when
> the 2.5G capability is supported.
> 
> Switch to use genphy_c45_pma_read_abilities for .get_features API.

It is better to have lots of small patches, each doing one thing. If
something regresses, a git bisect gives a much finer idea where the
problem is. It is also easier to review small patches with good commit
messages.

So please break this patch up.

> -	/* Configure lower ramdom seed to make phy linked as slave mode */
> -	ret = qca808x_phy_ms_random_seed_set(phydev);
> -	if (ret)
> -		return ret;
> +		/* Configure lower ramdom seed to make phy linked as slave mode */
> +		ret = qca808x_phy_ms_random_seed_set(phydev);
> +		if (ret)
> +			return ret;

Shouldn't this depend on how MDIO_MMD_AN, MDIO_AN_T1_ADV_L bit
MDIO_AN_T1_ADV_M_MST is set? Maybe the user wants it to prefer master
rather than slave?

I know you are just trying to move code around, but it does seem like
a good time to also improve the code.

FYI: net-next is closed at the moment. Officially you should post as
RFC, or wait until it opens again.

  Andrew

  reply	other threads:[~2023-07-04 23:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04  9:00 [PATCH v1 0/2] net: phy: at803x: support qca8081 1G version chip Luo Jie
2023-07-04  9:00 ` [PATCH v1 1/2] net: phy: at803x: support qca8081 1G chip type Luo Jie
2023-07-04 23:24   ` Andrew Lunn [this message]
2023-07-05  8:35     ` Jie Luo
2023-07-04  9:00 ` [PATCH v1 2/2] net: phy: at803x: add qca8081 fifo reset on the link changed Luo Jie
2023-07-04 23:26   ` Andrew Lunn

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=66a5f898-e3fd-460a-b604-bb11a000e4e9@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_luoj@quicinc.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®