All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steen Hegelund <steen.hegelund@microchip.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Liu Jian <liujian56@huawei.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <lars.povlsen@microchip.com>,
	<daniel.machon@microchip.com>, <UNGLinuxDriver@microchip.com>,
	<horatiu.vultur@microchip.com>, <bjarni.jonasson@microchip.com>,
	<netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH net] net: sparx5: fix error handling in sparx5_port_open()
Date: Thu, 17 Nov 2022 15:29:48 +0100	[thread overview]
Message-ID: <841c618ee79adf50eb9281308d370d5c761f3a05.camel@microchip.com> (raw)
In-Reply-To: <Y3Y0B4umLgFdcD4u@shell.armlinux.org.uk>

Hi Liu and Russell,

Yes, I think we should go over this and do some testing on the platform before taking it in.

On Thu, 2022-11-17 at 13:15 +0000, Russell King (Oracle) wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, Nov 17, 2022 at 08:59:18PM +0800, Liu Jian wrote:
> > If phylink_of_phy_connect() fails, the port should be disabled.
> > If sparx5_serdes_set()/phy_power_on() fails, the port should be
> > disabled and the phylink should be stopped and disconnected.
> > 
> > Fixes: 946e7fd5053a ("net: sparx5: add port module support")
> > Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support")
> > Signed-off-by: Liu Jian <liujian56@huawei.com>
> 
> The patch looks sane for the code structure that's there, but I question
> whether this is the best code structure.
> 
> phylink_start() will call the pcs_config() method, which then goes on
> to call sparx5_port_pcs_set() and sparx5_port_pcs_low_set() - which
> then calls sparx5_serdes_set(). Is that safe with the serdes PHY
> powered down? I think sparx5 maintainers need to think about that,
> and possibly include a comment in the code if it is indeed safe.
> 
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

BR
Steen



WARNING: multiple messages have this Message-ID (diff)
From: Steen Hegelund <steen.hegelund@microchip.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Liu Jian <liujian56@huawei.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <lars.povlsen@microchip.com>,
	<daniel.machon@microchip.com>, <UNGLinuxDriver@microchip.com>,
	<horatiu.vultur@microchip.com>, <bjarni.jonasson@microchip.com>,
	<netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH net] net: sparx5: fix error handling in sparx5_port_open()
Date: Thu, 17 Nov 2022 15:29:48 +0100	[thread overview]
Message-ID: <841c618ee79adf50eb9281308d370d5c761f3a05.camel@microchip.com> (raw)
In-Reply-To: <Y3Y0B4umLgFdcD4u@shell.armlinux.org.uk>

Hi Liu and Russell,

Yes, I think we should go over this and do some testing on the platform before taking it in.

On Thu, 2022-11-17 at 13:15 +0000, Russell King (Oracle) wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, Nov 17, 2022 at 08:59:18PM +0800, Liu Jian wrote:
> > If phylink_of_phy_connect() fails, the port should be disabled.
> > If sparx5_serdes_set()/phy_power_on() fails, the port should be
> > disabled and the phylink should be stopped and disconnected.
> > 
> > Fixes: 946e7fd5053a ("net: sparx5: add port module support")
> > Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support")
> > Signed-off-by: Liu Jian <liujian56@huawei.com>
> 
> The patch looks sane for the code structure that's there, but I question
> whether this is the best code structure.
> 
> phylink_start() will call the pcs_config() method, which then goes on
> to call sparx5_port_pcs_set() and sparx5_port_pcs_low_set() - which
> then calls sparx5_serdes_set(). Is that safe with the serdes PHY
> powered down? I think sparx5 maintainers need to think about that,
> and possibly include a comment in the code if it is indeed safe.
> 
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

BR
Steen



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-17 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 12:59 [PATCH net] net: sparx5: fix error handling in sparx5_port_open() Liu Jian
2022-11-17 12:59 ` Liu Jian
2022-11-17 13:15 ` Russell King (Oracle)
2022-11-17 13:15   ` Russell King (Oracle)
2022-11-17 14:29   ` Steen Hegelund [this message]
2022-11-17 14:29     ` Steen Hegelund
2022-11-22  9:28 ` Steen Hegelund
2022-11-22  9:28   ` Steen Hegelund
2022-11-22 10:10   ` Steen Hegelund
2022-11-22 10:10     ` Steen Hegelund
2022-11-22 10:50 ` patchwork-bot+netdevbpf
2022-11-22 10:50   ` patchwork-bot+netdevbpf

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=841c618ee79adf50eb9281308d370d5c761f3a05.camel@microchip.com \
    --to=steen.hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=bjarni.jonasson@microchip.com \
    --cc=daniel.machon@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=lars.povlsen@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=liujian56@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.