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
a67ea8eb
Commit
a67ea8eb
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 #7: Garzik fix (IIRC): add locking to tx_timeout
parent
4c5ec545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
drivers/net/fealnx.c
drivers/net/fealnx.c
+8
-3
No files found.
drivers/net/fealnx.c
View file @
a67ea8eb
...
@@ -1144,6 +1144,7 @@ static void getlinktype(struct net_device *dev)
...
@@ -1144,6 +1144,7 @@ static void getlinktype(struct net_device *dev)
}
}
/* Take lock before calling this */
static
void
allocate_rx_buffers
(
struct
net_device
*
dev
)
static
void
allocate_rx_buffers
(
struct
net_device
*
dev
)
{
{
struct
netdev_private
*
np
=
dev
->
priv
;
struct
netdev_private
*
np
=
dev
->
priv
;
...
@@ -1174,15 +1175,17 @@ static void netdev_timer(unsigned long data)
...
@@ -1174,15 +1175,17 @@ static void netdev_timer(unsigned long data)
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
netdev_private
*
np
=
dev
->
priv
;
struct
netdev_private
*
np
=
dev
->
priv
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
10
*
HZ
;
int
old_crvalue
=
np
->
crvalue
;
int
old_crvalue
=
np
->
crvalue
;
unsigned
int
old_linkok
=
np
->
linkok
;
unsigned
int
old_linkok
=
np
->
linkok
;
unsigned
long
flags
;
if
(
debug
)
if
(
debug
)
printk
(
KERN_DEBUG
"%s: Media selection timer tick, status %8.8x "
printk
(
KERN_DEBUG
"%s: Media selection timer tick, status %8.8x "
"config %8.8x.
\n
"
,
dev
->
name
,
readl
(
ioaddr
+
ISR
),
"config %8.8x.
\n
"
,
dev
->
name
,
readl
(
ioaddr
+
ISR
),
readl
(
ioaddr
+
TCRRCR
));
readl
(
ioaddr
+
TCRRCR
));
spin_lock_irqsave
(
&
np
->
lock
,
flags
);
if
(
np
->
flags
==
HAS_MII_XCVR
)
{
if
(
np
->
flags
==
HAS_MII_XCVR
)
{
getlinkstatus
(
dev
);
getlinkstatus
(
dev
);
if
((
old_linkok
==
0
)
&&
(
np
->
linkok
==
1
))
{
/* we need to detect the media type again */
if
((
old_linkok
==
0
)
&&
(
np
->
linkok
==
1
))
{
/* we need to detect the media type again */
...
@@ -1196,7 +1199,9 @@ static void netdev_timer(unsigned long data)
...
@@ -1196,7 +1199,9 @@ static void netdev_timer(unsigned long data)
allocate_rx_buffers
(
dev
);
allocate_rx_buffers
(
dev
);
np
->
timer
.
expires
=
RUN_AT
(
next_tick
);
spin_unlock_irqrestore
(
&
np
->
lock
,
flags
);
np
->
timer
.
expires
=
RUN_AT
(
10
*
HZ
);
add_timer
(
&
np
->
timer
);
add_timer
(
&
np
->
timer
);
}
}
...
@@ -1401,7 +1406,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
...
@@ -1401,7 +1406,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
}
}
/*
S
top rx before calling this */
/*
Take lock and s
top 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
;
...
...
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