linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@st.com>
To: "Sriram Dash" <sriram.dash@samsung.com>,
	"'Heiko Stübner'" <heiko@sntech.de>,
	"'Florian Fainelli'" <f.fainelli@gmail.com>,
	"'David Miller'" <davem@davemloft.net>
Cc: "Jose.Abreu@synopsys.com" <Jose.Abreu@synopsys.com>,
	"jayati.sahu@samsung.com" <jayati.sahu@samsung.com>,
	"rcsekar@samsung.com" <rcsekar@samsung.com>,
	"pankaj.dubey@samsung.com" <pankaj.dubey@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"p.rajanbabu@samsung.com" <p.rajanbabu@samsung.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Peppe CAVALLARO <peppe.cavallaro@st.com>,
	"linux-stm32@st-md-mailman.stormreply.com"
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Linux-stm32] [PATCH] net: stmmac: platform: Fix MDIO init for platforms without PHY
Date: Tue, 7 Jan 2020 13:15:13 +0000	[thread overview]
Message-ID: <6c657b5e-b4fb-551c-080a-18f04ac2dba3@st.com> (raw)
In-Reply-To: <011901d5c51c$1f93be30$5ebb3a90$@samsung.com>

Hi All

On 1/7/20 6:34 AM, Sriram Dash wrote:
>> From: Heiko Stübner <heiko@sntech.de>
>> Subject: Re: [PATCH] net: stmmac: platform: Fix MDIO init for platforms
> without
>> PHY
>>
>> Hi Florian,
>>
>> Am Sonntag, 5. Januar 2020, 23:22:00 CET schrieb Florian Fainelli:
>>> On 1/5/2020 12:43 PM, Heiko Stübner wrote:
>>>> Am Samstag, 21. Dezember 2019, 06:29:18 CET schrieb David Miller:
>>>>> From: Padmanabhan Rajanbabu <p.rajanbabu@samsung.com>
>>>>> Date: Thu, 19 Dec 2019 15:47:01 +0530
>>>>>
>>>>>> The current implementation of "stmmac_dt_phy" function initializes
>>>>>> the MDIO platform bus data, even in the absence of PHY. This fix
>>>>>> will skip MDIO initialization if there is no PHY present.
>>>>>>
>>>>>> Fixes: 7437127 ("net: stmmac: Convert to phylink and remove phylib
>>>>>> logic")
>>>>>> Acked-by: Jayati Sahu <jayati.sahu@samsung.com>
>>>>>> Signed-off-by: Sriram Dash <sriram.dash@samsung.com>
>>>>>> Signed-off-by: Padmanabhan Rajanbabu <p.rajanbabu@samsung.com>
>>>>> Applied and queued up for -stable, thanks.
>>>> with this patch applied I now run into issues on multiple rockchip
>>>> platforms using a gmac interface.
>>> Do you have a list of DTS files that are affected by any chance? For
>>> the 32-bit platforms that I looked it, it seems like:
>>>
> Hi Florian, 
> We have listed down the platforms which will break for as they don't have
> the mdio / snps,dwmac-mdio node.
> Arm32 spear* , Arm32 ox820*, arm32 rv1108, arc abilis* , arc axs10x*, arc
> vdk_axs10x*, mips pistachio, arm64 rockchip/px30* There might be more
> platforms.

STiH410-B2260 is affected by this patch, i proposed a fix for this board :

https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=224639

David, will you applied this DT series in your tree ?

Thanks

Patrice


>
>>> arch/arm/boot/dts/rk3228-evb.dts is OK because it has a MDIO bus node
>>> arch/arm/boot/dts/rk3229-xms6.dts is also OK
>>>
>>> arch/arm/boot/dts/rk3229-evb.dts is probably broken, there is no
>>> phy-handle property or MDIO bus node, so it must be relying on
>>> auto-scanning of the bus somehow that this patch broke.
>>>
>>> And likewise for most 64-bit platforms except a1 and nanopi4.
>> I primarily noticed that on the px30-evb.dts and the internal board I'm
> working
>> on right now. Both don't have that mdio bus node right now.
>>
>>
>>>> When probing the driver and trying to establish a connection for a
>>>> nfsroot it always runs into a null pointer in mdiobus_get_phy():
>>>>
>>>> [   26.878839] rk_gmac-dwmac ff360000.ethernet: IRQ eth_wake_irq not
>> found
>>>> [   26.886322] rk_gmac-dwmac ff360000.ethernet: IRQ eth_lpi not found
>>>> [   26.894505] rk_gmac-dwmac ff360000.ethernet: PTP uses main clock
>>>> [   26.908209] rk_gmac-dwmac ff360000.ethernet: clock input or output?
>> (output).
> ... snip ...
>
>>>>
>>>> This is torvalds git head and it was still working at -rc1 and all
>>>> kernels before that. When I just revert this commit, things also
>>>> start working again, so I guess something must be wrong here?
>>> Yes, this was also identified to be problematic by the kernelci boot
>>> farms on another platform, see [1].
>>>
>>> [1]:
>>> https://lore.kernel.org/linux-arm-kernel/5e0314da.1c69fb81.a7d63.29c1@
>>> mx.google.com/
>>>
>>> Do you mind trying this patch and letting me know if it works for you.
>>> Sriram, please also try it on your platforms and let me know if solves
>>> the problem you were after. Thanks
>> Works on both boards I had that were affected, so
>> Tested-by: Heiko Stuebner <heiko@sntech.de>
> Nacked-by : Sriram Dash <Sriram.dash@samsung.com>
>
>>
>> Thanks
>> Heiko
>>
>>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>>> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>>> index cc8d7e7bf9ac..e192b8e0809e 100644
>>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>>> @@ -320,7 +320,7 @@ static int stmmac_mtl_setup(struct platform_device
>>> *pdev,  static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
>>>                          struct device_node *np, struct device *dev)
>>> {
>>> -       bool mdio = false;
>>> +       bool mdio = true;
>>>         static const struct of_device_id need_mdio_ids[] = {
>>>                 { .compatible = "snps,dwc-qos-ethernet-4.10" },
>>>                 {},
>>> @@ -341,8 +341,9 @@ static int stmmac_dt_phy(struct
>>> plat_stmmacenet_data *plat,
>>>         }
>>>
>>>         if (plat->mdio_node) {
> For the platforms which neither have mdio nor snps,dwmac-mdio property in
> dt, they will not enter the block.
> plat->mdio_node will always be false for them. Which, essentially, preserves
> the mdio variable Boolean value defined at the start of the function.
>
>>> -               dev_dbg(dev, "Found MDIO subnode\n");
>>> -               mdio = true;
>>> +               mdio = of_device_is_available(plat->mdio_node);
>>> +               dev_dbg(dev, "Found MDIO subnode, status: %sabled\n",
>>> +                       mdio ? "en" : "dis");
>>>         }
>>>
>>>         if (mdio) {
>>>
>>
>>
> There is a proposal for this problem solution. You can refer it at :
> https://lkml.org/lkml/2020/1/7/14
>
>
>
> _______________________________________________
> Linux-stm32 mailing list
> Linux-stm32@st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-07 13:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191219102407epcas5p103b26e6fb191f7135d870a3449115c89@epcas5p1.samsung.com>
2019-12-19 10:17 ` [PATCH] net: stmmac: platform: Fix MDIO init for platforms without PHY Padmanabhan Rajanbabu
2019-12-21  5:29   ` David Miller
2020-01-05 20:43     ` Heiko Stübner
2020-01-05 22:22       ` Florian Fainelli
2020-01-05 23:05         ` Heiko Stübner
2020-01-06 20:50           ` Florian Fainelli
2020-01-07  5:34           ` Sriram Dash
2020-01-07 13:15             ` Patrice CHOTARD [this message]
2020-01-07 13:28               ` [Linux-stm32] " Patrice CHOTARD
2020-01-13 13:19                 ` Leonidas P. Papadakos
2020-01-13 13:21                   ` Jose Abreu

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=6c657b5e-b4fb-551c-080a-18f04ac2dba3@st.com \
    --to=patrice.chotard@st.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=heiko@sntech.de \
    --cc=jayati.sahu@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.rajanbabu@samsung.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=peppe.cavallaro@st.com \
    --cc=rcsekar@samsung.com \
    --cc=sriram.dash@samsung.com \
    --cc=stable@vger.kernel.org \
    /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).