From nobody Wed Jan 26 07:34:59 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9ACDB197A3DE; Wed, 26 Jan 2022 07:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JkFqR3sylz4sm1; Wed, 26 Jan 2022 07:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643182499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jr2KccK6/47wCFA2UL1b+uoK1M6EDYSwS+kZ3KHc7Yk=; b=FuDD6fXuYSyQkoFp12FHhYShysMWyzzwlVsYO7+TRfX7JTiMB0ttzkk5sWAEnZOkwJRHS0 atGyetZrwAhF8pcu+qPZHhLTV+PMmLql07ANO0l6F3+QAXCYeiFUi9yg03rr6iy9ndPWfM MJo0l5inMkDIqno9lAj6LS0LQr+qhLF/APYM294FxxVqIBU90A/WOyA0SQGFR6yhLbdh85 cGAcK6n2KMCj1nQB8CLs+B9gIbQLnhwmy0uwQf3021UM8QuoO3pI6ZgfO6JQ1NKS2IfuX9 yb0FxpfYr/JwRRYDN71fgITE0sZIE606PmVH+dLA3jYyeo3QcPF0G+aZai/GXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64A5F196A6; Wed, 26 Jan 2022 07:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20Q7Yx0W061123; Wed, 26 Jan 2022 07:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20Q7YxBp061122; Wed, 26 Jan 2022 07:34:59 GMT (envelope-from git) Date: Wed, 26 Jan 2022 07:34:59 GMT Message-Id: <202201260734.20Q7YxBp061122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 46f4697fb76e - stable/12 - mmc_da: use MMC_SECTOR_SIZE constant in place of literals List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 46f4697fb76e3f1af05b6235b5d8f45e9ab1111f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643182499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jr2KccK6/47wCFA2UL1b+uoK1M6EDYSwS+kZ3KHc7Yk=; b=TNGmwn1To03QGWUXMT0NuJBv7vMaRF8QVgLXJfqD4QVGkg+wKLQvC/iot2Sa7DAI+Xule2 m2lL0Y5/XNTxk7d7Zx7drpAql+lTiZOBmQwzOnSGCAKVNcrR64ijuyZtUnNbKrplA/gU+8 +ZxFWtYWExVUls+zSMy5FnznURhMpspjXXvMp3wjk3+j+i2ZISFMYbOqPTy3lcV4CQEO7u eAQsCOxlBM1tGBBffSamBrmYDIuaoS1ZE2PRrznnzR1vv0VlqAZR4LTTt/JzG1aagTTKgd KGe+0HR93vHLYR/86kZJAAaJtqufl5GKfzr1Kf1Sqg8jms7dZ67ZtjXYZNyi2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643182499; a=rsa-sha256; cv=none; b=aa34VXT0y0GfDQ9c/GgNgrMpMmzndWVLSRdU3p7JF7T+uWTDxLsOPwq2z0MvXoA77cfZXj OCXSYuJ36VCkzInUQ0RKiVdttpG2x0UxDdtBC2o4LpJnd4bEgN7QPAAk5YiAy9QcWQ9g+K jY8idjT3IFlECEAdYtTrUhihRjHBibLomt8y48L56puYGTBYStn+D3lCsKuPyS/VcOJRCQ H9sNkVNQVh0ajpe/BqOOYT4+gUmM062akmA9uLtweK+gWFc8Cy/W0bO2I5UT5UDFNzOl1l d72emCbywWZIDb4S/CfVjoG3aF3vW+N9yWQd1r2y0igE5HQG9X4ZrMbzyLQ2Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=46f4697fb76e3f1af05b6235b5d8f45e9ab1111f commit 46f4697fb76e3f1af05b6235b5d8f45e9ab1111f Author: Andriy Gapon AuthorDate: 2022-01-12 07:14:36 +0000 Commit: Andriy Gapon CommitDate: 2022-01-26 07:34:30 +0000 mmc_da: use MMC_SECTOR_SIZE constant in place of literals (cherry picked from commit 60b7d5a24a8fe9ddd4f3880119a52d9df8519fbe) --- sys/cam/mmc/mmc_da.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 5f888789e46a..9b5bbbefcf8e 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -1230,7 +1230,7 @@ sdda_start_init(void *context, union ccb *start_ccb) mmc_decode_cid_sd(mmcp->card_cid, &softc->cid); } - softc->sector_count = softc->csd.capacity / 512; + softc->sector_count = softc->csd.capacity / MMC_SECTOR_SIZE; softc->mediasize = softc->csd.capacity; softc->cmd6_time = mmc_get_cmd6_timeout(periph); @@ -1242,7 +1242,7 @@ sdda_start_init(void *context, union ccb *start_ccb) (softc->raw_ext_csd[EXT_CSD_SEC_CNT + 3] << 24); if (sec_count != 0) { softc->sector_count = sec_count; - softc->mediasize = softc->sector_count * 512; + softc->mediasize = softc->sector_count * MMC_SECTOR_SIZE; /* FIXME: there should be a better name for this option...*/ mmcp->card_features |= CARD_FEATURE_SDHC; } @@ -1461,7 +1461,7 @@ sdda_add_part(struct cam_periph *periph, u_int type, const char *name, part->disk = disk_alloc(); part->disk->d_rotation_rate = DISK_RR_NON_ROTATING; part->disk->d_devstat = devstat_new_entry(part->name, - cnt, 512, + cnt, MMC_SECTOR_SIZE, DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT | XPORT_DEVSTAT_TYPE(cpi.transport), DEVSTAT_PRIORITY_DISK); @@ -1738,7 +1738,7 @@ sddastart(struct cam_periph *periph, union ccb *start_ccb) { struct ccb_mmcio *mmcio; uint64_t blockno = bp->bio_pblkno; - uint16_t count = bp->bio_bcount / 512; + uint16_t count = bp->bio_bcount / MMC_SECTOR_SIZE; uint16_t opcode; if (bp->bio_cmd == BIO_READ) @@ -1774,7 +1774,7 @@ sddastart(struct cam_periph *periph, union ccb *start_ccb) mmcio->cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; mmcio->cmd.data = softc->mmcdata; mmcio->cmd.data->data = bp->bio_data; - mmcio->cmd.data->len = 512 * count; + mmcio->cmd.data->len = MMC_SECTOR_SIZE * count; mmcio->cmd.data->flags = (bp->bio_cmd == BIO_READ ? MMC_DATA_READ : MMC_DATA_WRITE); /* Direct h/w to issue CMD12 upon completion */ if (count > 1) {