Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Simple VME FMC Carrier SVEC
Commits
e3345018
Commit
e3345018
authored
Oct 13, 2017
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: better error propagation
Signed-off-by:
Federico Vaga
<
federico.vaga@vaga.pv.it
>
parent
dc753d6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
svec-core.c
kernel/svec-core.c
+8
-6
No files found.
kernel/svec-core.c
View file @
e3345018
...
...
@@ -314,12 +314,12 @@ static int svec_fpga_write_stop(struct svec_dev *svec)
if
(
!
(
rval
&
XLDR_CSR_DONE
))
{
dev_err
(
&
svec
->
dev
,
"error: FPGA program timeout.
\n
"
);
return
-
EIO
;
svec
->
prog_err
=
-
EIO
;
}
if
(
rval
&
XLDR_CSR_ERROR
)
{
dev_err
(
&
svec
->
dev
,
"Bitstream loaded, status ERROR
\n
"
);
return
-
EINVAL
;
svec
->
prog_err
=
-
EINVAL
;
}
out:
/* give the VME bus control to App FPGA */
...
...
@@ -402,7 +402,7 @@ static int svec_open(struct inode *inode, struct file *file)
file
->
private_data
=
svec
;
svec
->
prog_err
=
0
;
svec
->
prog_err
=
-
EINVAL
;
/* Reset the bitstream programming words */
svec
->
bitstream_last_word
=
-
1
;
svec
->
bitstream_last_word_size
=
-
1
;
...
...
@@ -458,11 +458,13 @@ static int svec_close(struct inode *inode, struct file *file)
spin_unlock
(
&
svec
->
lock
);
module_put
(
file
->
f_op
->
owner
);
mutex_unlock
(
&
svec
->
mtx
);
if
(
!
svec
->
prog_err
)
dev_info
(
&
svec
->
dev
,
"a new application FPGA has been programmed
\n
"
);
mutex_unlock
(
&
svec
->
mtx
);
dev_info
(
&
svec
->
dev
,
"a new application FPGA has been programmed
\n
"
);
return
err
;
}
...
...
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