Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
602432c1
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
602432c1
编写于
10月 21, 2016
作者:
J
James Bottomley
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'mkp-scsi/4.9/scsi-fixes' into fixes
上级
ebbb7594
77f18a87
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
19 deletion
+28
-19
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.c
+3
-3
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/be2iscsi/be_main.c
+23
-14
drivers/scsi/libiscsi.c
drivers/scsi/libiscsi.c
+2
-2
未找到文件。
drivers/scsi/NCR5380.c
浏览文件 @
602432c1
...
...
@@ -353,7 +353,7 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
#endif
static
int
probe_irq
__initdata
;
static
int
probe_irq
;
/**
* probe_intr - helper for IRQ autoprobe
...
...
@@ -365,7 +365,7 @@ static int probe_irq __initdata;
* used by the IRQ probe code.
*/
static
irqreturn_t
__init
probe_intr
(
int
irq
,
void
*
dev_id
)
static
irqreturn_t
probe_intr
(
int
irq
,
void
*
dev_id
)
{
probe_irq
=
irq
;
return
IRQ_HANDLED
;
...
...
@@ -380,7 +380,7 @@ static irqreturn_t __init probe_intr(int irq, void *dev_id)
* and then looking to see what interrupt actually turned up.
*/
static
int
__
init
__
maybe_unused
NCR5380_probe_irq
(
struct
Scsi_Host
*
instance
,
static
int
__maybe_unused
NCR5380_probe_irq
(
struct
Scsi_Host
*
instance
,
int
possible
)
{
struct
NCR5380_hostdata
*
hostdata
=
shost_priv
(
instance
);
...
...
drivers/scsi/be2iscsi/be_main.c
浏览文件 @
602432c1
...
...
@@ -900,8 +900,9 @@ void hwi_ring_cq_db(struct beiscsi_hba *phba,
static
struct
sgl_handle
*
alloc_io_sgl_handle
(
struct
beiscsi_hba
*
phba
)
{
struct
sgl_handle
*
psgl_handle
;
unsigned
long
flags
;
spin_lock_
bh
(
&
phba
->
io_sgl_lock
);
spin_lock_
irqsave
(
&
phba
->
io_sgl_lock
,
flags
);
if
(
phba
->
io_sgl_hndl_avbl
)
{
beiscsi_log
(
phba
,
KERN_INFO
,
BEISCSI_LOG_IO
,
"BM_%d : In alloc_io_sgl_handle,"
...
...
@@ -919,14 +920,16 @@ static struct sgl_handle *alloc_io_sgl_handle(struct beiscsi_hba *phba)
phba
->
io_sgl_alloc_index
++
;
}
else
psgl_handle
=
NULL
;
spin_unlock_
bh
(
&
phba
->
io_sgl_lock
);
spin_unlock_
irqrestore
(
&
phba
->
io_sgl_lock
,
flags
);
return
psgl_handle
;
}
static
void
free_io_sgl_handle
(
struct
beiscsi_hba
*
phba
,
struct
sgl_handle
*
psgl_handle
)
{
spin_lock_bh
(
&
phba
->
io_sgl_lock
);
unsigned
long
flags
;
spin_lock_irqsave
(
&
phba
->
io_sgl_lock
,
flags
);
beiscsi_log
(
phba
,
KERN_INFO
,
BEISCSI_LOG_IO
,
"BM_%d : In free_,io_sgl_free_index=%d
\n
"
,
phba
->
io_sgl_free_index
);
...
...
@@ -941,7 +944,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
"value there=%p
\n
"
,
phba
->
io_sgl_free_index
,
phba
->
io_sgl_hndl_base
[
phba
->
io_sgl_free_index
]);
spin_unlock_
bh
(
&
phba
->
io_sgl_lock
);
spin_unlock_
irqrestore
(
&
phba
->
io_sgl_lock
,
flags
);
return
;
}
phba
->
io_sgl_hndl_base
[
phba
->
io_sgl_free_index
]
=
psgl_handle
;
...
...
@@ -950,7 +953,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
phba
->
io_sgl_free_index
=
0
;
else
phba
->
io_sgl_free_index
++
;
spin_unlock_
bh
(
&
phba
->
io_sgl_lock
);
spin_unlock_
irqrestore
(
&
phba
->
io_sgl_lock
,
flags
);
}
static
inline
struct
wrb_handle
*
...
...
@@ -958,15 +961,16 @@ beiscsi_get_wrb_handle(struct hwi_wrb_context *pwrb_context,
unsigned
int
wrbs_per_cxn
)
{
struct
wrb_handle
*
pwrb_handle
;
unsigned
long
flags
;
spin_lock_
bh
(
&
pwrb_context
->
wrb_lock
);
spin_lock_
irqsave
(
&
pwrb_context
->
wrb_lock
,
flags
);
pwrb_handle
=
pwrb_context
->
pwrb_handle_base
[
pwrb_context
->
alloc_index
];
pwrb_context
->
wrb_handles_available
--
;
if
(
pwrb_context
->
alloc_index
==
(
wrbs_per_cxn
-
1
))
pwrb_context
->
alloc_index
=
0
;
else
pwrb_context
->
alloc_index
++
;
spin_unlock_
bh
(
&
pwrb_context
->
wrb_lock
);
spin_unlock_
irqrestore
(
&
pwrb_context
->
wrb_lock
,
flags
);
if
(
pwrb_handle
)
memset
(
pwrb_handle
->
pwrb
,
0
,
sizeof
(
*
pwrb_handle
->
pwrb
));
...
...
@@ -1001,14 +1005,16 @@ beiscsi_put_wrb_handle(struct hwi_wrb_context *pwrb_context,
struct
wrb_handle
*
pwrb_handle
,
unsigned
int
wrbs_per_cxn
)
{
spin_lock_bh
(
&
pwrb_context
->
wrb_lock
);
unsigned
long
flags
;
spin_lock_irqsave
(
&
pwrb_context
->
wrb_lock
,
flags
);
pwrb_context
->
pwrb_handle_base
[
pwrb_context
->
free_index
]
=
pwrb_handle
;
pwrb_context
->
wrb_handles_available
++
;
if
(
pwrb_context
->
free_index
==
(
wrbs_per_cxn
-
1
))
pwrb_context
->
free_index
=
0
;
else
pwrb_context
->
free_index
++
;
spin_unlock_
bh
(
&
pwrb_context
->
wrb_lock
);
spin_unlock_
irqrestore
(
&
pwrb_context
->
wrb_lock
,
flags
);
}
/**
...
...
@@ -1037,8 +1043,9 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
static
struct
sgl_handle
*
alloc_mgmt_sgl_handle
(
struct
beiscsi_hba
*
phba
)
{
struct
sgl_handle
*
psgl_handle
;
unsigned
long
flags
;
spin_lock_
bh
(
&
phba
->
mgmt_sgl_lock
);
spin_lock_
irqsave
(
&
phba
->
mgmt_sgl_lock
,
flags
);
if
(
phba
->
eh_sgl_hndl_avbl
)
{
psgl_handle
=
phba
->
eh_sgl_hndl_base
[
phba
->
eh_sgl_alloc_index
];
phba
->
eh_sgl_hndl_base
[
phba
->
eh_sgl_alloc_index
]
=
NULL
;
...
...
@@ -1056,14 +1063,16 @@ static struct sgl_handle *alloc_mgmt_sgl_handle(struct beiscsi_hba *phba)
phba
->
eh_sgl_alloc_index
++
;
}
else
psgl_handle
=
NULL
;
spin_unlock_
bh
(
&
phba
->
mgmt_sgl_lock
);
spin_unlock_
irqrestore
(
&
phba
->
mgmt_sgl_lock
,
flags
);
return
psgl_handle
;
}
void
free_mgmt_sgl_handle
(
struct
beiscsi_hba
*
phba
,
struct
sgl_handle
*
psgl_handle
)
{
spin_lock_bh
(
&
phba
->
mgmt_sgl_lock
);
unsigned
long
flags
;
spin_lock_irqsave
(
&
phba
->
mgmt_sgl_lock
,
flags
);
beiscsi_log
(
phba
,
KERN_INFO
,
BEISCSI_LOG_CONFIG
,
"BM_%d : In free_mgmt_sgl_handle,"
"eh_sgl_free_index=%d
\n
"
,
...
...
@@ -1078,7 +1087,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
"BM_%d : Double Free in eh SGL ,"
"eh_sgl_free_index=%d
\n
"
,
phba
->
eh_sgl_free_index
);
spin_unlock_
bh
(
&
phba
->
mgmt_sgl_lock
);
spin_unlock_
irqrestore
(
&
phba
->
mgmt_sgl_lock
,
flags
);
return
;
}
phba
->
eh_sgl_hndl_base
[
phba
->
eh_sgl_free_index
]
=
psgl_handle
;
...
...
@@ -1088,7 +1097,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
phba
->
eh_sgl_free_index
=
0
;
else
phba
->
eh_sgl_free_index
++
;
spin_unlock_
bh
(
&
phba
->
mgmt_sgl_lock
);
spin_unlock_
irqrestore
(
&
phba
->
mgmt_sgl_lock
,
flags
);
}
static
void
...
...
drivers/scsi/libiscsi.c
浏览文件 @
602432c1
...
...
@@ -791,9 +791,9 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
free_task:
/* regular RX path uses back_lock */
spin_lock
_bh
(
&
session
->
back_lock
);
spin_lock
(
&
session
->
back_lock
);
__iscsi_put_task
(
task
);
spin_unlock
_bh
(
&
session
->
back_lock
);
spin_unlock
(
&
session
->
back_lock
);
return
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录