Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
13882269
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
13882269
编写于
8月 24, 2011
作者:
S
Stanislaw Gruszka
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
iwlegacy: mark il_{grab,release}_nic_access as unlocked
Signed-off-by:
N
Stanislaw Gruszka
<
sgruszka@redhat.com
>
上级
142b343f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
24 deletion
+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
未找到文件。
drivers/net/wireless/iwlegacy/iwl-io.h
浏览文件 @
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
浏览文件 @
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
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录