[PATCH v2] ramips: fix at803x patch again
John Thomson
lists at johnthomson.fastmail.com.au
Fri Jun 11 15:51:32 PDT 2021
On Fri, 11 Jun 2021, at 08:10, David Bauer wrote:
> Can you be more precise in terms of which issues are you facing? The
> PHY capabilities on
> the AR8333 now read 1000B-X as a supported link mode, so fiber
> operation should be possible.
>
> Can you share the capabilities advertised with current master and your
> path (ethtool).
>
> Reverting these patches would divert from upcoming kernel versions
> (mind both are backports,
> not downstream hacks), thus this is not a solution. Ideally, the fiber
> operation should be
> integrated into the upstream driver.
I agree that this should be corrected atop the backports.
It would be great to see this SFP support upstreamed.
I have not tested SFP on OpenWrt master for some time, so I cannot blame a change yet.
This is what I am seeing on ramips 760igs:
SFP (module, and driver LOS) has link detected, but this is not reflected by the interface
(which is configured in OpenWrt as part of a bridge)
sfp: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel master br-wan state DOWN qlen 1000
r16925+6-b721579842 master, plus my
SPI-NOR changes: https://github.com/openwrt/openwrt/pull/3271/commits
I do not remember these being looped in dmesg when I had working SFP:
sfp sfp1: SM: enter present:up:link_up event dev_up
sfp sfp1: SM: exit present:up:link_up
ethtool sfp
Settings for sfp:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
1000baseX/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: MII
PHYAD: 7
Transceiver: external
Auto-negotiation: on
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: no
Pieces missing from a very old (r14885+1-fe302d472a) working SFP build: link partner advertisement and link speed / duplex
Link partner advertised link modes: 1000baseX/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 7
Transceiver: external
Auto-negotiation: on
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes
these cannot be forced on my current build:
ethtool -s sfp speed 1000 duplex full
[ 182.182182] at803x_config_aneg: fiber
Attached:
version=$(cat /etc/openwrt_version)
mkdir -p "/tmp/sfp/$version"
dmesg > "/tmp/sfp/$version/dmesg"
logread > "/tmp/sfp/$version/logread"
ethtool sfp > "/tmp/sfp/$version/ethtool_sfp"
ethtool -m sfp > "/tmp/sfp/$version/ethtool_m_sfp"
echo -n 'file sfp.c +p' > /sys/kernel/debug/dynamic_debug/control
/etc/init.d/network restart
dmesg > "/tmp/sfp/$version/dmesg_reup"
logread > "/tmp/sfp/$version/logread_reup"
# remove, and reinsert SFP module
dmesg > "/tmp/sfp/$version/dmesg_reinsert"
logread > "/tmp/sfp/$version/logread_reinsert"
diffconfig:
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7621=y
CONFIG_TARGET_ramips_mt7621_DEVICE_mikrotik_routerboard-760igs=y
CONFIG_KERNEL_DYNAMIC_DEBUG=y
CONFIG_KERNEL_MTD_PARTITIONED_MASTER=y
CONFIG_PACKAGE_ethtool=y
CONFIG_ETHTOOL_PRETTY_DUMP=y
Cheers,
--
John Thomson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openwrt_sfp_logs.tar.zstd
Type: application/octet-stream
Size: 26311 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210611/811cd547/attachment-0001.obj>
More information about the openwrt-devel
mailing list