Thread (15 messages) 15 messages, 7 authors, 2024-06-28

Re: [PATCH v2 net-next 2/2] net: airoha: Introduce ethernet support for EN7581 SoC

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-06-18 13:47:00
Also in: linux-arm-kernel, linux-clk, linux-devicetree

+static void airoha_fe_maccr_init(struct airoha_eth *eth)
+{
...
+	airoha_fe_wr(eth, REG_FE_VIP_PATN(11), 0xc057); /* PPP->IPv6CP (0xc057) */
include/uapi/linux/ppp_defs.h
#define PPP_IPV6CP      0x8057  /* IPv6 Control Protocol */

Are these the same thing? Why is there one bit difference?

+	airoha_fe_wr(eth, REG_FE_VIP_PATN(17), 0x1ae0);
+	airoha_fe_wr(eth, REG_FE_VIP_EN(17),
+		     PATN_FCPU_EN_MASK | PATN_SP_EN_MASK |
+		     FIELD_PREP(PATN_TYPE_MASK, 3) | PATN_EN_MASK);
+
+	airoha_fe_wr(eth, REG_FE_VIP_PATN(18), 0x1ae00000);
+	airoha_fe_wr(eth, REG_FE_VIP_EN(18),
+		     PATN_FCPU_EN_MASK | PATN_DP_EN_MASK |
+		     FIELD_PREP(PATN_TYPE_MASK, 3) | PATN_EN_MASK);
+	airoha_fe_wr(eth, REG_FE_VIP_PATN(22), 0xaaaa);
Please add a comment what these match.
+static int airoha_dev_change_mtu(struct net_device *dev, int new_mtu)
+{
+	dev->mtu = new_mtu;
+
+	return 0;
+}
+
I don't think this is needed. Look at __dev_set_mtu().

    Andrew

---
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help