[BPI-R4] and SFP

yes, but do you have a better idea? I do not know what I’m doing, I’m just try-and-error rebuilding sfp over and over again

do you have a suggestion of ubsan - kcsan when debugging i2c? both seem to make the kernel too large to boot. meanwhile, page 0x56:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f   0123456789abcdef
00: 20 40 00 06 31 c3 ff ff ff ff ff ff ff ff ff ff    @..1...........
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff   ................

Would it be possible to make it work using a PHY_ID_MATCH_EXACT quirk in drivers/net/phy/aquantia/ somewhere?

#define PHY_ID_AQR113	0x31c31c40

Is this read via i2cdump or i2csfp?

All bytes from offset 0x6 are read as 0xff, they should not.

Bytes 0x-04-0x07 contain the phy id, but only 2 of the four bytes are correct.

(Normally it can only be read if the corresponding ethX interface is set link up.)

i2csfp sfp1 i2cdump 0x56

I reverted to an older build version which does not try to probe i2c

It should look like this (you could try and see if it works with those commands):

I assume it does (only the bad ID at the end):

root@APBureau4:~# i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 -- -- -- -- 56 -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: UU -- -- -- -- -- -- --                         
root@APBureau4:~# i2cdump -y 3 0x50
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 03 04 07 10 00 00 00 00 00 00 00 06 67 00 00 00    ????.......?g...
10: 08 02 00 1e 4f 45 4d 20 20 20 20 20 20 20 20 20    ??.?OEM         
20: 20 20 20 20 00 00 1b 21 5a 4b 2d 31 30 47 2d 54        ..?!ZK-10G-T
30: 58 20 20 20 20 20 20 20 31 20 20 20 03 52 00 89    X       1   ?R.?
40: 00 1a 00 00 32 35 30 35 30 31 30 34 34 33 20 20    .?..2505010443  
50: 20 20 20 20 32 35 30 34 31 32 20 20 68 f0 03 9b        250412  h???
60: 9f 00 11 6d 82 26 b8 38 2a 2f 53 b4 10 06 7d e3    ?.?m?&?8*/S???}?
70: 18 2f eb 00 00 00 00 00 00 00 00 00 37 9e f6 d5    ?/?.........7???
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
root@APBureau4:~# i2cdump -y 3 0x51
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 5f 00 ce 00 5a 00 d3 00 8c a0 75 30 88 b8 79 18    _.?.Z.?.??u0??y?
10: 1d 4c 01 f4 19 64 03 e8 4d f0 06 30 3d e8 06 f2    ?L???d??M??0=???
20: 2b d4 00 c7 27 10 00 df 00 00 00 00 00 00 00 00    +?.?'?.?........
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: 00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00    ....??......?...
50: 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 f1    ?...?...?......?
60: 44 47 82 78 0b b8 13 88 0f a0 00 00 00 00 00 00    DG?x??????......
70: 00 00 00 00 00 00 00 00 03 00 00 ff ff ff ff 00    ........?.......
80: 43 4f 55 49 41 38 4e 43 41 41 31 30 2d 32 34 31    COUIA8NCAA10-241
90: 35 2d 30 33 56 30 33 20 01 00 46 00 00 00 00 c6    5-03V03 ?.F....?
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 aa aa    ..............??
c0: 53 46 50 2d 31 30 47 2d 53 52 20 20 20 20 20 20    SFP-10G-SR      
d0: 20 20 20 20 33 32 00 00 00 00 00 00 00 00 00 35        32.........5
e0: 1e 28 2e 2e 31 34 29 36 00 00 00 00 00 00 00 00    ?(..14)6........
f0: 00 00 00 00 00 66 00 00 ff ff ff ff 00 00 00 00    .....f..........
root@APBureau4:~# i2cdump -y 3 0x56
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 20 40 00 06 31 c3 ff ff ff ff ff ff ff ff ff ff     @.?1?..........
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

All these ‘ff’ are wrong. There is an i2c problem.

does this help you? found it in dmesg (this time):

[   33.842512] mtk_soc_eth 15100000.ethernet sfp-lan: validation with support 00,00000000,00000000,00000000 failed: -EINVAL
[   33.853461] sfp sfp2: sfp_add_phy failed: -EINVAL
[   41.504366] mtk_soc_eth 15100000.ethernet sfp-wan: validation with support 00,00000000,00000000,00000000 failed: -EINVAL
[   41.515366] sfp sfp1: sfp_add_phy failed: -EINVAL
[  112.447446] bondjp: (slave wan): making interface the new active one
[  112.453830] mtk_soc_eth 15100000.ethernet sfp-wan: left promiscuous mode
[  112.460587] mtk_soc_eth 15100000.ethernet sfp-wan: left allmulticast mode
[  112.467380] mt7530-mmio 15020000.switch wan: entered promiscuous mode
[  112.473871] mt7530-mmio 15020000.switch wan: entered allmulticast mode
[  128.356020] i2c-mt65xx 11005000.i2c: addr: 30, transfer ACK error
[  128.362349] i2c-mt65xx 11005000.i2c: addr: 31, transfer ACK error
[  128.368698] i2c-mt65xx 11005000.i2c: addr: 32, transfer ACK error
[  128.375024] i2c-mt65xx 11005000.i2c: addr: 33, transfer ACK error
[  128.381367] i2c-mt65xx 11005000.i2c: addr: 34, transfer ACK error
[  128.387713] i2c-mt65xx 11005000.i2c: addr: 35, transfer ACK error
[  128.394043] i2c-mt65xx 11005000.i2c: addr: 36, transfer ACK error
[  128.400381] i2c-mt65xx 11005000.i2c: addr: 37, transfer ACK error
[  128.407794] i2c-mt65xx 11005000.i2c: addr: 52, transfer ACK error
[  128.414102] i2c-mt65xx 11005000.i2c: addr: 53, transfer ACK error
[  128.420450] i2c-mt65xx 11005000.i2c: addr: 54, transfer ACK error
[  128.426795] i2c-mt65xx 11005000.i2c: addr: 55, transfer ACK error
[  128.433378] i2c-mt65xx 11005000.i2c: addr: 57, transfer ACK error
[  128.439713] i2c-mt65xx 11005000.i2c: addr: 58, transfer ACK error
[  128.446063] i2c-mt65xx 11005000.i2c: addr: 59, transfer ACK error
[  128.452390] i2c-mt65xx 11005000.i2c: addr: 5a, transfer ACK error
[  128.458720] i2c-mt65xx 11005000.i2c: addr: 5b, transfer ACK error
[  128.465041] i2c-mt65xx 11005000.i2c: addr: 5c, transfer ACK error
[  128.471385] i2c-mt65xx 11005000.i2c: addr: 5d, transfer ACK error
[  128.477721] i2c-mt65xx 11005000.i2c: addr: 5e, transfer ACK error
[  128.484041] i2c-mt65xx 11005000.i2c: addr: 5f, transfer ACK error

edit this appears at i2cdetect, both bus 3 and 4

Did you remove all hardware from the board, except the sfp module?

are you pointing at the key m and B slots? if so, yes. The mini-pcie slots do not count, do they?

All additional hardware,also the wifi card(s) in mpcie :slight_smile:

that would hurt … I can’t simply take the “dumb AP” with DNS + DHCP server offline (the ISP “modem” is only the gateway and disarmed for everything else). But, something I thought would be useful: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/i2c?h=v6.16-rc4&id=c3f55241882bd5b4bc84dbe77d2efd0d9574ed9c Would it be useful to check whether backporting this to 6.12 works?

We we need to know if it can be power related…so just remove wifi card and test with ethernet.

nope, just tried with all cards removed: i2cdump -y 3 0x56 is still the same (on both ethernet sfp+ devices)

Which kernel are you using?

Try another image.

default 6.12 kernel image from openwrt with debug options activated using “make kernel_menuconfig” … but maybe I should try @frank-w 's kernel instead

my copper SFP was working until recently where i now get this error

[31607.973612] sfp sfp2: module OEM              SFP-10G-T        rev B    sn 2408220095       dc 240822  
[31608.013244] hwmon hwmon6: temp1_input not attached to any thermal zone
[31634.855008] Aquantia AQR113C: probe of i2c:sfp2:11 failed with error -22
[31634.861776] mtk_soc_eth 15100000.ethernet eth1: validation with support 00,00000000,00000000,00000000 failed: -EINVAL
[31634.872468] sfp sfp2: sfp_add_phy failed: -EINVAL

any fix

What changed? Looks it could be similar to the problem in the last 20 or so posts here…

i updated some of my packages a week ago and it was working fine but suddenly about 2 days ago it decided to stop working

Then you might have more luck in the openwrt forum, if this is openwrt related.