Skip to content

Commit 5daed42

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: sfp: only use soft polling if we have A2h access
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>
1 parent f94b9be commit 5daed42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/phy/sfp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2284,7 +2284,11 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
22842284
sfp->sm_dev_state != SFP_DEV_UP)
22852285
break;
22862286

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

22902294
sfp_module_tx_enable(sfp);

0 commit comments

Comments
 (0)