Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Nov 2021 17:29:30 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c01a46d4acab - main - camcontrol: dump received data for MMC command even if it is unknown
Message-ID:  <202111061729.1A6HTUY0091434@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by avg:

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

commit c01a46d4acab923961dfb7e4605b9ca6e775e616
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-11-06 10:23:55 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-06 17:25:57 +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  |....??..........|
    
    MFC after:      2 weeks
---
 sbin/camcontrol/camcontrol.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index e560eb349f79..facabbe2ecdc 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -8140,6 +8140,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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111061729.1A6HTUY0091434>