Replace diagPending by ioc_reset_in_progress. Similarily to the fusion-4.17 driver. Signed-off-by: Bernd Schubert <bs@xxxxxxxxx> --- drivers/message/fusion/mptbase.c | 16 +++++++++------- drivers/message/fusion/mptbase.h | 2 +- drivers/message/fusion/mptscsih.c | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) Index: linus-git/drivers/message/fusion/mptbase.c =================================================================== --- linus-git.orig/drivers/message/fusion/mptbase.c +++ linus-git/drivers/message/fusion/mptbase.c @@ -290,7 +290,7 @@ mpt_fault_reset_work(struct work_struct int rc; unsigned long flags; - if (ioc->diagPending || !ioc->active) + if (ioc->ioc_reset_in_progress || !ioc->active) goto out; ioc_raw_state = mpt_GetIocState(ioc, 0); @@ -1655,7 +1655,7 @@ mpt_attach(struct pci_dev *pdev, const s ioc->reply_sz = MPT_REPLY_FRAME_SIZE; ioc->pcidev = pdev; - ioc->diagPending = 0; + ioc->ioc_reset_in_progress = 0; spin_lock_init(&ioc->diagLock); spin_lock_init(&ioc->initializing_hba_lock); @@ -6411,12 +6411,14 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i * mpt_do_ioc_recovery at any instant in time. */ spin_lock_irqsave(&ioc->diagLock, flags); - if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)){ + if ((ioc->ioc_reset_in_progress) + || (ioc->alt_ioc && ioc->alt_ioc->ioc_reset_in_progress)) { spin_unlock_irqrestore(&ioc->diagLock, flags); return 0; - } else { - ioc->diagPending = 1; } + ioc->ioc_reset_in_progress = 1; + if (ioc->alt_ioc) + ioc->alt_ioc->ioc_reset_in_progress = 1; spin_unlock_irqrestore(&ioc->diagLock, flags); /* FIXME: If do_ioc_recovery fails, repeat.... @@ -6453,9 +6455,9 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i ioc->alt_ioc->reload_fw = 0; spin_lock_irqsave(&ioc->diagLock, flags); - ioc->diagPending = 0; + ioc->ioc_reset_in_progress = 0; if (ioc->alt_ioc) - ioc->alt_ioc->diagPending = 0; + ioc->alt_ioc->ioc_reset_in_progress = 0; spin_unlock_irqrestore(&ioc->diagLock, flags); dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT "HardResetHandler rc = %d!\n", ioc->name, rc)); Index: linus-git/drivers/message/fusion/mptbase.h =================================================================== --- linus-git.orig/drivers/message/fusion/mptbase.h +++ linus-git/drivers/message/fusion/mptbase.h @@ -644,7 +644,7 @@ typedef struct _MPT_ADAPTER struct proc_dir_entry *ioc_dentry; struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ spinlock_t diagLock; /* diagnostic reset lock */ - int diagPending; + u8 ioc_reset_in_progress; u32 biosVersion; /* BIOS version from IO Unit Page 2 */ int eventTypes; /* Event logging parameters */ int eventContext; /* Next event context */ Index: linus-git/drivers/message/fusion/mptscsih.c =================================================================== --- linus-git.orig/drivers/message/fusion/mptscsih.c +++ linus-git/drivers/message/fusion/mptscsih.c @@ -1561,7 +1561,8 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 // SJR - CHECKME - Can we avoid this here? // (mpt_HardResetHandler has this check...) spin_lock_irqsave(&ioc->diagLock, flags); - if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) { + if ((ioc->ioc_reset_in_progress) + || (ioc->alt_ioc && ioc->alt_ioc->ioc_reset_in_progress)) { spin_unlock_irqrestore(&ioc->diagLock, flags); return FAILED; } -- Bernd Schubert Q-Leap Networks GmbH -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html