The branch stable/12 has been updated by avg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=06f49eaf13bdd9a0e5f4d8e260891dede592db12

commit 06f49eaf13bdd9a0e5f4d8e260891dede592db12
Author:     Andriy Gapon <a...@freebsd.org>
AuthorDate: 2021-07-09 14:28:40 +0000
Commit:     Andriy Gapon <a...@freebsd.org>
CommitDate: 2021-11-27 08:39:19 +0000

    sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes
    
    (cherry picked from commit e17b58ecbcb644f76cceda4ca7ff08f7677b5dfd)
---
 sys/cam/mmc/mmc_da.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index 2587cda115cc..96898e92cb81 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1834,7 +1834,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb)
                            /*reduction*/0,
                            /*timeout*/0,
                            /*getcount_only*/0);
-               error = 5; /* EIO */
+               error = EIO;
        } else {
                if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
                        panic("REQ_CMP with QFRZN");
@@ -1855,7 +1855,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb)
                softc->outstanding_cmds--;
                /* Complete partition switch */
                softc->state = SDDA_STATE_NORMAL;
-               if (error != MMC_ERR_NONE) {
+               if (error != 0) {
                        /* TODO: Unpause retune if accessing RPMB */
                        xpt_release_ccb(done_ccb);
                        xpt_schedule(periph, CAM_PRIORITY_NORMAL);

Reply via email to