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
1b473f09
Commit
1b473f09
authored
May 17, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Fix time_after() warnings in ether1.c.
parent
b9d88a8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
drivers/net/arm/ether1.c
drivers/net/arm/ether1.c
+11
-10
No files found.
drivers/net/arm/ether1.c
View file @
1b473f09
...
@@ -450,6 +450,7 @@ ether1_init_for_open (struct net_device *dev)
...
@@ -450,6 +450,7 @@ ether1_init_for_open (struct net_device *dev)
struct
ether1_priv
*
priv
=
(
struct
ether1_priv
*
)
dev
->
priv
;
struct
ether1_priv
*
priv
=
(
struct
ether1_priv
*
)
dev
->
priv
;
int
i
,
status
,
addr
,
next
,
next2
;
int
i
,
status
,
addr
,
next
,
next2
;
int
failures
=
0
;
int
failures
=
0
;
unsigned
long
timeout
;
outb
(
CTRL_RST
|
CTRL_ACK
,
REG_CONTROL
);
outb
(
CTRL_RST
|
CTRL_ACK
,
REG_CONTROL
);
...
@@ -515,19 +516,19 @@ ether1_init_for_open (struct net_device *dev)
...
@@ -515,19 +516,19 @@ ether1_init_for_open (struct net_device *dev)
outb
(
CTRL_CA
,
REG_CONTROL
);
outb
(
CTRL_CA
,
REG_CONTROL
);
/* 586 should now unset iscp.busy */
/* 586 should now unset iscp.busy */
i
=
jiffies
+
HZ
/
2
;
timeout
=
jiffies
+
HZ
/
2
;
while
(
ether1_inw
(
dev
,
ISCP_ADDR
,
iscp_t
,
iscp_busy
,
DISABLEIRQS
)
==
1
)
{
while
(
ether1_inw
(
dev
,
ISCP_ADDR
,
iscp_t
,
iscp_busy
,
DISABLEIRQS
)
==
1
)
{
if
(
time_after
(
jiffies
,
i
))
{
if
(
time_after
(
jiffies
,
timeout
))
{
printk
(
KERN_WARNING
"%s: can't initialise 82586: iscp is busy
\n
"
,
dev
->
name
);
printk
(
KERN_WARNING
"%s: can't initialise 82586: iscp is busy
\n
"
,
dev
->
name
);
return
1
;
return
1
;
}
}
}
}
/* check status of commands that we issued */
/* check status of commands that we issued */
i
+=
HZ
/
10
;
timeout
+=
HZ
/
10
;
while
(((
status
=
ether1_inw
(
dev
,
CFG_ADDR
,
cfg_t
,
cfg_status
,
DISABLEIRQS
))
while
(((
status
=
ether1_inw
(
dev
,
CFG_ADDR
,
cfg_t
,
cfg_status
,
DISABLEIRQS
))
&
STAT_COMPLETE
)
==
0
)
{
&
STAT_COMPLETE
)
==
0
)
{
if
(
time_after
(
jiffies
,
i
))
if
(
time_after
(
jiffies
,
timeout
))
break
;
break
;
}
}
...
@@ -541,10 +542,10 @@ ether1_init_for_open (struct net_device *dev)
...
@@ -541,10 +542,10 @@ ether1_init_for_open (struct net_device *dev)
failures
+=
1
;
failures
+=
1
;
}
}
i
+=
HZ
/
10
;
timeout
+=
HZ
/
10
;
while
(((
status
=
ether1_inw
(
dev
,
SA_ADDR
,
sa_t
,
sa_status
,
DISABLEIRQS
))
while
(((
status
=
ether1_inw
(
dev
,
SA_ADDR
,
sa_t
,
sa_status
,
DISABLEIRQS
))
&
STAT_COMPLETE
)
==
0
)
{
&
STAT_COMPLETE
)
==
0
)
{
if
(
time_after
(
jiffies
,
i
))
if
(
time_after
(
jiffies
,
timeout
))
break
;
break
;
}
}
...
@@ -558,10 +559,10 @@ ether1_init_for_open (struct net_device *dev)
...
@@ -558,10 +559,10 @@ ether1_init_for_open (struct net_device *dev)
failures
+=
1
;
failures
+=
1
;
}
}
i
+=
HZ
/
10
;
timeout
+=
HZ
/
10
;
while
(((
status
=
ether1_inw
(
dev
,
MC_ADDR
,
mc_t
,
mc_status
,
DISABLEIRQS
))
while
(((
status
=
ether1_inw
(
dev
,
MC_ADDR
,
mc_t
,
mc_status
,
DISABLEIRQS
))
&
STAT_COMPLETE
)
==
0
)
{
&
STAT_COMPLETE
)
==
0
)
{
if
(
time_after
(
jiffies
,
i
))
if
(
time_after
(
jiffies
,
timeout
))
break
;
break
;
}
}
...
@@ -575,10 +576,10 @@ ether1_init_for_open (struct net_device *dev)
...
@@ -575,10 +576,10 @@ ether1_init_for_open (struct net_device *dev)
failures
+=
1
;
failures
+=
1
;
}
}
i
+=
HZ
;
timeout
+=
HZ
;
while
(((
status
=
ether1_inw
(
dev
,
TDR_ADDR
,
tdr_t
,
tdr_status
,
DISABLEIRQS
))
while
(((
status
=
ether1_inw
(
dev
,
TDR_ADDR
,
tdr_t
,
tdr_status
,
DISABLEIRQS
))
&
STAT_COMPLETE
)
==
0
)
{
&
STAT_COMPLETE
)
==
0
)
{
if
(
time_after
(
jiffies
,
i
))
if
(
time_after
(
jiffies
,
timeout
))
break
;
break
;
}
}
...
...
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