Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Mohd Ayaan Anwar
Mon, 23 Nov 2026 18:41
[PATCH RFC net-next 0/2] net: stmmac: qcom-ethqos: add support for RMII
Author: Mohd Ayaan Anwar
Date: Mon, 23 Nov 2026 18:41
Date: Mon, 23 Nov 2026 18:41
70 lines
18965 bytes
18965 bytes
Hi,
I am sending this RFC as I am looking for some feedback and inputs on
handling a HW quirk that affects the RMII PHY mode on the Qualcomm
ETHQOS controller. Maybe someone has seen similar behavior on other
platforms?
The Qualcomm ETHQOS core supports the RMII PHY mode, but only if you
ignore the dribble error, which is set in each receive descriptor. The
programming guide provides some details on why this happens, and an
excerpt is included below [0].
I initially thought about using a platform specific flag that would
ensure that the dribble error would only be ignored for the qcom-ethqos
+ "rmii" combination. But some digging pointed out the commit below,
which does something similar for norm_desc.c and enh_desc.c:
commit 1cc5a735185a963ed9324a65e1f2db02bf52c0d4
Author: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Wed Feb 15 00:10:37 2012 +0000
stmmac: do not discard frame on dribbling bit assert
If this bit is set and the CRC error is reset, then the packet is
valid. Only report this as stat info.
Apart from this, the wording in 802.3 around "Integer Number of Octets
in Frame" and "aAlignmentErrors" specifically calls out packets as
being error packets only if they do not pass the FCS check, although I
might be missing something here.
Anyway, this series has two patches - the first adds logic to accept
receive frames if the dribble error bit is the only error bit set in
the descriptors, and the second adds RMII support to the qcom-ethqos
driver. It has been tested with the KSZ8081RNB PHY attached to a Shikra
SoC based board. Since the programming guide mentions a generic
programming sequence for all SoCs, I have kept the platform glue logic
generic.
[0] Here's the excerpt from the ETHQOS programming guide (paraphrased
and shortened):
In RMII 10/100 receive mode, differences between the PHY's recovered
clock and the local reference clock can leave data temporarily buffered.
Consequently, CRS_DV may transition at a nibble boundary near the end of
a frame.
To handle this, software must ignore the dribble indication, RDES3[19],
while processing RMII receive write-back descriptors. The dribble
indication may contribute to the descriptor error summary even though
the complete octets and FCS are valid. Other receive errors remain
subject to normal validation and must not be masked.
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
---
Mohd Ayaan Anwar (2):
net: stmmac: dwmac4: accept dribble-only receive frames
net: stmmac: qcom-ethqos: add RMII support
.../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 49 ++++++++++++++++++++++
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h | 1 +
3 files changed, 53 insertions(+), 1 deletion(-)
---
base-commit: 5a1f6793361524314b442371dc05ce3cd4f2f838
change-id: 20261123-ethqos_rmii-f929c84f24e6
Best regards,
--
Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads