mptbase: reset ioc initiator during PCI resume
Subsystems (2)
PATCH 1/7 mptbase: reset ioc initiator during PCI resume
From: "Darrick J. Wong" <[email protected]>
It appears that the LSI SAS 1064E chip needs to be reset after a suspend/resume cycle before the driver attempts further communications with the chip. Without this patch, resuming the chip results in this error message being printed repeatedly and no more disk I/O.
mptbase: ioc0: ERROR - Invalid IOC facts reply, msgLength=0 offsetof=6!
So far it seems to fix suspend/resume on all the MPT Fusion cards I have (SAS and U320 SCSI) but since I don't know the internals of that chip I can't say for sure if this is a proper fix.
---
drivers/message/fusion/mptbase.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/message/fusion/mptbase.c renamed from drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiator-during-pci-resume +6 -0
@@ -1852,6 +1852,12 @@ mpt_resume(struct pci_dev *pdev) (mpt_GetIocState (ioc,1 ) >>MPI_IOC_STATE_SHIFT ), CHIPREG_READ32(&ioc->chip->Doorbell)); +/* put ioc into READY_STATE */ +if (SendIocReset (ioc,MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET ,CAN_SLEEP )) { +printk (MYIOC_s_ERR_FMT +"pci-resume: IOC msg unit reset failed!\n" , ioc->name); + } +/* bring ioc to operational state */ if ((recovery_state =mpt_do_ioc_recovery (ioc,MPT_HOSTEVENT_IOC_RECOVER ,CAN_SLEEP )) !=0 ) {
_
Quoted 29 lines · Andrew Morton
Signed-off-by Darrick J. Wong <[email protected]>Cc "Moore, Eric" <[email protected]>Cc <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/message/fusion/mptbase.c | 6 ++++++ 1 file changed, 6 insertions(+)diff -puN
drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiator-during-pci-resumedrivers/message/fusion/mptbase.c
---
a/drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiatordrivers/message/fusion/mptbase.c renamed from drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiator-during-pci-resume +7
-1-during-pci-resume +++ a/drivers/message/fusion/mptbase.c@@ -1852,6 +1852,12 @@ mpt_resume(struct pci_dev *pdev) (mpt_GetIocState(ioc, 1) >> MPI_IOC_STATE_SHIFT), CHIPREG_READ32(&ioc->chip->Doorbell)); +/* put ioc into READY_STATE */ +if (SendIocReset (ioc,MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET ,CAN_SLEEP )) { +printk (MYIOC_s_ERR_FMT +"pci-resume: IOC msg unit reset failed!\n" , ioc->name); + } +/* bring ioc to operational state */ if ((recovery_state = mpt_do_ioc_recovery(ioc,
Quoted 3 lines
MPT_HOSTEVENT_IOC_RECOVER,CAN_SLEEP)) != 0) {
_
Actually we have a different patch for this, which Sathya been working on.
Eric
Quoted 21 lines · Eric
Quoted 20 lines · Andrew Morton
Signed-off-by Darrick J. Wong <[email protected]>Cc "Moore, Eric" <[email protected]>Cc <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/message/fusion/mptbase.c | 6 ++++++ 1 file changed, 6 insertions(+)diff -puN
drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiator-during-pci-resumedrivers/message/fusion/mptbase.c
---
a/drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiatordrivers/message/fusion/mptbase.c renamed from drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiator-during-pci-resume +1
-1-during-pci-resume +++ a/drivers/message/fusion/mptbase.c@@ -1852,6 +1852,12 @@ mpt_resume(struct pci_dev *pdev) (mpt_GetIocState (ioc,1 ) >>MPI_IOC_STATE_SHIFT ), CHIPREG_READ32(&ioc->chip->Doorbell));
Quoted 16 lines
Quoted 9 lines
drivers/message/fusion/mptbase.c renamed from drivers/message/fusion/mptbase.c~mptbase-reset-ioc-initiator-during-pci-resume +6
-0+/* put ioc into READY_STATE */ +if (SendIocReset (ioc,MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET ,CAN_SLEEP )) { +printk (MYIOC_s_ERR_FMT +"pci-resume: IOC msg unit reset failed!\n" , ioc->name); + } +/* bring ioc to operational state */ if ((recovery_state = mpt_do_ioc_recovery(ioc,Quoted 3 lines
MPT_HOSTEVENT_IOC_RECOVER,CAN_SLEEP)) != 0) {
_Actually we have a different patch for this, which Sathya been working on.
Will that be ready in time for 2.6.25? If not, should we merge Darrick's patch as an interrim thing?
And I assume that 2.6.24 has the same problem - what should we do there?
Thanks.