From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F089FC6FA82 for ; Tue, 13 Sep 2022 07:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231243AbiIMHsN (ORCPT ); Tue, 13 Sep 2022 03:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbiIMHsL (ORCPT ); Tue, 13 Sep 2022 03:48:11 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3546A5A3C8 for ; Tue, 13 Sep 2022 00:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4adA3WGta17K9Xm/Y7x7sihozZeoygCz4taXNK2AlN8=; b=SEbmuyUo3echOtiLDeRaVOgyvw Ax6FG7UVUzFFTctGXgIdtjkPyiuepxRgu6EsKRPjd4GU/m8g5izi+Upp9aBbtW1qbyIsQzH6vWs1z G9jzwivX93uEd22LaQNwYmt4QrPEgWJjpkTd+qf2KEpQTqhEsoA6VrJaLBwFAe09E4TQpOzkdg7IL RZXSqNprQtExSvZrsUtu9CvS8D54LJnzkjtJ5klUt3gddpLqDbS2EujasZoMaxKGKo50LYUrQQDf+ LNWbHw4K0AC5wXEHjGWAof6/VjpvcBz7uw2nWINeYxeHGromvo8K/Zr3b+0QDSgs7lB58KXPZygmY Hf3QdtHg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34288) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oY0eI-0002ar-KK; Tue, 13 Sep 2022 08:48:02 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oY0eH-0000Vv-ET; Tue, 13 Sep 2022 08:48:01 +0100 Date: Tue, 13 Sep 2022 08:48:01 +0100 From: "Russell King (Oracle)" To: Baruch Siach Cc: netdev@vger.kernel.org, Andrew Lunn , Baruch Siach Subject: Re: [PATCH] net: sfp: workaround GPIO input signals bounce Message-ID: References: <5934427dadd3065b125b80c38a111320677fa723.1663055018.git.baruch@tkos.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5934427dadd3065b125b80c38a111320677fa723.1663055018.git.baruch@tkos.co.il> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Sep 13, 2022 at 10:43:38AM +0300, Baruch Siach wrote: > From: Baruch Siach > > Add a trivial debounce to avoid miss of state changes when there is no > proper hardware debounce on the input signals. Otherwise a GPIO might > randomly indicate high level when the signal is actually going down, > and vice versa. > > This fixes observed miss of link up event when LOS signal goes down on > Armada 8040 based system with an optical SFP module. NAK. This needs more inteligent handling. For systems where we poll, your code introduces a 100us delay each time we poll and there has been no change. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!