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
0e2e4f04
Commit
0e2e4f04
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 #9: fix locking for set_rx_mode
parent
e12bb4d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
drivers/net/fealnx.c
drivers/net/fealnx.c
+16
-2
No files found.
drivers/net/fealnx.c
View file @
0e2e4f04
...
...
@@ -459,6 +459,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev);
static
irqreturn_t
intr_handler
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
);
static
int
netdev_rx
(
struct
net_device
*
dev
);
static
void
set_rx_mode
(
struct
net_device
*
dev
);
static
void
__set_rx_mode
(
struct
net_device
*
dev
);
static
struct
net_device_stats
*
get_stats
(
struct
net_device
*
dev
);
static
int
mii_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
static
struct
ethtool_ops
netdev_ethtool_ops
;
...
...
@@ -979,7 +980,7 @@ static int netdev_open(struct net_device *dev)
getlinkstatus
(
dev
);
if
(
np
->
linkok
)
getlinktype
(
dev
);
set_rx_mode
(
dev
);
__
set_rx_mode
(
dev
);
netif_start_queue
(
dev
);
...
...
@@ -1246,7 +1247,7 @@ static void enable_rxtx(struct net_device *dev)
writel
(
np
->
bcrvalue
,
ioaddr
+
BCR
);
writel
(
0
,
ioaddr
+
RXPDR
);
set_rx_mode
(
dev
);
/* changes np->crvalue, writes it into TCRRCR */
__
set_rx_mode
(
dev
);
/* changes np->crvalue, writes it into TCRRCR */
/* Clear and Enable interrupts by setting the interrupt mask. */
writel
(
FBE
|
TUNF
|
CNTOVF
|
RBU
|
TI
|
RI
,
ioaddr
+
ISR
);
...
...
@@ -1840,7 +1841,20 @@ static struct net_device_stats *get_stats(struct net_device *dev)
return
&
np
->
stats
;
}
/* for dev->set_multicast_list */
static
void
set_rx_mode
(
struct
net_device
*
dev
)
{
spinlock_t
*
lp
=
&
((
struct
netdev_private
*
)
dev
->
priv
)
->
lock
;
unsigned
long
flags
;
spin_lock_irqsave
(
lp
,
flags
);
__set_rx_mode
(
dev
);
spin_unlock_irqrestore
(
&
lp
,
flags
);
}
/* Take lock before calling */
static
void
__set_rx_mode
(
struct
net_device
*
dev
)
{
struct
netdev_private
*
np
=
dev
->
priv
;
long
ioaddr
=
dev
->
base_addr
;
...
...
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