From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>, Andrew Lunn <andrew@lunn.ch>,
Jason Cooper <jason@lakedaemon.net>,
devicetree@vger.kernel.org, Grzegorz Jaszczyk <jaz@semihalf.com>,
Gregory Clement <gregory.clement@bootlin.com>,
linux-kernel@vger.kernel.org, Evan Wang <xswang@marvell.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
"Nadav Haklai \(Marvell\)" <nadavh@marvell.com>,
Rob Herring <robh+dt@kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Marcin Wojtas <mw@semihalf.com>,
linux-arm-kernel@lists.infradead.org,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 2/6] phy: add A3700 COMPHY support
Date: Thu, 29 Nov 2018 16:16:43 +0000 [thread overview]
Message-ID: <20181129161643.GZ30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20181129171245.4f683045@xps13>
On Thu, Nov 29, 2018 at 05:12:45PM +0100, Miquel Raynal wrote:
> Hello,
>
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 22 Nov 2018
> 22:04:16 +0100:
> > +static struct phy *mvebu_a3700_comphy_xlate(struct device *dev,
> > + struct of_phandle_args *args)
> > +{
> > + struct mvebu_a3700_comphy_lane *lane;
> > + struct phy *phy;
> > +
> > + if (WARN_ON(args->args[0] >= MVEBU_A3700_COMPHY_PORTS))
> > + return ERR_PTR(-EINVAL);
> > +
> > + phy = of_phy_simple_xlate(dev, args);
> > + if (IS_ERR(phy))
> > + return phy;
> > +
> > + lane = phy_get_drvdata(phy);
> > + if (lane->port >= 0)
> > + return ERR_PTR(-EBUSY);
>
> This is not valid. It works only the first time the consumer gets
> a PHY for this lane. If the consumer put the PHY (module is unloaded)
> and then gets the PHY again (module is re-loaded a second time), the
> port is already set to != -1 and this will exit with an error and
> prevent the module to probe.
>
> > +
> > + lane->port = args->args[0];
>
> I will remove the above check and transform it into a valid "port"
> value right here.
Please note that mvebu_comphy_xlate() in
drivers/phy/marvell/phy-mvebu-cp110-comphy.c does exactly the same.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-11-29 16:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 21:04 [PATCH 0/6] Add Armada 3700 COMPHY support Miquel Raynal
2018-11-22 21:04 ` [PATCH 1/6] phy: enumerate SATA PHY mode Miquel Raynal
2018-11-22 21:04 ` [PATCH 2/6] phy: add A3700 COMPHY support Miquel Raynal
2018-11-23 8:30 ` Miquel Raynal
2018-11-29 16:12 ` Miquel Raynal
2018-11-29 16:16 ` Russell King - ARM Linux [this message]
2018-11-22 21:04 ` [PATCH 3/6] dt-bindings: phy: mvebu-comphy: extend the file to describe a3700 bindings Miquel Raynal
2018-11-22 21:04 ` [PATCH 4/6] MAINTAINERS: phy: add entry for Armada 3700 COMPHY driver Miquel Raynal
2018-11-22 21:04 ` [PATCH 5/6] ARM64: dts: marvell: armada-37xx: fix SATA node scope Miquel Raynal
2018-11-22 21:04 ` [PATCH 6/6] ARM64: dts: marvell: armada-37xx: declare the COMPHY node Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181129161643.GZ30658@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=jaz@semihalf.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=miquel.raynal@bootlin.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=xswang@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox