netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marty E. Plummer" <hanetzer@startmail.com>
To: netdev@vger.kernel.org
Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com,
	davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	p.zabel@pengutronix.de, linux-kernel@vger.kernel.org,
	"Marty E. Plummer" <hanetzer@startmail.com>
Subject: hix5hd2_gmac: inconsistent rx_skb crash.
Date: Mon,  2 May 2022 03:56:18 -0500	[thread overview]
Message-ID: <20220502085618.274927-1-hanetzer@startmail.com> (raw)

Hello. As part of my work on the Hi3521a SoC, I'm trying to get
networking and persistent storage up. As far as I can tell, the
registers and bitfields for the 'GSF' in the Hi3521a SoC are almost a
1:1 match against the hix5hd2_gmac driver. Setting up the dts like so:

--- hi3521a.dtsi
gmac0: ethernet@100a0000 {
	compatible = "hisilicon,hisi-gmac-v2";
	reg = <0x100a0000 0x1000>, <0x1204008c 0x4>;
	interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&crg HI3521A_ETH_CLK>, <&crg HI3521A_ETH_MACIF_CLK>;
	clock-names = "mac_core", "mac_ifc";
	resets = <&crg 0x78 0>, <&crg 0x78 2>, <&crg 0x78 5>;
	reset-names = "mac_core", "mac_ifc", "phy";
	hisilicon,phy-reset-delays-us = <10000 10000 30000>;
	status = "disabled";
};

--- hi3521a-rs-dm290e.dts
&gmac0 {
	#address-cells = <1>;
	#size-cells = <0>;
	phy-handle = <&phy3>;
	phy-mode = "rgmii";
	mac-address = [00 00 00 00 00 00];
	status = "okay";

	phy3: ethernet-phy@3 {
		compatible = "ethernet-phy-id001c.c816", "ethernet-phy-ieee802.3-c22";
		reg = <3>;
	};
};

Does in fact set up most of the things you'd expect. I can read the phy
id from sysfs and such, seems fine. Relevant dmesg logs are:

--- dmesg | grep -C1 -e eth -e mdio
[    8.386695] 0x000000b00000-0x000001f00000 : "extra"
[    8.449664] mdio_bus fixed-0: GPIO lookup for consumer reset
[    8.455453] mdio_bus fixed-0: using lookup tables for GPIO lookup
[    8.461629] mdio_bus fixed-0: No GPIO consumer reset found
[    8.517993] mdio_bus 100a0000.ethernet-mii: GPIO lookup for consumer reset
[    8.525012] mdio_bus 100a0000.ethernet-mii: using device tree for GPIO lookup
[    8.532710] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/ethernet@100a0000[0]'
[    8.543070] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/ethernet@100a0000[0]'
[    8.552970] mdio_bus 100a0000.ethernet-mii: using lookup tables for GPIO lookup
[    8.560367] mdio_bus 100a0000.ethernet-mii: No GPIO consumer reset found
[    8.567650] mdio_bus 100a0000.ethernet-mii:03: GPIO lookup for consumer reset
[    8.574898] mdio_bus 100a0000.ethernet-mii:03: using device tree for GPIO lookup
[    8.582860] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/ethernet@100a0000/ethernet-phy@3[0]'
[    8.594620] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/ethernet@100a0000/ethernet-phy@3[0]'
[    8.605808] mdio_bus 100a0000.ethernet-mii:03: using lookup tables for GPIO lookup
[    8.613455] mdio_bus 100a0000.ethernet-mii:03: No GPIO consumer reset found
[    8.627212] (unnamed net_device) (uninitialized): using random MAC address c6:57:fb:4d:47:ff

However. Setting an ip address (ip addr add 192.168.99.77/24 dev eth0)
and setting the link up (ip link set eth0 up) spams the console with:
[   49.103197] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   49.419046] hisi-gmac 100a0000.ethernet eth0: inconsistent rx_skb
[   49.434159] hisi-gmac 100a0000.ethernet eth0: inconsistent rx_skb
quite a lot. I even saw it crash the system once, but I think that was a
misconfiguration on my part. attached at phy3 is a realtek phy.

At this point everything looks like it should work,
[  628.063999] hisi-gmac 100a0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
but I cannot ping any other devices on that subnet. Am I missing
something here?
-- 
2.35.1


                 reply	other threads:[~2022-05-02  9:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220502085618.274927-1-hanetzer@startmail.com \
    --to=hanetzer@startmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.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).