Skip to content

Commit

Permalink
net: sfp: only use soft polling if we have A2h access
Browse files Browse the repository at this point in the history
The soft state bits are stored in the A2h memory space, and require
SFF-8472 compliance. This is what our have_a2 flag tells us, so use
this to indicate whether we should attempt to use the soft signals.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Russell King (Oracle) authored and Jakub Kicinski committed Mar 11, 2023
1 parent f94b9be commit 5daed42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/phy/sfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,11 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
sfp->sm_dev_state != SFP_DEV_UP)
break;

if (!(sfp->id.ext.diagmon & SFP_DIAGMON_ADDRMODE))
/* Only use the soft state bits if we have access to the A2h
* memory, which implies that we have some level of SFF-8472
* compliance.
*/
if (sfp->have_a2)
sfp_soft_start_poll(sfp);

sfp_module_tx_enable(sfp);
Expand Down

0 comments on commit 5daed42

Please sign in to comment.