Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
b4edcbca
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
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看板
提交
b4edcbca
编写于
6月 19, 2005
作者:
C
Christoph Hellwig
提交者:
James Bottomley
6月 26, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[SCSI] remove scsi_cmnd->owner
never checked anywhere Signed-off-by:
N
James Bottomley
<
James.Bottomley@SteelEye.com
>
上级
f5ad5614
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
1 addition
and
36 deletion
+1
-36
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+0
-5
drivers/scsi/scsi_error.c
drivers/scsi/scsi_error.c
+1
-17
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_lib.c
+0
-2
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_priv.h
+0
-11
include/scsi/scsi_cmnd.h
include/scsi/scsi_cmnd.h
+0
-1
未找到文件。
drivers/scsi/scsi.c
浏览文件 @
b4edcbca
...
...
@@ -260,7 +260,6 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
memset
(
cmd
,
0
,
sizeof
(
*
cmd
));
cmd
->
device
=
dev
;
cmd
->
state
=
SCSI_STATE_UNUSED
;
cmd
->
owner
=
SCSI_OWNER_NOBODY
;
init_timer
(
&
cmd
->
eh_timeout
);
INIT_LIST_HEAD
(
&
cmd
->
list
);
spin_lock_irqsave
(
&
dev
->
list_lock
,
flags
);
...
...
@@ -612,7 +611,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
*/
cmd
->
state
=
SCSI_STATE_QUEUED
;
cmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
atomic_inc
(
&
cmd
->
device
->
iorequest_cnt
);
...
...
@@ -683,7 +681,6 @@ void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq)
{
sreq
->
sr_command
=
cmd
;
cmd
->
owner
=
SCSI_OWNER_MIDLEVEL
;
cmd
->
cmd_len
=
sreq
->
sr_cmd_len
;
cmd
->
use_sg
=
sreq
->
sr_use_sg
;
...
...
@@ -768,7 +765,6 @@ void __scsi_done(struct scsi_cmnd *cmd)
*/
cmd
->
serial_number
=
0
;
cmd
->
state
=
SCSI_STATE_BHQUEUE
;
cmd
->
owner
=
SCSI_OWNER_BH_HANDLER
;
atomic_inc
(
&
cmd
->
device
->
iodone_cnt
);
if
(
cmd
->
result
)
...
...
@@ -889,7 +885,6 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
SCSI_LOG_MLCOMPLETE
(
4
,
printk
(
"Notifying upper driver of completion "
"for device %d %x
\n
"
,
sdev
->
id
,
cmd
->
result
));
cmd
->
owner
=
SCSI_OWNER_HIGHLEVEL
;
cmd
->
state
=
SCSI_STATE_FINISHED
;
/*
...
...
drivers/scsi/scsi_error.c
浏览文件 @
b4edcbca
...
...
@@ -77,7 +77,6 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag)
/*
* FIXME: Can we stop setting owner and state.
*/
scmd
->
owner
=
SCSI_OWNER_ERROR_HANDLER
;
scmd
->
state
=
SCSI_STATE_FAILED
;
list_add_tail
(
&
scmd
->
eh_entry
,
&
shost
->
eh_cmd_q
);
set_bit
(
SHOST_RECOVERY
,
&
shost
->
shost_state
);
...
...
@@ -451,7 +450,6 @@ static void scsi_eh_done(struct scsi_cmnd *scmd)
*/
if
(
del_timer
(
&
scmd
->
eh_timeout
))
{
scmd
->
request
->
rq_status
=
RQ_SCSI_DONE
;
scmd
->
owner
=
SCSI_OWNER_ERROR_HANDLER
;
SCSI_LOG_ERROR_RECOVERY
(
3
,
printk
(
"%s scmd: %p result: %x
\n
"
,
__FUNCTION__
,
scmd
,
scmd
->
result
));
...
...
@@ -484,8 +482,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
* we will use a queued command if possible, otherwise we will
* emulate the queuing and calling of completion function ourselves.
*/
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
if
(
sdev
->
scsi_level
<=
SCSI_2
)
scmd
->
cmnd
[
1
]
=
(
scmd
->
cmnd
[
1
]
&
0x1f
)
|
(
sdev
->
lun
<<
5
&
0xe0
);
...
...
@@ -514,7 +510,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
*/
if
(
scsi_eh_eflags_chk
(
scmd
,
SCSI_EH_REC_TIMEOUT
))
{
scsi_eh_eflags_clr
(
scmd
,
SCSI_EH_REC_TIMEOUT
);
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
/*
* as far as the low level driver is
...
...
@@ -530,8 +525,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
shost
->
hostt
->
eh_abort_handler
(
scmd
);
scmd
->
request
->
rq_status
=
RQ_SCSI_DONE
;
scmd
->
owner
=
SCSI_OWNER_ERROR_HANDLER
;
rtn
=
FAILED
;
}
...
...
@@ -742,9 +735,6 @@ static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd)
*/
if
(
scmd
->
serial_number
==
0
)
return
SUCCESS
;
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
return
scmd
->
device
->
host
->
hostt
->
eh_abort_handler
(
scmd
);
}
...
...
@@ -862,10 +852,7 @@ static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd)
if
(
!
scmd
->
device
->
host
->
hostt
->
eh_device_reset_handler
)
return
FAILED
;
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
rtn
=
scmd
->
device
->
host
->
hostt
->
eh_device_reset_handler
(
scmd
);
if
(
rtn
==
SUCCESS
)
{
scmd
->
device
->
was_reset
=
1
;
scmd
->
device
->
expecting_cc_ua
=
1
;
...
...
@@ -1048,7 +1035,6 @@ static int scsi_try_bus_reset(struct scsi_cmnd *scmd)
SCSI_LOG_ERROR_RECOVERY
(
3
,
printk
(
"%s: Snd Bus RST
\n
"
,
__FUNCTION__
));
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
if
(
!
scmd
->
device
->
host
->
hostt
->
eh_bus_reset_handler
)
return
FAILED
;
...
...
@@ -1077,7 +1063,6 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd)
SCSI_LOG_ERROR_RECOVERY
(
3
,
printk
(
"%s: Snd Host RST
\n
"
,
__FUNCTION__
));
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
if
(
!
scmd
->
device
->
host
->
hostt
->
eh_host_reset_handler
)
return
FAILED
;
...
...
@@ -1819,8 +1804,7 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
memset
(
&
scmd
->
eh_timeout
,
0
,
sizeof
(
scmd
->
eh_timeout
));
scmd
->
request
->
rq_status
=
RQ_SCSI_BUSY
;
scmd
->
state
=
SCSI_STATE_INITIALIZING
;
scmd
->
owner
=
SCSI_OWNER_MIDLEVEL
;
memset
(
&
scmd
->
cmnd
,
'\0'
,
sizeof
(
scmd
->
cmnd
));
scmd
->
scsi_done
=
scsi_reset_provider_done_command
;
...
...
drivers/scsi/scsi_lib.c
浏览文件 @
b4edcbca
...
...
@@ -149,7 +149,6 @@ int scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
* Register the fact that we own the thing for now.
*/
cmd
->
state
=
SCSI_STATE_MLQUEUE
;
cmd
->
owner
=
SCSI_OWNER_MIDLEVEL
;
/*
* Decrement the counters, since these commands are no longer
...
...
@@ -299,7 +298,6 @@ EXPORT_SYMBOL(scsi_wait_req);
*/
static
int
scsi_init_cmd_errh
(
struct
scsi_cmnd
*
cmd
)
{
cmd
->
owner
=
SCSI_OWNER_MIDLEVEL
;
cmd
->
serial_number
=
0
;
memset
(
cmd
->
sense_buffer
,
0
,
sizeof
cmd
->
sense_buffer
);
...
...
drivers/scsi/scsi_priv.h
浏览文件 @
b4edcbca
...
...
@@ -12,17 +12,6 @@ struct scsi_request;
struct
Scsi_Host
;
/*
* These are the values that the owner field can take.
* They are used as an indication of who the command belongs to.
*/
#define SCSI_OWNER_HIGHLEVEL 0x100
#define SCSI_OWNER_MIDLEVEL 0x101
#define SCSI_OWNER_LOWLEVEL 0x102
#define SCSI_OWNER_ERROR_HANDLER 0x103
#define SCSI_OWNER_BH_HANDLER 0x104
#define SCSI_OWNER_NOBODY 0x105
/*
* Magic values for certain scsi structs. Shouldn't ever be used.
*/
...
...
include/scsi/scsi_cmnd.h
浏览文件 @
b4edcbca
...
...
@@ -32,7 +32,6 @@ struct scsi_cmnd {
struct
scsi_device
*
device
;
unsigned
short
state
;
unsigned
short
owner
;
struct
scsi_request
*
sc_request
;
struct
list_head
list
;
/* scsi_cmnd participates in queue lists */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录