mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
scsi: message: fusion: Open-code mptfc_block_error_handler() for bus reset
When calling bus_reset we have potentially several ports to be reset, so this patch open-codes the existing mptfc_block_error_handler() to wait for all ports attached to this bus. Signed-off-by: Hannes Reinecke <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
1 parent
e6629081fb
commit
17865dc2ec
1 file changed
+14
-3
@@ -262,12 +262,23 @@ static int
|
||||
mptfc_bus_reset(struct scsi_cmnd *SCpnt)
|
||||
{
|
||||
struct Scsi_Host *shost = SCpnt->device->host;
|
||||
struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device));
|
||||
MPT_SCSI_HOST __maybe_unused *hd = shost_priv(shost);
|
||||
int channel = SCpnt->device->channel;
|
||||
struct mptfc_rport_info *ri;
|
||||
int rtn;
|
||||
|
||||
rtn = mptfc_block_error_handler(rport);
|
||||
if (rtn == SUCCESS) {
|
||||
list_for_each_entry(ri, &hd->ioc->fc_rports, list) {
|
||||
if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) {
|
||||
VirtTarget *vtarget = ri->starget->hostdata;
|
||||
|
||||
if (!vtarget || vtarget->channel != channel)
|
||||
continue;
|
||||
rtn = fc_block_rport(ri->rport);
|
||||
if (rtn != 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rtn == 0) {
|
||||
dfcprintk (hd->ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"%s.%d: %d:%llu, executing recovery.\n", __func__,
|
||||
hd->ioc->name, shost->host_no,
|
||||
|
||||
Reference in new issue
Block a user