Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
94d0e7b8
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
94d0e7b8
编写于
5月 28, 2005
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[SCSI] allow sleeping in ->eh_device_reset_handler()
Signed-off-by:
N
James Bottomley
<
James.Bottomley@SteelEye.com
>
上级
8fa728a2
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
98 addition
and
42 deletion
+98
-42
Documentation/scsi/scsi_mid_low_api.txt
Documentation/scsi/scsi_mid_low_api.txt
+1
-2
drivers/ieee1394/sbp2.c
drivers/ieee1394/sbp2.c
+13
-1
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.c
+1
-5
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/scsi/zfcp_scsi.c
+0
-3
drivers/scsi/aha152x.c
drivers/scsi/aha152x.c
+0
-2
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
+4
-4
drivers/scsi/aic7xxx_old.c
drivers/scsi/aic7xxx_old.c
+13
-1
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/ibmvscsi/ibmvscsi.c
+0
-2
drivers/scsi/ipr.c
drivers/scsi/ipr.c
+12
-1
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_scsi.c
+11
-1
drivers/scsi/megaraid.c
drivers/scsi/megaraid.c
+13
-1
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_mbox.c
+13
-1
drivers/scsi/qla1280.c
drivers/scsi/qla1280.c
+7
-1
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_os.c
+1
-7
drivers/scsi/scsi_error.c
drivers/scsi/scsi_error.c
+2
-5
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/scsi/sym53c8xx_2/sym_glue.c
+7
-1
drivers/usb/storage/scsiglue.c
drivers/usb/storage/scsiglue.c
+0
-4
未找到文件。
Documentation/scsi/scsi_mid_low_api.txt
浏览文件 @
94d0e7b8
...
...
@@ -973,8 +973,7 @@ Details:
*
* Returns SUCCESS if command aborted else FAILED
*
* Locks: struct Scsi_Host::host_lock held (with irqsave) on entry
* and assumed to be held on return.
* Locks: None held
*
* Calling context: kernel thread
*
...
...
drivers/ieee1394/sbp2.c
浏览文件 @
94d0e7b8
...
...
@@ -2615,7 +2615,7 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt)
/*
* Called by scsi stack when something has really gone wrong.
*/
static
int
sbp2scsi_reset
(
struct
scsi_cmnd
*
SCpnt
)
static
int
__
sbp2scsi_reset
(
struct
scsi_cmnd
*
SCpnt
)
{
struct
scsi_id_instance_data
*
scsi_id
=
(
struct
scsi_id_instance_data
*
)
SCpnt
->
device
->
host
->
hostdata
[
0
];
...
...
@@ -2630,6 +2630,18 @@ static int sbp2scsi_reset(struct scsi_cmnd *SCpnt)
return
(
SUCCESS
);
}
static
int
sbp2scsi_reset
(
struct
scsi_cmnd
*
SCpnt
)
{
unsigned
long
flags
;
int
rc
;
spin_lock_irqsave
(
SCpnt
->
device
->
host
->
host_lock
,
flags
);
rc
=
__sbp2scsi_reset
(
SCpnt
);
spin_unlock_irqrestore
(
SCpnt
->
device
->
host
->
host_lock
,
flags
);
return
rc
;
}
static
const
char
*
sbp2scsi_info
(
struct
Scsi_Host
*
host
)
{
return
"SCSI emulation for IEEE-1394 SBP-2 Devices"
;
...
...
drivers/message/fusion/mptscsih.c
浏览文件 @
94d0e7b8
...
...
@@ -1801,7 +1801,6 @@ int
mptscsih_dev_reset
(
struct
scsi_cmnd
*
SCpnt
)
{
MPT_SCSI_HOST
*
hd
;
spinlock_t
*
host_lock
=
SCpnt
->
device
->
host
->
host_lock
;
/* If we can't locate our host adapter structure, return FAILED status.
*/
...
...
@@ -1818,7 +1817,6 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
printk
(
KERN_WARNING
MYNAM
": %s: >> Attempting target reset! (sc=%p)
\n
"
,
hd
->
ioc
->
name
,
SCpnt
);
spin_unlock_irq
(
host_lock
);
if
(
mptscsih_TMHandler
(
hd
,
MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET
,
SCpnt
->
device
->
channel
,
SCpnt
->
device
->
id
,
0
,
0
,
5
/* 5 second timeout */
)
...
...
@@ -1830,12 +1828,10 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
hd
->
ioc
->
name
,
SCpnt
);
hd
->
tmPending
=
0
;
hd
->
tmState
=
TM_STATE_NONE
;
spin_lock_irq
(
host_lock
);
return
FAILED
;
}
spin_lock_irq
(
host_lock
);
return
SUCCESS
;
return
SUCCESS
;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
...
...
drivers/s390/scsi/zfcp_scsi.c
浏览文件 @
94d0e7b8
...
...
@@ -636,8 +636,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
struct
zfcp_unit
*
unit
=
(
struct
zfcp_unit
*
)
scpnt
->
device
->
hostdata
;
struct
Scsi_Host
*
scsi_host
=
scpnt
->
device
->
host
;
spin_unlock_irq
(
scsi_host
->
host_lock
);
if
(
!
unit
)
{
ZFCP_LOG_NORMAL
(
"bug: Tried reset for nonexistent unit
\n
"
);
retval
=
SUCCESS
;
...
...
@@ -680,7 +678,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
retval
=
SUCCESS
;
}
out:
spin_lock_irq
(
scsi_host
->
host_lock
);
return
retval
;
}
...
...
drivers/scsi/aha152x.c
浏览文件 @
94d0e7b8
...
...
@@ -1225,8 +1225,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
}
DO_UNLOCK
(
flags
);
spin_lock_irq
(
shpnt
->
host_lock
);
return
ret
;
}
...
...
drivers/scsi/aic7xxx/aic79xx_osm.c
浏览文件 @
94d0e7b8
...
...
@@ -1511,17 +1511,17 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
ahd_name
(
ahd
),
cmd
->
device
->
channel
,
cmd
->
device
->
id
,
cmd
->
device
->
lun
,
cmd
);
#endif
ahd_
midlayer_entrypoint_
lock
(
ahd
,
&
s
);
ahd_lock
(
ahd
,
&
s
);
dev
=
ahd_linux_get_device
(
ahd
,
cmd
->
device
->
channel
,
cmd
->
device
->
id
,
cmd
->
device
->
lun
,
/*alloc*/
FALSE
);
if
(
dev
==
NULL
)
{
ahd_
midlayer_entrypoint_
unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
kfree
(
recovery_cmd
);
return
(
FAILED
);
}
if
((
scb
=
ahd_get_scb
(
ahd
,
AHD_NEVER_COL_IDX
))
==
NULL
)
{
ahd_
midlayer_entrypoint_
unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
kfree
(
recovery_cmd
);
return
(
FAILED
);
}
...
...
@@ -1570,7 +1570,7 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
spin_lock_irq
(
&
ahd
->
platform_data
->
spin_lock
);
ahd_schedule_runq
(
ahd
);
ahd_linux_run_complete_queue
(
ahd
);
ahd_
midlayer_entrypoint_
unlock
(
ahd
,
&
s
);
ahd_unlock
(
ahd
,
&
s
);
printf
(
"%s: Device reset returning 0x%x
\n
"
,
ahd_name
(
ahd
),
retval
);
return
(
retval
);
}
...
...
drivers/scsi/aic7xxx_old.c
浏览文件 @
94d0e7b8
...
...
@@ -10358,7 +10358,7 @@ aic7xxx_queue(Scsi_Cmnd *cmd, void (*fn)(Scsi_Cmnd *))
* Returns an enumerated type that indicates the status of the operation.
*-F*************************************************************************/
static
int
aic7xxx_bus_device_reset
(
Scsi_Cmnd
*
cmd
)
__
aic7xxx_bus_device_reset
(
Scsi_Cmnd
*
cmd
)
{
struct
aic7xxx_host
*
p
;
struct
aic7xxx_scb
*
scb
;
...
...
@@ -10551,6 +10551,18 @@ aic7xxx_bus_device_reset(Scsi_Cmnd *cmd)
return
SUCCESS
;
}
static
int
aic7xxx_bus_device_reset
(
Scsi_Cmnd
*
cmd
)
{
int
rc
;
spin_lock_irq
(
cmd
->
device
->
host
->
host_lock
);
rc
=
__aic7xxx_bus_device_reset
(
cmd
);
spin_unlock_irq
(
cmd
->
device
->
host
->
host_lock
);
return
rc
;
}
/*+F*************************************************************************
* Function:
...
...
drivers/scsi/ibmvscsi/ibmvscsi.c
浏览文件 @
94d0e7b8
...
...
@@ -976,9 +976,7 @@ static int ibmvscsi_eh_device_reset_handler(struct scsi_cmnd *cmd)
return
FAILED
;
}
spin_unlock_irq
(
hostdata
->
host
->
host_lock
);
wait_for_completion
(
&
evt
->
comp
);
spin_lock_irq
(
hostdata
->
host
->
host_lock
);
/* make sure we got a good response */
if
(
unlikely
(
srp_rsp
.
srp
.
generic
.
type
!=
SRP_RSP_TYPE
))
{
...
...
drivers/scsi/ipr.c
浏览文件 @
94d0e7b8
...
...
@@ -2916,7 +2916,7 @@ static int ipr_eh_host_reset(struct scsi_cmnd * scsi_cmd)
* Return value:
* SUCCESS / FAILED
**/
static
int
ipr_eh_dev_reset
(
struct
scsi_cmnd
*
scsi_cmd
)
static
int
__
ipr_eh_dev_reset
(
struct
scsi_cmnd
*
scsi_cmd
)
{
struct
ipr_cmnd
*
ipr_cmd
;
struct
ipr_ioa_cfg
*
ioa_cfg
;
...
...
@@ -2970,6 +2970,17 @@ static int ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd)
return
(
IPR_IOASC_SENSE_KEY
(
ioasc
)
?
FAILED
:
SUCCESS
);
}
static
int
ipr_eh_dev_reset
(
struct
scsi_cmnd
*
cmd
)
{
int
rc
;
spin_lock_irq
(
cmd
->
device
->
host
->
host_lock
);
rc
=
__ipr_eh_dev_reset
(
cmd
);
spin_unlock_irq
(
cmd
->
device
->
host
->
host_lock
);
return
rc
;
}
/**
* ipr_bus_reset_done - Op done function for bus reset.
* @ipr_cmd: ipr command struct
...
...
drivers/scsi/lpfc/lpfc_scsi.c
浏览文件 @
94d0e7b8
...
...
@@ -928,7 +928,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
}
static
int
lpfc_reset_lun_handler
(
struct
scsi_cmnd
*
cmnd
)
__
lpfc_reset_lun_handler
(
struct
scsi_cmnd
*
cmnd
)
{
struct
Scsi_Host
*
shost
=
cmnd
->
device
->
host
;
struct
lpfc_hba
*
phba
=
(
struct
lpfc_hba
*
)
shost
->
hostdata
[
0
];
...
...
@@ -1040,6 +1040,16 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd)
return
ret
;
}
static
int
lpfc_reset_lun_handler
(
struct
scsi_cmnd
*
cmnd
)
{
int
rc
;
spin_lock_irq
(
cmnd
->
device
->
host
->
host_lock
);
rc
=
__lpfc_reset_lun_handler
(
cmnd
);
spin_unlock_irq
(
cmnd
->
device
->
host
->
host_lock
);
return
rc
;
}
/*
* Note: midlayer calls this function with the host_lock held
*/
...
...
drivers/scsi/megaraid.c
浏览文件 @
94d0e7b8
...
...
@@ -1938,7 +1938,7 @@ megaraid_abort(Scsi_Cmnd *cmd)
static
int
megaraid_reset
(
Scsi_Cmnd
*
cmd
)
__
megaraid_reset
(
Scsi_Cmnd
*
cmd
)
{
adapter_t
*
adapter
;
megacmd_t
mc
;
...
...
@@ -1972,6 +1972,18 @@ megaraid_reset(Scsi_Cmnd *cmd)
return
rval
;
}
static
int
megaraid_reset
(
Scsi_Cmnd
*
cmd
)
{
adapter
=
(
adapter_t
*
)
cmd
->
device
->
host
->
hostdata
;
int
rc
;
spin_lock_irq
(
&
adapter
->
lock
);
rc
=
__megaraid_reset
(
cmd
);
spin_unlock_irq
(
&
adapter
->
lock
);
return
rc
;
}
/**
...
...
drivers/scsi/megaraid/megaraid_mbox.c
浏览文件 @
94d0e7b8
...
...
@@ -2726,7 +2726,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp)
* host
**/
static
int
megaraid_reset_handler
(
struct
scsi_cmnd
*
scp
)
__
megaraid_reset_handler
(
struct
scsi_cmnd
*
scp
)
{
adapter_t
*
adapter
;
scb_t
*
scb
;
...
...
@@ -2847,6 +2847,18 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
return
rval
;
}
static
int
megaraid_reset_handler
(
struct
scsi_cmnd
*
cmd
)
{
int
rc
;
spin_lock_irq
(
cmd
->
device
->
host
->
host_lock
);
rc
=
__megaraid_reset_handler
(
cmd
);
spin_unlock_irq
(
cmd
->
device
->
host
->
host_lock
);
return
rc
;
}
/*
* START: internal commands library
...
...
drivers/scsi/qla1280.c
浏览文件 @
94d0e7b8
...
...
@@ -1114,7 +1114,13 @@ qla1280_eh_abort(struct scsi_cmnd * cmd)
static
int
qla1280_eh_device_reset
(
struct
scsi_cmnd
*
cmd
)
{
return
qla1280_error_action
(
cmd
,
DEVICE_RESET
);
int
rc
;
spin_lock_irq
(
cmd
->
device
->
host
->
host_lock
);
rc
=
qla1280_error_action
(
cmd
,
DEVICE_RESET
);
spin_unlock_irq
(
cmd
->
device
->
host
->
host_lock
);
return
rc
;
}
/**************************************************************************
...
...
drivers/scsi/qla2xxx/qla_os.c
浏览文件 @
94d0e7b8
...
...
@@ -613,12 +613,8 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
qla_printk
(
KERN_INFO
,
ha
,
"scsi(%ld:%d:%d): DEVICE RESET ISSUED.
\n
"
,
ha
->
host_no
,
id
,
lun
);
spin_unlock_irq
(
ha
->
host
->
host_lock
);
if
(
qla2x00_wait_for_hba_online
(
ha
)
!=
QLA_SUCCESS
)
{
spin_lock_irq
(
ha
->
host
->
host_lock
);
if
(
qla2x00_wait_for_hba_online
(
ha
)
!=
QLA_SUCCESS
)
goto
eh_dev_reset_done
;
}
if
(
qla2x00_wait_for_loop_ready
(
ha
)
==
QLA_SUCCESS
)
{
if
(
qla2x00_device_reset
(
ha
,
fcport
)
==
0
)
...
...
@@ -669,8 +665,6 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
"scsi(%ld:%d:%d): DEVICE RESET SUCCEEDED.
\n
"
,
ha
->
host_no
,
id
,
lun
);
eh_dev_reset_done:
spin_lock_irq
(
ha
->
host
->
host_lock
);
return
ret
;
}
...
...
drivers/scsi/scsi_error.c
浏览文件 @
94d0e7b8
...
...
@@ -857,17 +857,14 @@ static int scsi_eh_abort_cmds(struct list_head *work_q,
**/
static
int
scsi_try_bus_device_reset
(
struct
scsi_cmnd
*
scmd
)
{
unsigned
long
flags
;
int
rtn
=
FAILED
;
int
rtn
;
if
(
!
scmd
->
device
->
host
->
hostt
->
eh_device_reset_handler
)
return
rtn
;
return
FAILED
;
scmd
->
owner
=
SCSI_OWNER_LOWLEVEL
;
spin_lock_irqsave
(
scmd
->
device
->
host
->
host_lock
,
flags
);
rtn
=
scmd
->
device
->
host
->
hostt
->
eh_device_reset_handler
(
scmd
);
spin_unlock_irqrestore
(
scmd
->
device
->
host
->
host_lock
,
flags
);
if
(
rtn
==
SUCCESS
)
{
scmd
->
device
->
was_reset
=
1
;
...
...
drivers/scsi/sym53c8xx_2/sym_glue.c
浏览文件 @
94d0e7b8
...
...
@@ -867,7 +867,13 @@ static int sym53c8xx_eh_abort_handler(struct scsi_cmnd *cmd)
static
int
sym53c8xx_eh_device_reset_handler
(
struct
scsi_cmnd
*
cmd
)
{
return
sym_eh_handler
(
SYM_EH_DEVICE_RESET
,
"DEVICE RESET"
,
cmd
);
int
rc
;
spin_lock_irq
(
cmd
->
device
->
host
->
host_lock
);
rc
=
sym_eh_handler
(
SYM_EH_DEVICE_RESET
,
"DEVICE RESET"
,
cmd
);
spin_unlock_irq
(
cmd
->
device
->
host
->
host_lock
);
return
rc
;
}
static
int
sym53c8xx_eh_bus_reset_handler
(
struct
scsi_cmnd
*
cmd
)
...
...
drivers/usb/storage/scsiglue.c
浏览文件 @
94d0e7b8
...
...
@@ -253,8 +253,6 @@ static int device_reset(struct scsi_cmnd *srb)
US_DEBUGP
(
"%s called
\n
"
,
__FUNCTION__
);
scsi_unlock
(
us_to_host
(
us
));
/* lock the device pointers and do the reset */
down
(
&
(
us
->
dev_semaphore
));
if
(
test_bit
(
US_FLIDX_DISCONNECTING
,
&
us
->
flags
))
{
...
...
@@ -264,8 +262,6 @@ static int device_reset(struct scsi_cmnd *srb)
result
=
us
->
transport_reset
(
us
);
up
(
&
(
us
->
dev_semaphore
));
/* lock the host for the return */
scsi_lock
(
us_to_host
(
us
));
return
result
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录