Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp459099ybl; Tue, 28 Jan 2020 06:18:22 -0800 (PST) X-Google-Smtp-Source: APXvYqz19RwMsFK8hXhDPjkblUitHp7iPLMXGI3/OIsIzcjAWqa+Q9+gVciuzhDVsINUqxDqBgbg X-Received: by 2002:aca:2307:: with SMTP id e7mr1076011oie.163.1580221102126; Tue, 28 Jan 2020 06:18:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221102; cv=none; d=google.com; s=arc-20160816; b=lHNLzCSuLOTFrgbu5Itnh2Mr+rC57rI6/Jp0aus76U8APVoHB3m4w1SWaN9epgDGTE R3EKA6O2ukynpx5ZZDdGNeDc+iIwK1hjzmvvdjfMM6L/yuRFTDB1UPMS06Nz53inyQiQ RIejvWFXqAqpPjSA4nRLI8+Hm2EaXNliK0wl6G7yu8EEWqfhvDQRzYGhetpldHsqvE1A TxPkgkPLfbIrcSWDF9/OyycYjmzSBYCWmgqtsQMTdLcU3F3kdKU3PhHBNNF1k1XYn9Ht Q4Hg5tND7AbFWOzcCBI5X72bmS1BWvgccA5WBAR2brwBTGuO9W3qgKZlWoJHy0CmhgQ9 cLog== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GjZQpfrHt0J9FKMAQZ5LbVVYsOUIKe8HnrXktGRMW8M=; b=vdbfkw8YtsjEcsizFV68y6yocLl4bEcrAXC87YWvMRHPzv6k/2sbJZj230bn3NG9nf ce35bpWnYMPn59DlGnp31w24bGJ9wn2Vq2H0YoPonfgE2hZnAZqZuRrLPiiV5tCJUfyJ R6YSoBQh3IyaCN4Z24a9J0UWZIEodAgILU/fl6jrMvaWfGSi0pnmNHMI2iB/qBJMl8BE 2HocczMreHViGoH5IDbnCoBgEgYhqe9Ju2yXmlmptozAHLhMEaiwAdSpngTnCSy/gWuO pl9b0WPlLVLCGn8YuFzBW7Lfrvzj71JwJsat5IeQeECHR5lZmK9bes1anz4+7Fg/vjw+ JCXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y6O8YdmD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c67si1678503oib.276.2020.01.28.06.18.09; Tue, 28 Jan 2020 06:18:22 -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=@kernel.org header.s=default header.b=Y6O8YdmD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730496AbgA1ORQ (ORCPT + 99 others); Tue, 28 Jan 2020 09:17:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:40938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729986AbgA1ORP (ORCPT ); Tue, 28 Jan 2020 09:17:15 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A5B324688; Tue, 28 Jan 2020 14:17:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221034; bh=5htcjhtbHdq0Ost+KCtaiwAzMuhIrqKE1/rT2KnWr9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y6O8YdmD+HeY8ySsh9ZBd1Jwn/Bg44kxW6TRJXetKo//D6d8xeaet2Z3H96K1UJvg DMoXbJZ8lqCAfn3Bn+dvVZl6no6UNN/WCGdOiUXWoOH1qVy41HFRBFlxfKrtifyHIZ 0jAPJshL+1lJG4DGUvP2rh+egyzc0hqbYc4/GXKM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Moritz Fischer , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 061/271] net: phy: fixed_phy: Fix fixed_phy not checking GPIO Date: Tue, 28 Jan 2020 15:03:30 +0100 Message-Id: <20200128135857.168617889@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Moritz Fischer [ Upstream commit 8f289805616e81f7c1690931aa8a586c76f4fa88 ] Fix fixed_phy not checking GPIO if no link_update callback is registered. In the original version all users registered a link_update callback so the issue was masked. Fixes: a5597008dbc2 ("phy: fixed_phy: Add gpio to determine link up/down.") Reviewed-by: Andrew Lunn Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/phy/fixed_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c index eb51672106811..3ab2eb677a599 100644 --- a/drivers/net/phy/fixed_phy.c +++ b/drivers/net/phy/fixed_phy.c @@ -67,11 +67,11 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) do { s = read_seqcount_begin(&fp->seqcount); /* Issue callback if user registered it. */ - if (fp->link_update) { + if (fp->link_update) fp->link_update(fp->phydev->attached_dev, &fp->status); - fixed_phy_update(fp); - } + /* Check the GPIO for change in status */ + fixed_phy_update(fp); state = fp->status; } while (read_seqcount_retry(&fp->seqcount, s)); -- 2.20.1