@@ -234,7 +234,7 @@ struct sfp {
234
234
unsigned char sm_mod_tries ;
235
235
unsigned char sm_dev_state ;
236
236
unsigned short sm_state ;
237
- unsigned int sm_retries ;
237
+ unsigned char sm_fault_retries ;
238
238
239
239
struct sfp_eeprom_id id ;
240
240
unsigned int module_power_mW ;
@@ -1490,7 +1490,7 @@ static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event)
1490
1490
1491
1491
static void sfp_sm_fault (struct sfp * sfp , unsigned int next_state , bool warn )
1492
1492
{
1493
- if (sfp -> sm_retries && !-- sfp -> sm_retries ) {
1493
+ if (sfp -> sm_fault_retries && !-- sfp -> sm_fault_retries ) {
1494
1494
dev_err (sfp -> dev ,
1495
1495
"module persistently indicates fault, disabling\n" );
1496
1496
sfp_sm_next (sfp , SFP_S_TX_DISABLE , 0 );
@@ -1893,7 +1893,7 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
1893
1893
sfp_module_tx_enable (sfp );
1894
1894
1895
1895
/* Initialise the fault clearance retries */
1896
- sfp -> sm_retries = N_FAULT_INIT ;
1896
+ sfp -> sm_fault_retries = N_FAULT_INIT ;
1897
1897
1898
1898
/* We need to check the TX_FAULT state, which is not defined
1899
1899
* while TX_DISABLE is asserted. The earliest we want to do
@@ -1933,7 +1933,7 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
1933
1933
* or t_start_up, so assume there is a fault.
1934
1934
*/
1935
1935
sfp_sm_fault (sfp , SFP_S_INIT_TX_FAULT ,
1936
- sfp -> sm_retries == N_FAULT_INIT );
1936
+ sfp -> sm_fault_retries == N_FAULT_INIT );
1937
1937
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR ) {
1938
1938
init_done : /* TX_FAULT deasserted or we timed out with TX_FAULT
1939
1939
* clear. Probe for the PHY and check the LOS state.
@@ -1946,7 +1946,7 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
1946
1946
sfp_sm_link_check_los (sfp );
1947
1947
1948
1948
/* Reset the fault retry count */
1949
- sfp -> sm_retries = N_FAULT ;
1949
+ sfp -> sm_fault_retries = N_FAULT ;
1950
1950
}
1951
1951
break ;
1952
1952
0 commit comments