aboutsummaryrefslogtreecommitdiff
path: root/sfpid.c
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2017-11-19 14:49:27 +0200
committerJohn W. Linville <linville@tuxdriver.com>2017-12-06 10:40:27 -0500
commit231cc52b6b4124b560b12223a29e54afdb3fb199 (patch)
treedefe12143676111c156b9a40f9b891c425d6a10b /sfpid.c
parent5a20e546c0bf4b479f1b3cd272ea366a6069bfa4 (diff)
downloadethtool-231cc52b6b4124b560b12223a29e54afdb3fb199.tar.gz
ethtool: Add extended compliance codes parsing to sfp modules
Update parsing according to SFP28 spec with extended compliance codes. SFF-8472, SFF-8024 specify the description of module capability present in the 36th byte. Signed-off-by: Gal Pressman <galp@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Diffstat (limited to 'sfpid.c')
-rw-r--r--sfpid.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/sfpid.c b/sfpid.c
index 1732e5e..a1753d3 100644
--- a/sfpid.c
+++ b/sfpid.c
@@ -40,10 +40,10 @@ static void sff8079_show_transceiver(const __u8 *id)
"\tTransceiver type :";
printf("\t%-41s : 0x%02x 0x%02x 0x%02x " \
- "0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
+ "0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
"Transceiver codes",
id[3], id[4], id[5], id[6],
- id[7], id[8], id[9], id[10]);
+ id[7], id[8], id[9], id[10], id[36]);
/* 10G Ethernet Compliance Codes */
if (id[3] & (1 << 7))
printf("%s 10G Ethernet: 10G Base-ER" \
@@ -168,6 +168,27 @@ static void sff8079_show_transceiver(const __u8 *id)
printf("%s FC: 200 MBytes/sec\n", pfx);
if (id[10] & (1 << 0))
printf("%s FC: 100 MBytes/sec\n", pfx);
+ /* Extended Specification Compliance Codes from SFF-8024 */
+ if (id[36] == 0x1)
+ printf("%s Extended: 100G AOC or 25GAUI C2M AOC with worst BER of 5x10^(-5)\n", pfx);
+ if (id[36] == 0x2)
+ printf("%s Extended: 100G Base-SR4 or 25GBase-SR\n", pfx);
+ if (id[36] == 0x3)
+ printf("%s Extended: 100G Base-LR4 or 25GBase-LR\n", pfx);
+ if (id[36] == 0x4)
+ printf("%s Extended: 100G Base-ER4 or 25GBase-ER\n", pfx);
+ if (id[36] == 0x8)
+ printf("%s Extended: 100G ACC or 25GAUI C2M ACC with worst BER of 5x10^(-5)\n", pfx);
+ if (id[36] == 0xb)
+ printf("%s Extended: 100G Base-CR4 or 25G Base-CR CA-L\n", pfx);
+ if (id[36] == 0xc)
+ printf("%s Extended: 25G Base-CR CA-S\n", pfx);
+ if (id[36] == 0xd)
+ printf("%s Extended: 25G Base-CR CA-N\n", pfx);
+ if (id[36] == 0x18)
+ printf("%s Extended: 100G AOC or 25GAUI C2M AOC with worst BER of 10^(-12)\n", pfx);
+ if (id[36] == 0x19)
+ printf("%s Extended: 100G ACC or 25GAUI C2M ACC with worst BER of 10^(-12)\n", pfx);
}
static void sff8079_show_encoding(const __u8 *id)