netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Egil Hjelmeland <privat@egil-hjelmeland.no>
Cc: vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: lan9303: Do not disable switch fabric port 0 at .probe
Date: Tue, 24 Oct 2017 18:27:02 +0200	[thread overview]
Message-ID: <20171024162702.GA12347@lunn.ch> (raw)
In-Reply-To: <20171024151410.28494-1-privat@egil-hjelmeland.no>

On Tue, Oct 24, 2017 at 05:14:10PM +0200, Egil Hjelmeland wrote:
> Make the LAN9303 work when lan9303_probe() is called twice.
> 
> For some unknown reason the LAN9303 switch fail to forward data when switch
> fabric port 0 TX is disabled during probe. (Write of LAN9303_MAC_TX_CFG_0
> in lan9303_disable_processing_port().)
> 
> In that situation the switch fabric seem to receive frames, because the ALR
> is learning addresses. But no frames are transmitted on any of the ports.
> 
> In our system lan9303_probe() is called twice, first time
> dsa_register_switch() return -EPROBE_DEFER. As an experiment, modified the
> code to skip writing LAN9303_MAC_TX_CFG_0, port 0 during the first probe.
> Then the switch works as expected.
> 
> Resolve the problem by not calling lan9303_disable_processing_port() on
> port 0 during probe. Ports 1 and 2 are still disabled.
> 
> Although unsatisfying that the exact failure mechanism is not known,
> the patch should not cause any harm.

I agree about this being unsatisfying, but as you said, it fixed your
issue, and it probably does not cause other issues.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2017-10-24 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 15:14 [PATCH net-next] net: dsa: lan9303: Do not disable switch fabric port 0 at .probe Egil Hjelmeland
2017-10-24 16:27 ` Andrew Lunn [this message]
2017-10-26  8:41 ` David Miller

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=20171024162702.GA12347@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=privat@egil-hjelmeland.no \
    --cc=vivien.didelot@savoirfairelinux.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).