From nobody Sun Nov 21 10:05:43 2021 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 8DA05189EF7E; Sun, 21 Nov 2021 10:05:44 +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 4HxmHr2Kshz3ss2; Sun, 21 Nov 2021 10:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 20106581D; Sun, 21 Nov 2021 10:05:44 +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 1ALA5hBb017418; Sun, 21 Nov 2021 10:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ALA5hiB017417; Sun, 21 Nov 2021 10:05:43 GMT (envelope-from git) Date: Sun, 21 Nov 2021 10:05:43 GMT Message-Id: <202111211005.1ALA5hiB017417@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: 128a6d31f2dc - stable/13 - camcontrol: dump received data for MMC command even if it is unknown 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/13 X-Git-Reftype: branch X-Git-Commit: 128a6d31f2dc59a9869dd852ab2a2343406e53c6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=128a6d31f2dc59a9869dd852ab2a2343406e53c6 commit 128a6d31f2dc59a9869dd852ab2a2343406e53c6 Author: Andriy Gapon AuthorDate: 2021-11-06 10:23:55 +0000 Commit: Andriy Gapon CommitDate: 2021-11-21 10:00:42 +0000 camcontrol: dump received data for MMC command even if it is unknown For example, EXT_CSD can be read like this: # camcontrol mmcsdcmd 2:0:0 -c 8 -a 0 -f 0x35 -l 512 CMD 8 arg 0 flags 35 MMCIO: error 0, 00000900 00000000 00000000 00000000 No command-specific decoder for CMD 8 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 0010 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |9...............| ... 0100 00 00 00 00 00 00 00 00 01 08 00 01 02 02 00 00 |................| ... 01e0 00 00 00 00 00 00 00 00 00 81 c7 00 00 01 03 07 |................| 01f0 05 00 03 01 3f 3f 01 01 01 00 00 00 00 00 00 00 |....??..........| (cherry picked from commit c01a46d4acab923961dfb7e4605b9ca6e775e616) --- sbin/camcontrol/camcontrol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index 27d545d924b3..35272bcdc8ed 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -8170,6 +8170,8 @@ mmcsdcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, break; default: printf("No command-specific decoder for CMD %d\n", mmc_opcode); + if (mmc_data_len > 0) + hexdump(mmc_data, mmc_data_len, NULL, 0); } } mmccmd_bailout: