Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d56ec794
Commit
d56ec794
authored
Apr 03, 2002
by
Dave Jones
Committed by
Jeff Garzik
Apr 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jiffies wrap fixes for net drivers atp, yam, and sb1000.
parent
8855ed68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
drivers/net/atp.c
drivers/net/atp.c
+1
-1
drivers/net/hamradio/yam.c
drivers/net/hamradio/yam.c
+2
-1
drivers/net/sb1000.c
drivers/net/sb1000.c
+3
-3
No files found.
drivers/net/atp.c
View file @
d56ec794
...
...
@@ -667,7 +667,7 @@ static void atp_interrupt(int irq, void *dev_instance, struct pt_regs * regs)
}
num_tx_since_rx
++
;
}
else
if
(
num_tx_since_rx
>
8
&&
jiffies
>
dev
->
last_rx
+
HZ
)
{
&&
time_after
(
jiffies
,
dev
->
last_rx
+
HZ
)
)
{
if
(
net_debug
>
2
)
printk
(
KERN_DEBUG
"%s: Missed packet? No Rx after %d Tx and "
"%ld jiffies status %02x CMR1 %02x.
\n
"
,
dev
->
name
,
...
...
drivers/net/hamradio/yam.c
View file @
d56ec794
...
...
@@ -308,7 +308,8 @@ static const unsigned char chktabh[256] =
static
void
delay
(
int
ms
)
{
unsigned
long
timeout
=
jiffies
+
((
ms
*
HZ
)
/
1000
);
while
(
jiffies
<
timeout
);
while
(
time_before
(
jiffies
,
timeout
))
cpu_relax
();
}
/*
...
...
drivers/net/sb1000.c
View file @
d56ec794
...
...
@@ -405,7 +405,7 @@ sb1000_wait_for_ready(const int ioaddr[], const char* name)
}
timeout
=
jiffies
+
Sb1000TimeOutJiffies
;
while
(
!
(
inb
(
ioaddr
[
1
]
+
6
)
&
0x40
))
{
if
(
jiffies
>=
timeout
)
{
if
(
time_after_eq
(
jiffies
,
timeout
)
)
{
printk
(
KERN_WARNING
"%s: sb1000_wait_for_ready timeout
\n
"
,
name
);
return
-
ETIME
;
...
...
@@ -423,7 +423,7 @@ sb1000_wait_for_ready_clear(const int ioaddr[], const char* name)
timeout
=
jiffies
+
Sb1000TimeOutJiffies
;
while
(
inb
(
ioaddr
[
1
]
+
6
)
&
0x80
)
{
if
(
jiffies
>=
timeout
)
{
if
(
time_after_eq
(
jiffies
,
timeout
)
)
{
printk
(
KERN_WARNING
"%s: sb1000_wait_for_ready_clear timeout
\n
"
,
name
);
return
-
ETIME
;
...
...
@@ -431,7 +431,7 @@ sb1000_wait_for_ready_clear(const int ioaddr[], const char* name)
}
timeout
=
jiffies
+
Sb1000TimeOutJiffies
;
while
(
inb
(
ioaddr
[
1
]
+
6
)
&
0x40
)
{
if
(
jiffies
>=
timeout
)
{
if
(
time_after_eq
(
jiffies
,
timeout
)
)
{
printk
(
KERN_WARNING
"%s: sb1000_wait_for_ready_clear timeout
\n
"
,
name
);
return
-
ETIME
;
...
...
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