1 --- a/drivers/net/phy/sfp.c
2 +++ b/drivers/net/phy/sfp.c
3 @@ -1803,6 +1803,7 @@ static int sfp_sm_mod_probe(struct sfp *
4 struct sfp_eeprom_id id;
11 @@ -1851,6 +1852,10 @@ static int sfp_sm_mod_probe(struct sfp *
15 + /* Some cheap SFP-GE-T modules always indicate TX fault */
16 + oem_ge_t = !memcmp(id.base.vendor_name, "OEM ", 16) &&
17 + !memcmp(id.base.vendor_pn, "SFP-GE-T ", 12);
19 /* Cotsworks do not seem to update the checksums when they
20 * do the final programming with the final module part number,
21 * serial number and date code.
22 @@ -1946,8 +1951,8 @@ static int sfp_sm_mod_probe(struct sfp *
24 sfp->module_t_start_up = T_START_UP;
26 - if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
27 - !memcmp(id.base.vendor_pn, "MA5671A ", 16))
28 + if ((!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
29 + !memcmp(id.base.vendor_pn, "MA5671A ", 16)) || oem_ge_t)
30 sfp->tx_fault_ignore = true;
32 sfp->tx_fault_ignore = false;
33 @@ -2404,10 +2409,12 @@ static void sfp_check_state(struct sfp *
34 mutex_lock(&sfp->st_mutex);
35 state = sfp_get_state(sfp);
36 changed = state ^ sfp->state;
37 - if (sfp->tx_fault_ignore)
38 + if (sfp->tx_fault_ignore) {
39 changed &= SFP_F_PRESENT | SFP_F_LOS;
41 + state &= ~SFP_F_TX_FAULT;
43 changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT;
46 for (i = 0; i < GPIO_MAX; i++)