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
e203b814
Commit
e203b814
authored
Apr 27, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/wrsw_rtud: HAL mini-ipc connection with timeout
parent
1980097a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
rtu_drv.c
userspace/wrsw_rtud/rtu_drv.c
+9
-2
No files found.
userspace/wrsw_rtud/rtu_drv.c
View file @
e203b814
...
...
@@ -72,19 +72,26 @@ static uint32_t vlan_entry_word0_w(struct vlan_table_entry *ent);
*/
static
int
fd
;
#define HAL_CONNECT_RETRIES 10
#define HAL_CONNECT_TIMEOUT 2000000
/* us */
/**
* \brief Initialize HW RTU memory map
*/
int
rtu_init
(
void
)
{
int
err
;
if
(
halexp_client_init
()
<
0
)
if
(
halexp_client_try_connect
(
HAL_CONNECT_RETRIES
,
HAL_CONNECT_TIMEOUT
)
<
0
)
{
TRACE
(
TRACE_FATAL
,
"The HAL is not responding... Are you sure it's running on your switch?
\n
"
);
exit
(
-
1
);
}
// Used to 'get' RTU IRQs from kernel
fd
=
open
(
RTU_DEVNAME
,
O_RDWR
);
if
(
fd
<
0
)
...
...
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