# Clearfog cn9130 pro and sfp ftth

**URL:** <https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560>\
**Category:** OCTEON CN9130\
**Created:** [January 11, 2023, 1:33pm UTC](https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560 "2023-01-11T13:33:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![doudootiana](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@doudootiana](https://community.solid-run.com/u/doudootiana)\
**Post date:** [January 11, 2023, 1:33pm UTC](https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560/1 "2023-01-11T13:33:11Z")

</div>

Hy 🙂

I tried to use sfp gpon onu with my clearfog pro.

I have 3 models :  
-fs  
-sercomm fgs202  
-huawei ma 5671a

With th fs,it’s ok.

But i don’t succeed to use the sercomm and the huawei.

I tried to modify the quirks in the sfp.c :

> SFP\_QUIRK\_M(FS, GSFP-ONU-SC, sfp\_quirk\_2500basex),
> 
> SFP\_QUIRK\_M(SERCOMM, FGS202, sfp\_quirk\_2500basex),

Here the output with huawei and sercomm sfp :

```auto
[7.812392] sfp sfp-eth@0: please wait, module slow to respond

bash-5.1# ethtool -m eth0
netlink error: No such device or address
bash-5.1# ethtool eth0
Settings for eth0:
        Supported ports: [MII]
        Supported link modes: 10000baseT/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes: 10000baseT/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: on
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Link detected: no

```

And here with the fs :

> bash-5.1# ethtool -m eth0  
> Identifier : 0x03 (SFP)  
> Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)  
> Connector : 0x01 (SC)  
> Transceiver codes : 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00  
> Transceiver type : Ethernet: 1000BASE-LX  
> Encoding : 0x03 (NRZ)  
> BR, Nominal : 1200MBd  
> Rate identifier : 0x00 (unspecified)  
> Length (SMF,km) : 20km  
> Length (SMF) : 20000m  
> Length (50um) : 0m  
> Length (62.5um) : 0m  
> Length (Copper) : 0m  
> Length (OM3) : 0m  
> Laser wavelength : 1310nm  
> Vendor name : FS  
> Vendor OUI : 00:00:00  
> Vendor PN : GSFP-ONU-SC  
> Vendor rev : 01  
> Option values : 0x00 0x1a  
> Option : RX\_LOS implemented  
> Option : TX\_FAULT implemented  
> Option : TX\_DISABLE implemented  
> BR margin, max : 0%  
> BR margin, min : 0%  
> Vendor SN : SCOM210A1F5A  
> Date code : 211007  
> bash-5.1# ethtool eth0  
> Settings for eth0:  
> Supported ports: [FIBRE]  
> Supported link modes: 2500baseX/Full  
> 1000baseX/Full  
> Supported pause frame use: Symmetric Receive-only  
> Supports auto-negotiation: Yes  
> Supported FEC modes: Not reported  
> Advertised link modes: 2500baseX/Full  
> Advertised pause frame use: Symmetric Receive-only  
> Advertised auto-negotiation: Yes  
> Advertised FEC modes: Not reported  
> Speed: Unknown!  
> Duplex: Unknown! (255)  
> Auto-negotiation: on  
> Port: FIBRE  
> PHYAD: 0  
> Transceiver: internal  
> Link detected: no  
> bash-5.1#

Thank you by advance 🙂

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [January 12, 2023, 2:02pm UTC](https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560/2 "2023-01-12T14:02:34Z")

</div>

Make sure you have this patch in your kernel sources. [[PATCH v2] net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT — Netdev](https://www.spinics.net/lists/netdev/msg817292.html)

---

<div class="post-metadata">

**Author:** ![doudootiana](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@doudootiana](https://community.solid-run.com/u/doudootiana)\
**Post date:** [January 12, 2023, 3:04pm UTC](https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560/3 "2023-01-12T15:04:12Z")

</div>

Hy,  
I applied this patch and here the part modified of my driver :

```auto
	/* Initialise state bits to use from hardware */
	sfp->state_hw_mask = SFP_F_PRESENT;
	if (sfp->gpio[GPIO_TX_DISABLE])
		sfp->state_hw_mask |= SFP_F_TX_DISABLE;
	if (sfp->gpio[GPIO_TX_FAULT])
		sfp->state_hw_mask |= SFP_F_TX_FAULT;
	if (sfp->gpio[GPIO_LOS])
		sfp->state_hw_mask |= SFP_F_LOS;

	sfp->module_t_start_up = T_START_UP;

	if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
	    !memcmp(id.base.vendor_pn, "MA5671A ", 16))
		sfp->tx_fault_ignore = true;
	else
		sfp->tx_fault_ignore = false;

	return 0;

	if (!memcmp(id.base.vendor_name, "SERCOMM ", 16) &&
	    !memcmp(id.base.vendor_pn, "FGS202 ", 16))
		sfp->tx_fault_ignore = true;
	else
		sfp->tx_fault_ignore = false;

	return 0;

	sfp->module_t_wait = T_WAIT;

```

and

```auto
static void sfp_check_state(struct sfp *sfp)
{
	unsigned int state, i, changed;

	mutex_lock(&sfp->st_mutex);
	state = sfp_get_state(sfp);
	changed = state ^ sfp->state;
	if (sfp->tx_fault_ignore)
		changed &= SFP_F_PRESENT | SFP_F_LOS;
	else
		changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT;

	for (i = 0; i < GPIO_MAX; i++)
		if (changed & BIT(i))
			dev_dbg(sfp->dev, "%s %u -> %u\n", gpio_of_names[i],
				!!(sfp->state & BIT(i)), !!(state & BIT(i)));

	state |= sfp->state & (SFP_F_TX_DISABLE | SFP_F_RATE_SELECT);
	sfp->state = state;

	rtnl_lock();
	if (changed & SFP_F_PRESENT)
		sfp_sm_event(sfp, state & SFP_F_PRESENT ?
				SFP_E_INSERT : SFP_E_REMOVE);

	if (changed & SFP_F_TX_FAULT)
		sfp_sm_event(sfp, state & SFP_F_TX_FAULT ?
				SFP_E_TX_FAULT : SFP_E_TX_CLEAR);

	if (changed & SFP_F_LOS)
		sfp_sm_event(sfp, state & SFP_F_LOS ?
				SFP_E_LOS_HIGH : SFP_E_LOS_LOW);
	rtnl_unlock();
	mutex_unlock(&sfp->st_mutex);
}

```

I use kernel 6.1 and i have applied all patches

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [January 12, 2023, 3:42pm UTC](https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560/4 "2023-01-12T15:42:10Z")

</div>

> [@doudootiana](#):
>
> ` `

I vaguely remember an issue with the SERDEV GPON units. They incorrectly require PIN 7 to be pulled high to not constantly reset. By default PIN 7 is grounded on the ClearFog carriers and requires changing a resistor location to pull it high.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/solid_run/original/1X/428f6455210e2fca845c33260068076be3745de0.png)

---

<div class="post-metadata">

**Author:** ![doudootiana](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@doudootiana](https://community.solid-run.com/u/doudootiana)\
**Post date:** [January 12, 2023, 3:48pm UTC](https://community.solid-run.com/t/clearfog-cn9130-pro-and-sfp-ftth/560/5 "2023-01-12T15:48:45Z")

</div>

I understand.  
That why, some people modify the pin 7 of the module sfp.

Thank you
