Received: by 10.223.185.116 with SMTP id b49csp2209858wrg; Sat, 24 Feb 2018 13:53:07 -0800 (PST) X-Google-Smtp-Source: AH8x225IIXgjYGF2gj/kUuLYD/QGGg/za6ZVpWi41b1b7kDkt1oC/d7T+62A9RJC0b9zCgfZloWZ X-Received: by 10.99.127.65 with SMTP id p1mr4756745pgn.50.1519509186936; Sat, 24 Feb 2018 13:53:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519509186; cv=none; d=google.com; s=arc-20160816; b=0PUvNmmFzAsQFfKqD5CKfVOkF7xRArZpMrBaPH5JAtDzxhM26wpUOUx6lCTg1znXvI o2F5q+FCm4l6HpbSAwGFmTnHxTgPA1k3UMo6IzKoypJgEZKLFMmoDw3qP7nNz1dTt0dI R3PbtbokXYS1okNlme6wb4ZfpnlNWdwSjO6710AFRz2Zcfjb2U6GelSjDnkzeuUSD/xW iaOhkImFROdKLPH2YiJcKJDgQtUkZl78/tjq83rVfdyMNqsGnNdFxgyLolnyCxF4PLpX vIvlSKoK58JSzc4F00KoMz4s+mPdw4RlQqiWv8PiLs26C1sb0NcpZtfhXKjQYxw2uBFp wFGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=8IhK+dHbt6n1bDXfmWl70HT4xIhFGPtOrNMqKlakIHI=; b=SdwHj3UH7PZIAJouEanBR3/54vt0/0nLy2KvhEtH/ARq+fNUQZ8NhlQ2ALErE74hJF X7EMLmYyhudij/tAXjQsS9eeBsAmhvmGQ7xC3gLoB5u5+QvocMtVdf+Iw9goNvzeNr5z 9X/VvZlQLMS4DJ5E1W3J84JaMoB2tq3BZWljbVL1n8E9TCMCl5f3fqfT6t6/pOVvdCyi JOS7Vtp25Jy5EgjTJy1nex7ZaBjzb5byPc16Yv9Rm4TlIi4Dxr26JTxeI1Rp+EzWMRSG Q4ATEM917W9MuotULk9xWfbU/ZIDlpAjM9qaFfZaszpCnA2F430H40gVDf7WlHw7H0N2 DdUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=NYyMqYo9; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20-v6si4317254plo.199.2018.02.24.13.52.51; Sat, 24 Feb 2018 13:53:06 -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; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=NYyMqYo9; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbeBXVvx (ORCPT + 99 others); Sat, 24 Feb 2018 16:51:53 -0500 Received: from sonic306-22.consmr.mail.ne1.yahoo.com ([66.163.189.84]:41415 "EHLO sonic306-22.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbeBXVvv (ORCPT ); Sat, 24 Feb 2018 16:51:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1519509111; bh=8IhK+dHbt6n1bDXfmWl70HT4xIhFGPtOrNMqKlakIHI=; h=From:To:Cc:Subject:Date:From:Subject; b=NYyMqYo9rP8wpVNpF8QrwjPktZCMbBvqL3Eyb90b/nYsBnLhNGTpH8pkyl6mXv5pzo0aALA+g7mJhpCxIR+toy9UCTZjXJRmngAinefMFI9qm3XNpnXP3OnFxLKmHp9ooCEoMWIZsGYObctOa4rrn+IcuJDaS5cOrTfDn50njXzkHZvsK61Q37ECrrKwJZG+yhLPwo67T5wP4AgQg9Vra5cl+C9WSFOju/yDHCTH/GQHPL9P58d4KFN+58zp1ymJqVurCmB7S4SKEfLrlLy1+IEruST2BlSKVMYIazlQu4eE590N9ZWUMQmn93+p/0mP3g2McSNJh0egejquQ4n6gw== X-YMail-OSG: 80j.57cVM1lTdLC7QKcGYN5j0rebEwUVKYEy5353dr.FeeAKHblhKDQsIWk0Z5l CnJOZRoWzSzVDwSyq.TcVFcMxFixJRXlBg0JBYe2bjwhlMjjzvaUbueK1j2y9nIt68d7kX5AF7yt nrykH5JcOTl9TAPTxBhZZm2iMNenkolpLwR2tpG_T83.72p.OsgutoqCOwVOkm7LjaWWEG2dy3II AlkEgvIKd2zA98TJiO4ZHpYJPsl7Ye6ut2ifMAFt6z612JWgHBoRvpYp6mRNxsSVVWkVdvUXf67F fSbZGR30Pc7zaVVJpnCA4rcCLRNln7ri5jDJ.xa9OsTj2AMNfoHvLMsKQG57.AroYPj9g5EtJz0Q 5STu5H1NagbszMVXTurDGCMXk7_hkD3ubduH.4nvPCJ1KiHptDhC1tjPT5RSleJi.0F1k66EguMr H5IYPePRt0aty_ruAkYyapXyC.XGenq_ITapXMPIIqxiADEUiUeF1LGY4glerJ.acTxNVkK_6fIP sPzoVVP126TobS_suKJeAJFwtzoXJdGW6qFpjaQSpvVZqzAkp Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sat, 24 Feb 2018 21:51:51 +0000 Received: from smtp229.mail.ne1.yahoo.com (EHLO localhost.localdomain) ([10.218.253.212]) by smtp403.mail.ne1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID e1087ee09432a6c74bd54491e027277e; Sat, 24 Feb 2018 21:51:47 +0000 (UTC) From: Denis Du To: davem@davemloft.net Cc: khc@pm.waw.pl, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Denis Du Subject: [PATCH] netdev: carrier detect ok, don't turn off negotiation Date: Sat, 24 Feb 2018 16:51:42 -0500 Message-Id: <1519509102-5629-1-git-send-email-dudenis2000@yahoo.ca> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/wan/hdlc_ppp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index afeca6b..ab8b3cb 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -574,7 +574,10 @@ static void ppp_timer(struct timer_list *t) 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; -- 2.1.4