Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
0d90b99b
Commit
0d90b99b
authored
Jul 28, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drivers/net: Convert 3c527 to anon_semaphore
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
1e56243f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/net/3c527.c
drivers/net/3c527.c
+8
-8
No files found.
drivers/net/3c527.c
View file @
0d90b99b
...
...
@@ -179,7 +179,7 @@ struct mc32_local
u16
rx_ring_tail
;
/* index to rx de-queue end */
struct
semaphore
cmd_mutex
;
/* Serialises issuing of execute commands */
struct
anon_
semaphore
cmd_mutex
;
/* Serialises issuing of execute commands */
struct
completion
execution_cmd
;
/* Card has completed an execute command */
struct
completion
xceiver_cmd
;
/* Card has completed a tx or rx command */
};
...
...
@@ -521,7 +521,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
lp
->
tx_len
=
lp
->
exec_box
->
data
[
9
];
/* Transmit list count */
lp
->
rx_len
=
lp
->
exec_box
->
data
[
11
];
/* Receive list count */
semaphore_init_locked
(
&
lp
->
cmd_mutex
);
anon_
semaphore_init_locked
(
&
lp
->
cmd_mutex
);
init_completion
(
&
lp
->
execution_cmd
);
init_completion
(
&
lp
->
xceiver_cmd
);
...
...
@@ -580,7 +580,7 @@ static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int
int
ioaddr
=
dev
->
base_addr
;
int
ret
=
-
1
;
if
(
down_trylock
(
&
lp
->
cmd_mutex
)
==
0
)
if
(
anon_
down_trylock
(
&
lp
->
cmd_mutex
)
==
0
)
{
lp
->
cmd_nonblocking
=
1
;
lp
->
exec_box
->
mbox
=
0
;
...
...
@@ -626,7 +626,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
int
ioaddr
=
dev
->
base_addr
;
int
ret
=
0
;
down
(
&
lp
->
cmd_mutex
);
anon_
down
(
&
lp
->
cmd_mutex
);
/*
* My Turn
...
...
@@ -646,7 +646,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
if
(
lp
->
exec_box
->
mbox
&
(
1
<<
13
))
ret
=
-
1
;
up
(
&
lp
->
cmd_mutex
);
anon_
up
(
&
lp
->
cmd_mutex
);
/*
* A multicast set got blocked - try it now
...
...
@@ -916,7 +916,7 @@ static int mc32_open(struct net_device *dev)
* Allow ourselves to issue commands
*/
up
(
&
lp
->
cmd_mutex
);
anon_
up
(
&
lp
->
cmd_mutex
);
/*
...
...
@@ -1384,7 +1384,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
*/
if
(
lp
->
cmd_nonblocking
)
{
up
(
&
lp
->
cmd_mutex
);
anon_
up
(
&
lp
->
cmd_mutex
);
if
(
lp
->
mc_reload_wait
)
mc32_reset_multicast_list
(
dev
);
}
...
...
@@ -1461,7 +1461,7 @@ static int mc32_close(struct net_device *dev)
/* Ensure we issue no more commands beyond this point */
down
(
&
lp
->
cmd_mutex
);
anon_
down
(
&
lp
->
cmd_mutex
);
/* Ok the card is now stopping */
...
...
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