Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: netdev@vger.kernel.org, kernel@pengutronix.de,
	David Jander <david@protonic.nl>
Subject: Re: Issue with SJA1105QELY on STM32MP151CAA3T over RGMII Interface
Date: Wed, 10 Jul 2024 16:50:59 +0300	[thread overview]
Message-ID: <20240710135059.jwtfofi3r3zdfsd6@skbuf> (raw)
In-Reply-To: <Zo6NIINGn53fIa5M@pengutronix.de>

Hi Oleksij,

On Wed, Jul 10, 2024 at 03:31:12PM +0200, Oleksij Rempel wrote:
> Hi Vladimir,
> 
> I hope this email finds you well.
> 
> I'm reaching out because I'm having an issue with the SJA1105QELY switch
> connected to an STM32MP151CAA3T over an RGMII interface. About 1 in
> every 10 starts, the SJA1105 fails to receive frames from the CPU.
> Specifically, the p04_n_rxfrm counters stay at 0, and all RX error
> counters are zero too, indicating that the port doesn't seem to see any
> frames at all.
> 
> I can reproduce this issue even without rebooting, just by using the
> unbind/bind sequence:
> 
> ```sh
> echo spi0.0 > /sys/bus/spi/drivers/sja1105/unbind
> echo spi0.0 > /sys/bus/spi/drivers/sja1105/bind
> ip l s dev t10 up
> sleep 1
> ethtool -t t10
> ```
> 
> Running the ethtool self-test is the most reliable way to reproduce the
> problem early without additional software.
> 
> I've checked the RX_CTL and RX_CLK lines of the SJA1105 port 4 with an
> oscilloscope, and both look correct and identical in both working and
> non-working cases.
> 
> Interestingly, the external RGMII switch ports are working fine. I can
> bridge them and push frames in all directions without issues.
> Transferring frames from the switch to the CPU works fine as well, which
> makes me suspect that the problem is isolated to the reception of frames
> on the CPU RGMII interface.
> 
> Is it possible there's some RGMII-specific race condition during the
> initialization stage? The bootloader implementation of the SJA1105 on same HW
> seems to work fine too, so this seems to be a Linux kernel-specific issue.
> 
> Any insights or suggestions you might have would be greatly appreciated!
> 
> Thanks a lot for your help.

The symptoms sound awfully similar to a situation described in NXP
document AH1704, chapter 6.1.13.3. I can't disclose anything from its
contents here, since it is not a public document, requiring, AFAIK,
sign-in.

But there have been workarounds implemented in other drivers for this
particular issue, used as DSA masters for this switch. For example
commit 4fa6c976158b ("net: stmmac: dwmac-imx: pause the TXC clock in
fixed-link"). If you get access to the NXP document, maybe you can
confirm that the circumstances leading to the issue are the same, and
you are able to implement a similar workaround for this NIC (also stmmac
driver, I believe?!).

Hope this helps.

  reply	other threads:[~2024-07-10 13:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09  8:21 [PATCH net-next v1 0/7] net: stmmac: refactor FPE for gmac4 and xgmac Furong Xu
2024-07-09  8:21 ` [PATCH net-next v1 1/7] net: stmmac: xgmac: drop incomplete FPE implementation Furong Xu
2024-07-09 13:16   ` Andrew Lunn
2024-07-09 17:10     ` Vladimir Oltean
2024-07-10  7:57       ` Furong Xu
2024-07-10 13:31       ` Issue with SJA1105QELY on STM32MP151CAA3T over RGMII Interface Oleksij Rempel
2024-07-10 13:50         ` Vladimir Oltean [this message]
2024-07-09  8:21 ` [PATCH net-next v1 2/7] net: stmmac: gmac4: drop FPE implementation for refactoring Furong Xu
2024-07-09 13:24   ` Andrew Lunn
2024-07-09  8:21 ` [PATCH net-next v1 3/7] net: stmmac: refactor Frame Preemption(FPE) implementation Furong Xu
2024-07-09  8:21 ` [PATCH net-next v1 4/7] net: stmmac: gmac4: complete FPE support Furong Xu
2024-07-09  8:21 ` [PATCH net-next v1 5/7] net: stmmac: xgmac: rename XGMAC_RQ to XGMAC_FPRQ Furong Xu
2024-07-09  8:21 ` [PATCH net-next v1 6/7] net: stmmac: xgmac: complete FPE support Furong Xu
2024-07-09  8:21 ` [PATCH net-next v1 7/7] net: stmmac: xgmac: enable Frame Preemption Interrupt by default Furong Xu
2024-07-09 13:31   ` Andrew Lunn

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=20240710135059.jwtfofi3r3zdfsd6@skbuf \
    --to=olteanv@gmail.com \
    --cc=david@protonic.nl \
    --cc=kernel@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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