Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hdlc_ppp: carrier detect ok, don't turn off negotiation

Sometimes when physical lines have a just good noise to make the protocol
handshaking fail, but the carrier detect still good. Then after remove of
the noise, nobody will trigger this protocol to be start again to cause
the link to never come back. The fix is when the carrier is still on, not
terminate the protocol handshaking.

Signed-off-by: Denis Du <dudenis2000@yahoo.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Denis Du and committed by
David S. Miller
b6c3bad1 1bb4f2e8

+4 -1
+4 -1
drivers/net/wan/hdlc_ppp.c
··· 574 574 ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, 575 575 0, NULL); 576 576 proto->restart_counter--; 577 - } else 577 + } else if (netif_carrier_ok(proto->dev)) 578 + ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, 579 + 0, NULL); 580 + else 578 581 ppp_cp_event(proto->dev, proto->pid, TO_BAD, 0, 0, 579 582 0, NULL); 580 583 break;