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
f44910c8
Commit
f44910c8
authored
Apr 21, 2004
by
Denis Vlasenko
Committed by
Linus Torvalds
Apr 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fealnx #4: stop doing stop_nic_rx/writel(np->crvalue) in reset_rx_descriptors
this can inadvertently (re)enable tx and/or rx.
parent
ad5373ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
drivers/net/fealnx.c
drivers/net/fealnx.c
+8
-4
No files found.
drivers/net/fealnx.c
View file @
f44910c8
...
@@ -1404,12 +1404,11 @@ static void free_one_rx_descriptor(struct netdev_private *np)
...
@@ -1404,12 +1404,11 @@ static void free_one_rx_descriptor(struct netdev_private *np)
}
}
/* Stop rx before calling this */
static
void
reset_rx_descriptors
(
struct
net_device
*
dev
)
static
void
reset_rx_descriptors
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
dev
->
priv
;
struct
netdev_private
*
np
=
dev
->
priv
;
stop_nic_rx
(
dev
->
base_addr
,
np
->
crvalue
);
while
(
!
(
np
->
cur_rx
->
status
&
RXOWN
))
while
(
!
(
np
->
cur_rx
->
status
&
RXOWN
))
free_one_rx_descriptor
(
np
);
free_one_rx_descriptor
(
np
);
...
@@ -1417,7 +1416,6 @@ static void reset_rx_descriptors(struct net_device *dev)
...
@@ -1417,7 +1416,6 @@ static void reset_rx_descriptors(struct net_device *dev)
writel
(
np
->
rx_ring_dma
+
((
char
*
)
np
->
cur_rx
-
(
char
*
)
np
->
rx_ring
),
writel
(
np
->
rx_ring_dma
+
((
char
*
)
np
->
cur_rx
-
(
char
*
)
np
->
rx_ring
),
dev
->
base_addr
+
RXLBA
);
dev
->
base_addr
+
RXLBA
);
writel
(
np
->
crvalue
,
dev
->
base_addr
+
TCRRCR
);
}
}
...
@@ -1475,8 +1473,11 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs
...
@@ -1475,8 +1473,11 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs
if
(
intr_status
&
(
RI
|
RBU
))
{
if
(
intr_status
&
(
RI
|
RBU
))
{
if
(
intr_status
&
RI
)
if
(
intr_status
&
RI
)
netdev_rx
(
dev
);
netdev_rx
(
dev
);
else
else
{
stop_nic_rx
(
ioaddr
,
np
->
crvalue
);
reset_rx_descriptors
(
dev
);
reset_rx_descriptors
(
dev
);
writel
(
np
->
crvalue
,
ioaddr
+
TCRRCR
);
}
}
}
while
(
np
->
really_tx_count
)
{
while
(
np
->
really_tx_count
)
{
...
@@ -1584,6 +1585,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs
...
@@ -1584,6 +1585,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs
static
int
netdev_rx
(
struct
net_device
*
dev
)
static
int
netdev_rx
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
dev
->
priv
;
struct
netdev_private
*
np
=
dev
->
priv
;
long
ioaddr
=
dev
->
base_addr
;
/* If EOP is set on the next entry, it's a new packet. Send it up. */
/* If EOP is set on the next entry, it's a new packet. Send it up. */
while
(
!
(
np
->
cur_rx
->
status
&
RXOWN
))
{
while
(
!
(
np
->
cur_rx
->
status
&
RXOWN
))
{
...
@@ -1642,7 +1644,9 @@ static int netdev_rx(struct net_device *dev)
...
@@ -1642,7 +1644,9 @@ static int netdev_rx(struct net_device *dev)
free_one_rx_descriptor
(
np
);
free_one_rx_descriptor
(
np
);
continue
;
continue
;
}
else
{
/* something error, need to reset this chip */
}
else
{
/* something error, need to reset this chip */
stop_nic_rx
(
ioaddr
,
np
->
crvalue
);
reset_rx_descriptors
(
dev
);
reset_rx_descriptors
(
dev
);
writel
(
np
->
crvalue
,
ioaddr
+
TCRRCR
);
}
}
break
;
/* exit the while loop */
break
;
/* exit the while loop */
}
}
...
...
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