Thread (3 messages) 3 messages, 3 authors, 24d ago

Re: [PATCH v3] Add config phase for dp83td510e phy

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-09-18 01:02:32

some checkpatch nit picks to address here:

On Tue, 15 Sep 2026 07:15:09 +0000 Julien Blanc wrote:
quoted hunk ↗ jump to hunk
+	if (phy_interface_is_rgmii(phydev)) {
+		rx_int_delay = dp83td510_config_rgmii_rx_delay(phydev);
+		/* Set DP83TD510E_RX_CLK_SHIFT to enable rx clk internal delay */
nit: we prefer staying under 80 char line width if it doesn't make 
the code less readable. Comments should always be under 80 chars.
You can probably drop this comment completely, IDK what value it adds,
the if below is clear enough
quoted hunk ↗ jump to hunk
+		if (rx_int_delay)
+			rgmii_delay |= DP83TD510E_RX_CLK_SHIFT;
+
+		tx_int_delay = dp83td510_config_rgmii_tx_delay(phydev);
+
+		/* Set DP83TD510E_TX_CLK_SHIFT to enable tx clk internal delay */
ditto
quoted hunk ↗ jump to hunk
+		if (tx_int_delay)
+			rgmii_delay |= DP83TD510E_TX_CLK_SHIFT;
+
+		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, DP83TD510E_RCSR,
+				     DP83TD510E_RX_CLK_SHIFT | DP83TD510E_TX_CLK_SHIFT,
this is also >80 char but more of a judgement call, up to you
quoted hunk ↗ jump to hunk
+				     rgmii_delay);
+		if (ret)
+			return ret;
+
+		ret = phy_set_bits_mmd(phydev, MDIO_MMD_VEND2,
+				       DP83TD510E_RCSR, DP83TD510E_RGMII_MODE_EN);
+
+		if (ret)
+			return ret;
+
+	} else if (phydev->interface == PHY_INTERFACE_MODE_RMII) {
+		// set RMII_MODE_EN, clear RGMII_MODE_EN (exclusive)
Okay, but you're mixing comment styles, above you used /**/
(so does the rest of this file)
quoted hunk ↗ jump to hunk
+		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, DP83TD510E_RCSR,
+				     DP83TD510E_RMII_MODE_EN | DP83TD510E_RGMII_MODE_EN,
+				     DP83TD510E_RMII_MODE_EN);
+		if (ret)
+			return ret;
+	} else {
+		// may be RMII, which is supported, or something else. Just 
+		// return success to keep the old behavior and not break 
+		// anything. Configuration may have been done by straps so 
+		// it's better to keep as-is.
This comment block has trailing space chars, please clean up
quoted hunk ↗ jump to hunk
+		ret = 0;
+	}
+
+	return ret;
+}
Please use --subject-prefix="PATCH net-next v4" when reposting,
to clearly mark the patch for net-next and add/preserve Andrew's
review tag
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help