Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Nov 2021 08:49:50 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a9f6a79b2d6a - stable/13 - sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes
Message-ID:  <202111270849.1AR8noZQ070226@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by avg:

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

commit a9f6a79b2d6a8f0ec7e63d8f1ae9876842c8678a
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-07-09 14:28:40 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-27 08:32:36 +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 62066311aa93..22a467af2f5f 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1935,7 +1935,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");
@@ -1956,7 +1956,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111270849.1AR8noZQ070226>