From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751978AbeAWRIe (ORCPT ); Tue, 23 Jan 2018 12:08:34 -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 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 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 X-Mailer: WebService/1.1.11214 YMailNorrin Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id w0NH8eMZ022435 Ok, I check the source code again. It have nothing to do with the interrupts, it is related how the hdlc.c is implemented. In drivers/net/wan/hdlc.c#L108         if (hdlc->carrier == on)         goto carrier_exit; /* no change in DCD line level */     hdlc->carrier = on;     if (!hdlc->open)         goto carrier_exit;     if (hdlc->carrier) {         netdev_info(dev, "Carrier detected\n");         hdlc_proto_start(dev);     } else {         netdev_info(dev, "Carrier lost\n");         hdlc_proto_stop(dev);     } carrier_exit:     spin_unlock_irqrestore(&hdlc->state_lock, flags);     return 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 previous timer expired due to protocol fail. If carrier keep no change by if (hdlc->carrier == on)         goto carrier_exit; /* no change 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 noise, and this issue was found and complained by our customers. So it is not my theory guessing, it is a real problem. On Monday, January 22, 2018, 3:25:16 PM EST, David Miller wrote: 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 > > 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 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.