Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
drivers
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
drivers
Commits
c7f02e5e
Verified
Commit
c7f02e5e
authored
Sep 11, 2019
by
Jeremy Soller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtl8168d: fix calculation of next read size
parent
7f95962f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
device.rs
rtl8168d/src/device.rs
+10
-5
No files found.
rtl8168d/src/device.rs
View file @
c7f02e5e
...
...
@@ -264,12 +264,17 @@ impl Rtl8168 {
}
pub
fn
next_read
(
&
self
)
->
usize
{
for
rd
in
self
.receive_ring
.iter
()
{
if
!
rd
.ctrl
.readf
(
OWN
)
{
return
rd
.ctrl
.read
()
as
usize
&
0x3FFF
;
}
let
mut
receive_i
=
self
.receive_i
;
if
receive_i
>=
self
.receive_ring
.len
()
{
receive_i
=
0
;
}
let
rd
=
&
self
.receive_ring
[
receive_i
];
if
!
rd
.ctrl
.readf
(
OWN
)
{
(
rd
.ctrl
.read
()
&
0x3FFF
)
as
usize
}
else
{
0
}
0
}
pub
unsafe
fn
init
(
&
mut
self
)
{
...
...
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