git: d4d7b768bb8e - stable/14 - mmc_da: garbage-collect sdda_get_max_data
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Aug 2025 06:02:26 UTC
The branch stable/14 has been updated by avg:
URL: https://cgit.FreeBSD.org/src/commit/?id=d4d7b768bb8e6d1915f9bbb5ba1d2fc705ce1ec2
commit d4d7b768bb8e6d1915f9bbb5ba1d2fc705ce1ec2
Author: Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2025-07-04 07:53:11 +0000
Commit: Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2025-08-06 06:00:39 +0000
mmc_da: garbage-collect sdda_get_max_data
The function is unused since 5aedb8b1d4a6.
For information, in MMC CAM both XPT_GET_TRAN_SETTINGS and XPT_PATH_INQ
obtain data using MMC_SIM_GET_TRAN_SETTINGS. So, "overlapping"
information like ccb_trans_settings_mmc::host_max_data and
ccb_pathinq::maxio is derived from the same source.
That's why sdda_get_max_data was redundant.
Reported by: bz
(cherry picked from commit ad0c3859a9184036484c0cd63d7260a4a3d1ad2d)
---
sys/cam/mmc/mmc_da.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index 594426d288cf..d6f8b514e183 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1199,27 +1199,6 @@ sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb)
return (cts->host_caps);
}
-static uint32_t
-sdda_get_max_data(struct cam_periph *periph, union ccb *ccb)
-{
- struct ccb_trans_settings_mmc *cts;
-
- cts = &ccb->cts.proto_specific.mmc;
- memset(cts, 0, sizeof(struct ccb_trans_settings_mmc));
-
- ccb->ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
- ccb->ccb_h.flags = CAM_DIR_NONE;
- ccb->ccb_h.retry_count = 0;
- ccb->ccb_h.timeout = 100;
- ccb->ccb_h.cbfcnp = NULL;
- xpt_action(ccb);
-
- if (ccb->ccb_h.status != CAM_REQ_CMP)
- panic("Cannot get host max data");
- KASSERT(cts->host_max_data != 0, ("host_max_data == 0?!"));
- return (cts->host_max_data);
-}
-
static void
sdda_start_init(void *context, union ccb *start_ccb)
{