Created attachment 231209 [details] remove additional MPT command allocation for R1 FP There is an additional command allocation for R1 FP IOs which will eventually cause MPT command scarcity in case of rigorous R1 FP IOs. and this issue will surface only in the case of R1 VD. Hence this BZ is created to address that. This issue is applicable to FreeBSD13, upcoming FreeBSD13.1FreeBSD12.2, FreeBSD12.3. I have attached the patch with the fix (this patch will remove the additional MPT command allocation for R1 FP)
As this is critical, this patch needs to be included in the upcoming release. Please review this patch.
This patch looks good to me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=79c4c4be9618470711480f46ef2cd3a15c00cdd2 commit 79c4c4be9618470711480f46ef2cd3a15c00cdd2 Author: Chandrakanth Patil <chandrakanth.patil@broadcom.com> AuthorDate: 2022-01-21 09:24:37 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-05 14:38:15 +0000 mrsas: if controller reset is in progress, refrain from firing DCMDs to firmware in shutdown If controller reset is in progress, at same time if system shutdown is issued then corresponding shutdown function in driver will be invoked where driver is waiting 15 seconds to complete the controller reset. If the reset is not complteted within that time frame driver will go ahead and fire cache flush and shutdown DCMDs which will end up accessing the the queues which are not initialized due to undergoing reset leads to FMU error in firmware. Fix: In shutdown function, if controller reset is not finished within 15 seconds than driver will return to the OS without firing any DCMDs. Reviewed by: imp PR: 261375 sys/dev/mrsas/mrsas.c | 1 + 1 file changed, 1 insertion(+)
It looks like I swapped the two bug reports in tagging them. Here's the right URL for the commit. URL: https://cgit.FreeBSD.org/src/commit/?id=241bb95552a39d440519162b544c776adcb7cf57
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=09e161a29ee5b0e52494c861f451de35b286e327 commit 09e161a29ee5b0e52494c861f451de35b286e327 Author: Chandrakanth Patil <chandrakanth.patil@broadcom.com> AuthorDate: 2022-01-21 09:24:37 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-06 16:27:25 +0000 mrsas: if controller reset is in progress, refrain from firing DCMDs to firmware in shutdown If controller reset is in progress, at same time if system shutdown is issued then corresponding shutdown function in driver will be invoked where driver is waiting 15 seconds to complete the controller reset. If the reset is not complteted within that time frame driver will go ahead and fire cache flush and shutdown DCMDs which will end up accessing the the queues which are not initialized due to undergoing reset leads to FMU error in firmware. Fix: In shutdown function, if controller reset is not finished within 15 seconds than driver will return to the OS without firing any DCMDs. Reviewed by: imp PR: 261375 (cherry picked from commit 79c4c4be9618470711480f46ef2cd3a15c00cdd2) sys/dev/mrsas/mrsas.c | 1 + 1 file changed, 1 insertion(+)
A commit in branch releng/13.1 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c872d65b55aa3bf6c030276eb0c7933015b20801 commit c872d65b55aa3bf6c030276eb0c7933015b20801 Author: Chandrakanth Patil <chandrakanth.patil@broadcom.com> AuthorDate: 2022-01-21 09:24:37 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-06 17:46:00 +0000 mrsas: if controller reset is in progress, refrain from firing DCMDs to firmware in shutdown If controller reset is in progress, at same time if system shutdown is issued then corresponding shutdown function in driver will be invoked where driver is waiting 15 seconds to complete the controller reset. If the reset is not complteted within that time frame driver will go ahead and fire cache flush and shutdown DCMDs which will end up accessing the the queues which are not initialized due to undergoing reset leads to FMU error in firmware. Fix: In shutdown function, if controller reset is not finished within 15 seconds than driver will return to the OS without firing any DCMDs. Approved by: re@ (gjb) Reviewed by: imp PR: 261375 (cherry picked from commit 79c4c4be9618470711480f46ef2cd3a15c00cdd2) (cherry picked from commit 09e161a29ee5b0e52494c861f451de35b286e327) sys/dev/mrsas/mrsas.c | 1 + 1 file changed, 1 insertion(+)
^Triage: assign to committer who also MFCed.