From nobody Thu Feb 2 06:57:18 2023 X-Original-To: dev-commits-src-all@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 4P6qNG361dz3c4SP; Thu, 2 Feb 2023 06:57:18 +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 4P6qNG2J1Wz4MDX; Thu, 2 Feb 2023 06:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675321038; 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=Q9YEnkGuFhpggh3yx5iWqlWVjXj1s/r19NCZUnZS97Q=; b=MOsWcxOok/x60o6Lo+I547nsSU79kCC8ccMNVEUF/F+dHQrOj3URW0T47viTSoTk0k5ze0 91kl+Xeziz91NH6SAeUggJeJbVDEKtH840plqPEM2hb5SfXKlWHkYWyZyObXYRoT8eoqAd Uapv9DBzWEYkFE//IMAD6oA4h+kA1/W+AZqL6BPORAErzh7nd4KDP4Ur34zO/PrFwzyyRg 5LPFGMmgB7BpO2GQz0tlon3E5OrsfOH3FQIUU11T44rKzrvqe9Lz4xrEpF5oYRiUNggepw kqfUYmpGC1k1PR+begX5L53BXyTw7pBg0ydPu3f7lqsTCU3EKrm9Um3IyfJWoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675321038; 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=Q9YEnkGuFhpggh3yx5iWqlWVjXj1s/r19NCZUnZS97Q=; b=I3KsctJcwPI9EKdBBZgmkNwv7BpBDZXMJRxSatBozODSC/SSxZV8+xbNIQFXr7tHcy5Sug bYY1WjeGvSlAHekKkjimLWQrRxVeXgDMPSM9GoEm9+7taFqup7VRJ06QnbebFRwzZ5sq5k 0ppiKL8xPzbWLCZ+z+NILnPLqsuDv2CN6b2yYHlvVlWl8+ZWdXhSybuFgRSrJW3t7rNIX1 FZ1pVtA/FM7+AqK4bjYPe/3GcCXr9STWH5Hi9AMWJWCMopYhzyuZBCx1jRgSi6C29ohFl9 aL+Q7UpjJTJtRq7a6vOz7nd7yY9TqTWvYvMWjmjTRZuHGbL57FFzWxAdSRgMNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675321038; a=rsa-sha256; cv=none; b=um+XUyOqWXi07l2IIbPNapE0qiUYFgEfB+cvgL1OMKvEx5+sBaRAVvsB0w18QScoFQ42xj WJ2INks92aO06K8GoWfKBO4mlHtHdupW7qfVHy3zzNx6KWgRpvvdmn2kqBDx2jE6dZYbCX Wau3BSs2DEUh97N102qP91FXv4go5E9kVmg41dYJX01it9IkymI4cDRz+q4puXoHO0YkK5 AKxwoO/7kpCeCAMWPU6GUHiNBBBwdIfD+T4wz6gksxqmf53ecnLvh/XFZ46zN3xeLQki2X BZunKluUM2/LScGbR0dAfujIj1hRhTWRofKttht0+7aTatQoL85ZEs8l9TxFjw== 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 4P6qNG1NF4zlr3; Thu, 2 Feb 2023 06:57:18 +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 3126vIxW003766; Thu, 2 Feb 2023 06:57:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3126vIWI003765; Thu, 2 Feb 2023 06:57:18 GMT (envelope-from git) Date: Thu, 2 Feb 2023 06:57:18 GMT Message-Id: <202302020657.3126vIWI003765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 8974b83aa1a0 - stable/13 - sdio: Do not allow setting a block size if function doesn't support it List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8974b83aa1a077bc038f59c0909e4698f88a5904 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8974b83aa1a077bc038f59c0909e4698f88a5904 commit 8974b83aa1a077bc038f59c0909e4698f88a5904 Author: Emmanuel Vadot AuthorDate: 2021-05-26 11:15:58 +0000 Commit: Emmanuel Vadot CommitDate: 2023-02-02 06:47:34 +0000 sdio: Do not allow setting a block size if function doesn't support it (cherry picked from commit 49da0242e798ade8a578036929bff493a2d6ef75) --- sys/dev/sdio/sdio_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/sdio/sdio_subr.c b/sys/dev/sdio/sdio_subr.c index 0885b16550a6..50b741ff2a27 100644 --- a/sys/dev/sdio/sdio_subr.c +++ b/sys/dev/sdio/sdio_subr.c @@ -121,6 +121,9 @@ sdio_set_block_size(struct sdio_func *f, uint16_t bs) uint32_t addr; uint16_t v; + if (bs > f->max_blksize) + return (EOPNOTSUPP); + if (!sdio_get_support_multiblk(f->dev)) return (EOPNOTSUPP);