Received: by 10.223.185.111 with SMTP id b44csp910121wrg; Fri, 9 Mar 2018 16:37:24 -0800 (PST) X-Google-Smtp-Source: AG47ELtVnOp5UlNuuhgc/+XZceIW4vnqqh7fOojGaUxSyANkvvig+09yaZn0bEyCwFVLvD5Y0asw X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr370525pll.52.1520642244216; Fri, 09 Mar 2018 16:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520642244; cv=none; d=google.com; s=arc-20160816; b=a9ZU8qvXNEa2Lnv6QAVajX3Bj7UFnZTxu4YPbC8BzrDhTikozzcU3YedSczfjHs5hu 6w78OBDM2AAXysTJ2jxUF6uRdLKsfOF2iuMPCi5kkrfy1eQACjdrxRtTaRLtuGCg48vr OMkYmZPdoEbXsqtPRA9CyDU1X7dEI37kjuhFDwdvAXx7KCxonta8mJxrhkAzV6AbURcd 1e6RsQ2Ad3fArLUJ+IQhsjDHTkhyW2mYxQAWttaOc0uXGY5XqPpB/NN/Uena5MyB0xPf DEfFCvWqjSOIDC0gZ6boIuLd72L8xMohqUoDGN/G4HBl1K/4XnMe/S2dRkWMsJXtHKLY DwFA== 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=Oz3dTtkcUDneisTJGexOgmPyTWSWFpeifGtNqqDW+VE=; b=BIBUuAUAtuyWLM6isW/6be9s/r4I0TaCWdhn7XgP2KdPM8ZdjJppMEk2BS8w0zG/6u 13R0FjnbLJXZW759Dxa2LNEvCjzpwq62ZKSyw7i8JMRRIvkGwShhjQhScZb45sRWy64p f0i2xzd/BEzlEPLkrZLimZiNik5QEbj5JPhJxZzToeXa2WLxm3nsi1Jmr7xq2vZdN1AK 060Seo7JV00NK1+KskTmmBiWx/P2c5lH9mb0aoAbGYK5GLDcMF4xb39nTeFNSMA/E/Gm +IA16Ap5QJ1mRJ5CNgDr60LKxz+H5pH//Sr4N1lfsbYGtDk0+1OTG+AGggFmjBtrranc cyUQ== 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 k10si325739pgo.39.2018.03.09.16.37.09; Fri, 09 Mar 2018 16:37:24 -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 S933794AbeCJAV4 (ORCPT + 99 others); Fri, 9 Mar 2018 19:21:56 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39784 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933761AbeCJAVw (ORCPT ); Fri, 9 Mar 2018 19:21:52 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C86DA10EF; Sat, 10 Mar 2018 00:21:51 +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.9 35/65] hdlc_ppp: carrier detect ok, dont turn off negotiation Date: Fri, 9 Mar 2018 16:18:35 -0800 Message-Id: <20180310001827.810045143@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180310001824.927996722@linuxfoundation.org> References: <20180310001824.927996722@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.9-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;