Skip to content

Commit 281e4ea

Browse files
Russell Kingdavem330
authored andcommitted
net: sfp: rename sm_retries
Rename sm_retries as sm_fault_retries, as this is what this member is tracking. Signed-off-by: Russell King <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 65ef2d5 commit 281e4ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/net/phy/sfp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ struct sfp {
234234
unsigned char sm_mod_tries;
235235
unsigned char sm_dev_state;
236236
unsigned short sm_state;
237-
unsigned int sm_retries;
237+
unsigned char sm_fault_retries;
238238

239239
struct sfp_eeprom_id id;
240240
unsigned int module_power_mW;
@@ -1490,7 +1490,7 @@ static bool sfp_los_event_inactive(struct sfp *sfp, unsigned int event)
14901490

14911491
static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn)
14921492
{
1493-
if (sfp->sm_retries && !--sfp->sm_retries) {
1493+
if (sfp->sm_fault_retries && !--sfp->sm_fault_retries) {
14941494
dev_err(sfp->dev,
14951495
"module persistently indicates fault, disabling\n");
14961496
sfp_sm_next(sfp, SFP_S_TX_DISABLE, 0);
@@ -1893,7 +1893,7 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
18931893
sfp_module_tx_enable(sfp);
18941894

18951895
/* Initialise the fault clearance retries */
1896-
sfp->sm_retries = N_FAULT_INIT;
1896+
sfp->sm_fault_retries = N_FAULT_INIT;
18971897

18981898
/* We need to check the TX_FAULT state, which is not defined
18991899
* 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)
19331933
* or t_start_up, so assume there is a fault.
19341934
*/
19351935
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
1936-
sfp->sm_retries == N_FAULT_INIT);
1936+
sfp->sm_fault_retries == N_FAULT_INIT);
19371937
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
19381938
init_done: /* TX_FAULT deasserted or we timed out with TX_FAULT
19391939
* 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)
19461946
sfp_sm_link_check_los(sfp);
19471947

19481948
/* Reset the fault retry count */
1949-
sfp->sm_retries = N_FAULT;
1949+
sfp->sm_fault_retries = N_FAULT;
19501950
}
19511951
break;
19521952

0 commit comments

Comments
 (0)