The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=706291eddb45a9afd8e690dc8d7e2c8d6bad6084
commit 706291eddb45a9afd8e690dc8d7e2c8d6bad6084 Author: Andriy Gapon <a...@freebsd.org> AuthorDate: 2025-07-04 07:53:11 +0000 Commit: Andriy Gapon <a...@freebsd.org> CommitDate: 2025-08-06 06:04:32 +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 6ea05863d646..8f9646f7b98f 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) {