netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: "Kamil Horák - 2N" <kamilh@axis.com>
Cc: <florian.fainelli@broadcom.com>,
	<bcm-kernel-feedback-list@broadcom.com>, <andrew@lunn.ch>,
	<hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <netdev@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 4/4] net: phy: bcm-phy-lib: Implement BroadR-Reach link modes
Date: Wed, 19 Jun 2024 12:14:36 +0530	[thread overview]
Message-ID: <20240619064436.GA1191293@maili.marvell.com> (raw)
In-Reply-To: <20240617113841.3694934-5-kamilh@axis.com>

On 2024-06-17 at 17:08:41, Kamil Horák - 2N (kamilh@axis.com) wrote:
> +
> +	if (brr_mode) {
> +		linkmode_set_bit_array(phy_basic_ports_array,
> +				       ARRAY_SIZE(phy_basic_ports_array),
> +				       phydev->supported);
> +
> +		val = phy_read(phydev, MII_BCM54XX_LRESR);
> +		if (val < 0)
> +			return val;
> +
> +		linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
> +				 phydev->supported, 1);
> +		linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
> +				 phydev->supported,
> +				 val & LRESR_100_1PAIR);
> +		linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT,
> +				 phydev->supported,
> +				 val & LRESR_10_1PAIR);
> +	} else {
> +		return genphy_read_abilities(phydev);
> +	}
> +
> +	return 0;
nit: Could you move this return to "if" statement and get rid of else part ?

> +static int bcm5481_config_aneg(struct phy_device *phydev)
> +{
> +	int ret;
> +	u8 brr_mode;
nit: Reverse xmas-tree.

> +static int bcm54811_config_aneg(struct phy_device *phydev)
> +{
> +	int ret;
> +	u8 brr_mode;
nit: Please apply reverse xmas-tree comment everywhere applicable.

  parent reply	other threads:[~2024-06-19  6:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 11:38 [PATCH v7 0/4] net: phy: bcm5481x: add support for BroadR-Reach mode Kamil Horák - 2N
2024-06-17 11:38 ` [PATCH v7 1/4] net: phy: bcm54811: New link mode for BroadR-Reach Kamil Horák - 2N
2024-06-19 10:35   ` Florian Fainelli
2024-06-17 11:38 ` [PATCH v7 2/4] net: phy: bcm54811: Add LRE registers definitions Kamil Horák - 2N
2024-06-19 10:36   ` Florian Fainelli
2024-06-17 11:38 ` [PATCH v7 3/4] dt-bindings: ethernet-phy: add optional brr-mode flag Kamil Horák - 2N
2024-06-17 16:25   ` Conor Dooley
2024-06-19 10:37   ` Florian Fainelli
2024-06-17 11:38 ` [PATCH v7 4/4] net: phy: bcm-phy-lib: Implement BroadR-Reach link modes Kamil Horák - 2N
2024-06-17 15:17   ` Simon Horman
2024-06-19  1:05   ` Jakub Kicinski
2024-06-19  6:44   ` Ratheesh Kannoth [this message]
2024-06-19 10:34   ` Russell King (Oracle)

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=20240619064436.GA1191293@maili.marvell.com \
    --to=rkannoth@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hkallweit1@gmail.com \
    --cc=kamilh@axis.com \
    --cc=krzk+dt@kernel.org \
    --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=robh@kernel.org \
    /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).