Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7438402ybn; Mon, 30 Sep 2019 13:58:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxw2w0q5xtxmjGmU3SjBCPo8o1p12Z5oNtjvy87cCBR5QxKw6mf4qSonjdLU4M4BzFzbRCt X-Received: by 2002:a50:a532:: with SMTP id y47mr21714368edb.273.1569877126674; Mon, 30 Sep 2019 13:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569877126; cv=none; d=google.com; s=arc-20160816; b=Ml0NG5PwPIWwmkbemXKJ/L7vey+BlVLiahmZxuTNXNMEDCa60KcYiQj6+9y8tRNl7g 2gm0xxLY0sIJJHZNF9IXC/6mfyUBCcEoUCTPOQdlSRsO9WcCf1xfAem8mGs2rokErPw4 Aa9egvFYGT0QkmckrMSaqAXADeFByG80QtPz4m0qrj1/RW1kCEzcU9HVBRBRrsXcgaFO 0xr8V7gEsMYWI6MpTndQATIQW0UewN+l1qY5nQT/Hepg64YybFqHW6RYB7tRSTac8f6V sGT7zhEXsqWnrfSenymi8UFmSL9rUKPnTffC+uH0dsIPpFPA+OMhhYwW6p7LMQvkS/Hj rJog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=imf44N8f1silJVmleLpPaeu7hk9rzuZNoqIcXY2FFtc=; b=Wwg++OSnadjPjmgcy6B6aS4gP+PjpJUBxEOrUfJOsr9K4/t59h61HzHMZgYIJsDusZ 2XlysnDLzG7YGAEubXMdKgqBDWIgIfvDHwmJ4gRhazd/vA/gRJMgQyH6gSBtpxqlNffr ZuTtiZabPhKsnqoFjiXtPC6sCpLLptOWWDGBpnKX7fP9AgD5YimYP6srzZdJQo2QES4t CylTdqMbls6cu1mU9M+PJUwIdGE0Qx0InIcTuf/aS4rZGgfBGtzhyuJPPHyf6I5rcRPQ EDfLuyLEKKWEbNlbvHL/SAFosqV43+NdreEr6jhSzQ6fVFFYs6U2tNP+KYozemD2d5dJ G1mQ== ARC-Authentication-Results: i=1; mx.google.com; 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 h91si8159348edd.270.2019.09.30.13.58.21; Mon, 30 Sep 2019 13:58:46 -0700 (PDT) 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; 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 S1731777AbfI3U5N convert rfc822-to-8bit (ORCPT + 99 others); Mon, 30 Sep 2019 16:57:13 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:41881 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730751AbfI3U5M (ORCPT ); Mon, 30 Sep 2019 16:57:12 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iEzqk-00015W-B5; Mon, 30 Sep 2019 19:52:42 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iEzqi-0004zx-TB; Mon, 30 Sep 2019 19:52:40 +0200 Date: Mon, 30 Sep 2019 19:52:40 +0200 From: Oleksij Rempel To: Andrew Lunn Cc: Jay Cliburn , Chris Snook , linux-kernel@vger.kernel.org, Pengutronix Kernel Team , netdev@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH v1] net: ag71xx: fix mdio subnode support Message-ID: <20190930175240.hfujxyst475wftzt@pengutronix.de> References: <20190930093310.10762-1-o.rempel@pengutronix.de> <20190930134209.GB14745@lunn.ch> <20190930142907.wo3tahtg7g7mvfmp@pengutronix.de> <20190930162557.GB15343@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20190930162557.GB15343@lunn.ch> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 19:52:14 up 136 days, 10 min, 87 users, load average: 0.00, 0.00, 0.00 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 06:25:57PM +0200, Andrew Lunn wrote: > On Mon, Sep 30, 2019 at 04:29:07PM +0200, Oleksij Rempel wrote: > > On Mon, Sep 30, 2019 at 03:42:09PM +0200, Andrew Lunn wrote: > > > On Mon, Sep 30, 2019 at 11:33:10AM +0200, Oleksij Rempel wrote: > > > > The driver was working with fixed phy without any noticeable issues. This bug > > > > was uncovered by introducing dsa ar9331-switch driver. > > > > > > > > Signed-off-by: Oleksij Rempel > > > > --- > > > > drivers/net/ethernet/atheros/ag71xx.c | 6 ++++-- > > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c > > > > index 6703960c7cf5..d1101eea15c2 100644 > > > > --- a/drivers/net/ethernet/atheros/ag71xx.c > > > > +++ b/drivers/net/ethernet/atheros/ag71xx.c > > > > @@ -526,7 +526,7 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) > > > > struct device *dev = &ag->pdev->dev; > > > > struct net_device *ndev = ag->ndev; > > > > static struct mii_bus *mii_bus; > > > > - struct device_node *np; > > > > + struct device_node *np, *mnp; > > > > int err; > > > > > > > > np = dev->of_node; > > > > @@ -571,7 +571,9 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) > > > > msleep(200); > > > > } > > > > > > > > - err = of_mdiobus_register(mii_bus, np); > > > > + mnp = of_get_child_by_name(np, "mdio"); > > > > + err = of_mdiobus_register(mii_bus, mnp); > > > > + of_node_put(mnp); > > > > if (err) > > > > goto mdio_err_put_clk; > > > > > > Hi Oleksij > > > > > > You need to keep backwards compatibility here. If you find an mdio > > > node, use it, but if not, you need to still register np. > > > > > > This is also extending the driver binding, so you need to update the > > > binding documentation. > > > > Hi Andrew, > > > > Normally i would agree. But in this case: > > - this driver is freshly added to the kernel and is different to OpenWrt > > implementation any way. No users from this side. > > - Devicetree binding says: > > Documentation/devicetree/bindings/net/qca,ar71xx.txt > > |Optional properties: > > |- phy-handle : phandle to the PHY device connected to this device. > > |- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory. > > | Use instead of phy-handle. > > | > > |Optional subnodes: > > |- mdio : specifies the mdio bus, used as a container for phy nodes > > | according to phy.txt in the same directory > > > > So, it is driver bug ...ooOO (my personal bug :D) > > Hi Oleksij > > Ah, O.K. You should of explained that in the commit message. > > Is the mdio support just in -rc, or is it older? > > You need to add a Fixes: tag. > > The patch subject should be [PATCH net] to indicate this is a fix to > the net tree > > The patch should be against net, not next-next. Ok. thx! i'll fix it. -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |