Netdev Archive on lore.kernel.org
 help / color / Atom feed
* How to disable CRC32 FCS in stmmac (v3.5)?
@ 2020-10-16 20:27 Gregoire Gentil
  0 siblings, 0 replies; only message in thread
From: Gregoire Gentil @ 2020-10-16 20:27 UTC (permalink / raw)
  To: netdev

I have a FPGA sending frames (payload length=1280) over RGMII to a 
Samsung module which includes STMMAC MAC IP (v3.5).

If the FCS is correct, I manage to receive data from the FPGA to the MAC 
in the kernel.

For multiple reasons, I wish to disable FCS so that frames are received 
in the kernel even if the 4-byte CRC FCS are wrong.

After a lot tries for the past few weeks, I don't manage to receive 
error frames. Especially, if FCS is wrong, I don't get anything in 
"stmmac_rx(struct stmmac_priv *priv, int limit)".

Here is a list of all the relevant bits I have played with:

C006_0000h (CST 25): CRC Stripping for Type Frames
C006_0000h (IPC 10): Checksum Offload
C006_0000h (ACS 7): Automatic Pad or CRC Stripping
C006_1018h (DT 26): Disable dropping of TCP/IP Checksum Error Frames
C006_1018h (FEF 7): Forward Error Frames

Whithout any special hacking, my default registers are:
C006_0000h: 0x1100880 (25:0, 10:0, 7:1)
C006_1018h: 0x2202006 (26:0, 7:0)

I have also unsuccessfully played with "ethtool --offload eth0 rx off"

The MAC registers documentation is rather sparse and written in flaky 
English though it seems that the register description table is a copy 
paste from the original ST documentation.


Has anyone managed to achieve my objective, getting rid of FCS frame drop?

Grégoire

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 20:27 How to disable CRC32 FCS in stmmac (v3.5)? Gregoire Gentil

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git