All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramon Fried <rfried.dev@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Joe Hershberger <joe.hershberger@ni.com>,
	 Tim Harvey <tharvey@gateworks.com>,
	Michael Walle <michael@walle.cc>
Subject: Re: [PATCH 1/2] net: dsa: pass CPU port fixed PHY to .port_disable
Date: Tue, 28 Sep 2021 16:27:45 +0300	[thread overview]
Message-ID: <CAGi-RUJMX-5JG7=nrzvj+ozMEnfpC=9XO2g+YK7+Ltmusq-r_Q@mail.gmail.com> (raw)
In-Reply-To: <20210918114956.1064294-2-vladimir.oltean@nxp.com>

On Sat, Sep 18, 2021 at 2:50 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> While adding the logic for DSA to register a fixed-link PHY for the CPU
> port, I forgot to pass it to the .port_disable method too, just
> .port_enable.
>
> Bug had no impact for felix_switch.c, due to the phy argument not being
> used, but ksz9477.c does use it => NULL pointer dereference.
>
> Fixes: fc054d563bfb ("net: Introduce DSA class for Ethernet switches")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  net/dsa-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c
> index 9b8ae1e82b92..d1c6c78acd6c 100644
> --- a/net/dsa-uclass.c
> +++ b/net/dsa-uclass.c
> @@ -100,7 +100,7 @@ static void dsa_port_stop(struct udevice *pdev)
>
>                 port_pdata = dev_get_parent_plat(pdev);
>                 ops->port_disable(dev, port_pdata->index, port_pdata->phy);
> -               ops->port_disable(dev, priv->cpu_port, NULL);
> +               ops->port_disable(dev, priv->cpu_port, priv->cpu_port_fixed_phy);
>         }
>
>         eth_get_ops(master)->stop(master);
> --
> 2.25.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

  reply	other threads:[~2021-09-28 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18 11:49 [PATCH 0/2] DSA cleanups Vladimir Oltean
2021-09-18 11:49 ` [PATCH 1/2] net: dsa: pass CPU port fixed PHY to .port_disable Vladimir Oltean
2021-09-28 13:27   ` Ramon Fried [this message]
2021-09-28 15:10   ` Tim Harvey
2021-09-18 11:49 ` [PATCH 2/2] net: dsa: remove unused variables Vladimir Oltean
2021-09-28 13:28   ` Ramon Fried

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='CAGi-RUJMX-5JG7=nrzvj+ozMEnfpC=9XO2g+YK7+Ltmusq-r_Q@mail.gmail.com' \
    --to=rfried.dev@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=michael@walle.cc \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.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.