From: <Arun.Ramadoss@microchip.com>
To: <andrew@lunn.ch>, <yoshihiro.shimoda.uh@renesas.com>,
<linux@armlinux.org.uk>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@google.com>, <davem@davemloft.net>,
<hkallweit1@gmail.com>
Cc: <netdev@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH net-next v2 2/4] net: ethernet: renesas: rswitch: Simplify struct phy * handling
Date: Tue, 10 Jan 2023 14:15:29 +0000 [thread overview]
Message-ID: <8f29ef6f855d965cf86fc776cbfc463c7d20258f.camel@microchip.com> (raw)
In-Reply-To: <20230110050206.116110-3-yoshihiro.shimoda.uh@renesas.com>
Hi Yoshihiro,
On Tue, 2023-01-10 at 14:02 +0900, Yoshihiro Shimoda wrote:
> Simplify struct phy *serdes handling by keeping the valiable in
> the struct rswitch_device.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
> drivers/net/ethernet/renesas/rswitch.c | 40 ++++++++++++----------
> ----
> drivers/net/ethernet/renesas/rswitch.h | 1 +
> 2 files changed, 19 insertions(+), 22 deletions(-)
>
>
>
> -static int rswitch_serdes_set_params(struct rswitch_device *rdev)
>
>
> static int rswitch_ether_port_init_one(struct rswitch_device *rdev)
> @@ -1299,6 +1290,10 @@ static int rswitch_ether_port_init_one(struct
> rswitch_device *rdev)
> if (err < 0)
> goto err_phylink_init;
>
> + err = rswitch_serdes_phy_get(rdev);
> + if (err < 0)
> + goto err_serdes_phy_get;
I think, we can use *err_serdes_set_params* instead of creating new
label err_serdes_phy_get, since the label is not doing any work.
> +
> err = rswitch_serdes_set_params(rdev);
> if (err < 0)
> goto err_serdes_set_params;
> @@ -1306,6 +1301,7 @@ static int rswitch_ether_port_init_one(struct
> rswitch_device *rdev)
> return 0;
>
> err_serdes_set_params:
> +err_serdes_phy_get:
> rswitch_phylink_deinit(rdev);
>
> err_phylink_init:
> diff --git a/drivers/net/ethernet/renesas/rswitch.h
> b/drivers/net/ethernet/renesas/rswitch.h
> index edbdd1b98d3d..d9a0be6666f5 100644
> --- a/drivers/net/ethernet/renesas/rswitch.h
> +++ b/drivers/net/ethernet/renesas/rswitch.h
> @@ -941,6 +941,7 @@ struct rswitch_device {
>
> int port;
> struct rswitch_etha *etha;
> + struct phy *serdes;
> };
>
> struct rswitch_mfwd_mac_table_entry {
next prev parent reply other threads:[~2023-01-10 14:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 5:02 [PATCH net-next v2 0/4] net: ethernet: renesas: rswitch: Modify initialization for SERDES and PHY Yoshihiro Shimoda
2023-01-10 5:02 ` [PATCH net-next v2 1/4] net: phylink: Set host_interfaces for a non-sfp PHY Yoshihiro Shimoda
2023-01-10 14:21 ` Arun.Ramadoss
2023-01-12 7:33 ` Yoshihiro Shimoda
2023-01-10 5:02 ` [PATCH net-next v2 2/4] net: ethernet: renesas: rswitch: Simplify struct phy * handling Yoshihiro Shimoda
2023-01-10 14:15 ` Arun.Ramadoss [this message]
2023-01-12 7:32 ` Yoshihiro Shimoda
2023-01-10 5:02 ` [PATCH net-next v2 3/4] net: ethernet: renesas: rswitch: Enable ovr_host_interfaces Yoshihiro Shimoda
2023-01-10 5:02 ` [PATCH net-next v2 4/4] net: ethernet: renesas: rswitch: Add phy_power_{on,off}() calling Yoshihiro Shimoda
2023-01-10 14:35 ` [PATCH net-next v2 0/4] net: ethernet: renesas: rswitch: Modify initialization for SERDES and PHY Russell King (Oracle)
2023-01-12 1:09 ` Yoshihiro Shimoda
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=8f29ef6f855d965cf86fc776cbfc463c7d20258f.camel@microchip.com \
--to=arun.ramadoss@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yoshihiro.shimoda.uh@renesas.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).