public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: dpaa: Fix dtsec check for PCS availability
@ 2023-01-03  6:50 Sean Anderson
  2023-01-03  9:15 ` Jiri Pirko
  2023-01-03  9:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Sean Anderson @ 2023-01-03  6:50 UTC (permalink / raw)
  To: Madalin Bucur, David S . Miller, Sean Anderson, netdev
  Cc: Paolo Abeni, Eric Dumazet, Jakub Kicinski, Christian Zigotzky,
	linux-kernel, Sean Anderson

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")
Reported-by: Christian Zigotzky <info@xenosoft.de>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/net/ethernet/freescale/fman/fman_dtsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index 3c87820ca202..3462f2b78680 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -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,
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net: dpaa: Fix dtsec check for PCS availability
  2023-01-03  6:50 [PATCH net] net: dpaa: Fix dtsec check for PCS availability Sean Anderson
@ 2023-01-03  9:15 ` Jiri Pirko
  2023-01-03 14:37   ` Sean Anderson
  2023-01-03  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2023-01-03  9:15 UTC (permalink / raw)
  To: Sean Anderson
  Cc: Madalin Bucur, David S . Miller, Sean Anderson, netdev,
	Paolo Abeni, Eric Dumazet, Jakub Kicinski, Christian Zigotzky,
	linux-kernel

Tue, Jan 03, 2023 at 07:50:38AM CET, seanga2@gmail.com 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.


>this condition.
>
>Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
>Reported-by: Christian Zigotzky <info@xenosoft.de>
>Signed-off-by: Sean Anderson <seanga2@gmail.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net: dpaa: Fix dtsec check for PCS availability
  2023-01-03  6:50 [PATCH net] net: dpaa: Fix dtsec check for PCS availability Sean Anderson
  2023-01-03  9:15 ` Jiri Pirko
@ 2023-01-03  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-03  9:30 UTC (permalink / raw)
  To: Sean Anderson
  Cc: madalin.bucur, davem, sean.anderson, netdev, pabeni, edumazet,
	kuba, info, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

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")
> Reported-by: Christian Zigotzky <info@xenosoft.de>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] net: dpaa: Fix dtsec check for PCS availability
  2023-01-03  9:15 ` Jiri Pirko
@ 2023-01-03 14:37   ` Sean Anderson
  0 siblings, 0 replies; 4+ messages in thread
From: Sean Anderson @ 2023-01-03 14:37 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: Madalin Bucur, David S . Miller, Sean Anderson, netdev,
	Paolo Abeni, Eric Dumazet, Jakub Kicinski, Christian Zigotzky,
	linux-kernel

On 1/3/23 04:15, Jiri Pirko wrote:
> Tue, Jan 03, 2023 at 07:50:38AM CET, seanga2@gmail.com 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 :)

>> this condition.
>>
>> Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
>> Reported-by: Christian Zigotzky <info@xenosoft.de>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> 
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-03 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03  6:50 [PATCH net] net: dpaa: Fix dtsec check for PCS availability Sean Anderson
2023-01-03  9:15 ` Jiri Pirko
2023-01-03 14:37   ` Sean Anderson
2023-01-03  9:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox