diff options
author | Tony Lindgren <tony@atomide.com> | 2010-03-02 01:19:05 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-02 01:19:05 +0300 |
commit | d702d12167a2c05a346f49aac7a311d597762495 (patch) | |
tree | baae42c299cce34d6df24b5d01f8b1d0b481bd9a /drivers/message/fusion/mptfc.c | |
parent | 9418c65f9bd861d0f7e39aab9cfb3aa6f2275d11 (diff) | |
parent | ac0f6f927db539e03e1f3f61bcd4ed57d5cde7a9 (diff) | |
download | linux-d702d12167a2c05a346f49aac7a311d597762495.tar.xz |
Merge with mainline to remove plat-omap/Kconfig conflict
Conflicts:
arch/arm/plat-omap/Kconfig
Diffstat (limited to 'drivers/message/fusion/mptfc.c')
-rw-r--r-- | drivers/message/fusion/mptfc.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index ebf6ae024da4..612ab3c51a6b 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -195,29 +195,34 @@ mptfc_block_error_handler(struct scsi_cmnd *SCpnt, unsigned long flags; int ready; MPT_ADAPTER *ioc; + int loops = 40; /* seconds */ hd = shost_priv(SCpnt->device->host); ioc = hd->ioc; spin_lock_irqsave(shost->host_lock, flags); - while ((ready = fc_remote_port_chkready(rport) >> 16) == DID_IMM_RETRY) { + while ((ready = fc_remote_port_chkready(rport) >> 16) == DID_IMM_RETRY + || (loops > 0 && ioc->active == 0)) { spin_unlock_irqrestore(shost->host_lock, flags); dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT "mptfc_block_error_handler.%d: %d:%d, port status is " - "DID_IMM_RETRY, deferring %s recovery.\n", + "%x, active flag %d, deferring %s recovery.\n", ioc->name, ioc->sh->host_no, - SCpnt->device->id, SCpnt->device->lun, caller)); + SCpnt->device->id, SCpnt->device->lun, + ready, ioc->active, caller)); msleep(1000); spin_lock_irqsave(shost->host_lock, flags); + loops --; } spin_unlock_irqrestore(shost->host_lock, flags); - if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata) { + if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata + || ioc->active == 0) { dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT "%s.%d: %d:%d, failing recovery, " - "port state %d, vdevice %p.\n", caller, + "port state %x, active %d, vdevice %p.\n", caller, ioc->name, ioc->sh->host_no, SCpnt->device->id, SCpnt->device->lun, ready, - SCpnt->device->hostdata)); + ioc->active, SCpnt->device->hostdata)); return FAILED; } dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT |