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
f6f3a488
Commit
f6f3a488
authored
May 25, 2005
by
Committed by
Jeff Garzik
May 25, 2005
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of /spare/repo/netdev-2.6 branch amd8111
parents
a58eae64
dfa1b73f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
drivers/net/amd8111e.c
drivers/net/amd8111e.c
+14
-10
No files found.
drivers/net/amd8111e.c
View file @
f6f3a488
...
@@ -738,6 +738,7 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
...
@@ -738,6 +738,7 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
short
vtag
;
short
vtag
;
#endif
#endif
int
rx_pkt_limit
=
dev
->
quota
;
int
rx_pkt_limit
=
dev
->
quota
;
unsigned
long
flags
;
do
{
do
{
/* process receive packets until we use the quota*/
/* process receive packets until we use the quota*/
...
@@ -841,18 +842,19 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
...
@@ -841,18 +842,19 @@ static int amd8111e_rx_poll(struct net_device *dev, int * budget)
/* Receive descriptor is empty now */
/* Receive descriptor is empty now */
dev
->
quota
-=
num_rx_pkt
;
dev
->
quota
-=
num_rx_pkt
;
*
budget
-=
num_rx_pkt
;
*
budget
-=
num_rx_pkt
;
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
netif_rx_complete
(
dev
);
netif_rx_complete
(
dev
);
/* enable receive interrupt */
writel
(
VAL0
|
RINTEN0
,
mmio
+
INTEN0
);
writel
(
VAL0
|
RINTEN0
,
mmio
+
INTEN0
);
writel
(
VAL2
|
RDMD0
,
mmio
+
CMD0
);
writel
(
VAL2
|
RDMD0
,
mmio
+
CMD0
);
spin_unlock_irqrestore
(
&
lp
->
lock
,
flags
);
return
0
;
return
0
;
rx_not_empty:
rx_not_empty:
/* Do not call a netif_rx_complete */
/* Do not call a netif_rx_complete */
dev
->
quota
-=
num_rx_pkt
;
dev
->
quota
-=
num_rx_pkt
;
*
budget
-=
num_rx_pkt
;
*
budget
-=
num_rx_pkt
;
return
1
;
return
1
;
}
}
#else
#else
...
@@ -1261,18 +1263,20 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
...
@@ -1261,18 +1263,20 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
amd8111e_priv
*
lp
=
netdev_priv
(
dev
);
struct
amd8111e_priv
*
lp
=
netdev_priv
(
dev
);
void
__iomem
*
mmio
=
lp
->
mmio
;
void
__iomem
*
mmio
=
lp
->
mmio
;
unsigned
int
intr0
;
unsigned
int
intr0
,
intren0
;
unsigned
int
handled
=
1
;
unsigned
int
handled
=
1
;
if
(
dev
==
NULL
)
if
(
unlikely
(
dev
==
NULL
)
)
return
IRQ_NONE
;
return
IRQ_NONE
;
if
(
regs
)
spin_lock
(
&
lp
->
lock
);
spin_lock
(
&
lp
->
lock
);
/* disabling interrupt */
/* disabling interrupt */
writel
(
INTREN
,
mmio
+
CMD0
);
writel
(
INTREN
,
mmio
+
CMD0
);
/* Read interrupt status */
/* Read interrupt status */
intr0
=
readl
(
mmio
+
INT0
);
intr0
=
readl
(
mmio
+
INT0
);
intren0
=
readl
(
mmio
+
INTEN0
);
/* Process all the INT event until INTR bit is clear. */
/* Process all the INT event until INTR bit is clear. */
...
@@ -1293,11 +1297,11 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
...
@@ -1293,11 +1297,11 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
/* Schedule a polling routine */
/* Schedule a polling routine */
__netif_rx_schedule
(
dev
);
__netif_rx_schedule
(
dev
);
}
}
else
{
else
if
(
intren0
&
RINTEN0
)
{
printk
(
"************Driver bug! \
printk
(
"************Driver bug! \
interrupt while in poll
\n
"
);
interrupt while in poll
\n
"
);
/* Fix by disabl
ing
interrupts */
/* Fix by disabl
e receive
interrupts */
writel
(
RINT
0
,
mmio
+
INT
0
);
writel
(
RINT
EN0
,
mmio
+
INTEN
0
);
}
}
}
}
#else
#else
...
@@ -1321,7 +1325,7 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
...
@@ -1321,7 +1325,7 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id, struct pt_regs *reg
err_no_interrupt:
err_no_interrupt:
writel
(
VAL0
|
INTREN
,
mmio
+
CMD0
);
writel
(
VAL0
|
INTREN
,
mmio
+
CMD0
);
if
(
regs
)
spin_unlock
(
&
lp
->
lock
);
spin_unlock
(
&
lp
->
lock
);
return
IRQ_RETVAL
(
handled
);
return
IRQ_RETVAL
(
handled
);
}
}
...
...
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