Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3832 - [Regression] xrx200 switch affecting AVM Fritz!Box 7362SL #8833

Open
openwrt-bot opened this issue May 27, 2021 · 91 comments
Open

FS#3832 - [Regression] xrx200 switch affecting AVM Fritz!Box 7362SL #8833

openwrt-bot opened this issue May 27, 2021 · 91 comments
Labels
bug flyspray release/21.02

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented May 27, 2021

MPW:

The 7362sl by AVM has two gigabit ports labeled 1+2 and two fast ethernet ports labled 3+4.

They all used to work, but with OpenWrt 21.02.0 only the two gigabit ports work. Port 3+4 are dead. Linked (layer1) can be established, no layer2 or higher traffic possible.

OpenWrt 19.07.7 Kernel 4.14.221 supports ports 3 + 4
Openwrt 21.02.0-rc1 Kernel 5.4.111 ports 3 + 4 are dead

root@OpenWrt:~# dmesg|grep -A5 -B5 PHY
[    0.163028] pinctrl core: initialized pinctrl subsystem
[    0.170653] NET: Registered protocol family 16
[    0.183980] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 1016 mV
[    0.198588] pinctrl-xway 1e100b10.pinmux: Init done
[    0.205140] dma-xway 1e104100.dma: Init done - hw rev: 7, ports: 7, channels: 28
[    0.216895] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.265910] usbcore: registered new interface driver usbfs
[    0.271499] usbcore: registered new interface driver hub
[    0.276869] usbcore: registered new device driver usb
[    0.282522] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.294467] clocksource: Switched to clocksource MIPS
--
[    0.708199] NET: Registered protocol family 10
[    0.715876] Segment Routing with IPv6
[    0.718218] NET: Registered protocol family 17
[    0.722769] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.735555] 8021q: 802.1Q VLAN Support v1.8
[    0.746142] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.859313] libphy: lantiq,xrx200-mdio: probed
[    0.869051] net-xrx200: invalid MAC, using random
[    0.872575] Atheros 8030 ethernet 0:00: attached PHY driver [Atheros 8030 ethernet] (mii_bus:phy_addr=0:00, irq=POLL)
[    0.883256] Atheros 8030 ethernet 0:01: attached PHY driver [Atheros 8030 ethernet] (mii_bus:phy_addr=0:01, irq=POLL)
[    0.894242] Intel XWAY PHY11G (xRX v1.2 integrated) 0:11: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:11, irq=POLL)
[    0.907971] Intel XWAY PHY11G (xRX v1.2 integrated) 0:13: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:13, irq=POLL)
[    1.046546] PCI host bridge /fpi@10000000/pcie@d900000 ranges:
[    1.051221] PCI host bridge to bus 0000:00
[    1.055083] pci_bus 0000:00: root bus resource [mem 0x1c000000-0x1cffffff]
[    1.061969] pci_bus 0000:00: root bus resource [io  0x1d800000-0x1d8fffff]
[    1.068840] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]

Notably might be the line ”failed to get the PCIe PHY“ which does not appear in 19.07.7.

As I didn't notice any changes regarding this particular device model, it might be a problem with the kernel driver for the switch module.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented May 29, 2021

Hauke:

Is a linkup or anything detected when you connect or disconnect the Ethernet cable?

Could you please post the output of these files from the working version and the broken version:
/sys/kernel/debug/pinctrl/pinctrl-maps
/sys/kernel/debug/pinctrl/*/pinmux-pins

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jun 2, 2021

MPW:

19.07.7 (working):

root@OpenWrt:~# cat /sys/kernel/debug/pinctrl/pinctrl-maps
Pinctrl maps:
device 1e100b10.pinmux
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group mdio
function mdio

device 1e100b10.pinmux
state default
type CONFIGS_PIN (3)
controlling device 1e100b10.pinmux
pin io37
config 00000000
config 00040001

device 1e100b10.pinmux
state default
type CONFIGS_PIN (3)
controlling device 1e100b10.pinmux
pin io44
config 00000000
config 00040001

device 1e100b10.pinmux
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand ale
function ebu

device 1e100b10.pinmux
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand cle
function ebu

device 1e100b10.pinmux
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand cs1
function ebu

device 1e100b10.pinmux
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand rd
function ebu

device 1e100b10.pinmux
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand rdy
function ebu

device 1e100b10.pinmux
state default
type CONFIGS_PIN (3)
controlling device 1e100b10.pinmux
pin io21
config 00010001
config 00040001

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_di
function spi

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_do
function spi

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_clk
function spi

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_cs4
function spi

device 1e100800.spi
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group spi_do
config 00040001

device 1e100800.spi
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group spi_clk
config 00040001

device 1e100800.spi
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group spi_cs4
config 00040001
root@OpenWrt:~# cat /sys/kernel/debug/pinctrl/*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (io0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 1 (io1): (MUX UNCLAIMED) XWAY GPIO:463
pin 2 (io2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 3 (io3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (io4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (io5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 6 (io6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (io7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 8 (io8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 9 (io9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 10 (io10): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_cs4
pin 11 (io11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 12 (io12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 13 (io13): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function ebu group nand ale
pin 14 (io14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 15 (io15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 16 (io16): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_di
pin 17 (io17): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_do
pin 18 (io18): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_clk
pin 19 (io19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 20 (io20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 21 (io21): (MUX UNCLAIMED) XWAY GPIO:483
pin 22 (io22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (io23): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function ebu group nand cs1
pin 24 (io24): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function ebu group nand cle
pin 25 (io25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (io26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (io27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 28 (io28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 29 (io29): (MUX UNCLAIMED) XWAY GPIO:491
pin 30 (io30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 31 (io31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 32 (io32): (MUX UNCLAIMED) XWAY GPIO:494
pin 33 (io33): (MUX UNCLAIMED) XWAY GPIO:495
pin 34 (io34): (MUX UNCLAIMED) XWAY GPIO:496
pin 35 (io35): (MUX UNCLAIMED) XWAY GPIO:497
pin 36 (io36): (MUX UNCLAIMED) XWAY GPIO:498
pin 37 (io37): (MUX UNCLAIMED) XWAY GPIO:499
pin 38 (io38): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 39 (io39): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 40 (io40): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 41 (io41): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 42 (io42): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function mdio group mdio
pin 43 (io43): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function mdio group mdio
pin 44 (io44): (MUX UNCLAIMED) XWAY GPIO:506
pin 45 (io45): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 46 (io46): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 47 (io47): (MUX UNCLAIMED) XWAY GPIO:509
pin 48 (io48): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function ebu group nand rdy
pin 49 (io49): 1e100b10.pinmux (GPIO UNCLAIMED) (HOG) function ebu group nand rd

21.02.0-rc1 (not working):

root@OpenWrt:~# cat /sys/kernel/debug/pinctrl/pinctrl-maps
Pinctrl maps:
device 1e100b10.pinmux
state default
type CONFIGS_PIN (3)
controlling device 1e100b10.pinmux
pin io37
config 00000000
config 00040001

device 1e100b10.pinmux
state default
type CONFIGS_PIN (3)
controlling device 1e100b10.pinmux
pin io44
config 00000000
config 00040001

device 1e100b10.pinmux
state default
type CONFIGS_PIN (3)
controlling device 1e100b10.pinmux
pin io21
config 00010001
config 00040001

device 14000000.flash
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand cle
function ebu

device 14000000.flash
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand ale
function ebu

device 14000000.flash
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand rd
function ebu

device 14000000.flash
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group nand cle
config 00000000
config 00010000
config 00040001

device 14000000.flash
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group nand ale
config 00000000
config 00010000
config 00040001

device 14000000.flash
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group nand rd
config 00000000
config 00010000
config 00040001

device 14000000.flash
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand rdy
function ebu

device 14000000.flash
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group nand rdy
config 00000002
config 00040000

device 14000000.flash
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group nand cs1
function ebu

device 14000000.flash
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group nand cs1
config 00000000
config 00010000

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_di
function spi

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_do
function spi

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_clk
function spi

device 1e100800.spi
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group spi_do
config 00040001

device 1e100800.spi
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group spi_clk
config 00040001

device 1e100800.spi
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group spi_cs4
function spi

device 1e100800.spi
state default
type CONFIGS_GROUP (4)
controlling device 1e100b10.pinmux
group spi_cs4
config 00040001

device 1e108000.eth
state default
type MUX_GROUP (2)
controlling device 1e100b10.pinmux
group mdio
function mdio
root@OpenWrt:~# cat /sys/kernel/debug/pinctrl/*/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (io0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 1 (io1): (MUX UNCLAIMED) XWAY GPIO:463
pin 2 (io2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 3 (io3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (io4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (io5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 6 (io6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (io7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 8 (io8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 9 (io9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 10 (io10): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_cs4
pin 11 (io11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 12 (io12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 13 (io13): 14000000.flash (GPIO UNCLAIMED) function ebu group nand ale
pin 14 (io14): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 15 (io15): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 16 (io16): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_di
pin 17 (io17): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_do
pin 18 (io18): 1e100800.spi (GPIO UNCLAIMED) function spi group spi_clk
pin 19 (io19): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 20 (io20): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 21 (io21): (MUX UNCLAIMED) XWAY GPIO:483
pin 22 (io22): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 23 (io23): 14000000.flash (GPIO UNCLAIMED) function ebu group nand cs1
pin 24 (io24): 14000000.flash (GPIO UNCLAIMED) function ebu group nand cle
pin 25 (io25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 26 (io26): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 27 (io27): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 28 (io28): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 29 (io29): (MUX UNCLAIMED) XWAY GPIO:491
pin 30 (io30): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 31 (io31): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 32 (io32): (MUX UNCLAIMED) XWAY GPIO:494
pin 33 (io33): (MUX UNCLAIMED) XWAY GPIO:495
pin 34 (io34): (MUX UNCLAIMED) XWAY GPIO:496
pin 35 (io35): (MUX UNCLAIMED) XWAY GPIO:497
pin 36 (io36): (MUX UNCLAIMED) XWAY GPIO:498
pin 37 (io37): (MUX UNCLAIMED) XWAY GPIO:499
pin 38 (io38): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 39 (io39): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 40 (io40): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 41 (io41): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 42 (io42): 1e108000.eth (GPIO UNCLAIMED) function mdio group mdio
pin 43 (io43): 1e108000.eth (GPIO UNCLAIMED) function mdio group mdio
pin 44 (io44): (MUX UNCLAIMED) XWAY GPIO:506
pin 45 (io45): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 46 (io46): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 47 (io47): (MUX UNCLAIMED) XWAY GPIO:509
pin 48 (io48): 14000000.flash (GPIO UNCLAIMED) function ebu group nand rdy
pin 49 (io49): 14000000.flash (GPIO UNCLAIMED) function ebu group nand rd

I also looked into the git history. Maybe this commit has something to do with the regression:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=f8ea7c53fd227a9c21f0ca45a2c3345312ea54b5

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jun 2, 2021

MPW:

Oh, just saw, forgot to answer your question: The physical link (layer-1) is there. If I connect port 3 or 4 to a switch, it shows me 100 Mbit/s.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Dec 23, 2021

skleeschulte:

I can add this information: When I connect a 100baseT-only device to LAN port 3 or 4, everything works as expected. When I connect a 1000baseT capable device, that device's ethernet port shows it is working in 100baseT mode; however, the port status on page /cgi-bin/luci/admin/network/switch shows "1000baseT full-duplex".

Is anyone working on this issue? What would be the next step to do?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Dec 27, 2021

Hauke:

Is the traffic working like expected and the only problem you see is that the wrong mode, "1000baseT full-duplex" instead of "100baseT full-duplex" is shown in LuCI?

Could you please provide the output of "ethtool " for both cases and the output of this command: "ubus call network.device status".

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Dec 30, 2021

Martinius:

Hi I can confirm this behavior. The ports are not working, only the first and second ethernet port are working. Here is also a link to a thread were other users confirm that after the upgrade the ports appear to be dead.

https://forum.openwrt.org/t/fritzbox-7362-sl-openwrt-port/28187/38

If it helps my output for "ubus call network.device status" is:

"br-lan": {
"external": false,
"present": true,
"type": "bridge",
"up": true,
"carrier": true,
"auth_status": false,
"bridge-members": [
"eth0"
],
"mtu": 1500,
"mtu6": 1500,
"macaddr": "2e:b1:c8:03:5e:d8",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 41710,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 174371804,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 1414506,
"tx_heartbeat_errors": 0,
"rx_dropped": 24,
"tx_aborted_errors": 0,
"tx_packets": 2393192,
"rx_errors": 0,
"tx_bytes": 2941462075,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 1500,
"mtu6": 1500,
"macaddr": "2e:b1:c8:03:5e:d8",
"txqueuelen": 1000,
"ipv6": false,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 210041988,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 1334468,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 2264175,
"rx_errors": 0,
"tx_bytes": 2908567814,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0.1": {
"external": false,
"present": true,
"type": "VLAN",
"up": false,
"carrier": false,
"auth_status": false,
"statistics": {

            }
    },
    "lo": {
            "external": false,
            "present": true,
            "type": "Network device",
            "up": true,
            "carrier": true,
            "auth_status": false,
            "mtu": 65536,
            "mtu6": 65536,
            "macaddr": "00:00:00:00:00:00",
            "txqueuelen": 1000,
            "ipv6": true,
            "ip6segmentrouting": false,
            "promisc": false,
            "rpfilter": 0,
            "acceptlocal": false,
            "igmpversion": 0,
            "mldversion": 0,
            "neigh4reachabletime": 30000,
            "neigh6reachabletime": 30000,
            "neigh4gcstaletime": 60,
            "neigh6gcstaletime": 60,
            "neigh4locktime": 100,
            "dadtransmits": 1,
            "multicast": false,
            "sendredirects": true,
            "drop_v4_unicast_in_l2_multicast": false,
            "drop_v6_unicast_in_l2_multicast": false,
            "drop_gratuitous_arp": false,
            "drop_unsolicited_na": false,
            "arp_accept": false,
            "statistics": {
                    "collisions": 0,
                    "rx_frame_errors": 0,
                    "tx_compressed": 0,
                    "multicast": 0,
                    "rx_length_errors": 0,
                    "tx_dropped": 0,
                    "rx_bytes": 57824,
                    "rx_missed_errors": 0,
                    "tx_errors": 0,
                    "rx_compressed": 0,
                    "rx_over_errors": 0,
                    "tx_fifo_errors": 0,
                    "rx_crc_errors": 0,
                    "rx_packets": 683,
                    "tx_heartbeat_errors": 0,
                    "rx_dropped": 0,
                    "tx_aborted_errors": 0,
                    "tx_packets": 683,
                    "rx_errors": 0,
                    "tx_bytes": 57824,
                    "tx_window_errors": 0,
                    "rx_fifo_errors": 0,
                    "tx_carrier_errors": 0
            }
    },</code>

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 1, 2022

skleeschulte:

To clarify: LAN ports 3 and 4 only work correctly, when not connected or connected to a 100baseT-only device. In this case, the port status on page /cgi-bin/luci/admin/network/switch is correct and network connectivity works as expected.

As soon as at least one 1000baseT-capable device is connected to port 3 or 4, both ports (3 and 4) stop working.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 1, 2022

skleeschulte:

Here are the outputs of "ethtool " and "ubus call network.device status" for both cases:

With a 100baseT-only device connected to LAN port 3 and port 4 unconnected:

root@openwrt:# ethtool br-lan
Settings for br-lan:
Link detected: yes
root@openwrt:
# ethtool eth0
Settings for eth0:
No data available
root@openwrt:# ethtool eth0.1
Settings for eth0.1:
Link detected: yes
root@openwrt:
# ubus call network.device status
{
"br-lan": {
"external": false,
"present": true,
"type": "bridge",
"up": true,
"carrier": true,
"auth_status": false,
"bridge-members": [
"eth0.1",
"wlan0",
"wlan0-1"
],
"mtu": 1500,
"mtu6": 1500,
"macaddr": "5c:49:79:...",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 565756,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 5267718406,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 17636388,
"tx_heartbeat_errors": 0,
"rx_dropped": 840211,
"tx_aborted_errors": 0,
"tx_packets": 16481506,
"rx_errors": 0,
"tx_bytes": 5409463939,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 1500,
"mtu6": 1500,
"macaddr": "7a:80:9a:...",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 1047296502,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 46316538,
"tx_heartbeat_errors": 0,
"rx_dropped": 8,
"tx_aborted_errors": 0,
"tx_packets": 31679152,
"rx_errors": 0,
"tx_bytes": 107964942,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0.1": {
"external": false,
"present": true,
"type": "VLAN",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 1500,
"mtu6": 1500,
"macaddr": "5c:49:79:...",
"txqueuelen": 1000,
"ipv6": false,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 679482,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 38497760900,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 46316450,
"tx_heartbeat_errors": 0,
"rx_dropped": 27989,
"tx_aborted_errors": 0,
"tx_packets": 31679199,
"rx_errors": 0,
"tx_bytes": 8437092062,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"lo": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 65536,
"mtu6": 65536,
"macaddr": "00:00:00:00:00:00",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": false,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 557116,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 5818,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 5818,
"rx_errors": 0,
"tx_bytes": 557116,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"vxlan_a": ...,
"wg_a": ...,
"wg_b": ...,
"wlan0": ...,
"wlan0-1": ...
}

With a 1000baseT-capable device connected to LAN port 3 and port 4 unconnected:

root@openwrt:# ethtool br-lan
Settings for br-lan:
Link detected: yes
root@openwrt:
# ethtool eth0
Settings for eth0:
No data available
root@openwrt:# ethtool eth0.1
Settings for eth0.1:
Link detected: yes
root@openwrt:
# ubus call network.device status
{
"br-lan": {
"external": false,
"present": true,
"type": "bridge",
"up": true,
"carrier": true,
"auth_status": false,
"bridge-members": [
"eth0.1",
"wlan0",
"wlan0-1"
],
"mtu": 1500,
"mtu6": 1500,
"macaddr": "5c:49:79:...",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 566263,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 5269387994,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 17643701,
"tx_heartbeat_errors": 0,
"rx_dropped": 840619,
"tx_aborted_errors": 0,
"tx_packets": 16488245,
"rx_errors": 0,
"tx_bytes": 5411611091,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 1500,
"mtu6": 1500,
"macaddr": "7a:80:9a:...",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 1049305323,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 46324740,
"tx_heartbeat_errors": 0,
"rx_dropped": 8,
"tx_aborted_errors": 0,
"tx_packets": 31686608,
"rx_errors": 0,
"tx_bytes": 110321443,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"eth0.1": {
"external": false,
"present": true,
"type": "VLAN",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 1500,
"mtu6": 1500,
"macaddr": "5c:49:79:...",
"txqueuelen": 1000,
"ipv6": false,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": true,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 680260,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 38499556469,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 46324652,
"tx_heartbeat_errors": 0,
"rx_dropped": 28003,
"tx_aborted_errors": 0,
"tx_packets": 31686655,
"rx_errors": 0,
"tx_bytes": 8439385553,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"lo": {
"external": false,
"present": true,
"type": "Network device",
"up": true,
"carrier": true,
"auth_status": false,
"mtu": 65536,
"mtu6": 65536,
"macaddr": "00:00:00:00:00:00",
"txqueuelen": 1000,
"ipv6": true,
"ip6segmentrouting": false,
"promisc": false,
"rpfilter": 0,
"acceptlocal": false,
"igmpversion": 0,
"mldversion": 0,
"neigh4reachabletime": 30000,
"neigh6reachabletime": 30000,
"neigh4gcstaletime": 60,
"neigh6gcstaletime": 60,
"neigh4locktime": 100,
"dadtransmits": 1,
"multicast": false,
"sendredirects": true,
"drop_v4_unicast_in_l2_multicast": false,
"drop_v6_unicast_in_l2_multicast": false,
"drop_gratuitous_arp": false,
"drop_unsolicited_na": false,
"arp_accept": false,
"statistics": {
"collisions": 0,
"rx_frame_errors": 0,
"tx_compressed": 0,
"multicast": 0,
"rx_length_errors": 0,
"tx_dropped": 0,
"rx_bytes": 586016,
"rx_missed_errors": 0,
"tx_errors": 0,
"rx_compressed": 0,
"rx_over_errors": 0,
"tx_fifo_errors": 0,
"rx_crc_errors": 0,
"rx_packets": 6155,
"tx_heartbeat_errors": 0,
"rx_dropped": 0,
"tx_aborted_errors": 0,
"tx_packets": 6155,
"rx_errors": 0,
"tx_bytes": 586016,
"tx_window_errors": 0,
"rx_fifo_errors": 0,
"tx_carrier_errors": 0
}
},
"vxlan_a": ...,
"wg_a": ...,
"wg_b": ...,
"wlan0": ...,
"wlan0-1": ...
}

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 2, 2022

nicefile:

some tests on ​FB7362

OpenWrt SNAPSHOT, r18460-def9565be6
doesnt even detect link

OpenWrt SNAPSHOT, r17180-089c2bb217
link is up and alive for ~30s but no real traffic possible

root@OpenWrt:~# logread |grep lan4
Wed Jul 21 15:48:45 2021 kern.info kernel: [ 1.495737] gswip 1e108000.switch lan4 (uninitialized): PHY [1e108000.switch-mii:01] driver [Atheros 8030 ethernet]
Wed Jul 21 15:49:10 2021 kern.info kernel: [ 48.364259] gswip 1e108000.switch lan4: configuring for phy/rmii link mode
Wed Jul 21 15:49:10 2021 kern.info kernel: [ 48.372887] 8021q: adding VLAN 0 to HW filter on device lan4
Wed Jul 21 15:49:10 2021 kern.info kernel: [ 48.393889] br-lan: port 4(lan4) entered blocking state
Wed Jul 21 15:49:10 2021 kern.info kernel: [ 48.397682] br-lan: port 4(lan4) entered disabled state
Wed Jul 21 15:49:10 2021 kern.info kernel: [ 48.433289] device lan4 entered promiscuous mode
Wed Jul 21 15:52:44 2021 kern.info kernel: [ 263.053590] gswip 1e108000.switch lan4: Link is Up - 100Mbps/Full - flow control rx/tx
Wed Jul 21 15:52:44 2021 kern.info kernel: [ 263.060120] br-lan: port 4(lan4) entered blocking state
Wed Jul 21 15:52:44 2021 kern.info kernel: [ 263.065382] br-lan: port 4(lan4) entered forwarding state
Wed Jul 21 15:52:44 2021 daemon.notice netifd: Network device 'lan4' link is up
Wed Jul 21 15:53:17 2021 kern.info kernel: [ 295.293562] gswip 1e108000.switch lan4: Link is Down
Wed Jul 21 15:53:17 2021 kern.info kernel: [ 295.297312] br-lan: port 4(lan4) entered disabled state
Wed Jul 21 15:53:17 2021 daemon.notice netifd: Network device 'lan4' link is down

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 14, 2022

Martinius:

Could we mark this as confirmed?

@abajk
Copy link
Contributor

@abajk abajk commented Feb 22, 2022

Kestrel discovered that the wrong reset pin numbers were probably to blame. It would be good if someone could verify this on his device.

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Feb 25, 2022

@skleeschulte @nicefile Hi, since I do not own the device, can you try changing the GPIO reset pin in the vr9_avm_fritz736x.dtsi from 37 to 45 and see if that solves the issue with the ports?

@nicefile
Copy link

@nicefile nicefile commented Feb 25, 2022

@kestrel1974 nothing changed here . lan3 and4 is up /down all the time with 10/100 or 1Gbit client. With 100Mbit client I'm able to even ssh to router but still flapping .7362SL tested

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Feb 25, 2022

@nicefile To bad, I cannot see anything else that differs.

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Feb 26, 2022

@nicefile Can you change the 37 to 45 here too and give it another try?

Edit1: 37 to 45 please.

@nicefile
Copy link

@nicefile nicefile commented Feb 26, 2022

@kestrel1974 no cigar .Exactly like described before . This might be something that came with linux-5.4 . On snapshot c331932 @5.4.69 version lan3&4 work only with 100Mbit client but same snapshot @4.19.138 lan3&4 work with 1Gbit client .

@abajk
Copy link
Contributor

@abajk abajk commented Feb 26, 2022

@nicefile Which device model do you have exactly?

@nicefile
Copy link

@nicefile nicefile commented Feb 26, 2022

@abajk fb7362sl branded by 1&1 . Also I've tested freshly added DSA with snapshot 964863b and guest what ? lan3 and lan4 flapping with 100Mb and 1Gb client .

@skleeschulte
Copy link

@skleeschulte skleeschulte commented Feb 26, 2022

What does "flapping" mean in this context?

@nicefile
Copy link

@nicefile nicefile commented Feb 26, 2022

@skleeschulte lan3 and lan4 device link goes up and down in circle . Visible in logs clearly .

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Feb 27, 2022

@abajk There are traces in the web, that the 7362 SL (1und1) has the internal ports (1 + 2) as Gigabit and the external ports (3 + 4) as Fast ethernet only. Would that combination work? Is there any chance that based on the current device tree, that it is tried to set ports 3 + 4 to gigabit ethernet and as such the repeated turn it on, turn it off occurs? gswip_phy_link_up is externalized through dsa switch ops. I wonder if the caller uses SPEED_1000 as parameter for the two RMII ports because the speed register of the at803x.c query returns AT803X_SS_SPEED_1000 for ports 3 + 4?

The avm stock firmware config sets ports 3 + 4 to MAC_RMII and it seems its just setting the flags without querying the bits from the phy, there is just two devices that set MAC_MODE_AUTO, so I guess the hard coded setting applies.

But I dont own the device. I wonder if @nicefile could add "case SPEED_1000:" before this line and post back what the result is. I assume this would limit all ports to 100MBit or Fast Ethernet, but maybe the flapping goes away.

Its a lot of speculation on my end. Maybe case SPEED_1000: needs to add a check if phy interface mode is RMII and then not set to 1G?

@nicefile
Copy link

@nicefile nicefile commented Feb 28, 2022

@kestrel1974 . Hardware is like described internal lantiq 1Gb phy for port 1 + 2 and external (AR8030) FE phy for 3 + 4. Others reported that luci shows 1Gbit on port 3 + 4 .And ethtool shows supported and advertised on 10/100 level Also with 1Gb clients . I can test any idea but is it possible to paste modified part here or patch file ? pull 3085 to DSA drivers definitely broke something even if 1Gb clients didn't work before merge on ports 3 +4

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Feb 28, 2022

@nicefile Please copy the attached file to target/linux/lantiq/patches-5.10, rename it to .patch plus change the two occurances of 37 in the vr9_avm_fritz7362sl.dts and then do a build and test it. My guess is that in some register Gigabit ethernet bit is set, which results in trying to set the gigabit configuration in mac up. Lets see if thats a match.
0755-fritzbox7362sl-test.txt
.

@nicefile
Copy link

@nicefile nicefile commented Feb 28, 2022

@kestrel1974 still getting up and down on ports 3 & 4 with 100Mb client . I've double checked the both changes to dtsi and lantiq_gswip.c .

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Mar 1, 2022

@nicefile Thanks for testing. Then its probably something more difficult. I guess that the issue is dependent on the fact that for port 3+4 to be Gigabit ports they need external phys, which are not present at the 7362 sl. It could also be something in the at803x.c driver.

@kestrel1974
Copy link
Contributor

@kestrel1974 kestrel1974 commented Mar 1, 2022

@nicefile I have created a patch (based on 5.10.100 which hopefully also works with your 5.10 kernel version) that brings you back the at803x.c phy of the kernel 4.19. I have tested it and it works even on the 7490. It would be great if you can test it, please remove the other patch I sent you.
It looks like a bug in the phy code of the kernel. This needs to be reported as a kernel bug, but since in the source file it is mentioned, that there is no data sheet for the 8030, it might be hard to impossible to fix it. Furthermore there were tons of changes, about 20kB more source code since then, will be difficult to find the problem.
There is one trace, you mentioned the jump from 4.19 to 5.4 when the GB clients stopped working, thats when they introduced querying the speed from a bit mask . It could be that the bit mask used does not apply to the 8030
0755-at803x-to-kernel-4.19-version.txt
.

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 21, 2022

@nicefile thanks, this confirms that the regulator code in at803x.c is not causing this issue (there's a potential issue when registers are being written/read in parallel in the regulator code-path)

please remove the target/linux/lantiq/patches-5.10/9999-HACK.patch from the previous test and apply the following patch to your OpenWrt tree instead:
vr9_avm_fritz736xsl-remove-phy-resets.patch
If the reset logic is buggy (which it may be, I think it's not saving/restoring all registers) then skipping the HW reset should keep it working. That said, you need to see if you get any traffic at all when a cable is plugged/unplugged during boot (AT8030 has a bug where it can lock up and not send/receive data. so try booting with a cable connected, if that doesn't help: try booting without a cable connected. hot-plugging while Linux is running may - or may not - work due to that PHY hardware bug and us temporarily removing the reset lines)

@nicefile
Copy link

@nicefile nicefile commented Apr 22, 2022

@xdarklight so with 100Mbit client connected on boot i have random UP/DOWN events and traffic in up state is visible (RX/TX packets counts). But after a while longer period of UP is visible but no traffic . Then UP/DOWN events start kicking again but with no traffic.
With hot plug its behave the same
below log is from on boot connected lan3 then cable is swapped to lan4.

root@7362sl:~# logread |grep lan3|grep link
Wed Apr 20 10:06:39 2022 kern.info kernel: [   47.913636] gswip 1e108000.switch lan3: configuring for phy/rmii link mode
Wed Apr 20 10:06:41 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:06:44 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:06:46 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:06:47 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:06:50 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:06:54 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:06:56 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:06:57 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:01 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:02 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:04 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:14 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:16 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:17 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:19 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:34 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:36 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:39 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:41 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:42 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:44 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:45 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:49 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:50 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:52 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:07:53 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:07:55 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:10:26 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:10:28 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:10:29 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:10:33 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:10:34 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:10:36 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:10:37 2022 daemon.notice netifd: Network device 'lan3' link is down
Wed Apr 20 10:10:42 2022 daemon.notice netifd: Network device 'lan3' link is up
Wed Apr 20 10:10:59 2022 daemon.notice netifd: Network device 'lan3' link is down
root@7362sl:~# logread |grep lan4|grep link
Wed Apr 20 10:06:39 2022 kern.info kernel: [   47.970583] gswip 1e108000.switch lan4: configuring for phy/rmii link mode
Wed Apr 20 10:11:02 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:11:09 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:11:13 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:11:14 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:11:16 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:11:17 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:11:19 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:11:20 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:11:21 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:05 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:07 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:08 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:10 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:11 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:13 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:16 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:20 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:21 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:24 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:25 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:27 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:33 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:35 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:37 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:39 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:42 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:46 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:47 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:50 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:52 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:53 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:54 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:56 2022 daemon.notice netifd: Network device 'lan4' link is up
Wed Apr 20 10:12:57 2022 daemon.notice netifd: Network device 'lan4' link is down
Wed Apr 20 10:12:59 2022 daemon.notice netifd: Network device 'lan4' link is up

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 22, 2022

@nicefile thanks, that means hard resetting the PHY is not the cause of the up/down cycling issue.

Between 4.14 and 5.4 one of the differences is that the PHY is not soft reset anymore unless there's a .soft_reset callback configured. The following patch (to be placed in target/linux/lantiq/patches-5.10/999-at803x-ar8030-soft-reset.patch) adds it back: 9999-at803x-ar8030-soft-reset.patch

Another observation I made is that AVM uses a 10ms delay after changing the GPIO's reset line. We can do the same with the following patch (applied directly against the OpenWrt tree): vr9_avm_fritz736xsl-add-reset-delays.patch

Please test the patches individually and by removing any previous patches/changes.

PS: These steps also apply to the 7360 SL if anyone wants to test on that board.

@nicefile
Copy link

@nicefile nicefile commented Apr 24, 2022

@kestrel1974 thank You for your patches. So I have tested them both in separate builds and guess what ? no change in behaviour . In previous test I've checked that DSA driver support caused UP/DOWN loop and migration from 4.19 to 5.4 killed media sense for ar8030 PHY . Is it possible to keep DSA for ports 1&2 and swconfig for 3&4 ?

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 24, 2022

So I have tested them both in separate builds and guess what ? no change in behaviour

that's unfortunate, still thank you for testing and reporting back!

In previous test I've checked that DSA driver support caused UP/DOWN loop and migration from 4.19 to 5.4 killed media sense for ar8030 PHY . Is it possible to keep DSA for ports 1&2 and swconfig for 3&4 ?

huh, let me mention my interepretation of the problem we're looking at to make sure that there's no misunderstanding.

My understanding is that LAN 3 and 4 are cycling between link UP/DOWN since OpenWrt 21.02.
21.02 is still using the swconfig based switch driver, only 22.03 and master are using the DSA driver.

What do you mean with "migration from 4.19 to 5.4 killed media sense for ar8030 PHY"?
Does this mean that in OpenWrt 21.02 there's no link UP/DOWN spam but instead the link is always down on LAN 3 and 4?

@Martinius
Copy link

@Martinius Martinius commented Apr 24, 2022

My understanding is that LAN 3 and 4 are cycling between link UP/DOWN since OpenWrt 21.02.
21.02 is still using the swconfig based switch driver, only 22.03 and master are using the DSA driver.

What do you mean with "migration from 4.19 to 5.4 killed media sense for ar8030 PHY"?
Does this mean that in OpenWrt 21.02 there's no link UP/DOWN spam but instead the link is always down on LAN 3 and 4?

I do not see any UP/DOWN Spam in my kernel log. It registers a link on the ports, but there is not traffic possible (No ping/ DHCP from or to connected devices). Here is the relevant kernel log when connecting and disconnecting devices to the ports:

[55778.837642] lantiq,xrx200-net 1e108000.eth eth0: port 0 got link
[55870.995786] lantiq,xrx200-net 1e108000.eth eth0: port 0 lost link
[55902.771276] lantiq,xrx200-net 1e108000.eth eth0: port 1 got link
[56024.624769] lantiq,xrx200-net 1e108000.eth eth0: port 1 lost link

logread |grep lan3|grep link and logread |grep lan4|grep link don't return any results

I run the vanilla OpenWrt 21.02 with no patches. For completeness here is my boot log (no devices connected to Lan port 3 and 4):


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 SMP Sun Oct 24 09:01:35 2021
[    0.000000] SoC: xRX200 rev 1.2
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is AVM FRITZ!Box 7362 SL
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] percpu: Embedded 14 pages/cpu s26256 r8192 d22896 u57344
[    0.000000] pcpu-alloc: s26256 r8192 d22896 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyLTQ0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00000841
[    0.000000] Readback ErrCtl register=00000841
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 120652K/131072K available (6252K kernel code, 217K rwdata, 1040K rodata, 1240K init, 223K bss, 10420K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from 0x8075aa38 with crng_init=0
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000012] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.007916] Calibrating delay loop... 332.54 BogoMIPS (lpj=665088)
[    0.045996] pid_max: default: 32768 minimum: 301
[    0.050941] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.058135] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.069537] rcu: Hierarchical SRCU implementation.
[    0.075106] smp: Bringing up secondary CPUs ...
[    0.080845] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.080864] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.080959] CPU1 revision is: 00019556 (MIPS 34Kc)
[    0.111779] Synchronize counters for CPU 1: done.
[    0.136176] smp: Brought up 1 node, 2 CPUs
[    0.146479] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.156141] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.163167] pinctrl core: initialized pinctrl subsystem
[    0.170823] NET: Registered protocol family 16
[    0.184225] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 1016 mV
[    0.198818] pinctrl-xway 1e100b10.pinmux: Init done
[    0.205408] dma-xway 1e104100.dma: Init done - hw rev: 7, ports: 7, channels: 28
[    0.217277] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.267118] usbcore: registered new interface driver usbfs
[    0.272789] usbcore: registered new interface driver hub
[    0.278172] usbcore: registered new device driver usb
[    0.283883] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.296391] clocksource: Switched to clocksource MIPS
[    0.303615] thermal_sys: Registered thermal governor 'step_wise'
[    0.304327] NET: Registered protocol family 2
[    0.314973] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.323329] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.331680] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.339349] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.346448] TCP: Hash tables configured (established 1024 bind 1024)
[    0.353042] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.359531] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.366861] NET: Registered protocol family 1
[    0.371217] PCI: CLS 0 bytes, default 32
[    0.375576] gptu: totally 6 16-bit timers/counters
[    0.380526] gptu: misc_register on minor 63
[    0.384702] gptu: succeeded to request irq 126
[    0.389188] gptu: succeeded to request irq 127
[    0.393729] gptu: succeeded to request irq 128
[    0.398231] gptu: succeeded to request irq 129
[    0.402749] gptu: succeeded to request irq 130
[    0.407244] gptu: succeeded to request irq 131
[    0.411964] No VPEs reserved for AP/SP, not initialize VPE loader
[    0.411964] Pass maxvpes=<n> argument as kernel argument
[    0.423342] random: fast init done
[    0.426837] No TCs reserved for AP/SP, not initializing RTLX.
[    0.426837] Pass maxtcs=<n> argument as kernel argument
[    0.440286] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.466758] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.472533] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.487587] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.504464] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    0.513439] printk: console [ttyLTQ0] enabled
[    0.522113] printk: bootconsole [early0] disabled
[    0.535972] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    0.540892] nand: Micron MT29F1G08ABADAWP
[    0.544895] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.552615] Scanning device for bad blocks
[    0.626506] 2 fixed-partitions partitions found on MTD device 14000000.flash
[    0.632152] Creating 2 MTD partitions on "14000000.flash":
[    0.637651] 0x000000000000-0x000000400000 : "kernel"
[    0.644888] 0x000000400000-0x000008000000 : "ubi"
[    0.654001] spi-lantiq-ssc 1e100800.spi: Lantiq SSC SPI controller (Rev 8, TXFS 8, RXFS 8, DMA 1)
[    0.674629] spi-nor spi0.4: s25fl008k (1024 Kbytes)
[    0.678214] 3 fixed-partitions partitions found on MTD device spi0.4
[    0.684446] Creating 3 MTD partitions on "spi0.4":
[    0.689256] 0x000000000000-0x000000040000 : "urlader"
[    0.695752] 0x000000040000-0x0000000a0000 : "tffs (1)"
[    0.701888] 0x0000000a0000-0x000000100000 : "tffs (2)"
[    0.709701] libphy: Fixed MDIO Bus: probed
[    0.723748] NET: Registered protocol family 10
[    0.731413] Segment Routing with IPv6
[    0.733914] NET: Registered protocol family 17
[    0.738261] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.751101] 8021q: 802.1Q VLAN Support v1.8
[    0.761752] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.874628] libphy: lantiq,xrx200-mdio: probed
[    0.884327] net-xrx200: invalid MAC, using random
[    0.887934] Atheros 8030 ethernet 0:00: attached PHY driver [Atheros 8030 ethernet] (mii_bus:phy_addr=0:00, irq=POLL)
[    0.898807] Atheros 8030 ethernet 0:01: attached PHY driver [Atheros 8030 ethernet] (mii_bus:phy_addr=0:01, irq=POLL)
[    0.909764] Intel XWAY PHY11G (xRX v1.2 integrated) 0:11: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:11, irq=POLL)
[    0.923484] Intel XWAY PHY11G (xRX v1.2 integrated) 0:13: attached PHY driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (mii_bus:phy_addr=0:13, irq=POLL)
[    1.062025] PCI host bridge /fpi@10000000/pcie@d900000 ranges:
[    1.066734] PCI host bridge to bus 0000:00
[    1.070593] pci_bus 0000:00: root bus resource [mem 0x1c000000-0x1cffffff]
[    1.077458] pci_bus 0000:00: root bus resource [io  0x1d800000-0x1d8fffff]
[    1.084395] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.091108] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.099081] pci 0000:00:00.0: [1bef:0011] type 01 class 0x060000
[    1.105047] ifx_pcie_rc_class_early_fixup: fixed pcie host bridge to pci-pci bridge
[    1.122772] pci 0000:00:00.0: 0x80442440 took 17292 usecs
[    1.126907] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.135823] pci 0000:01:00.0: [168c:abcd] type 00 class 0x020000
[    1.140529] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[    1.147327] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    1.154073] pci 0000:01:00.0: supports D1
[    1.157954] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[    1.166865] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.172121] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    1.178740] pci 0000:00:00.0: BAR 8: assigned [mem 0x1c000000-0x1c0fffff]
[    1.185521] pci 0000:00:00.0: BAR 9: assigned [mem 0x1c100000-0x1c1fffff pref]
[    1.192751] pci 0000:01:00.0: BAR 0: assigned [mem 0x1c000000-0x1c01ffff 64bit]
[    1.200090] pci 0000:01:00.0: BAR 6: assigned [mem 0x1c100000-0x1c10ffff pref]
[    1.207259] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.212247] pci 0000:00:00.0:   bridge window [mem 0x1c000000-0x1c0fffff]
[    1.219011] pci 0000:00:00.0:   bridge window [mem 0x1c100000-0x1c1fffff pref]
[    1.226372] ifx_pcie_bios_map_irq port 0 dev 0000:00:00.0 slot 0 pin 1 
[    1.232842] ifx_pcie_bios_map_irq dev 0000:00:00.0 irq 144 assigned
[    1.239150] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.247369] UBI: auto-attach mtd1
[    1.249377] ubi0: attaching mtd1
[    1.662361] ubi0: scanning is finished
[    1.679254] ubi0: attached mtd1 (name "ubi", size 124 MiB)
[    1.683398] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.690241] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.696937] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    1.703733] ubi0: good PEBs: 992, bad PEBs: 0, corrupted PEBs: 0
[    1.709716] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    1.716953] ubi0: max/mean erase counter: 132/62, WL threshold: 4096, image sequence number: 986535732
[    1.726264] ubi0: available PEBs: 0, total reserved PEBs: 992, PEBs reserved for bad PEB handling: 20
[    1.735576] ubi0: background thread "ubi_bgt0d" started, PID 482
[    1.740605] block ubiblock0_0: created from ubi0:0(rootfs)
[    1.747033] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    1.761814] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    1.769603] Freeing unused kernel memory: 1240K
[    1.772742] This architecture does not have kernel memory protection.
[    1.779149] Run /sbin/init as init process
[    2.466530] init: Console is alive
[    2.468974] init: - watchdog -
[    3.694780] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.972176] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[    3.979226] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[    4.088874] dwc2 1e101000.usb: DWC OTG Controller
[    4.092313] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[    4.099391] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[    4.106178] hub 1-0:1.0: USB hub found
[    4.108741] hub 1-0:1.0: 1 port detected
[    4.114041] dwc2 1e106000.usb: 1e106000.usb supply vusb_d not found, using dummy regulator
[    4.121169] dwc2 1e106000.usb: 1e106000.usb supply vusb_a not found, using dummy regulator
[    4.230720] dwc2 1e106000.usb: DWC OTG Controller
[    4.234163] dwc2 1e106000.usb: new USB bus registered, assigned bus number 2
[    4.241128] dwc2 1e106000.usb: irq 91, io mem 0x1e106000
[    4.248008] hub 2-0:1.0: USB hub found
[    4.250772] hub 2-0:1.0: 1 port detected
[    4.257377] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.265342] init: - preinit -
[    5.294736] lantiq,xrx200-net 1e108000.eth eth0: port 4 got link
[    5.299439] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.331446] random: procd: uninitialized urandom read (4 bytes read)
[    8.352549] lantiq,xrx200-net 1e108000.eth eth0: port 2 got link
[    9.591425] UBIFS (ubi0:1): Mounting in unauthenticated mode
[    9.596141] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 563
[    9.651849] UBIFS (ubi0:1): recovery needed
[    9.787079] UBIFS (ubi0:1): recovery completed
[    9.790401] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    9.797967] UBIFS (ubi0:1): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.807888] UBIFS (ubi0:1): FS size: 119218176 bytes (113 MiB, 924 LEBs), journal size 5935104 bytes (5 MiB, 46 LEBs)
[    9.818513] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[    9.825142] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 67933AFF-AEEB-44F4-8321-44BE6DF14DB7, small LPT model
[    9.847788] mount_root: loading kmods from internal overlay
[   10.034292] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   10.374617] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.413576] SCSI subsystem initialized
[   10.429141] ehci-fsl: Freescale EHCI Host controller driver
[   10.435385] ehci-platform: EHCI generic platform driver
[   10.496930] usbcore: registered new interface driver usb-storage
[   10.507081] usbcore: registered new interface driver uas
[   10.511642] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   11.875393] random: crng init done
[   12.124266] block: attempting to load /tmp/ubifs_cfg/upper/etc/config/fstab
[   12.136946] block: extroot: not configured
[   12.142933] mount_root: switching to ubifs overlay
[   12.163869] urandom-seed: Seeding with /etc/urandom.seed
[   12.441257] lantiq,xrx200-net 1e108000.eth eth0: port 2 lost link
[   12.446111] lantiq,xrx200-net 1e108000.eth eth0: port 4 lost link
[   12.468807] procd: - early -
[   12.470441] procd: - watchdog -
[   13.151425] procd: - watchdog -
[   13.156635] procd: - ubus -
[   13.274563] procd: - init -
[   14.979996] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.022038] IFXOS, Version 1.5.19 (c) Copyright 2009, Lantiq Deutschland GmbH
[   15.034250] NET: Registered protocol family 8
[   15.037254] NET: Registered protocol family 20
[   15.058136] PPP generic driver version 2.4.2
[   15.309151] urngd: v1.0.2 started.
[   15.309784] Lantiq (VRX) DSL CPE MEI driver, version 1.5.17.6, (c) 2007-2015 Lantiq Beteiligungs-GmbH & Co. KG
[   15.323950] 
[   15.323950] 
[   15.323950] Lantiq CPE API Driver version: DSL CPE API V4.17.18.6
[   15.341733] 
[   15.341733] Predefined debug level: 3
[   15.390920] fuse: init (API version 7.31)
[   15.409103] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   15.415318] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   15.445373] Infineon Technologies DEU driver version 2.0.0 
[   15.452851] IFX DEU DES initialized (multiblock).
[   15.458932] IFX DEU AES initialized (multiblock).
[   15.463478] IFX DEU ARC4 initialized (multiblock).
[   15.467631] IFX DEU SHA1 initialized.
[   15.471334] IFX DEU MD5 initialized.
[   15.474852] IFX DEU SHA1_HMAC initialized.
[   15.479060] IFX DEU MD5_HMAC initialized.
[   15.498645] NET: Registered protocol family 24
[   15.517305] xt_time: kernel timezone is -0000
[   15.689306] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   15.695824] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   15.778955] ifx_pcie_bios_map_irq port 0 dev 0000:01:00.0 slot 0 pin 1 
[   15.784316] ifx_pcie_bios_map_irq dev 0000:01:00.0 irq 144 assigned
[   15.790573] ath9k 0000:01:00.0: enabling device (0000 -> 0002)
[   15.806074] ath: EEPROM regdomain: 0x8114
[   15.806091] ath: EEPROM indicates we should expect a country code
[   15.806104] ath: doing EEPROM country->regdmn map search
[   15.806116] ath: country maps to regdmn code: 0x37
[   15.806128] ath: Country alpha2 being used: DE
[   15.806137] ath: Regpair used: 0x37
[   15.821835] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   15.827117] ieee80211 phy0: Atheros AR9300 Rev:3 mem=0xbc000000, irq=144
[   15.835408] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.053216] br-lan: port 1(eth0) entered blocking state
[   32.057213] br-lan: port 1(eth0) entered disabled state
[   32.063261] device eth0 entered promiscuous mode
[   35.136683] lantiq,xrx200-net 1e108000.eth eth0: port 4 got link
[   35.141727] br-lan: port 1(eth0) entered blocking state
[   35.146644] br-lan: port 1(eth0) entered forwarding state
[   35.188539] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   39.232705] lantiq,xrx200-net 1e108000.eth eth0: port 2 got link
[   41.067687] br-lan: port 2(wlan0) entered blocking state
[   41.071768] br-lan: port 2(wlan0) entered disabled state
[   41.077793] device wlan0 entered promiscuous mode
[   41.373359] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   41.378914] br-lan: port 2(wlan0) entered blocking state
[   41.383753] br-lan: port 2(wlan0) entered forwarding state
[   41.455935] br-guest_lan: port 1(wlan0-1) entered blocking state
[   41.460637] br-guest_lan: port 1(wlan0-1) entered disabled state
[   41.467477] device wlan0-1 entered promiscuous mode
[   41.497251] br-guest_lan: port 1(wlan0-1) entered blocking state
[   41.501916] br-guest_lan: port 1(wlan0-1) entered forwarding state
[   41.510193] IPv6: ADDRCONF(NETDEV_CHANGE): br-guest_lan: link becomes ready
[   41.927298] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   41.959520] br-lan: port 3(wlan0-2) entered blocking state
[   41.963722] br-lan: port 3(wlan0-2) entered disabled state
[   41.969929] device wlan0-2 entered promiscuous mode
[   41.997198] br-lan: port 3(wlan0-2) entered blocking state
[   42.001335] br-lan: port 3(wlan0-2) entered forwarding state
[   42.048793] br-lan: port 3(wlan0-2) entered disabled state
[   42.449226] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   42.454981] br-lan: port 3(wlan0-2) entered blocking state
[   42.459955] br-lan: port 3(wlan0-2) entered forwarding state
[   73.088626] Lantiq PTM driver, version 1.0.27, (c) 2001-2013 Lantiq Deutschland GmbH
[   73.088626]     PTM (E1) firmware version 2.16.0
[   73.099632] ifxmips_ptm: PTM init succeed

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 24, 2022

My understanding is that LAN 3 and 4 are cycling between link UP/DOWN since OpenWrt 21.02.
21.02 is still using the swconfig based switch driver, only 22.03 and master are using the DSA driver.

What do you mean with "migration from 4.19 to 5.4 killed media sense for ar8030 PHY"?
Does this mean that in OpenWrt 21.02 there's no link UP/DOWN spam but instead the link is always down on LAN 3 and 4?

I do not see any UP/DOWN Spam in my kernel log. It registers a link on the ports, but there is not traffic possible (No ping/ DHCP from or to connected devices).

Thanks! This at confirms that at least the symptoms are different between the GSWIP and swconfig based drivers.
It's not clear to me though why @nicefile wants to know whether DSA and swconfig can be mixed (they can't) because the end result is the same: LAN 3 and 4 are not working (regardless of DSA or swconfig being used)

To anyone who is still interested: the following patch would affect both, 7360 SL and 7362 SL:
9999-gswip-use-rmii-refclk-from-phy.patch
With the GSWIP driver we're configuring the RMII clock as output (meaning: MAC provides the RMII clock) while AVM's driver doesn't touch this bit. Based on some PCB photos the component between the right PHY and the cap could be an oscillator. If it's outputting at 50MHz then it's probably used as RMII reference clock and then served as an input for (both) PHY(s) and the MAC.

@janh
Copy link
Contributor

@janh janh commented Apr 25, 2022

To anyone who is still interested: the following patch would affect both, 7360 SL and 7362 SL: 9999-gswip-use-rmii-refclk-from-phy.patch

This patch makes LAN3 and LAN4 work on my 7362 SL!

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 25, 2022

To anyone who is still interested: the following patch would affect both, 7360 SL and 7362 SL: 9999-gswip-use-rmii-refclk-from-phy.patch

This patch makes LAN3 and LAN4 work on my 7362 SL!

That's awesome! I will send this patch upstream later and mark it for backporting to stable kernels (5.10 and 5.15).
Can I add your Tested-by when I send that patch upstream?

@abajk
Copy link
Contributor

@abajk abajk commented Apr 25, 2022

@jospezial also reported LAN port instability issues on VGV7510KW22. This router uses an IC+ IP101A chip connected via the RMII interface. Maybe Martin's patch will fix this issue too.

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 25, 2022

@jospezial also reported LAN port instability issues on VGV7510KW22. This router uses an IC+ IP101A chip connected via the RMII interface. Maybe Martin's patch will fix this issue too.

just to manage hopes and dreams: I think this patch is unrelated to issues on VGV7510KW22 because

$ git grep mii target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi:              phy-mode = "mii";

If it the board was wired for MII instead of RMII then I think no traffic would flow at all.
Trying it out won't do any harm

@abajk
Copy link
Contributor

@abajk abajk commented Apr 25, 2022

just to manage hopes and dreams: I think this patch is unrelated to issues on VGV7510KW22 because

You are right. I looked in the wrong file.

@janh
Copy link
Contributor

@janh janh commented Apr 25, 2022

Can I add your Tested-by when I send that patch upstream?
Yes.

@nicefile
Copy link

@nicefile nicefile commented Apr 25, 2022

@xdarklight I can also confirm this patch work on my 7362SL with 100Mbit and 1Gb client . Hope to see it soon in master branch.

@allhailCdosdude
Copy link

@allhailCdosdude allhailCdosdude commented Apr 25, 2022

@jospezial
Copy link

@jospezial jospezial commented Apr 25, 2022

First step would be rename the patch to remove the .txt extension.

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 25, 2022

@xdarklight I can also confirm this patch work on my 7362SL with 100Mbit and 1Gb client . Hope to see it soon in master branch.

Thanks for confirming this!

Once the patch is accepted upstream (in the net.git tree) it'll take approx. one week to get into mainline.
From there it'll typically take one more week to show up in the next stable release.
And from then on it typically takes a few days to get that stable release into OpenWrt.

The benefit of this approach: the fix will show up in master but also also in the 22.03 branch.

If anyone really needs this sooner then please wait until the patch has been accepted in net.git and then backport it to OpenWrt yourself.

@allhailCdosdude
Copy link

@allhailCdosdude allhailCdosdude commented Apr 25, 2022

@xdarklight I can also confirm this patch work on my 7362SL with 100Mbit and 1Gb client . Hope to see it soon in master branch.

@xdarklight thanks a LOT for a much anticipated fix. We're all very grateful to you. @nicefile , can you please help me get my hands on this, an howto, use the patch would be great. I can't wait any longer for it to be taken up upstream. Please help. And thanks a lot.

@bananos
Copy link

@bananos bananos commented Apr 26, 2022

To anyone who is still interested: the following patch would affect both, 7360 SL and 7362 SL:
9999-gswip-use-rmii-refclk-from-phy.patch

@xdarklight Confirmed, your patch works on latest master on 7360 SL as well.

LAN 1 & 2 and LAN 3 & 4 seem to report correct link speeds (I was plugging ethernet cable back and forth)

root@OpenWrt:~# logread -f
Fri Apr 22 07:38:22 2022 kern.info kernel: [  886.660554] gswip 1e108000.switch lan2: Link is Up - 1Gbps/Full - flow control off
Fri Apr 22 07:38:22 2022 kern.info kernel: [  886.666760] br-lan: port 2(lan2) entered blocking state
Fri Apr 22 07:38:22 2022 kern.info kernel: [  886.672017] br-lan: port 2(lan2) entered forwarding state
Fri Apr 22 07:38:22 2022 daemon.notice netifd: Network device 'lan2' link is up
Fri Apr 22 07:38:23 2022 kern.info kernel: [  887.700407] gswip 1e108000.switch lan2: Link is Down
Fri Apr 22 07:38:23 2022 kern.info kernel: [  887.704105] br-lan: port 2(lan2) entered disabled state
Fri Apr 22 07:38:23 2022 daemon.notice netifd: Network device 'lan2' link is down
Fri Apr 22 07:38:27 2022 kern.info kernel: [  890.820545] gswip 1e108000.switch lan2: Link is Up - 1Gbps/Full - flow control off
Fri Apr 22 07:38:27 2022 kern.info kernel: [  890.826751] br-lan: port 2(lan2) entered blocking state
Fri Apr 22 07:38:27 2022 kern.info kernel: [  890.832008] br-lan: port 2(lan2) entered forwarding state
Fri Apr 22 07:38:27 2022 daemon.notice netifd: Network device 'lan2' link is up
Fri Apr 22 07:38:46 2022 kern.info kernel: [  910.580406] gswip 1e108000.switch lan2: Link is Down
Fri Apr 22 07:38:46 2022 kern.info kernel: [  910.584112] br-lan: port 2(lan2) entered disabled state
Fri Apr 22 07:38:46 2022 daemon.notice netifd: Network device 'lan2' link is down
Fri Apr 22 07:38:50 2022 kern.info kernel: [  913.941156] gswip 1e108000.switch lan3: Link is Up - 100Mbps/Full - flow control off
Fri Apr 22 07:38:50 2022 kern.info kernel: [  913.947558] br-lan: port 3(lan3) entered blocking state
Fri Apr 22 07:38:50 2022 kern.info kernel: [  913.953010] br-lan: port 3(lan3) entered forwarding state
Fri Apr 22 07:38:50 2022 daemon.notice netifd: Network device 'lan3' link is up
Fri Apr 22 07:39:15 2022 kern.info kernel: [  938.900812] gswip 1e108000.switch lan3: Link is Down
Fri Apr 22 07:39:15 2022 kern.info kernel: [  938.904962] br-lan: port 3(lan3) entered disabled state
Fri Apr 22 07:39:15 2022 daemon.notice netifd: Network device 'lan3' link is down
Fri Apr 22 07:39:18 2022 kern.info kernel: [  942.020707] gswip 1e108000.switch lan4: Link is Up - 100Mbps/Full - flow control off
Fri Apr 22 07:39:18 2022 kern.info kernel: [  942.027074] br-lan: port 4(lan4) entered blocking state
Fri Apr 22 07:39:18 2022 kern.info kernel: [  942.032333] br-lan: port 4(lan4) entered forwarding state
Fri Apr 22 07:39:18 2022 daemon.notice netifd: Network device 'lan4' link is up
Fri Apr 22 07:39:52 2022 kern.info kernel: [  976.340624] gswip 1e108000.switch lan4: Link is Down
Fri Apr 22 07:39:52 2022 kern.info kernel: [  976.344730] br-lan: port 4(lan4) entered disabled state
Fri Apr 22 07:39:52 2022 daemon.notice netifd: Network device 'lan4' link is down

bootlog

[    0.000000] Linux version 5.10.111 (bananos@ha) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 unknown) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Fri Apr 22 07:23:49 2022
[    0.000000] SoC: xRX200 rev 1.2
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is AVM FRITZ!Box 7360 SL
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] percpu: Embedded 14 pages/cpu s26448 r8192 d22704 u57344
[    0.000000] pcpu-alloc: s26448 r8192 d22704 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyLTQ0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00040180
[    0.000000] Readback ErrCtl register=00040180
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 119320K/131072K available (6610K kernel code, 624K rwdata, 1624K rodata, 1236K init, 211K bss, 11752K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x3d0/0x5e8 with crng_init=0
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000013] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.007915] Calibrating delay loop... 331.77 BogoMIPS (lpj=1658880)
[    0.073995] pid_max: default: 32768 minimum: 301
[    0.078928] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.086124] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.097697] rcu: Hierarchical SRCU implementation.
[    0.102824] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.110837] smp: Bringing up secondary CPUs ...
[    0.116415] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.116432] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.116527] CPU1 revision is: 00019556 (MIPS 34Kc)
[    0.170653] Synchronize counters for CPU 1: done.
[    0.194962] smp: Brought up 1 node, 2 CPUs
[    0.205733] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.215517] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.222451] pinctrl core: initialized pinctrl subsystem
[    0.228981] NET: Registered protocol family 16
[    0.273206] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 1016 mV
[    0.280958] pinctrl-xway 1e100b10.pinmux: Init done
[    0.292372] dma-xway 1e104100.dma: Init done - hw rev: 7, ports: 7, channels: 28
[    0.300563] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.367719] random: fast init done
[    0.376944] usbcore: registered new interface driver usbfs
[    0.383014] usbcore: registered new interface driver hub
[    0.388430] usbcore: registered new device driver usb
[    0.400121] clocksource: Switched to clocksource MIPS
[    0.408432] NET: Registered protocol family 2
[    0.413127] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.421920] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.430355] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.437974] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.445176] TCP: Hash tables configured (established 1024 bind 1024)
[    0.452100] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.458595] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.466131] NET: Registered protocol family 1
[    0.470659] PCI: CLS 0 bytes, default 32
[    0.476672] gptu: totally 6 16-bit timers/counters
[    0.481605] gptu: misc_register on minor 63
[    0.485821] gptu: succeeded to request irq 126
[    0.490317] gptu: succeeded to request irq 127
[    0.494708] gptu: succeeded to request irq 128
[    0.499239] gptu: succeeded to request irq 129
[    0.503861] gptu: succeeded to request irq 130
[    0.508250] gptu: succeeded to request irq 131
[    0.513013] No VPEs reserved for AP/SP, not initialize VPE loader
[    0.513013] Pass maxvpes=<n> argument as kernel argument
[    0.524427] No TCs reserved for AP/SP, not initializing RTLX.
[    0.524427] Pass maxtcs=<n> argument as kernel argument
[    0.539723] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.553641] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.559322] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.576199] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    0.585349] printk: console [ttyLTQ0] enabled
[    0.594012] printk: bootconsole [early0] disabled
[    0.607008] lantiq nor flash device: 01000000 at 10000000
[    0.611287] ltq_nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x00227e
[    0.620711] Amd/Fujitsu Extended Query Table at 0x0040
[    0.625747]   Amd/Fujitsu Extended Query version 1.3.
[    0.630821] number of CFI chips: 1
[    0.634252] 4 fixed-partitions partitions found on MTD device ltq_nor
[    0.640676] Creating 4 MTD partitions on "ltq_nor":
[    0.645497] 0x000000000000-0x000000020000 : "urlader"
[    0.652062] 0x000000020000-0x000000f80000 : "firmware"
[    0.662216] 2 eva-fw partitions found on MTD device firmware
[    0.666507] 0x000000020000-0x0000002badc4 : "kernel"
[    0.671522] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.681087] 0x0000002c0100-0x000000f80000 : "rootfs"
[    0.684679] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.695343] mtd: device 3 (rootfs) set to be root filesystem
[    0.699656] 1 squashfs-split partitions found on MTD device rootfs
[    0.705885] 0x0000005e0000-0x000000f80000 : "rootfs_data"
[    0.713077] 0x000000f80000-0x000000fc0000 : "tffs (1)"
[    0.718381] 0x000000fc0000-0x000001000000 : "tffs (2)"
[    1.083855] gswip 1e108000.switch: dsa switch register failed: -517
[    1.103047] NET: Registered protocol family 10
[    1.116206] Segment Routing with IPv6
[    1.118561] NET: Registered protocol family 17
[    1.123896] 8021q: 802.1Q VLAN Support v1.8
[    1.132870] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    1.481700] gswip 1e108000.switch lan3 (uninitialized): PHY [1e108000.switch-mii:00] driver [Qualcomm Atheros AR8030] (irq=POLL)
[    1.495254] gswip 1e108000.switch lan4 (uninitialized): PHY [1e108000.switch-mii:01] driver [Qualcomm Atheros AR8030] (irq=POLL)
[    1.510572] gswip 1e108000.switch lan2 (uninitialized): PHY [1e108000.switch-mii:11] driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (irq=POLL)
[    1.527150] gswip 1e108000.switch lan1 (uninitialized): PHY [1e108000.switch-mii:13] driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (irq=POLL)
[    1.541576] DSA: tree 0 setup
[    1.543169] gswip 1e108000.switch: probed GSWIP version 21 mod 0
[    1.673056] PCI host bridge /fpi@10000000/pcie@d900000 ranges:
[    1.677713] PCI host bridge to bus 0000:00
[    1.681637] pci_bus 0000:00: root bus resource [mem 0x1c000000-0x1cffffff]
[    1.688444] pci_bus 0000:00: root bus resource [io  0x1d800000-0x1d8fffff]
[    1.695383] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.702142] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.710141] ifx_pcie_rc_class_early_fixup: fixed pcie host bridge to pci-pci bridge
[    1.727786] pci 0000:00:00.0: ifx_pcie_rc_class_early_fixup+0x0/0x7c took 17203 usecs
[    1.734227] pci 0000:00:00.0: [1bef:0011] type 01 class 0x060400
[    1.740380] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.749409] pci 0000:01:00.0: [168c:ff1c] type 00 class 0x020000
[    1.754204] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
[    1.761057] pci 0000:01:00.0: supports D1
[    1.764778] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[    1.773753] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.778940] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    1.785637] pci 0000:00:00.0: BAR 8: assigned [mem 0x1c000000-0x1c0fffff]
[    1.792414] pci 0000:01:00.0: BAR 0: assigned [mem 0x1c000000-0x1c00ffff 64bit]
[    1.799667] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.804673] pci 0000:00:00.0:   bridge window [mem 0x1c000000-0x1c0fffff]
[    1.811602] ifx_pcie_bios_map_irq port 0 dev 0000:00:00.0 slot 0 pin 1 
[    1.818000] ifx_pcie_bios_map_irq dev 0000:00:00.0 irq 144 assigned
[    1.824352] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.843807] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.851449] Freeing unused kernel memory: 1236K
[    1.854532] This architecture does not have kernel memory protection.
[    1.861039] Run /sbin/init as init process
[    1.865057]   with arguments:
[    1.865065]     /sbin/init
[    1.865072]   with environment:
[    1.865079]     HOME=/
[    1.865087]     TERM=linux
[    2.681860] init: Console is alive
[    2.684454] init: - watchdog -
[    3.657996] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.798284] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.815572] init: - preinit -
[    5.647842] random: jshn: uninitialized urandom read (4 bytes read)
[    6.029945] random: jshn: uninitialized urandom read (4 bytes read)
[    6.244972] random: jshn: uninitialized urandom read (4 bytes read)
[    6.676241] urandom_read: 3 callbacks suppressed
[    6.676255] random: jshn: uninitialized urandom read (4 bytes read)
[    6.786050] gswip 1e108000.switch lan1: configuring for phy/internal link mode
[    6.792250] 8021q: adding VLAN 0 to HW filter on device lan1
[    6.820639] random: procd: uninitialized urandom read (4 bytes read)
[   10.981028] gswip 1e108000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   10.987455] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   11.277022] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.289562] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.496611] gswip 1e108000.switch lan1: Link is Down
[   11.521698] procd: - early -
[   11.523567] procd: - watchdog -
[   12.269443] procd: - watchdog -
[   12.273524] procd: - ubus -
[   12.372346] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.379697] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.397434] procd: - init -
[   13.854696] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.875655] IFXOS, Version 1.7.1 (c) Copyright 2009, Lantiq Deutschland GmbH
[   13.887799] NET: Registered protocol family 8
[   13.890897] NET: Registered protocol family 20
[   13.908325] PPP generic driver version 2.4.2
[   13.938919] Lantiq (VRX) DSL CPE MEI driver, version 1.5.17.6, (c) 2007-2015 Lantiq Beteiligungs-GmbH & Co. KG
[   13.956355] 
[   13.956355] 
[   13.956355] Lantiq CPE API Driver version: DSL CPE API V4.17.18.6
[   13.974111] 
[   13.974111] Predefined debug level: 3
[   13.996825] Infineon Technologies DEU driver version 2.0.0 
[   14.005028] IFX DEU DES initialized (multiblock).
[   14.013500] IFX DEU AES initialized (multiblock).
[   14.017303] IFX DEU SHA1 initialized.
[   14.021099] IFX DEU MD5 initialized.
[   14.024573] IFX DEU SHA1_HMAC initialized.
[   14.028644] IFX DEU MD5_HMAC initialized.
[   14.063514] NET: Registered protocol family 24
[   14.177997] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.403824] urngd: v1.0.2 started.
[   14.703044] random: crng init done
[   73.040280] gswip 1e108000.switch lan1: configuring for phy/internal link mode
[   73.061031] 8021q: adding VLAN 0 to HW filter on device lan1
[   73.067374] br-lan: port 1(lan1) entered blocking state
[   73.071414] br-lan: port 1(lan1) entered disabled state
[   73.084514] device lan1 entered promiscuous mode
[   73.087757] device eth0 entered promiscuous mode
[   73.210326] gswip 1e108000.switch lan2: configuring for phy/internal link mode
[   73.220610] 8021q: adding VLAN 0 to HW filter on device lan2
[   73.230882] br-lan: port 2(lan2) entered blocking state
[   73.234755] br-lan: port 2(lan2) entered disabled state
[   73.260275] device lan2 entered promiscuous mode
[   73.338123] gswip 1e108000.switch lan3: configuring for phy/rmii link mode
[   73.349076] 8021q: adding VLAN 0 to HW filter on device lan3
[   73.367426] br-lan: port 3(lan3) entered blocking state
[   73.371463] br-lan: port 3(lan3) entered disabled state
[   73.395897] device lan3 entered promiscuous mode
[   73.444812] gswip 1e108000.switch lan4: configuring for phy/rmii link mode
[   73.453256] 8021q: adding VLAN 0 to HW filter on device lan4
[   73.461114] br-lan: port 4(lan4) entered blocking state
[   73.464921] br-lan: port 4(lan4) entered disabled state
[   73.480357] device lan4 entered promiscuous mode
[   73.548094] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   73.570354] jffs2_build_filesystem(): unlocking the mtd device... 
[   73.570379] done.
[   73.577070] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   76.180535] gswip 1e108000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   76.194462] br-lan: port 1(lan1) entered blocking state
[   76.199556] br-lan: port 1(lan1) entered forwarding state
[   76.208470] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  117.908995] done.
[  117.909497] jffs2: notice: (1654) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  118.056596] overlayfs: upper fs does not support tmpfile.

@allhailCdosdude
Copy link

@allhailCdosdude allhailCdosdude commented Apr 27, 2022

To anyone who is still interested: the following patch would affect both, 7360 SL and 7362 SL:
9999-gswip-use-rmii-refclk-from-phy.patch

@xdarklight Confirmed, your patch works on latest master on 7360 SL as well.

LAN 1 & 2 and LAN 3 & 4 seem to report correct link speeds (I was plugging ethernet cable back and forth)

root@OpenWrt:~# logread -f
Fri Apr 22 07:38:22 2022 kern.info kernel: [  886.660554] gswip 1e108000.switch lan2: Link is Up - 1Gbps/Full - flow control off
Fri Apr 22 07:38:22 2022 kern.info kernel: [  886.666760] br-lan: port 2(lan2) entered blocking state
Fri Apr 22 07:38:22 2022 kern.info kernel: [  886.672017] br-lan: port 2(lan2) entered forwarding state
Fri Apr 22 07:38:22 2022 daemon.notice netifd: Network device 'lan2' link is up
Fri Apr 22 07:38:23 2022 kern.info kernel: [  887.700407] gswip 1e108000.switch lan2: Link is Down
Fri Apr 22 07:38:23 2022 kern.info kernel: [  887.704105] br-lan: port 2(lan2) entered disabled state
Fri Apr 22 07:38:23 2022 daemon.notice netifd: Network device 'lan2' link is down
Fri Apr 22 07:38:27 2022 kern.info kernel: [  890.820545] gswip 1e108000.switch lan2: Link is Up - 1Gbps/Full - flow control off
Fri Apr 22 07:38:27 2022 kern.info kernel: [  890.826751] br-lan: port 2(lan2) entered blocking state
Fri Apr 22 07:38:27 2022 kern.info kernel: [  890.832008] br-lan: port 2(lan2) entered forwarding state
Fri Apr 22 07:38:27 2022 daemon.notice netifd: Network device 'lan2' link is up
Fri Apr 22 07:38:46 2022 kern.info kernel: [  910.580406] gswip 1e108000.switch lan2: Link is Down
Fri Apr 22 07:38:46 2022 kern.info kernel: [  910.584112] br-lan: port 2(lan2) entered disabled state
Fri Apr 22 07:38:46 2022 daemon.notice netifd: Network device 'lan2' link is down
Fri Apr 22 07:38:50 2022 kern.info kernel: [  913.941156] gswip 1e108000.switch lan3: Link is Up - 100Mbps/Full - flow control off
Fri Apr 22 07:38:50 2022 kern.info kernel: [  913.947558] br-lan: port 3(lan3) entered blocking state
Fri Apr 22 07:38:50 2022 kern.info kernel: [  913.953010] br-lan: port 3(lan3) entered forwarding state
Fri Apr 22 07:38:50 2022 daemon.notice netifd: Network device 'lan3' link is up
Fri Apr 22 07:39:15 2022 kern.info kernel: [  938.900812] gswip 1e108000.switch lan3: Link is Down
Fri Apr 22 07:39:15 2022 kern.info kernel: [  938.904962] br-lan: port 3(lan3) entered disabled state
Fri Apr 22 07:39:15 2022 daemon.notice netifd: Network device 'lan3' link is down
Fri Apr 22 07:39:18 2022 kern.info kernel: [  942.020707] gswip 1e108000.switch lan4: Link is Up - 100Mbps/Full - flow control off
Fri Apr 22 07:39:18 2022 kern.info kernel: [  942.027074] br-lan: port 4(lan4) entered blocking state
Fri Apr 22 07:39:18 2022 kern.info kernel: [  942.032333] br-lan: port 4(lan4) entered forwarding state
Fri Apr 22 07:39:18 2022 daemon.notice netifd: Network device 'lan4' link is up
Fri Apr 22 07:39:52 2022 kern.info kernel: [  976.340624] gswip 1e108000.switch lan4: Link is Down
Fri Apr 22 07:39:52 2022 kern.info kernel: [  976.344730] br-lan: port 4(lan4) entered disabled state
Fri Apr 22 07:39:52 2022 daemon.notice netifd: Network device 'lan4' link is down

bootlog

[    0.000000] Linux version 5.10.111 (bananos@ha) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 unknown) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Fri Apr 22 07:23:49 2022
[    0.000000] SoC: xRX200 rev 1.2
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is AVM FRITZ!Box 7360 SL
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] percpu: Embedded 14 pages/cpu s26448 r8192 d22704 u57344
[    0.000000] pcpu-alloc: s26448 r8192 d22704 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyLTQ0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00040180
[    0.000000] Readback ErrCtl register=00040180
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 119320K/131072K available (6610K kernel code, 624K rwdata, 1624K rodata, 1236K init, 211K bss, 11752K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x3d0/0x5e8 with crng_init=0
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000013] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.007915] Calibrating delay loop... 331.77 BogoMIPS (lpj=1658880)
[    0.073995] pid_max: default: 32768 minimum: 301
[    0.078928] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.086124] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.097697] rcu: Hierarchical SRCU implementation.
[    0.102824] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.110837] smp: Bringing up secondary CPUs ...
[    0.116415] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.116432] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.116527] CPU1 revision is: 00019556 (MIPS 34Kc)
[    0.170653] Synchronize counters for CPU 1: done.
[    0.194962] smp: Brought up 1 node, 2 CPUs
[    0.205733] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.215517] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.222451] pinctrl core: initialized pinctrl subsystem
[    0.228981] NET: Registered protocol family 16
[    0.273206] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 1016 mV
[    0.280958] pinctrl-xway 1e100b10.pinmux: Init done
[    0.292372] dma-xway 1e104100.dma: Init done - hw rev: 7, ports: 7, channels: 28
[    0.300563] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.367719] random: fast init done
[    0.376944] usbcore: registered new interface driver usbfs
[    0.383014] usbcore: registered new interface driver hub
[    0.388430] usbcore: registered new device driver usb
[    0.400121] clocksource: Switched to clocksource MIPS
[    0.408432] NET: Registered protocol family 2
[    0.413127] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.421920] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.430355] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.437974] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.445176] TCP: Hash tables configured (established 1024 bind 1024)
[    0.452100] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.458595] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.466131] NET: Registered protocol family 1
[    0.470659] PCI: CLS 0 bytes, default 32
[    0.476672] gptu: totally 6 16-bit timers/counters
[    0.481605] gptu: misc_register on minor 63
[    0.485821] gptu: succeeded to request irq 126
[    0.490317] gptu: succeeded to request irq 127
[    0.494708] gptu: succeeded to request irq 128
[    0.499239] gptu: succeeded to request irq 129
[    0.503861] gptu: succeeded to request irq 130
[    0.508250] gptu: succeeded to request irq 131
[    0.513013] No VPEs reserved for AP/SP, not initialize VPE loader
[    0.513013] Pass maxvpes=<n> argument as kernel argument
[    0.524427] No TCs reserved for AP/SP, not initializing RTLX.
[    0.524427] Pass maxtcs=<n> argument as kernel argument
[    0.539723] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.553641] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.559322] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.576199] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    0.585349] printk: console [ttyLTQ0] enabled
[    0.594012] printk: bootconsole [early0] disabled
[    0.607008] lantiq nor flash device: 01000000 at 10000000
[    0.611287] ltq_nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x00227e
[    0.620711] Amd/Fujitsu Extended Query Table at 0x0040
[    0.625747]   Amd/Fujitsu Extended Query version 1.3.
[    0.630821] number of CFI chips: 1
[    0.634252] 4 fixed-partitions partitions found on MTD device ltq_nor
[    0.640676] Creating 4 MTD partitions on "ltq_nor":
[    0.645497] 0x000000000000-0x000000020000 : "urlader"
[    0.652062] 0x000000020000-0x000000f80000 : "firmware"
[    0.662216] 2 eva-fw partitions found on MTD device firmware
[    0.666507] 0x000000020000-0x0000002badc4 : "kernel"
[    0.671522] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.681087] 0x0000002c0100-0x000000f80000 : "rootfs"
[    0.684679] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.695343] mtd: device 3 (rootfs) set to be root filesystem
[    0.699656] 1 squashfs-split partitions found on MTD device rootfs
[    0.705885] 0x0000005e0000-0x000000f80000 : "rootfs_data"
[    0.713077] 0x000000f80000-0x000000fc0000 : "tffs (1)"
[    0.718381] 0x000000fc0000-0x000001000000 : "tffs (2)"
[    1.083855] gswip 1e108000.switch: dsa switch register failed: -517
[    1.103047] NET: Registered protocol family 10
[    1.116206] Segment Routing with IPv6
[    1.118561] NET: Registered protocol family 17
[    1.123896] 8021q: 802.1Q VLAN Support v1.8
[    1.132870] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    1.481700] gswip 1e108000.switch lan3 (uninitialized): PHY [1e108000.switch-mii:00] driver [Qualcomm Atheros AR8030] (irq=POLL)
[    1.495254] gswip 1e108000.switch lan4 (uninitialized): PHY [1e108000.switch-mii:01] driver [Qualcomm Atheros AR8030] (irq=POLL)
[    1.510572] gswip 1e108000.switch lan2 (uninitialized): PHY [1e108000.switch-mii:11] driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (irq=POLL)
[    1.527150] gswip 1e108000.switch lan1 (uninitialized): PHY [1e108000.switch-mii:13] driver [Intel XWAY PHY11G (xRX v1.2 integrated)] (irq=POLL)
[    1.541576] DSA: tree 0 setup
[    1.543169] gswip 1e108000.switch: probed GSWIP version 21 mod 0
[    1.673056] PCI host bridge /fpi@10000000/pcie@d900000 ranges:
[    1.677713] PCI host bridge to bus 0000:00
[    1.681637] pci_bus 0000:00: root bus resource [mem 0x1c000000-0x1cffffff]
[    1.688444] pci_bus 0000:00: root bus resource [io  0x1d800000-0x1d8fffff]
[    1.695383] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.702142] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.710141] ifx_pcie_rc_class_early_fixup: fixed pcie host bridge to pci-pci bridge
[    1.727786] pci 0000:00:00.0: ifx_pcie_rc_class_early_fixup+0x0/0x7c took 17203 usecs
[    1.734227] pci 0000:00:00.0: [1bef:0011] type 01 class 0x060400
[    1.740380] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.749409] pci 0000:01:00.0: [168c:ff1c] type 00 class 0x020000
[    1.754204] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
[    1.761057] pci 0000:01:00.0: supports D1
[    1.764778] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[    1.773753] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.778940] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    1.785637] pci 0000:00:00.0: BAR 8: assigned [mem 0x1c000000-0x1c0fffff]
[    1.792414] pci 0000:01:00.0: BAR 0: assigned [mem 0x1c000000-0x1c00ffff 64bit]
[    1.799667] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.804673] pci 0000:00:00.0:   bridge window [mem 0x1c000000-0x1c0fffff]
[    1.811602] ifx_pcie_bios_map_irq port 0 dev 0000:00:00.0 slot 0 pin 1 
[    1.818000] ifx_pcie_bios_map_irq dev 0000:00:00.0 irq 144 assigned
[    1.824352] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.843807] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.851449] Freeing unused kernel memory: 1236K
[    1.854532] This architecture does not have kernel memory protection.
[    1.861039] Run /sbin/init as init process
[    1.865057]   with arguments:
[    1.865065]     /sbin/init
[    1.865072]   with environment:
[    1.865079]     HOME=/
[    1.865087]     TERM=linux
[    2.681860] init: Console is alive
[    2.684454] init: - watchdog -
[    3.657996] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.798284] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.815572] init: - preinit -
[    5.647842] random: jshn: uninitialized urandom read (4 bytes read)
[    6.029945] random: jshn: uninitialized urandom read (4 bytes read)
[    6.244972] random: jshn: uninitialized urandom read (4 bytes read)
[    6.676241] urandom_read: 3 callbacks suppressed
[    6.676255] random: jshn: uninitialized urandom read (4 bytes read)
[    6.786050] gswip 1e108000.switch lan1: configuring for phy/internal link mode
[    6.792250] 8021q: adding VLAN 0 to HW filter on device lan1
[    6.820639] random: procd: uninitialized urandom read (4 bytes read)
[   10.981028] gswip 1e108000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   10.987455] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   11.277022] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.289562] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.496611] gswip 1e108000.switch lan1: Link is Down
[   11.521698] procd: - early -
[   11.523567] procd: - watchdog -
[   12.269443] procd: - watchdog -
[   12.273524] procd: - ubus -
[   12.372346] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.379697] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.397434] procd: - init -
[   13.854696] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.875655] IFXOS, Version 1.7.1 (c) Copyright 2009, Lantiq Deutschland GmbH
[   13.887799] NET: Registered protocol family 8
[   13.890897] NET: Registered protocol family 20
[   13.908325] PPP generic driver version 2.4.2
[   13.938919] Lantiq (VRX) DSL CPE MEI driver, version 1.5.17.6, (c) 2007-2015 Lantiq Beteiligungs-GmbH & Co. KG
[   13.956355] 
[   13.956355] 
[   13.956355] Lantiq CPE API Driver version: DSL CPE API V4.17.18.6
[   13.974111] 
[   13.974111] Predefined debug level: 3
[   13.996825] Infineon Technologies DEU driver version 2.0.0 
[   14.005028] IFX DEU DES initialized (multiblock).
[   14.013500] IFX DEU AES initialized (multiblock).
[   14.017303] IFX DEU SHA1 initialized.
[   14.021099] IFX DEU MD5 initialized.
[   14.024573] IFX DEU SHA1_HMAC initialized.
[   14.028644] IFX DEU MD5_HMAC initialized.
[   14.063514] NET: Registered protocol family 24
[   14.177997] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.403824] urngd: v1.0.2 started.
[   14.703044] random: crng init done
[   73.040280] gswip 1e108000.switch lan1: configuring for phy/internal link mode
[   73.061031] 8021q: adding VLAN 0 to HW filter on device lan1
[   73.067374] br-lan: port 1(lan1) entered blocking state
[   73.071414] br-lan: port 1(lan1) entered disabled state
[   73.084514] device lan1 entered promiscuous mode
[   73.087757] device eth0 entered promiscuous mode
[   73.210326] gswip 1e108000.switch lan2: configuring for phy/internal link mode
[   73.220610] 8021q: adding VLAN 0 to HW filter on device lan2
[   73.230882] br-lan: port 2(lan2) entered blocking state
[   73.234755] br-lan: port 2(lan2) entered disabled state
[   73.260275] device lan2 entered promiscuous mode
[   73.338123] gswip 1e108000.switch lan3: configuring for phy/rmii link mode
[   73.349076] 8021q: adding VLAN 0 to HW filter on device lan3
[   73.367426] br-lan: port 3(lan3) entered blocking state
[   73.371463] br-lan: port 3(lan3) entered disabled state
[   73.395897] device lan3 entered promiscuous mode
[   73.444812] gswip 1e108000.switch lan4: configuring for phy/rmii link mode
[   73.453256] 8021q: adding VLAN 0 to HW filter on device lan4
[   73.461114] br-lan: port 4(lan4) entered blocking state
[   73.464921] br-lan: port 4(lan4) entered disabled state
[   73.480357] device lan4 entered promiscuous mode
[   73.548094] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   73.570354] jffs2_build_filesystem(): unlocking the mtd device... 
[   73.570379] done.
[   73.577070] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   76.180535] gswip 1e108000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   76.194462] br-lan: port 1(lan1) entered blocking state
[   76.199556] br-lan: port 1(lan1) entered forwarding state
[   76.208470] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  117.908995] done.
[  117.909497] jffs2: notice: (1654) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  118.056596] overlayfs: upper fs does not support tmpfile.

@bananos , for those of us not familiar with obtaining the firmware outside the regular release channel, would you please say how to obtain and install the 'latest master' you mentioned, please? Thanks a lot!

@bananos
Copy link

@bananos bananos commented Apr 27, 2022

@allhailCdosdude Basically, to build OpenWRT image yourself you just need to follow this guide https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

Below are a short version of the steps I've done to get my image on Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-55-generic x86_64)

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt

# Update the feeds
./scripts/feeds update -a
./scripts/feeds install -a

# Using official build config 
wget https://downloads.openwrt.org/releases/21.02.3/targets/lantiq/xrx200/config.buildinfo -O .config

make menuconfig
# Target system = Lantiq
# Subtarget = XRX200
# Target profile = AVM FRITZ!Box 7360 SL
make defconfig

# download and put patch at:
target/linux/lantiq/patches-5.10/9999-gswip-use-rmii-refclk-from-phy.patch 

make kernel_menuconfig

# Build the firmware image
make -j $(nproc) download clean world

# Final images can be found at 
ls -l bin/targets/lantiq/xrx200/ | grep "bin"
-rw-r--r-- 1 bananos bananos 5892909 Apr 25 11:14 openwrt-lantiq-xrx200-avm_fritz7360sl-initramfs-kernel.bin
-rw-r--r-- 1 bananos bananos 6030425 Apr 25 11:14 openwrt-lantiq-xrx200-avm_fritz7360sl-squashfs-sysupgrade.bin

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented Apr 28, 2022

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71cffebf6358a7f5031f5b208bbdc1cb4db6e539 has just landed in mainline which is the fix for this issue.
If all goes well then the stable release next week (probably v5.10.114) will contain this fix.
From then on it's probably a matter of a few days to have this kernel bump included in OpenWrt.

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented May 9, 2022

Linux v5.10.114 and v5.15.38 just got release. Both include the fix.

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented May 9, 2022

Can someone please test #9859 and provide the Tested-by there?

@allhailCdosdude
Copy link

@allhailCdosdude allhailCdosdude commented May 13, 2022

@xdarklight
Copy link
Contributor

@xdarklight xdarklight commented May 16, 2022

Fixed with 8592df6
The next development snapshot build (assuming this build hasn't started yet) will include the fix: https://downloads.openwrt.org/snapshots/targets/lantiq/xrx200/

@allhailCdosdude
Copy link

@allhailCdosdude allhailCdosdude commented May 17, 2022

@abajk
Copy link
Contributor

@abajk abajk commented May 17, 2022

@allhailCdosdude

On this page you can view which commit was used during the last build by buildbot. In the case of the xrx200 target, it was this commit. This means that the fixes for Fritzbox 736x should already be included in these images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug flyspray release/21.02
Projects
None yet
Development

No branches or pull requests