The branch main has been updated by avg:

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

commit ad0c3859a9184036484c0cd63d7260a4a3d1ad2d
Author:     Andriy Gapon <a...@freebsd.org>
AuthorDate: 2025-07-04 07:53:11 +0000
Commit:     Andriy Gapon <a...@freebsd.org>
CommitDate: 2025-07-04 08:01:00 +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
    MFC after:      5 days
---
 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 1c455e1951d7..9246f95a080e 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1198,27 +1198,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)
 {

Reply via email to