Received: by 10.223.185.111 with SMTP id b44csp916616wrg; Fri, 9 Mar 2018 16:48:10 -0800 (PST) X-Google-Smtp-Source: AG47ELvyw/FBItkH4q7/nVVynBxJWPKvKzDThk4HOzSgkkhQt47te2cxPugGGO2IJtZ2kFn4Wttp X-Received: by 2002:a17:902:3383:: with SMTP id b3-v6mr384545plc.224.1520642890095; Fri, 09 Mar 2018 16:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520642890; cv=none; d=google.com; s=arc-20160816; b=WjgefAf8WufgdcY/oizJ7XAfKgn4dUyaXyFEhT0H66qgf/wYyigXNPeZb1ExN/o5y0 RD7HiUR52mqOHe4MW/S/uU31Fqem/IUx8A8TZGdMJVfB2JKM82NlI0MvnuyOeg7WguW9 lHEt/q0vanSWxX+jz2pnidE5WGH4C7hM8EjSeju/wzSPuy3JYzNKDLgeJbbryxOFvm5y u1/63fw8xCW8s4Ap9Ti3lt7+P49ggrMmDW0su8IXoyd6nQZbJKqdiCoSFkXWw/hQfsBg VVjrEyyYxhi5l2DZkClsXTPNx/7R/nC7AuzhSZBCSSKLYkbjG+F6LXPYm7PPRpzvjlwZ XJQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=XrWhxIZiP4uwxPpIhwsE2Xy4P6bgir0LU83zboo3GqY=; b=QCJkknOZNCTY/nxzVGNpfXH/Rp3lQzIc4A/ryCRWY4VgGbvF1DTHoBTreG60Q2tV2U 55yXFaX1F4CBUyH51+h3XE68yyVH+/dHATwOgYx5Ji+3DbSsPQgh8qEzud4Cs9fKT46J eXpRiFqSKNjUoGO5kKaedGFwUQ/o0TRmKHOK95deFRB1tSP2ZEcIg3Lq9BFh+PODNcjr 6BI2EalbsWLKawlCCil0mv/qDEqzIIoDft6kvoDZFcv/vdZgdC63dEXuMQZzDsY6qIIo emRCSOVTWPfj49XqjE8qOJMuVplF4ruRMp1OlSaURNZN38Dk4g7x3Nin06o6KAv/yr0Y SUNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si1507669pgd.392.2018.03.09.16.47.55; Fri, 09 Mar 2018 16:48:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933277AbeCJAUG (ORCPT + 99 others); Fri, 9 Mar 2018 19:20:06 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38972 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933237AbeCJAUE (ORCPT ); Fri, 9 Mar 2018 19:20:04 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 173C2FB1; Sat, 10 Mar 2018 00:20:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Denis Du , "David S. Miller" Subject: [PATCH 4.4 20/36] hdlc_ppp: carrier detect ok, dont turn off negotiation Date: Fri, 9 Mar 2018 16:18:36 -0800 Message-Id: <20180310001808.462928150@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180310001807.213987241@linuxfoundation.org> References: <20180310001807.213987241@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Denis Du [ Upstream commit b6c3bad1ba83af1062a7ff6986d9edc4f3d7fc8e ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/hdlc_ppp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -574,7 +574,10 @@ static void ppp_timer(unsigned long arg) ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, 0, NULL); proto->restart_counter--; - } else + } else if (netif_carrier_ok(proto->dev)) + ppp_cp_event(proto->dev, proto->pid, TO_GOOD, 0, 0, + 0, NULL); + else ppp_cp_event(proto->dev, proto->pid, TO_BAD, 0, 0, 0, NULL); break;