Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
20522186
Commit
20522186
authored
Jul 24, 2015
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrsw_hal: expand accepted values for qualifying SFP as 1GbE
We need it for some copper SFPs, e.g. Cisco MGBT1
parent
b09c19c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
sfp_lib.h
userspace/libwr/include/libwr/sfp_lib.h
+2
-0
hal_ports.c
userspace/wrsw_hal/hal_ports.c
+1
-0
No files found.
userspace/libwr/include/libwr/sfp_lib.h
View file @
20522186
...
...
@@ -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
;
...
...
userspace/wrsw_hal/hal_ports.c
View file @
20522186
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment