Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp645144lqb; Fri, 24 May 2024 08:59:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGOiTnEGPsnrl8C1cDT9YCGSiAptghN/gD1HOewsowj2ryJYI11chTFCnKj1BUF8P5kvS8kLTx5KlHXzPi3p2twXBEBNpLCE1yz0d+4w== X-Google-Smtp-Source: AGHT+IFKOH1WRqvv+ejhZ/HY88rA7UBoDzNwsY/l2+zA/E1dt+0X2S2ynZRNsBDETF3B5N3uFCgt X-Received: by 2002:a05:6e02:1a46:b0:36b:85e:7d69 with SMTP id e9e14a558f8ab-3737b292328mr39199195ab.10.1716566340995; Fri, 24 May 2024 08:59:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716566340; cv=pass; d=google.com; s=arc-20160816; b=Pwq0XR4KI/1gUG4nK7jv/x5v+VgoPwBp7RPKWgcPQB52kPmhMzUVL4CfzHCy+t3Sql J8+xaTloo2QqxBQvF5I0GJmDNQ3aAGmwUZnE6atLM+tf5gSksQfJGm5jAq0nSK2DjIDv wvg00ODgen96X28AGXz7H6AJo8wOe3fjV4jWDeXRIooDfPv3d/EyTW0qNjg1YQ3+ZA29 J2+fUI9WFKQYyk5cNdHM6WAe96xO/wwYthsir6X/ifcBAcRxeXraQhZ634TVkt/GRHPv BkjG7EMbdupi7zA4/q3ejGntciQq8MzcmpfbZ5O3qKoNG+hMAMfUoDflQLEreNgZ4DBY yJ8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=etSydXL6tXHFa81kbUBjj0DUGgJuvxzCEq1M2WtotB0=; fh=/YJv4wK3c68M+xo1cPVj0zhvALwtNqsfTWC56tMEsdk=; b=AzBWb7t9UixhPQ7L7OXRlYxpT6TwbCJ/KvzBJWx+bnha5Va6HVN2p0pS1KCYUoaik5 X/+0yx1ypr0SwjhVQ1b8a6wdRb+MvcKgVzENeL0G8x8ALdfxk35m2FH4rGWx+9LRuoi8 +QMqNHdpi87gsHTRk93rs+/5aK2t1ltJBt4TVhAfRpddPBRFsUMpvr+3O6ansok80c6W ycn4NkFD7PA+FNtbrXCHT3ECQjoH2TcA/bpHflqIQKTvHmpoyTENzxwoEfk+s2I0M7FL tmTE3dZjbfCUhgo6pMjieKScdUd7LEvWbWTYzDJbzacGUPTpv5DLW0opEK4xtVMUNlbp 9m3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="ReUg/wOb"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-188903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-682287f1ed4si1465243a12.475.2024.05.24.08.59.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 08:59:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="ReUg/wOb"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-188903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 847E0B228CF for ; Fri, 24 May 2024 15:58:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E348712E1E7; Fri, 24 May 2024 15:57:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="ReUg/wOb" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C83C712E1C2; Fri, 24 May 2024 15:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716566273; cv=none; b=Orb0e55s2fRcgUnpGM7yjYgsLx+UKosvOFghwBS3WzvnLAc5KHCf16jpRi2XIEEEA5ak7w/VwrR37jEAx6ergIiTWDBArqNpoEmzkJR9WAlZcCh0X35F2gtx9PTSTuWl5haL4RyOp4PvYuEpy9W/aNh+nQT6wKHUDsm4LqG2/YY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716566273; c=relaxed/simple; bh=kfIIi857EybpxBimqI/wHunoGzeTcbPROPA9FGNUzsc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WvhCC768xlu7Zvpb+1Zfkoa4+Iod9ZTBOvWp5X8dC/+26/9zLmysB6OtgDQCrI7BKpEARfBkTXdlCwPse2ouSxebgWmV2VlMHtJSQ48QjLU1Jmk6vmKSG4UupAfPVdgV97D0qWNQYYOjRjuzYGWDhP4A13kdyHzHutXdOcGLBhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=ReUg/wOb; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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=etSydXL6tXHFa81kbUBjj0DUGgJuvxzCEq1M2WtotB0=; b=ReUg/wObEt+ltc/5I9cAUEALuM 9PHtfWthwH3KhBCBC4xjVJPC6OBRqGCSemSIJSOyn+ar8zl8+KMP9tsUptUyiLAatlbCBG2mfETJl 4hk5nfRUanX3aS8k0btrjL4oGqVMMxeG8Z86Up2m6bbIxgldDO3TNiApdCrhbPOij9JTsfy+tgVir EFxp4lBXmxiwmbL1Y7ArJoGnQWFTxbPN8u3NIqRHqAA8W3fERSwgqL6x48OvZxM21xTBMt3NYJD9z uIrQ5xHpFSOPmJEKIVLgzwXe72zSWQMDQEQXCBN/nN+repU4XVb9IVe+Um8nv/Wz96mvpz1R53rsH NgoUYrRA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:37468) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sAXIX-0005Vl-30; Fri, 24 May 2024 16:57:37 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sAXIY-00084S-7T; Fri, 24 May 2024 16:57:38 +0100 Date: Fri, 24 May 2024 16:57:38 +0100 From: "Russell King (Oracle)" To: Horatiu Vultur Cc: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, sumang@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v2] net: micrel: Fix lan8841_config_intr after getting out of sleep mode Message-ID: References: <20240524085350.359812-1-horatiu.vultur@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524085350.359812-1-horatiu.vultur@microchip.com> Sender: Russell King (Oracle) On Fri, May 24, 2024 at 10:53:50AM +0200, Horatiu Vultur wrote: > When the interrupt is enabled, the function lan8841_config_intr tries to > clear any pending interrupts by reading the interrupt status, then > checks the return value for errors and then continue to enable the > interrupt. It has been seen that once the system gets out of sleep mode, > the interrupt status has the value 0x400 meaning that the PHY detected > that the link was in low power. That is correct value but the problem is > that the check is wrong. We try to check for errors but we return an > error also in this case which is not an error. Therefore fix this by > returning only when there is an error. > > Fixes: a8f1a19d27ef ("net: micrel: Add support for lan8841 PHY") > Signed-off-by: Horatiu Vultur LGTM. Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!