Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp643443lqb; Fri, 24 May 2024 08:55:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcy8hs7Svb+tVUScOTDzYp+KzZmVZGWxz61+kglF00fbYBckj4Jq+fKgPsANsKD0OqgCEbi2A+9zaPC4Kbq/azziLiuhBr9O+Rser6FQ== X-Google-Smtp-Source: AGHT+IGiM9hX3h8BA9hME2KgIJepljGV6ozQhQ4th0vJx2A32le0I6WxPBR3Etg0PEn+dk8yHEOY X-Received: by 2002:a05:6512:34c2:b0:51d:d630:365c with SMTP id 2adb3069b0e04-52965290455mr1802265e87.4.1716566150244; Fri, 24 May 2024 08:55:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716566150; cv=pass; d=google.com; s=arc-20160816; b=z2YHoO1lF88qolO+4nMnL+xPK6BL8Mh5dKNrX/4I4hMBYdc8DTNfloh3y16a/v+pZt QMr1wkpL/2R3Td0J59vjlwTqphD7+ysWQbIIKStcgTD1KttwxieKL6v3j/FFkts8dVuT OgnIbAIuryyohn5o58TEO+3oauphl9SmnbGbNphfD0T8loL+Su4Zv9nVyVFdHfvXXN+o 4zn5f4ZkWevyMxvC6zoQa7S0zgfZ5iINZs8iJVTSxBbqMmhCohBtrWKUmrWPXusAIe6U WIgKP4GZ3GV1kQy8ckk43DQMZFnf1++322/+ccV05DLBGNV8O6qw8Yi/PPQjZIsRKG/I gnSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=b0cNZSS7qsIL3jfLsIaauMYSwAyrlh2OnI7WJcM1lcs=; fh=R/sjI2VxPnTez0hHsUIfYtgiLbDiFOPvxnN29XG6WDw=; b=W68ZTuEc+DExCYjDzKQvaEL2c1M4L8jw6QbYHyNv2lR0r+3YfHjdjjyuHCqVQ+0ygi NeG+akV1ovnjMmY+TVoGvlYtfYD6qm9454zmZLgKX+wz4hWLKjOREjJtPxEtFEyytfby FCDS7996lvSIRBwHWK0KzfLCPmxRn0Zg0qU1qJNNaW9/NfGQsCRZWij6LJpHunZjThx2 DuSALptZBjnX+rI4N863XrlRXkfrZx07Sxt031ctlQ2sndxUhH2AlnXlN1u7ZubFzzmp VdlR5bUp7tKCVhkwJ+R12Xt8waUjdyQdI0f+n5YAI3AFF2FtGet/Z/YFgB5xVyfrdTBZ TJ/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=DmVUYB3H; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-188901-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188901-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc691e6si89595566b.687.2024.05.24.08.55.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 08:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188901-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=DmVUYB3H; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-188901-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188901-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 am.mirrors.kernel.org (Postfix) with ESMTPS id EEECA1F21699 for ; Fri, 24 May 2024 15:55:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E52812EBD7; Fri, 24 May 2024 15:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="DmVUYB3H" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 53B1F12CD81; Fri, 24 May 2024 15:55:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716566130; cv=none; b=GSW9WVK2ShJpknGwiUE63N72hPv6TFzxQFGI2z6Ww9Sn+6+OvTvGV8z2JXz5ceqVvP+5gV0JsOenD8ILxOtIfD8YgdHMmQ1OSgxcmpsvj47AGgWl2GMNv8g3yxip7kTmAVl07wPui131rvDfZ2RS0aYMAHQA8jmImH66mXHczlo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716566130; c=relaxed/simple; bh=zbyfZX6Yga2Bf8bLCvb+bQFlpjWOy0MIq9OjBAmJOiE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jR0HKR7BxNLYLMtX149MVduH0XZKVEjC5yhdBVAvck9JIjvQyAntv9jH0+s4KLfu6/sx5CuD1wVLwIyuLFTj35oNxKMCX4bXLPHyi76EsJBm4XMV0iM3ewgVq94GMgTkrLI10iy4ttXr+O5QRqW4AAky0+u152/1mZkCTHTm3/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=DmVUYB3H; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=b0cNZSS7qsIL3jfLsIaauMYSwAyrlh2OnI7WJcM1lcs=; b=DmVUYB3HfEMWzTXJ4t9hv//EPh YL1lLJZtGKm0xmM/7/bRtHTVS+pJP5ndOYairHHtl2VJpLQnLb2kkl4Ztn4+6Hv8hVx3DqtS7JpCD neEgX4ADUmSOB8OgDt1FW/aALz7ffhWul/iZK1XknLbNvKeNEsAUPZLnuFxKgeN97Z64=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sAXGF-00FxoV-Cv; Fri, 24 May 2024 17:55:15 +0200 Date: Fri, 24 May 2024 17:55:15 +0200 From: Andrew Lunn To: Horatiu Vultur Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, 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> 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 Reviewed-by: Andrew Lunn Andrew