Bug 261375 - mrsas: Remove additional MPT command allocation for R1 FP IOs
Summary: mrsas: Remove additional MPT command allocation for R1 FP IOs
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: Warner Losh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-21 12:51 UTC by Chandrakanth Patil
Modified: 2023-12-28 11:32 UTC (History)
6 users (show)

See Also:


Attachments
remove additional MPT command allocation for R1 FP (1010 bytes, application/mbox)
2022-01-21 12:51 UTC, Chandrakanth Patil
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chandrakanth Patil 2022-01-21 12:51:39 UTC
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)
Comment 1 Chandrakanth Patil 2022-04-04 07:09:33 UTC
As this is critical, this patch needs to be included in the upcoming release. Please review this patch.
Comment 2 Warner Losh freebsd_committer freebsd_triage 2022-04-05 14:23:28 UTC
This patch looks good to me.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-04-05 14:38:32 UTC
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(+)
Comment 4 Warner Losh freebsd_committer freebsd_triage 2022-04-05 14:54:02 UTC
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
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-04-06 16:27:42 UTC
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(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-04-06 17:46:58 UTC
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(+)
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2023-12-28 11:32:17 UTC
^Triage: assign to committer who also MFCed.