Skip to contentSkip to conversation

net: dpaa: Fix dtsec check for PCS availability

PATCH Applied Sean Anderson 3 participants 4 messages Jan 3, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dpaa: Fix dtsec check for PCS availability

We want to fail if the PCS is not available, not if it is available. Fix this condition.

Fixes 5d93cfcf7360 ("net: dpaa: Convert to phylink")

---

 drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fman/fman_dtsec.c +1 -1
index 3c87820ca202..3462f2b78680 100644
@@ -1431,7 +1431,7 @@ int dtsec_initialization(struct mac_device *mac_dev,
 	dtsec->dtsec_drv_param->tx_pad_crc = true;
 
 	phy_node = of_parse_phandle(mac_node, "tbi-handle", 0);
-	if (!phy_node || of_device_is_available(phy_node)) {
+	if (!phy_node || !of_device_is_available(phy_node)) {
 		of_node_put(phy_node);
 		err = -EINVAL;
 		dev_err_probe(mac_dev->dev, err,
Signature · 1 line
2.37.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Tue, Jan 03, 2023 at 07:50:38AM CET, [email protected] wrote:

We want to fail if the PCS is not available, not if it is available. Fix

It is odd to read plural maiestaticus in patch desctiption :) Better to stick with describing what code does wrong and then telling the codebase what to do.

Quoted 5 lines

this condition.

Fixes 5d93cfcf7360 ("net: dpaa: Convert to phylink")
#2 lore raw
Quoted 6 lines · Jiri Pirko
Quoted 1 line · Tue, Jan 03, 2023 at 07:50:38AM CET, [email protected] wrote:

We want to fail if the PCS is not available, not if it is available. Fix

It is odd to read plural maiestaticus in patch desctiption :) Better to stick with describing what code does wrong and then telling the codebase what to do.

Writing a kernel is a collaborative effort :)

Quoted 7 lines
Quoted 5 lines

this condition.

Fixes 5d93cfcf7360 ("net: dpaa: Convert to phylink")
#3 lore raw
In reply to Sean Anderson
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Tue, 3 Jan 2023 01:50:38 -0500 you wrote:

We want to fail if the PCS is not available, not if it is available. Fix this condition.

Fixes 5d93cfcf7360 ("net: dpaa: Convert to phylink")

[...]

Here is the summary with links:
- [net] net: dpaa: Fix dtsec check for PCS availability

    https://git.kernel.org/netdev/net/c/7dc618385419

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html