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>
Subject: Re: [PATCH 2/2] net: dsa: sja1105: fix device id detection
Date: Sat, 15 Jan 2022 18:48:20 +0200	[thread overview]
Message-ID: <CAGi-RU+uG6=8GFDSqVt3rX6VmL3pAocOqatma=a3zMkuo=Dseg@mail.gmail.com> (raw)
In-Reply-To: <20211204230035.4136596-3-vladimir.oltean@nxp.com>

On Sun, Dec 5, 2021 at 1:01 AM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> The sja1105_check_device_id() function contains logic to work without
> changing the device tree on reworked boards, one of which I have (the
> NXP LS1021A-TSN normally has a SJA1105T, but I have a version with a
> resoldered SJA1105Q which is pin compatible). This logic is taken from
> the Linux driver.
>
> However this logic gets shortcircuited in U-Boot by an earlier check for
> the exact device ID specified in the device tree. So the reworked board
> does not probe the SJA1105Q switch. Remove this duplicated logic and let
> the automatic device ID detection do its job.
>
> Fixes: f24b666b2204 ("net: dsa: add driver for NXP SJA1105 L2 switch")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/net/sja1105.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/sja1105.c b/drivers/net/sja1105.c
> index 17bab33eddb7..4ca8709e347c 100644
> --- a/drivers/net/sja1105.c
> +++ b/drivers/net/sja1105.c
> @@ -3276,12 +3276,6 @@ static int sja1105_check_device_id(struct sja1105_private *priv)
>         sja1105_packing(packed_buf, &device_id, 31, 0, SJA1105_SIZE_DEVICE_ID,
>                         UNPACK);
>
> -       if (device_id != priv->info->device_id) {
> -               printf("Expected device ID 0x%llx but read 0x%llx\n",
> -                      priv->info->device_id, device_id);
> -               return -ENODEV;
> -       }
> -
>         rc = sja1105_xfer_buf(priv, SPI_READ, regs->prod_id, packed_buf,
>                               SJA1105_SIZE_DEVICE_ID);
>         if (rc < 0)
> --
> 2.25.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

  reply	other threads:[~2022-01-15 16:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 23:00 [PATCH 0/2] DSA switch fixes Vladimir Oltean
2021-12-04 23:00 ` [PATCH 1/2] net: dsa: fix phydev->speed being uninitialized for the CPU port fixed PHY Vladimir Oltean
2022-01-15 16:46   ` Ramon Fried
2022-01-15 16:47     ` Ramon Fried
2022-03-25 16:53   ` Tim Harvey
2022-03-25 18:07     ` Vladimir Oltean
2022-03-25 21:03       ` Tim Harvey
2022-03-28  9:26         ` Vladimir Oltean
2022-03-28 22:23           ` Tim Harvey
2022-03-29  0:03             ` Vladimir Oltean
2022-03-29 21:19               ` Tim Harvey
2021-12-04 23:00 ` [PATCH 2/2] net: dsa: sja1105: fix device id detection Vladimir Oltean
2022-01-15 16:48   ` Ramon Fried [this message]
2022-01-15 16:48     ` 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-RU+uG6=8GFDSqVt3rX6VmL3pAocOqatma=a3zMkuo=Dseg@mail.gmail.com' \
    --to=rfried.dev@gmail.com \
    --cc=joe.hershberger@ni.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.