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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9EA3C43381 for ; Sun, 24 Feb 2019 17:57:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7C6520652 for ; Sun, 24 Feb 2019 17:57:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="3ScxrsWJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727594AbfBXR5N (ORCPT ); Sun, 24 Feb 2019 12:57:13 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:36914 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbfBXR5N (ORCPT ); Sun, 24 Feb 2019 12:57:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender: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=gMjMulprno8asu8uLs7cltnM23B/KE5kVZipd/pI2gA=; b=3ScxrsWJpUD9bvDxH/Ub8d2mdk Dq+Biv09jeJeXQ6u8iSv7iQFnk1QcZnMjdGprN9mwuafRHpD/OeEAbwSYdqEEWiu7mmObemmCVL8x xjjgP/RwfYciFUCWyh10pUXYrX1lf+epzQUJ4wJPROXc5uXR04diVQPEnOQgCsRRDy4c=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1gxy1W-0004nN-DB; Sun, 24 Feb 2019 18:57:10 +0100 Date: Sun, 24 Feb 2019 18:57:10 +0100 From: Andrew Lunn To: Heiner Kallweit Cc: Florian Fainelli , David Miller , "netdev@vger.kernel.org" Subject: Re: [PATCH net] net: phy: fix reading fixed phy status Message-ID: <20190224175710.GL26626@lunn.ch> References: <7ab8732d-bcc1-cc49-4bc8-34826e78038b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ab8732d-bcc1-cc49-4bc8-34826e78038b@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Feb 24, 2019 at 06:01:18PM +0100, Heiner Kallweit wrote: > With the switch to phy_resolve_aneg_linkmode() we don't read from the > chip any longer what is advertised but use phydev->advertising directly. > For a fixed phy however this bitmap is empty so far, what results in > no common mode being found. This breaks DSA. Fix this by advertising > everything that is supported. For a normal phy this done by phy_probe(). > > Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") > Signed-off-by: Heiner Kallweit Tested-by: Andrew Lunn But i tested on net-next, not net. Andrew > --- > drivers/net/phy/fixed_phy.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c > index b0d1368c3..1acd8bfdb 100644 > --- a/drivers/net/phy/fixed_phy.c > +++ b/drivers/net/phy/fixed_phy.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > > #include "swphy.h" > > @@ -300,6 +301,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq, > phy->supported); > } > > + linkmode_copy(phy->advertising, phy->supported); > + > ret = phy_device_register(phy); > if (ret) { > phy_device_free(phy); > -- > 2.20.1 >