From: Rasmus Villemoes <ravi@prevas.dk>
To: Daniel Golle <daniel@makrotopia.org>
Cc: netdev@vger.kernel.org, "Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>
Subject: question on gswip_pce_table_entry_write() in lantiq_gswip_common.c
Date: Tue, 23 Dec 2025 09:48:26 +0100 [thread overview]
Message-ID: <87sed1shwl.fsf@prevas.dk> (raw)
Hi
Reading gswip_pce_table_entry_write() in lantiq_gswip_common.c, I'm
wondering if it really has to do all that it does. In particular, it
seems to write the same value to (a subset of) the GSWIP_PCE_TBL_CTRL
reg twice, then it reads the reg value back, manually tweaks the
remaining bits appropriately and folds in the "start access bit", then
writes the whole value to the register.
Why couldn't that be done by reading the register, do all the masking
and bit setting, then doing a single write of the whole thing?
The data sheet doesn't say anything about this complicated scheme being
necessary.
Another thing: I'd really appreciate it if someone could point me to
documentation on the various tables, i.e. what does val[2] of an entry
in GSWIP_TABLE_VLAN_MAPPING actually mean? I can see that BIT(port) is
either set or cleared from it depending on 'untagged', so I can
sort-of-guess, but I'd prefer to have it documented so I don't have to
guess. AFAICT, none of the documents I can download from MaxLinear spell
this out in any way.
Rasmus
next reply other threads:[~2025-12-23 8:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 8:48 Rasmus Villemoes [this message]
2025-12-23 11:03 ` question on gswip_pce_table_entry_write() in lantiq_gswip_common.c Daniel Golle
2025-12-23 11:45 ` Rasmus Villemoes
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=87sed1shwl.fsf@prevas.dk \
--to=ravi@prevas.dk \
--cc=daniel@makrotopia.org \
--cc=netdev@vger.kernel.org \
--cc=yweng@maxlinear.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).