* [PATCH net] net: txgbe: fix null pointer to pcs
@ 2024-11-15 7:35 Jiawen Wu
2024-11-19 3:00 ` patchwork-bot+netdevbpf
2024-11-19 9:14 ` [PATCH net] net: txgbe: fix null pointer to pcs: manual merge Matthieu Baerts
0 siblings, 2 replies; 3+ messages in thread
From: Jiawen Wu @ 2024-11-15 7:35 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, rmk+kernel, netdev
Cc: mengyuanlou, duanqiangwen, Jiawen Wu
For 1000BASE-X or SGMII interface mode, the PCS also need to be selected.
Only return null pointer when there is a copper NIC with external PHY.
Fixes: 02b2a6f91b90 ("net: txgbe: support copper NIC with external PHY")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
index 2bfe41339c1c..f26946198a2f 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
@@ -162,7 +162,7 @@ static struct phylink_pcs *txgbe_phylink_mac_select(struct phylink_config *confi
struct wx *wx = phylink_to_wx(config);
struct txgbe *txgbe = wx->priv;
- if (interface == PHY_INTERFACE_MODE_10GBASER)
+ if (wx->media_type != sp_media_copper)
return &txgbe->xpcs->pcs;
return NULL;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: txgbe: fix null pointer to pcs
2024-11-15 7:35 [PATCH net] net: txgbe: fix null pointer to pcs Jiawen Wu
@ 2024-11-19 3:00 ` patchwork-bot+netdevbpf
2024-11-19 9:14 ` [PATCH net] net: txgbe: fix null pointer to pcs: manual merge Matthieu Baerts
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-19 3:00 UTC (permalink / raw)
To: Jiawen Wu
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, rmk+kernel, netdev,
mengyuanlou, duanqiangwen
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 15 Nov 2024 15:35:08 +0800 you wrote:
> For 1000BASE-X or SGMII interface mode, the PCS also need to be selected.
> Only return null pointer when there is a copper NIC with external PHY.
>
> Fixes: 02b2a6f91b90 ("net: txgbe: support copper NIC with external PHY")
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> ---
> drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net] net: txgbe: fix null pointer to pcs
https://git.kernel.org/netdev/net/c/2160428bcb20
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] 3+ messages in thread
* Re: [PATCH net] net: txgbe: fix null pointer to pcs: manual merge
2024-11-15 7:35 [PATCH net] net: txgbe: fix null pointer to pcs Jiawen Wu
2024-11-19 3:00 ` patchwork-bot+netdevbpf
@ 2024-11-19 9:14 ` Matthieu Baerts
1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2024-11-19 9:14 UTC (permalink / raw)
To: Jiawen Wu
Cc: andrew+netdev, davem, kuba, pabeni, mengyuanlou, duanqiangwen,
Stephen Rothwell, netdev
[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]
Hello,
On 15/11/2024 08:35, Jiawen Wu wrote:
> For 1000BASE-X or SGMII interface mode, the PCS also need to be selected.
> Only return null pointer when there is a copper NIC with external PHY.
FYI, we got a small conflict when merging 'net' in 'net-next' in the
MPTCP tree due to this patch applied in 'net':
2160428bcb20 ("net: txgbe: fix null pointer to pcs")
and this one from 'net-next':
155c499ffd1d ("net: wangxun: txgbe: use phylink_pcs internally")
----- Generic Message -----
The best is to avoid conflicts between 'net' and 'net-next' trees but if
they cannot be avoided when preparing patches, a note about how to fix
them is much appreciated.
The conflict has been resolved on our side [1] and the resolution we
suggest is attached to this email. Please report any issues linked to
this conflict resolution as it might be used by others. If you worked on
the mentioned patches, don't hesitate to ACK this conflict resolution.
---------------------------
Regarding this conflict, it was simple to resolve it because the
conflict was in the context: so the modification from both sides can be
taken: the new 'if' condition from 'net', and the new 'return' statement
from 'net-next'.
Rerere cache is available in [2].
1: https://github.com/multipath-tcp/mptcp_net-next/commit/74e6371ac34a
2: https://github.com/multipath-tcp/mptcp-upstream-rr-cache/commit/631a1
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
[-- Attachment #2: 74e6371ac34a567f241de4b57ccbbc1741b3255e.patch --]
[-- Type: text/x-patch, Size: 525 bytes --]
diff --cc drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
index a5e4fe6c31c5,2e666f65aa82..1ae68f94dd49
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
@@@ -162,8 -162,8 +162,8 @@@ static struct phylink_pcs *txgbe_phylin
struct wx *wx = phylink_to_wx(config);
struct txgbe *txgbe = wx->priv;
- if (interface == PHY_INTERFACE_MODE_10GBASER)
+ if (wx->media_type != sp_media_copper)
- return &txgbe->xpcs->pcs;
+ return txgbe->pcs;
return NULL;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-19 9:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 7:35 [PATCH net] net: txgbe: fix null pointer to pcs Jiawen Wu
2024-11-19 3:00 ` patchwork-bot+netdevbpf
2024-11-19 9:14 ` [PATCH net] net: txgbe: fix null pointer to pcs: manual merge Matthieu Baerts
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).