Skip to content

Commit 2160428

Browse files
Jiawen Wukuba-moo
authored andcommitted
net: txgbe: fix null pointer to pcs
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: 02b2a6f ("net: txgbe: support copper NIC with external PHY") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Link: https://patch.msgid.link/20241115073508.1130046-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 62e9c00 commit 2160428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static struct phylink_pcs *txgbe_phylink_mac_select(struct phylink_config *confi
162162
struct wx *wx = phylink_to_wx(config);
163163
struct txgbe *txgbe = wx->priv;
164164

165-
if (interface == PHY_INTERFACE_MODE_10GBASER)
165+
if (wx->media_type != sp_media_copper)
166166
return &txgbe->xpcs->pcs;
167167

168168
return NULL;

0 commit comments

Comments
 (0)