From: Vivien Didelot <vivien.didelot@gmail.com>
To: Baruch Siach <baruch@tkos.co.il>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
"Marek Behún" <marek.behun@nic.cz>,
netdev@vger.kernel.org, "Baruch Siach" <baruch@tkos.co.il>,
"Denis Odintsov" <d.odintsov@traviangames.com>
Subject: Re: [PATCH] net: dsa: mv88e6xxx: force cmode write on 6141/6341
Date: Fri, 20 Dec 2019 14:27:25 -0500 [thread overview]
Message-ID: <20191220142725.GB2458874@t480s.localdomain> (raw)
In-Reply-To: <dd029665fdacef34a17f4fb8c5db4584211eacf6.1576748902.git.baruch@tkos.co.il>
Hi Baruch,
On Thu, 19 Dec 2019 11:48:22 +0200, Baruch Siach <baruch@tkos.co.il> wrote:
> mv88e6xxx_port_set_cmode() relies on cmode stored in struct
> mv88e6xxx_port to skip cmode update when the requested value matches the
> cached value. It turns out that mv88e6xxx_port_hidden_write() might
> change the port cmode setting as a side effect, so we can't rely on the
> cached value to determine that cmode update in not necessary.
>
> Force cmode update in mv88e6341_port_set_cmode(), to make
> serdes configuration work again. Other mv88e6xxx_port_set_cmode()
> callers keep the current behaviour.
>
> This fixes serdes configuration of the 6141 switch on SolidRun Clearfog
> GT-8K.
>
> Fixes: 7a3007d22e8 ("net: dsa: mv88e6xxx: fully support SERDES on Topaz family")
> Reported-by: Denis Odintsov <d.odintsov@traviangames.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Andrew,
We tend to avoid caching values in the mv88e6xxx driver the more we can and
query the hardware instead to avoid errors like this. We can consider calling a
new mv88e6xxx_port_get_cmode() helper when needed (e.g. in higher level callers
like mv88e6xxx_serdes_power() and mv88e6xxx_serdes_irq_thread_fn()) and pass
the value down to the routines previously accessing chip->ports[port].cmode,
as a new argument. I can prepare a patch doing this. What do you think?
Thanks,
Vivien
next prev parent reply other threads:[~2019-12-20 19:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 9:48 [PATCH] net: dsa: mv88e6xxx: force cmode write on 6141/6341 Baruch Siach
2019-12-20 19:27 ` Vivien Didelot [this message]
2019-12-21 10:22 ` Andrew Lunn
2019-12-21 21:51 ` Vivien Didelot
2019-12-22 9:43 ` Baruch Siach
2020-01-02 20:45 ` David Miller
2020-01-02 22:36 ` Andrew Lunn
2020-01-02 23:31 ` 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=20191220142725.GB2458874@t480s.localdomain \
--to=vivien.didelot@gmail.com \
--cc=andrew@lunn.ch \
--cc=baruch@tkos.co.il \
--cc=d.odintsov@traviangames.com \
--cc=marek.behun@nic.cz \
--cc=netdev@vger.kernel.org \
/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