Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5159656imm; Tue, 9 Oct 2018 10:33:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV62g5Kouo8oDt/7p1yyVmyu7o1/QFOTEEOdC6aRmWr6ti8AS4w1suYxdLOpBogi0R5dtvrhz X-Received: by 2002:a17:902:205:: with SMTP id 5-v6mr17656507plc.307.1539106382422; Tue, 09 Oct 2018 10:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539106382; cv=none; d=google.com; s=arc-20160816; b=A/Zc96c7+7M8aGjjvG6HTmSa/rBmq/ZtcmH7Dbmro0bgqI0oeYTTrIbW6w7JP6sMQn b/uZ7Pd6VlP1nGCZkzt8Bj1jurkCgkRQC6fOjEo8MAXRtUTcEvDA6bPHPPYixAMt1OSv ZVpwobygv2a6aeqeUGqhmM16BD6g5p84+cUCjj0N+YLCcpY78x84urRKD2duxElISu1W 7OvzpWmc/7CValh9RWP18h/XhAVnOZwPiNt2/ZG1h45Fysqlop3v7eYKd9h0fUvNukRG iGJvPzD/FXD6M4BeRmMsYseKa4sHLkkeWqb33OAPiVdioum/JrPzMKnj/UTKfjLTw/mS JM+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:mime-version :dkim-signature; bh=46CS8BnLz44Na4ecEMVYlapes34LPL9XvwCGT1TI3xE=; b=E5k5EPy6j6IEijl0tNcymitETSTrBwI93vV+vIrpEXQo95lgLdPecnbnc3gCtjuZNP SmK7ndiet+k3CL125GeXCZF+0bDo9i2EzBxofBXzYglL79NrpMDvYVEU5QD4nz0ZWfTB xR67OUW7QYUyvtyyWX095QhDkJzyGPO2w9aiEnAOcDM1C8AvrOrwH41uRu49uKNbVbUK lDKaMpdrTz2u9b/vpVsVnTReayrwaPgttzLihOjkxFwH4A2DcoI/oThUTKv1DbJoVvkW gI8HpyuQJmxLBFBclWY6ihe0vI9mbdHdqd5XU4kZTMiq5fnENlKxucTrsYpMtnB6BMDl cW6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nanometrics.ca header.s=google header.b=MtsFXtl9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nanometrics.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si20372937plt.7.2018.10.09.10.32.47; Tue, 09 Oct 2018 10:33:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nanometrics.ca header.s=google header.b=MtsFXtl9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nanometrics.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727339AbeJJAt3 (ORCPT + 99 others); Tue, 9 Oct 2018 20:49:29 -0400 Received: from mail-it1-f174.google.com ([209.85.166.174]:36928 "EHLO mail-it1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbeJJAt2 (ORCPT ); Tue, 9 Oct 2018 20:49:28 -0400 Received: by mail-it1-f174.google.com with SMTP id e74-v6so3928017ita.2 for ; Tue, 09 Oct 2018 10:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=46CS8BnLz44Na4ecEMVYlapes34LPL9XvwCGT1TI3xE=; b=MtsFXtl9PSeUy28cAGp7qjbtAadZ8/F9bZlYFhuZhyyNOYj0BWbz+XBJGLPzpvyaYr Fm161/V4Idfo+Kx8sMn5bNATJH4mbR58SFRqukwcaJQktlkUvduseVoSBd5ca6RluUrb X3fumUlQwSS2yJeEK0YRJu3Nx7TQKHhFKE6XI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=46CS8BnLz44Na4ecEMVYlapes34LPL9XvwCGT1TI3xE=; b=iy+mUWQc5xiqwdEz5Qhy4Wpkv30QkpFW1houc/SjZWRAk9UZyzyh+c+Sp3YzQfs3Ks /bBBWNZppUlpMp9YobfTDsAu9A/kJFN/mJ1pWlkJLFIAhiz5fmdJx7kvMOJrU2cdtfKp k+6K+Ddaec0gCs5XDWwlYmt0ove46u/fApfiZAs01Dyf0WntnArWiYrPaUjzNapHB3PF xlDxH/g9JTBawtnrxFI2ugbF/WC0LzXYjxXGBDWtgbsRTwPns9nmFK/oaEJ69uJ3GNtJ 9sq4XiKnoFgyXBA5wcCcL26OyGcoKEuL398fZjhLu7aO0cUbEjUkiu8Q5RTuC3e2sxR6 Niww== X-Gm-Message-State: ABuFfohRALHVbm9CFcd3COAwkPgAa2wRkoXg3bwPNTdMg8Xcebj+kAoZ XmiMpU6OGEtWQ7kpYQjPNFwos2g9r2rWDj3CqJ1nXdYoDjPPqYxTI+DrXDfPOcSAGOKXnqSlwuu snCsquEYE9lfTzpN/ MIME-Version: 1.0 X-Received: by 2002:a24:448:: with SMTP id 69-v6mr2222440itb.156.1539106285410; Tue, 09 Oct 2018 10:31:25 -0700 (PDT) Received: from jamesnuss-kubuntu.nanometrics.ca ([72.142.127.130]) by smtp.gmail.com with ESMTPSA id c24-v6sm6321018iod.44.2018.10.09.10.31.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 10:31:24 -0700 (PDT) From: James Nuss To: linux-mmc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/7] mmc-utils: interpret DEVICE_VERSION when printing extcsd Date: Tue, 9 Oct 2018 13:31:07 -0400 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Content-Type: text/plain; charset="US-ASCII" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DEVICE_VERSION is a 2-byte field Print the individual byte values in hex Signed-off-by: James Nuss --- mmc.h | 2 ++ mmc_cmds.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/mmc.h b/mmc.h index 86e209a..f25869e 100644 --- a/mmc.h +++ b/mmc.h @@ -59,6 +59,8 @@ #define EXT_CSD_OPTIMAL_READ_SIZE 266 /* RO */ #define EXT_CSD_OPTIMAL_WRITE_SIZE 265 /* RO */ #define EXT_CSD_OPTIMAL_TRIM_UNIT_SIZE 264 /* RO */ +#define EXT_CSD_DEVICE_VERSION_1 263 /* RO */ +#define EXT_CSD_DEVICE_VERSION_0 262 /* RO */ #define EXT_CSD_FIRMWARE_VERSION_7 261 /* RO */ #define EXT_CSD_FIRMWARE_VERSION_6 260 /* RO */ #define EXT_CSD_FIRMWARE_VERSION_5 259 /* RO */ diff --git a/mmc_cmds.c b/mmc_cmds.c index 45aa4c0..756aa2f 100644 --- a/mmc_cmds.c +++ b/mmc_cmds.c @@ -1758,6 +1758,9 @@ int do_read_extcsd(int nargs, char **argv) } if (ext_csd_rev >= 7) { + printf("Device Version: 0x%02x%02x\n", + ext_csd[EXT_CSD_DEVICE_VERSION_1], + ext_csd[EXT_CSD_DEVICE_VERSION_0]); printf("Firmware Version: 0x%02x%02x%02x%02x%02x%02x%02x%02x\n", ext_csd[EXT_CSD_FIRMWARE_VERSION_7], ext_csd[EXT_CSD_FIRMWARE_VERSION_6], -- 2.7.4 -- This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged, confidential or otherwise legally exempt from disclosure. If you are not the named addressee, or have been inadvertently and erroneously referenced in the address line, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.