Received: by 10.223.176.46 with SMTP id f43csp4418351wra; Tue, 23 Jan 2018 09:09:30 -0800 (PST) X-Google-Smtp-Source: AH8x225bxVa+/nDRgiobCIPHrDsM/BhR3bNZWBcNYJdbOi4ni9BwnrCx/oS9p3RXmuNmFzqo5IIb X-Received: by 10.36.236.4 with SMTP id g4mr4542191ith.87.1516727370728; Tue, 23 Jan 2018 09:09:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516727370; cv=none; d=google.com; s=arc-20160816; b=QdISoHQDGKwbNId9b0mDAYuXHkcHV/4EOKFARAac95oJ3E8nr2CJ7d983NDptSXRbI bFAvF0HhxRpqXr6f6uG/GoyEDJ/cioThOSPFH1yRxjytPogIWJvEmtuXY+6FR51NWeTF 0YCrm+Cy69be1EpGKbKfTrzbmtFZS1dQlbne9k40DTb538hwwm/UvWBAcELzI5LxKpit pZJwCjav8ZfSMGI6vZQuFofjt2ktjil12SSIoJwe6lsPLfzjEtRIKG8tyQpDIgs2VwGe Fy0nMIcNTXeHTvwBsgPhW6AgXQx885sRwQoXVtYT6G275tUW3Pixseq0Llt3+zeIliLT jKgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :subject:references:in-reply-to:message-id:cc:to:from:date :dkim-signature:arc-authentication-results; bh=KtKoc8ZM/a/7aBCI3oj73iQx6y4mP6cK+rNKaAOuCVk=; b=RueRs7RPcBc1PV07iPwW/9vqmTXzDLdJoJuh1ruKrPyhPVSzm8J4dZpebyUlqIqfYz SlbRveRsimq2kVZGDp86BNUVKkO3Dc7Hf1FkXwuKYgcMaLxkbiEta2KYkROZDm2M6v4+ J7eFV3opWi8bQTmaAttEO00C9mYCBFPTrKy685hKf2dCYh3FdIEeFA4pcW9sDuVZZZ8N cutdjfioADQzADU5sUg2NaU4HWbG8N93Kc/FSvxofbGp7BEx+77Ua59TmJDqhTsvq+kG ctjklhqRXIUfNcTEEqRVMr6bVsEa8Ll8uOnmuafZ84u+xEDfPoh9FouMMapJ1Mj3uykj TZ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=OIfbcP93; 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 b126si9048046iti.43.2018.01.23.09.09.17; Tue, 23 Jan 2018 09:09:30 -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=OIfbcP93; 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 S1751970AbeAWRId (ORCPT + 99 others); Tue, 23 Jan 2018 12:08:33 -0500 Received: from sonic306-3.consmr.mail.bf2.yahoo.com ([74.6.132.42]:42372 "EHLO sonic306-3.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbeAWRIb (ORCPT ); Tue, 23 Jan 2018 12:08:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1516727310; bh=KtKoc8ZM/a/7aBCI3oj73iQx6y4mP6cK+rNKaAOuCVk=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=OIfbcP93UlGNNCTGieHzveFS6XSdBK6QzYQtgcu4lFHV5fPnrim8rZZMaoTKz63IBFBRVPKck476Fi5haykFNP78v6MISqXF/uFldEVeQD7h6GEyUhEHE9g2+vnk+AtVkVp8dv5CcBlCXijlNthT4/e8s9fJxuvwaUxWt1mtD0eP3l8BdMHyYJCh5qMxZEex8QDBWfnDBZy8fog+CywvdsoLGeSuqVrLpexZLVA6BV/PtaQ5jpxd0brrkNlbi/rklVjVD9DnZz1hKjU08paAF9E0U1Wa/SNC5hoE75TBtV2GCS92RGzZrO3VDa4OzFOygXox4wYryuxYsitmazUIsQ== X-YMail-OSG: u3f7glIVM1n4qygGtjTrwbZfzWEcmEFae_ZTZ5PY3IF5X24ziodLHIPhTMZ.s9h HNddeQ.HbABoWlf0ZG0WZ3AHSYhP7QUZ0r8OereyFRnIvhU2qzYDK_1xHuaMchxl5HVxixKM9Mbi mVXJ24pWCnS04YUAQp.i0FbIfVSvY9vcKfYsI26CFNl_R0l4hrOaqccFhjyLprqLFsePeg7df0vI HpcfkHUZvsKPZ1i6vVk0DNCOZMFCyTzqFWOkkCbS4m54mYm62zw5nm5hafdptCv2IFuOwJS5kV55 waD9Oz.hPLeZkdfIl1nZfmBLvdt9sS3Lsj7nvyV9_E2hcrjK280DHg0z9tv0I2zIyswxjbND9C5H gM9oNUlYGXOpNEZQXhXMitYjmFIPv5HD5cQiLAAzkj1yVkFAlYCJUPoflcUHtnFD7BIDkxqI367S g6zq7j91eMJuKmjv5xXMkQDoPVdBO5_sXi.9_GzVdEUkHB5XFjre_F.aidR681HSc5hOBvj7CT5U hMo2IctwM_.VQ6gUV6V2BHRZTD2xeJ4hlGU9r Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Tue, 23 Jan 2018 17:08:30 +0000 Date: Tue, 23 Jan 2018 17:08:10 +0000 (UTC) From: Denis Du To: David Miller Cc: khc@pm.waw.pl, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <998451043.3408644.1516727290310@mail.yahoo.com> In-Reply-To: <20180122.152513.1108868799788445512.davem@davemloft.net> References: <751079597.1884905.1516121905374.ref@mail.yahoo.com> <751079597.1884905.1516121905374@mail.yahoo.com> <20180122.152513.1108868799788445512.davem@davemloft.net> Subject: Re: [PATCH] Carrier detect ok, don't turn off negotiation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.11214 YMailNorrin Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Content-Length: 2785 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ok, I check the source code again. It have nothing to do with the interrupt= s, it is related how the hdlc.c is implemented. In drivers/net/wan/hdlc.c#L108 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (hdlc->carrier =3D=3D on= ) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto carrier_exit; /* no ch= ange in DCD line level */ =C2=A0=C2=A0=C2=A0=C2=A0hdlc->carrier =3D on; =C2=A0=C2=A0=C2=A0=C2=A0if (!hdlc->open) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto carrier_exit; =C2=A0=C2=A0=C2=A0=C2=A0if (hdlc->carrier) { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0netdev_info(dev, "Carrier d= etected\n"); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0hdlc_proto_start(dev); =C2=A0=C2=A0=C2=A0=C2=A0} else { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0netdev_info(dev, "Carrier l= ost\n"); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0hdlc_proto_stop(dev); =C2=A0=C2=A0=C2=A0=C2=A0} carrier_exit: =C2=A0=C2=A0=C2=A0=C2=A0spin_unlock_irqrestore(&hdlc->state_lock, flags); =C2=A0=C2=A0=C2=A0=C2=A0return NOTIFY_DONE; From the above code, I can get that only Carrier have some change, it will = restart the protocol by hdlc_proto_start(dev);and thus the timer, the previ= ous timer expired due to protocol fail. If carrier keep no change by if (hdlc->carrier =3D=3D on) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto carrier_exit; /* no ch= ange in DCD line level */It will do nothing, not start any new protocol and= thus the timer. My case is the carrier always good, but protocol will fail due to perfect n= oise, and this issue was found and complained by our customers. So it is no= t my theory guessing, it is a real problem. On Monday, January 22, 2018, 3:25:16 PM EST, David Miller wrote:=20 From: Denis Du Date: Tue, 16 Jan 2018 16:58:25 +0000 (UTC) > From b5902a4dfc709b62b704997ab64f31c9ef69a6db Mon Sep 17 00:00:00 2001 > From: Denis Du > Date: Mon, 15 Jan 2018 17:26:06 -0500 > Subject: [PATCH] netdev: carrier detect ok, don't turn off negotiation >=20 > 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. >=20 > Signed-off-by: Denis Du The timer is supposed to restart the protocol again, that's how this whole thing is designed to work. I think you are making changes to the symptom rather than the true cause of the problems you are seeing. Sorry, I will not apply this until the exact issue is better understood. Thank you.