Commit 20522186 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

wrsw_hal: expand accepted values for qualifying SFP as 1GbE

We need it for some copper SFPs, e.g. Cisco MGBT1
parent b09c19c0
......@@ -27,6 +27,8 @@
* should be rounded up to 0Dh (13 in
* units of 100 MBd) for Ethernet
* 1000BASE-X. */
#define SFP_SPEED_1Gb_10 0x0A /* Unfortunatelly the above is not always true,
* e.g. Cisco copper SFP (MGBT1) says simply 10 and not 13.*/
struct shw_sfp_caldata {
uint32_t flags;
......
......@@ -490,6 +490,7 @@ static void hal_port_insert_sfp(struct hal_port_state * p)
strncpy(p->calib.sfp.vendor_serial, (void *)shdr.vendor_serial, 16);
/* check if SFP is 1GbE */
p->calib.sfp.flags |= shdr.br_nom == SFP_SPEED_1Gb ? SFP_FLAG_1GbE : 0;
p->calib.sfp.flags |= shdr.br_nom == SFP_SPEED_1Gb_10 ? SFP_FLAG_1GbE : 0;
/*
* Now, we should fix the alpha value according to fiber
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment