lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220502085618.274927-1-hanetzer@startmail.com>
Date:   Mon,  2 May 2022 03:56:18 -0500
From:   "Marty E. Plummer" <hanetzer@...rtmail.com>
To:     netdev@...r.kernel.org
Cc:     yisen.zhuang@...wei.com, salil.mehta@...wei.com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        p.zabel@...gutronix.de, linux-kernel@...r.kernel.org,
        "Marty E. Plummer" <hanetzer@...rtmail.com>
Subject: hix5hd2_gmac: inconsistent rx_skb crash.

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@...a0000 {
	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@...a0000[0]'
[    8.543070] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/ethernet@...a0000[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@...a0000/ethernet-phy@3[0]'
[    8.594620] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/ethernet@...a0000/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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ