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
86
Issues
86
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
cf8c92a6
Commit
cf8c92a6
authored
Aug 24, 2017
by
Sven Meier
Committed by
Adam Wujek
Aug 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hal: replaced LINK_DOWN state with RESET state so a port is not going down
parent
6c49ab72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
hal_shmem.h
userspace/libwr/include/libwr/hal_shmem.h
+1
-0
hal_ports.c
userspace/wrsw_hal/hal_ports.c
+2
-1
No files found.
userspace/libwr/include/libwr/hal_shmem.h
View file @
cf8c92a6
...
...
@@ -11,6 +11,7 @@
#define HAL_PORT_STATE_UP 2
#define HAL_PORT_STATE_CALIBRATION 3
#define HAL_PORT_STATE_LOCKING 4
#define HAL_PORT_STATE_RESET 5
/* Read temperature from SFPs */
#define READ_SFP_DIAG_ENABLE 1
...
...
userspace/wrsw_hal/hal_ports.c
View file @
cf8c92a6
...
...
@@ -423,6 +423,7 @@ static void hal_port_fsm(struct hal_port_state * p)
/* Default state - wait until the link goes up */
case
HAL_PORT_STATE_LINK_DOWN
:
case
HAL_PORT_STATE_RESET
:
{
if
(
link_up
)
{
p
->
calib
.
tx_calibrated
=
1
;
...
...
@@ -782,8 +783,8 @@ int hal_port_reset(const char *port_name)
/* turn off link/wrmode LEDs */
set_led_wrmode
(
p
->
hw_index
,
SFP_LED_WRMODE_OFF
);
p
->
state
=
HAL_PORT_STATE_LINK_DOWN
;
hal_port_reset_state
(
p
);
p
->
state
=
HAL_PORT_STATE_RESET
;
rts_enable_ptracker
(
p
->
hw_index
,
0
);
pr_info
(
"%s: link down
\n
"
,
p
->
name
);
...
...
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