YuukiJapanTech / CA8271x

Hacking EN-XGSFPP-OMAC, XG-99S, LTF-7263-BH+LTF-7267-BH+
GNU General Public License v3.0
103 stars 6 forks source link

PON stick get de-registered due to remote deregistration every 60 seconds #4

Open helixzz opened 7 months ago

helixzz commented 7 months ago

PON stick: FS XGS-ONU-25-20NI with rewrited 10G EPON firmware. This problem occurs after accidental broke and repair of the PON fiber.

The cold connector broke while I'm moving my rack and streched the fiber, which caused the receive signal strength is slightly below -30 dBm and it apparently unacceptable. The PPPoE connection lost at the same time. After rework of the fiber connector, the Rx signal recovered to acceptable level. However, dmesg shows the PON stick's registration state is flapping every 10 seconds. The PPPoE connection can't establish and pppd stuck at error message "Timeout waiting for PADO packets" and "Unable to complete PPPoE Discovery".

Tried to alter the MAC address of the PON stick to find out if we're blacklisted by the OLT. No luck.

...
[   12.619062] ca-ne: load scfg 567 OK, bitmap=0x2
[   12.623660] ca-ne: load 509 OK, XFI 1 is connected to AUTO_XFI(13)
[   12.629920] ca-ne: load 508 OK, XFI 1 is connected to phy_addr(0)
[   12.636077] ca-ne: SFPPLUS XFI init start...
[   12.950919] aal_xfi_speed_set: L3708 xfi idx 0 is invalid
[   13.299682] ca-ne: SFPPLUS XFI init done
[   13.305473] ca-ne: aal_ni_reset_intf init ...  OK NI_HV_GLB_INTF_RST_CONFIG = 0xa6318
[   13.314559] <__aal_fdb_sw_lrn_mode_get, 1741>using_sw_lrn:0
[   13.320097] <__aal_fdb_sw_lrn_tbl_create, 1777>
[   13.324670] <__aal_fdb_static_mac_create, 2037>
[   13.331529] FDB init OK
[   13.337656] ca-ne: init QoS OK
[   13.341233] init SFU SATURN L2FE,L3FE done.
[   13.345316] ca-ne: init special packet OK
[   13.349309] ca_mirror_init mirror_vlan:2018
[   13.353508] ca_ni_init_l3qm: =====================call aal_l3qm_check_init_done()================
[   13.362380] aal_l3qm_check_init_done: ===========================Enter========================
[   13.370990] aal_l3qm_init_empty_buffer_CPU: l3qm_eq_profile_cpu_use_fbm=0, l3qm_eq_profile_cpu_pool0_fbm_pool_id=6, l3qm_eq_profile_cpu_pool1_fbm_pool_id=7
[   13.384884] aal_l3qm_init_empty_buffer_CPU: i=0, reg_off=0xd00071ac, cfg2_eq.wrd=0x5e0d
[   13.392873] aal_l3qm_init_empty_buffer_CPU: l3qm_eq_profile_cpu_use_fbm=0, l3qm_eq_profile_cpu_pool0_fbm_pool_id=6, l3qm_eq_profile_cpu_pool1_fbm_pool_id=7
[   13.406772] aal_l3qm_init_empty_buffer_CPU: i=1, reg_off=0xd00071c0, cfg2_eq.wrd=0x5e0d
[   13.414766] aal_l3qm_init_empty_buffer_CPU: l3qm_eq_profile_cpu_pool0_eq_id=0, cfg4_eq.bf.axi_top_bit=0
[   13.424172] aal_l3qm_check_bid_start: aal_l3qm_bid_entry_count=4
[   13.430146] [0]: eqid=0 bid_start=256 bid_count=768
[   13.434998] next_bid_start=0
[   13.437875] [1]: eqid=1 bid_start=1024 bid_count=768
[   13.442818] next_bid_start=1024
[   13.445945] total_bid_count=1536
[   13.449168] [2]: eqid=4 bid_start=2000 bid_count=6144
[   13.454198] next_bid_start=1792
[   13.457326] total_bid_count=7680
[   13.460550] [3]: eqid=5 bid_start=8144 bid_count=6144
[   13.465580] next_bid_start=8144
[   13.468715] total_bid_count=13824
[   13.472100] ca_tunnel_init: Tunnel API is initialized.
[   13.477160] No I2C Buffer!
[   13.480315] ca-pon: SFP PON XCVR was detected
[   13.492364] ca-pon: PON XCVR Vendor:FS             , PartNum:XGS-ONU-25-20NI, Reversion:V1., SN:G234, Date:231030 
[   13.503201] ca-pon: PON XCVR Tx wave length: 1270 nm
[   13.508133] ca-pon: init PON_RX_LOS_POLARITY_INVERT as 0.
[   13.513565] ca-pon: init PON Tx laser polarity as 1
[   13.518452] ca-pon: init PON SerDes (mode: XGEPON_SYM, reversion D)
[   14.537450] INFO: PON SERDES Rx clock status = 0x1c00.
[   14.542436] aal_psds_out_of_reset: Failed to do psds_sync
[   14.682625] __psds_gbox_init  rx_bit_order 1, tx_bit_order 1
[   14.689212] ca-pon: init PON SerDes OK
[   14.993187] EPON-MAC: being initialized ... done.
[   14.997751] ca-epon: OLT vendor(ALCL)
[   15.001922] ca-puc: configure VoQ mapping table - llid_num_per_chip(16), queue_num_per_llid(8)
[   15.010388] ca-puc: mpcp report mode(0) - 2QS8P
[   15.014919] puc_voq_map_mode = 2, upstream_use_dq = 0,report_mode = 0
[   15.021418] ca-puc: initialization was done.
[   15.025744] ca-pon: init PDC OK
[   15.028732] ca-mpcp: being initialized ... 
[   15.032912] ca-mpcp: mapping bc-llid(0xffff/0xfffe/0x7fff/0x7ffe) to internal llid index(63).
[   15.041416] ca-mpcp: llid mode - S-LLID
[   15.045269] ca-mpcp: ONU-MAC(54:43:9c:bf:34:7a)
[   15.049775] ca-mpcp: initialization was done.
[   15.054093] CFG_ID_EPON_ENCRYPTION_MODE 5, PON_MODE 2
[   15.059244] ca-epon: interrup is being initialized ... done.
[   15.065393] ca-pon: IRQ 10 setup successfully.
[   15.069844] GLOBAL_BLOCK_RESET before: 0x1b280000
[   15.074549] GLOBAL_BLOCK_RESET after: 0x1b280000
[   15.079261] sfpplus disable gphy,sd done.
[   15.083321] ca-pon: init OK.
[   15.086192] ca-ne: start restore Ethernet ports configuration from SCFG
[   15.093818] ca-ne: ca_eth_ports_restore: Enable port 6 OK
[   16.226809] ca_ni_init_module_probe: ca_init() is done successfully!
[   16.233071] ca_ni_init_module_probe: call phy_cal_load()......
[   16.238874] phy_cal_load: param dev=87c73d10 cell=fffffffe
[   16.244311] phy_cal_load: phy_param dev=87c73d10 cell=fffffffe
[   16.250201] ca_ni_init_port_configs: port_cfg_infos[0].irq[0]=26
[   16.256137] ca_ni_init_port_configs: port_cfg_infos[1].irq[0]=28
[   16.262147] ca_ni_init_port_configs: port_cfg_infos[2].irq[0]=29
[   16.268141] ca_ni_init_port_configs: port_cfg_infos[3].irq[0]=30
[   16.274119] ca_ni_init_port_configs: port_cfg_infos[4].irq[0]=31
[   16.280129] ca_ni_init_port_configs: port_cfg_infos[5].irq[0]=32
[   16.286108] ca_ni_init_port_configs: port_cfg_infos[6].irq[0]=33
[   16.292117] ca_ni_init_port_configs: port_cfg_infos[7].irq[0]=34
[   16.298097] ca_ni_init_cpu_ports: ca_ni_num_intf=1
[   16.302929] ca_ni_set_flow_control: ca_eth_port_pause_set(port_id=0x10007, pause_rx=1, pause_tx=0), ret=2
[   16.312443] ca_ni_init_cpu_ports: port_cfg_infos[0].irq[0]=26
[   16.318164] ca_ni_dump_intfs: ===================== interface 0 ===================
[   16.325802] ni_info_data.dev[i]=0x875a7000, cep=0x875a73c0
[   16.331284] cpu_port[0]=0, port_cfg_infos[0].irq[0]=26
[   16.336399] port_id[0]=6
[   16.338940] port_id[1]=7
[   16.341440] MAC ADDR=54:43:9c:bf:34:7a
[   16.345175] duplex=0x1, flowctrl=0x2, tx_ldpid=7
[   16.353109] ca_ni_init_module_probe: ======= after CPU pool bid count=768 =======
[   16.360504] ca_ni_init_module_probe: ni_info_data.refill_req_8=35, ni_info_data.refill_req_9=36
[   16.369136] ca_ni_get_chip_revision: data.chip_revision=68
[   16.374594] ca_ni_dma_lso_init_startup_config: ca_ni_chip_revision=68
[   16.381038] ca_ni_dma_lso_init_startup_config: aal_scfg_read(CFG_ID_DMA_LSO_ACE_TEST), dma_lso_ace_test=0
[   16.390590] ca_ni_dma_lso_init_startup_config: aal_scfg_read(CFG_ID_NE_CA_TX_BY_START_XMIT), ca_tx_by_start_xmit=1
[   16.400930] ca_ni_dma_lso_init_startup_config: aal_scfg_read(CFG_ID_PON_VOQ_MODE), puc_voq_mode=2
[   16.411428] ca_ni_netlink_rx_init: read from starup config, netlink_rx_ack=0
[   16.419076] ca-pon: Enable NI_HV_MACSEC NANDI_RX interrupt : 0x000000ff
[   16.425539] ca-pon: Enable NI_HV_MACSEC NANDI_TX interrupt : 0x000000ff
[   16.432234] ca_ni_macsec_init: Cortina NI MACSEC driver is ready.
[   16.438248] cig plugin: proc files init OK.
[   16.442482] Ingres CLS rule for LLID 0: start 40 count 20
[   16.447808] Ingres CLS rule for LLID 1: start 60 count 12
[   16.453169] Ingres CLS rule for LLID 2: start 72 count 4
[   16.458483] Ingres CLS rule for LLID 3: start 76 count 4
[   16.463767] Ingres CLS rule for LLID 4: start 80 count 4
[   16.469083] Ingres CLS rule for LLID 5: start 84 count 4
[   16.474367] Ingres CLS rule for LLID 6: start 88 count 4
[   16.479681] Ingres CLS rule for LLID 7: start 92 count 4
[   16.484967] Ingres CLS rule for LLID 8: start 96 count 4
[   16.490283] Ingres CLS rule for LLID 9: start 100 count 4
[   16.495653] Ingres CLS rule for LLID 10: start 104 count 4
[   16.501142] Ingres CLS rule for LLID 11: start 108 count 4
[   16.506600] Ingres CLS rule for LLID 12: start 112 count 4
[   16.512089] Ingres CLS rule for LLID 13: start 116 count 4
[   16.517561] Ingres CLS rule for LLID 14: start 120 count 4
[   16.523020] Ingres CLS rule for LLID 15: start 124 count 4
[   16.528671] ca_ni_init_module: platform_driver_register() return ret=0
[   16.725881] sdk ioctl init success
[   17.541450] __sfpplus_eth_port_link_scan: port 6 in AAL_NI_IF_MODE_AUTO_XFI..
[   17.983672] kioctl init success
[   19.103849] random: dd: uninitialized urandom read (512 bytes read, 41 bits of entropy available)
[   19.363196] ca_ni_set_flow_control: ca_eth_port_pause_set(port_id=0x10007, pause_rx=1, pause_tx=0), ret=2
[   20.448504] random: sshd: uninitialized urandom read (32 bytes read, 46 bits of entropy available)
[   20.714785] NET: Registered protocol family 10
[   25.347577] ca-mpcp: activate mpcp registration for llid_idx(00)
[   25.428757] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[   25.454739] dg oam set done, len:60, gasp_send_cnt:1
[   25.975805] cig plugin: ipAddr 0x0100a8c0 data[0] 192.
[   25.981002] cig plugin: l2_classifier_rule_add 2 ret 0.
[   29.540601] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[   30.347565] ca-mpcp: activate mpcp registration for llid_idx(00)
[   30.425777] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[   35.417613] llid_throughput_monitor:Single LLID, best performance mode
[   39.421842] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[   39.457574] ca-mpcp: activate mpcp registration for llid_idx(00)
[   40.429319] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[   49.428674] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[   49.467574] ca-mpcp: activate mpcp registration for llid_idx(00)
[   50.425359] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[   55.413021] random: sshd: uninitialized urandom read (32 bytes read, 118 bits of entropy available)
[   59.437503] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[   59.450188] ca-mpcp: activate mpcp registration for llid_idx(00)
[   60.167597] random: nonblocking pool is initialized
[   60.427549] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[   69.424089] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[   69.437779] ca-mpcp: activate mpcp registration for llid_idx(00)
[   70.431562] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)

And those lines just repeat forever...

[  559.527567] ca-mpcp: activate mpcp registration for llid_idx(00)
[  560.473712] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  569.480113] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  569.507617] ca-mpcp: activate mpcp registration for llid_idx(00)
[  570.476253] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  579.471509] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  579.497618] ca-mpcp: activate mpcp registration for llid_idx(00)
[  580.478285] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  589.474953] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  589.527568] ca-mpcp: activate mpcp registration for llid_idx(00)
[  590.481822] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  599.478755] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  599.517575] ca-mpcp: activate mpcp registration for llid_idx(00)
[  600.475359] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  609.480849] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  609.507618] ca-mpcp: activate mpcp registration for llid_idx(00)
[  610.477893] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  619.474426] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  619.507588] ca-mpcp: activate mpcp registration for llid_idx(00)
[  620.481929] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  629.477134] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  629.527571] ca-mpcp: activate mpcp registration for llid_idx(00)
[  630.483476] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  639.479382] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  639.517589] ca-mpcp: activate mpcp registration for llid_idx(00)
[  640.476377] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  649.483787] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  649.507618] ca-mpcp: activate mpcp registration for llid_idx(00)
[  650.479909] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  659.477068] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  659.507610] ca-mpcp: activate mpcp registration for llid_idx(00)
[  660.483073] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  669.481475] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  669.507618] ca-mpcp: activate mpcp registration for llid_idx(00)
[  670.477731] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  679.484363] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  679.517573] ca-mpcp: activate mpcp registration for llid_idx(00)
[  680.480276] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  689.471769] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  689.527567] ca-mpcp: activate mpcp registration for llid_idx(00)
[  690.492805] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
[  699.490687] ca-mpcp: ONU-DE-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was de-registered due to remote deregistration.
[  699.537567] ca-mpcp: activate mpcp registration for llid_idx(00)
[  700.487337] ca-mpcp: ONU-REG, llid(00020)--llid_idx(00)--MAC(54-43-9c-bf-34-7a) was registered to OLT(bc-61-4e-51-21-01)
helixzz commented 7 months ago

FYI: This is not likely related to PON firmware nor the configuration. Seems it's more related to problems on the OLT side.

YuukiJapanTech commented 7 months ago

Added method to change MAC and LOID. (/doc/XG-99x_Config.md)

Normally, the OLT authenticates with the ONU MAC. If the MAC is blacklisted on the OLT side, the only way is to get a new MAC address. To accomplish this, contact the ISP or request an ONU replacement.