From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, vivien.didelot@gmail.com,
davem@davemloft.net,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: Re: [PATCH net-next 2/2] net: dsa: bcm_sf2: Add support for optional reset controller line
Date: Mon, 4 Nov 2019 13:33:35 -0800 [thread overview]
Message-ID: <4808c8d7-8f26-989b-033f-65d161e13b41@gmail.com> (raw)
In-Reply-To: <20191104204847.GB17620@lunn.ch>
On 11/4/19 12:48 PM, Andrew Lunn wrote:
>> @@ -350,6 +350,18 @@ static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv)
>> {
>> unsigned int timeout = 1000;
>> u32 reg;
>> + int ret;
>> +
>> + /* The watchdog reset does not work on 7278, we need to hit the
>> + * "external" reset line through the reset controller.
>> + */
>> + if (priv->type == BCM7278_DEVICE_ID && !IS_ERR(priv->rcdev)) {
>> + ret = reset_control_assert(priv->rcdev);
>> + if (ret)
>> + return ret;
>> +
>> + return reset_control_deassert(priv->rcdev);
>
> Hi Florian
>
> Here you do it conditional on priv->type
>
>> @@ -1223,6 +1240,8 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
>> /* Disable all ports and interrupts */
>> bcm_sf2_sw_suspend(priv->dev->ds);
>> bcm_sf2_mdio_unregister(priv);
>> + if (!IS_ERR(priv->rcdev))
>> + reset_control_assert(priv->rcdev);
>
> And here it is unconditional. Seem a bit inconsistent. If it is in DT,
> why not use it?
That's an oversight, thanks for spotting that, v2 coming shortly.
--
Florian
prev parent reply other threads:[~2019-11-04 21:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 18:42 [PATCH net-next 0/2] net: dsa: bcm_sf2: Add support for optional reset controller line Florian Fainelli
2019-11-04 18:42 ` [PATCH net-next 1/2] dt-bindings: net: Describe BCM7445 switch reset property Florian Fainelli
2019-11-04 21:34 ` Andrew Lunn
2019-11-04 18:42 ` [PATCH net-next 2/2] net: dsa: bcm_sf2: Add support for optional reset controller line Florian Fainelli
2019-11-04 20:48 ` Andrew Lunn
2019-11-04 21:33 ` Florian Fainelli [this message]
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=4808c8d7-8f26-989b-033f-65d161e13b41@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).