# ip -o link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000\ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\ link/ether 4c:a5:15:40:00:b4 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\ link/ether 4c:a5:15:40:00:b5 brd ff:ff:ff:ff:ff:ff В момент, когда NetworkManager пытается поднять интерфейсы, ядро ругается: [ 322.951355] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 322.957229] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 323.678463] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 323.684338] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 324.332557] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 324.338435] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 325.047651] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 325.053531] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 325.700741] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 325.706621] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 326.419960] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 326.425836] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 327.073932] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 327.079809] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19)
Та же проблема наблюдается с ядром 5.10.17. Только оно более толково ругается: [ 16.930217] Micrel KSZ9031 Gigabit PHY stmmac-1:03: phy_poll_reset failed: -110 [ 16.937708] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 16.943575] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 17.596114] Micrel KSZ9031 Gigabit PHY stmmac-2:03: phy_poll_reset failed: -110 [ 17.603602] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 17.609468] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 18.245793] Micrel KSZ9031 Gigabit PHY stmmac-1:03: phy_poll_reset failed: -110 [ 18.253293] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 18.259163] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 18.884032] Micrel KSZ9031 Gigabit PHY stmmac-2:03: phy_poll_reset failed: -110 [ 18.891528] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 18.897397] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 19.572000] Micrel KSZ9031 Gigabit PHY stmmac-1:03: phy_poll_reset failed: -110 [ 19.579485] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 19.585353] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 20.227617] Micrel KSZ9031 Gigabit PHY stmmac-2:03: phy_poll_reset failed: -110 [ 20.235105] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 20.240980] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 20.918167] Micrel KSZ9031 Gigabit PHY stmmac-1:03: phy_poll_reset failed: -110 [ 20.925671] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 20.931571] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 21.573394] Micrel KSZ9031 Gigabit PHY stmmac-2:03: phy_poll_reset failed: -110 [ 21.580879] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 21.586750] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) [ 22.254807] Micrel KSZ9031 Gigabit PHY stmmac-1:03: phy_poll_reset failed: -110 [ 22.262294] baikal-dwmac 30240000.eth0 eth0: no phy at addr -1 [ 22.268162] baikal-dwmac 30240000.eth0 eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 22.893576] Micrel KSZ9031 Gigabit PHY stmmac-2:03: phy_poll_reset failed: -110 [ 22.901074] baikal-dwmac 30250000.eth1 eth1: no phy at addr -1 [ 22.906941] baikal-dwmac 30250000.eth1 eth1: stmmac_open: Cannot attach to PHY (error: -19) Если добавить в blacklist micrel, то интерфейсы успешно поднимаются с generic PHY: echo 'blacklist micrel' | sudo tee /etc/modprobe.d/micrel_disable.conf sudo rmmod dwmac_baikal sudo rmmod dwmac_generic sudo modprobe dwmac_baikal 227.019142] baikal-dwmac 30240000.eth0: IRQ eth_wake_irq not found [ 227.025359] baikal-dwmac 30240000.eth0: IRQ eth_lpi not found [ 227.031222] baikal-dwmac 30240000.eth0: PTP uses main clock [ 227.036830] baikal-dwmac 30240000.eth0: no reset control found [ 227.042698] baikal-dwmac 30240000.eth0: Baikal Electronics DWMAC glue driver [ 227.049987] baikal-dwmac 30240000.eth0: User ID: 0x10, Synopsys ID: 0x37 [ 227.056718] baikal-dwmac 30240000.eth0: DWMAC1000 [ 227.061535] baikal-dwmac 30240000.eth0: DMA HW capability register supported [ 227.068608] baikal-dwmac 30240000.eth0: RX Checksum Offload Engine supported [ 227.075680] baikal-dwmac 30240000.eth0: COE Type 2 [ 227.080492] baikal-dwmac 30240000.eth0: TX Checksum insertion supported [ 227.087131] baikal-dwmac 30240000.eth0: Wake-Up On Lan supported [ 227.093160] baikal-dwmac 30240000.eth0: Enhanced/Alternate descriptors [ 227.099711] baikal-dwmac 30240000.eth0: Enabled extended descriptors [ 227.106087] baikal-dwmac 30240000.eth0: Ring mode enabled [ 227.111508] baikal-dwmac 30240000.eth0: Enable RX Mitigation via HW Watchdog Timer [ 227.134831] libphy: stmmac: probed [ 227.143571] baikal-dwmac 30250000.eth1: IRQ eth_wake_irq not found [ 227.149790] baikal-dwmac 30250000.eth1: IRQ eth_lpi not found [ 227.155661] baikal-dwmac 30250000.eth1: PTP uses main clock [ 227.161265] baikal-dwmac 30250000.eth1: no reset control found [ 227.166521] baikal-dwmac 30240000.eth0 eth0: PHY [stmmac-1:03] driver [Generic PHY] (irq=POLL) [ 227.167128] baikal-dwmac 30250000.eth1: Baikal Electronics DWMAC glue driver [ 227.167695] baikal-dwmac 30250000.eth1: User ID: 0x10, Synopsys ID: 0x37 [ 227.189594] baikal-dwmac 30250000.eth1: DWMAC1000 [ 227.194415] baikal-dwmac 30250000.eth1: DMA HW capability register supported [ 227.201496] baikal-dwmac 30250000.eth1: RX Checksum Offload Engine supported [ 227.208572] baikal-dwmac 30250000.eth1: COE Type 2 [ 227.213384] baikal-dwmac 30250000.eth1: TX Checksum insertion supported [ 227.220022] baikal-dwmac 30250000.eth1: Wake-Up On Lan supported [ 227.226055] baikal-dwmac 30250000.eth1: Enhanced/Alternate descriptors [ 227.232605] baikal-dwmac 30250000.eth1: Enabled extended descriptors [ 227.238982] baikal-dwmac 30250000.eth1: Ring mode enabled [ 227.244405] baikal-dwmac 30250000.eth1: Enable RX Mitigation via HW Watchdog Timer [ 227.252993] PHY re-inited for Baikal DWMAC [ 227.267855] libphy: stmmac: probed [ 227.286873] baikal-dwmac 30240000.eth0 eth0: No Safety Features support found [ 227.294058] baikal-dwmac 30240000.eth0 eth0: No MAC Management Counters available [ 227.301569] baikal-dwmac 30240000.eth0 eth0: IEEE 1588-2008 Advanced Timestamp supported [ 227.309878] baikal-dwmac 30240000.eth0 eth0: registered PTP clock [ 227.316350] baikal-dwmac 30240000.eth0 eth0: configuring for phy/rgmii-id link mode [ 227.384914] baikal-dwmac 30250000.eth1 eth1: PHY [stmmac-2:03] driver [Generic PHY] (irq=POLL) [ 227.398091] PHY re-inited for Baikal DWMAC [ 227.415515] NET: Registered protocol family 17 [ 227.431900] baikal-dwmac 30250000.eth1 eth1: No Safety Features support found [ 227.439109] baikal-dwmac 30250000.eth1 eth1: No MAC Management Counters available [ 227.446633] baikal-dwmac 30250000.eth1 eth1: IEEE 1588-2008 Advanced Timestamp supported [ 227.454979] baikal-dwmac 30250000.eth1 eth1: registered PTP clock [ 227.461438] baikal-dwmac 30250000.eth1 eth1: configuring for phy/rgmii-id link mode [ 230.395154] baikal-dwmac 30240000.eth0: fix_mac_speed new speed 1000 [ 230.401542] baikal-dwmac 30240000.eth0: setting TX2 clock frequency to 250000000 [ 230.411617] baikal-dwmac 30240000.eth0 eth0: Link is Up - 1Gbps/Full - flow control off [ 230.419677] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Но судя по device tree, должен быть именно micrel: gmdio0: gmac0_mdio { compatible = "snps,dwmac-mdio"; #address-cells = <1>; #size-cells = <0>; gmac0_phy: ethernet-phy@3 { compatible = "micrel,ksz9031", "ethernet-phy-id0022.1620", "ethernet-phy-ieee802.3-c22"; reg = <0x3>; txd0-skew-ps = <0>; txd1-skew-ps = <0>; txd2-skew-ps = <0>; txd3-skew-ps = <0>; txc-skew-ps = <0xff>; }; };
"родное" ядро из SDK-M 5.1 также не может завести Ethernet, ровно с такими же ошибками
Возможная причина (но это не точно): [ 3.044974] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/soc/pcie@2220000[0]' - status (0) [ 4.979660] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/eth0@30240000/gmac0_mdio[0]' [ 4.990156] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/eth0@30240000/gmac0_mdio[0]' [ 5.026236] of_get_named_gpiod_flags: can't parse 'snps,reset-gpios' property of node '/soc/eth0@30240000[0]' [ 5.036209] of_get_named_gpiod_flags: can't parse 'snps,reset-gpio' property of node '/soc/eth0@30240000[0]' [ 5.092791] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/eth0@30240000/gmac0_mdio/ethernet-phy@3[0]' [ 5.104585] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/eth0@30240000/gmac0_mdio/ethernet-phy@3[0]' [ 5.234831] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/eth1@30250000/gmac1_mdio[0]' [ 5.248219] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/eth1@30250000/gmac1_mdio[0]' [ 5.278226] of_get_named_gpiod_flags: can't parse 'snps,reset-gpios' property of node '/soc/eth1@30250000[0]' [ 5.292959] of_get_named_gpiod_flags: can't parse 'snps,reset-gpio' property of node '/soc/eth1@30250000[0]' [ 5.417730] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/soc/eth1@30250000/gmac1_mdio/ethernet-phy@3[0]' [ 5.429525] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/soc/eth1@30250000/gmac1_mdio/ethernet-phy@3[0]'
А почему Component: kernel-image-std-def?
(Ответ для Alexey Sheplyakov на комментарий #2) > "родное" ядро из SDK-M 5.1 также не может завести Ethernet, ровно с такими > же ошибками Какая... красота...
(Ответ для Dmitry V. Levin на комментарий #4) > А почему Component: kernel-image-std-def? Потому, что проблема наблюдается именно при использовании kernel-image-std-def из Сизифа. То есть понятно, что проблема внесена новой прошивкой Байкала, но на них, увы, можно повесить сколько угодно собак -- результат бывает далеко не всегда и всегда долго...
Патч: http://git.altlinux.org/people/asheplyakov/packages/linux.git?p=linux.git;a=patch;h=db2dd662880e9951352754636f71dcee4b50e122
(In reply to Anton V. Boyarshinov from comment #6) > (Ответ для Dmitry V. Levin на комментарий #4) > > А почему Component: kernel-image-std-def? > > Потому, что проблема наблюдается именно при использовании > kernel-image-std-def из Сизифа. То есть понятно, что проблема внесена новой > прошивкой Байкала, Нет. Проблема не зависит от версии прошивки. Я не вполне разобрался в особенностях байкаловского dwmac. И баг в драйвере был всегда. Я тестировал драйвер только с generic PHY. А байкаловцы взяли "мой" драйвер для 5.4 без изменений.
Исправлено в kernel-image-std-def 5.4.101-alt1