History

net: sfp: rename sm_retries

Rename sm_retries as sm_fault_retries, as this is what this member is tracking.

Russell King committed 6 years ago

Commit 281e4ea1 parent 65ef2d51 file · +5 −5Browse files

Unified · Split

drivers/net/phy/sfp.c+5−5
@@ -234,7 +234,7 @@ struct sfp { · 233 unmodified lines
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) · 1249 unmodified lines
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) · 396 unmodified lines
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) · 33 unmodified lines
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) · 6 unmodified lines
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t