forked from mirrors/linux
		
	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: 02b2a6f91b ("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>
			
			
This commit is contained in:
		
							parent
							
								
									62e9c00ea8
								
							
						
					
					
						commit
						2160428bcb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -162,7 +162,7 @@ static struct phylink_pcs *txgbe_phylink_mac_select(struct phylink_config *confi | ||||||
| 	struct wx *wx = phylink_to_wx(config); | 	struct wx *wx = phylink_to_wx(config); | ||||||
| 	struct txgbe *txgbe = wx->priv; | 	struct txgbe *txgbe = wx->priv; | ||||||
| 
 | 
 | ||||||
| 	if (interface == PHY_INTERFACE_MODE_10GBASER) | 	if (wx->media_type != sp_media_copper) | ||||||
| 		return &txgbe->xpcs->pcs; | 		return &txgbe->xpcs->pcs; | ||||||
| 
 | 
 | ||||||
| 	return NULL; | 	return NULL; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jiawen Wu
						Jiawen Wu