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
13882269
Commit
13882269
authored
Aug 24, 2011
by
Stanislaw Gruszka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iwlegacy: mark il_{grab,release}_nic_access as unlocked
Signed-off-by:
Stanislaw Gruszka
<
sgruszka@redhat.com
>
parent
142b343f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
24 deletions
+22
-24
drivers/net/wireless/iwlegacy/iwl-io.h
drivers/net/wireless/iwlegacy/iwl-io.h
+20
-22
drivers/net/wireless/iwlegacy/iwl4965-base.c
drivers/net/wireless/iwlegacy/iwl4965-base.c
+2
-2
No files found.
drivers/net/wireless/iwlegacy/iwl-io.h
View file @
13882269
...
...
@@ -137,14 +137,12 @@ static inline int _il_grab_nic_access(struct il_priv *il)
return
0
;
}
#define il_grab_nic_access(il) _il_grab_nic_access(il)
static
inline
void
_il_release_nic_access
(
struct
il_priv
*
il
)
{
_il_clear_bit
(
il
,
CSR_GP_CNTRL
,
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ
);
}
#define il_release_nic_access(il) _il_release_nic_access(il)
static
inline
u32
_il_read_direct32
(
struct
il_priv
*
il
,
u32
reg
)
{
...
...
@@ -157,9 +155,9 @@ static inline u32 il_read_direct32(struct il_priv *il, u32 reg)
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
il_grab_nic_access
(
il
);
_
il_grab_nic_access
(
il
);
value
=
_il_read_direct32
(
il
,
reg
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
return
value
;
...
...
@@ -176,9 +174,9 @@ il_write_direct32(struct il_priv *il, u32 reg, u32 value)
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
if
(
!
il_grab_nic_access
(
il
))
{
if
(
!
_
il_grab_nic_access
(
il
))
{
_il_write_direct32
(
il
,
reg
,
value
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
}
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
@@ -222,9 +220,9 @@ static inline u32 il_read_prph(struct il_priv *il, u32 reg)
u32
val
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
il_grab_nic_access
(
il
);
_
il_grab_nic_access
(
il
);
val
=
_il_read_prph
(
il
,
reg
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
return
val
;
}
...
...
@@ -244,9 +242,9 @@ il_write_prph(struct il_priv *il, u32 addr, u32 val)
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
if
(
!
il_grab_nic_access
(
il
))
{
if
(
!
_
il_grab_nic_access
(
il
))
{
_il_write_prph
(
il
,
addr
,
val
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
}
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
@@ -260,9 +258,9 @@ il_set_bits_prph(struct il_priv *il, u32 reg, u32 mask)
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
il_grab_nic_access
(
il
);
_
il_grab_nic_access
(
il
);
_il_set_bits_prph
(
il
,
reg
,
mask
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
@@ -276,9 +274,9 @@ static inline void il_set_bits_mask_prph(struct il_priv *il, u32 reg,
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
il_grab_nic_access
(
il
);
_
il_grab_nic_access
(
il
);
_il_set_bits_mask_prph
(
il
,
reg
,
bits
,
mask
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
@@ -289,10 +287,10 @@ static inline void il_clear_bits_prph(struct il_priv
u32
val
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
il_grab_nic_access
(
il
);
_
il_grab_nic_access
(
il
);
val
=
_il_read_prph
(
il
,
reg
);
_il_write_prph
(
il
,
reg
,
(
val
&
~
mask
));
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
@@ -302,13 +300,13 @@ static inline u32 il_read_targ_mem(struct il_priv *il, u32 addr)
u32
value
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
il_grab_nic_access
(
il
);
_
il_grab_nic_access
(
il
);
_il_write_direct32
(
il
,
HBUS_TARG_MEM_RADDR
,
addr
);
rmb
();
value
=
_il_read_direct32
(
il
,
HBUS_TARG_MEM_RDAT
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
return
value
;
}
...
...
@@ -319,11 +317,11 @@ il_write_targ_mem(struct il_priv *il, u32 addr, u32 val)
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
if
(
!
il_grab_nic_access
(
il
))
{
if
(
!
_
il_grab_nic_access
(
il
))
{
_il_write_direct32
(
il
,
HBUS_TARG_MEM_WADDR
,
addr
);
wmb
();
_il_write_direct32
(
il
,
HBUS_TARG_MEM_WDAT
,
val
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
}
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
@@ -335,14 +333,14 @@ il_write_targ_mem_buf(struct il_priv *il, u32 addr,
unsigned
long
reg_flags
;
spin_lock_irqsave
(
&
il
->
reg_lock
,
reg_flags
);
if
(
!
il_grab_nic_access
(
il
))
{
if
(
!
_
il_grab_nic_access
(
il
))
{
_il_write_direct32
(
il
,
HBUS_TARG_MEM_WADDR
,
addr
);
wmb
();
for
(;
0
<
len
;
len
-=
sizeof
(
u32
),
values
++
)
_il_write_direct32
(
il
,
HBUS_TARG_MEM_WDAT
,
*
values
);
il_release_nic_access
(
il
);
_
il_release_nic_access
(
il
);
}
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
reg_flags
);
}
...
...
drivers/net/wireless/iwlegacy/iwl4965-base.c
View file @
13882269
...
...
@@ -522,8 +522,8 @@ static void il4965_perform_ct_kill_task(struct il_priv *il)
_il_rd
(
il
,
CSR_UCODE_DRV_GP1
);
spin_lock_irqsave
(
&
il
->
reg_lock
,
flags
);
if
(
!
il_grab_nic_access
(
il
))
il_release_nic_access
(
il
);
if
(
!
_
il_grab_nic_access
(
il
))
_
il_release_nic_access
(
il
);
spin_unlock_irqrestore
(
&
il
->
reg_lock
,
flags
);
}
...
...
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