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
Kirill Smelkov
linux
Commits
a20a28bc
Commit
a20a28bc
authored
Dec 30, 2011
by
Francois Romieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
via-rhine: balance interrupt acknowledge and events retrieval.
Signed-off-by:
Francois Romieu
<
romieu@fr.zoreil.com
>
parent
269f3114
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
drivers/net/ethernet/via/via-rhine.c
drivers/net/ethernet/via/via-rhine.c
+14
-8
No files found.
drivers/net/ethernet/via/via-rhine.c
View file @
a20a28bc
...
...
@@ -508,9 +508,8 @@ do { \
1024 - i, __func__, __LINE__); \
} while (0)
static
inline
u32
get_intr_status
(
struct
net_device
*
dev
)
static
u32
rhine_get_events
(
struct
rhine_private
*
rp
)
{
struct
rhine_private
*
rp
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
rp
->
base
;
u32
intr_status
;
...
...
@@ -521,6 +520,16 @@ static inline u32 get_intr_status(struct net_device *dev)
return
intr_status
;
}
static
void
rhine_ack_events
(
struct
rhine_private
*
rp
,
u32
mask
)
{
void
__iomem
*
ioaddr
=
rp
->
base
;
if
(
rp
->
quirks
&
rqStatusWBRace
)
iowrite8
(
mask
>>
16
,
ioaddr
+
IntrStatus2
);
iowrite16
(
mask
,
ioaddr
+
IntrStatus
);
IOSYNC
;
}
/*
* Get power related registers into sane state.
* Notify user about past WOL event.
...
...
@@ -1580,14 +1589,11 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance)
int
boguscnt
=
max_interrupt_work
;
int
handled
=
0
;
while
((
intr_status
=
get_intr_status
(
dev
)))
{
while
((
intr_status
=
rhine_get_events
(
rp
)))
{
handled
=
1
;
/* Acknowledge all of the current interrupt sources ASAP. */
if
(
intr_status
&
IntrTxDescRace
)
iowrite8
(
0x08
,
ioaddr
+
IntrStatus2
);
iowrite16
(
intr_status
&
0xffff
,
ioaddr
+
IntrStatus
);
IOSYNC
;
rhine_ack_events
(
rp
,
intr_status
);
if
(
debug
>
4
)
netdev_dbg
(
dev
,
"Interrupt, status %08x
\n
"
,
...
...
@@ -1872,7 +1878,7 @@ static void rhine_restart_tx(struct net_device *dev) {
* If new errors occurred, we need to sort them out before doing Tx.
* In that case the ISR will be back here RSN anyway.
*/
intr_status
=
get_intr_status
(
dev
);
intr_status
=
rhine_get_events
(
rp
);
if
((
intr_status
&
IntrTxErrSummary
)
==
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