Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp473752yba; Wed, 15 May 2019 04:46:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXQgiX4XRCWQHL+IhfXnt5bDTs+ya5c/4r2vaw7Y121lZHIn0S52noeUulDqAHoORxZWAl X-Received: by 2002:a65:44c8:: with SMTP id g8mr44293882pgs.443.1557920794026; Wed, 15 May 2019 04:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557920794; cv=none; d=google.com; s=arc-20160816; b=MQV71QB1sgfXZioneX2bFiwPxOKxX4m0gNxuNIpRLkxrTJDxnG3knz1u8W+HH4JOCZ Yk8y7bsx14HggV+EUNgeUb4XB5TUnsQ3BbPBC16D+LKjAkBt2jut/jhCPZ4aGcuWOGNT CJZr5FaBEXHdxKFhtXFS3Q2Kk1V/4+IqSyDct+oMRkTgTzunkeAOXY/Njl/Ue8mNnXLu BVnqmzTvbKk17Dw3rNdMx+n3xqliCJniTcXN7c5yU0VD5oBvNJDThpii2bBOk48M4iFy UC9HDt+DL252wmAjGXoEpVv9/7EjXnm92SVdLS63Vh1lQaplBEPLtmQTnL+dUzr3/gcd KteQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uKYbEQ5uNAWRk6caACX6URXlpWmN2bLHVsjC40JMmDU=; b=tXc/q2poFVATKSD5wt1PbBNS8ysYb6YkeRDortyU90zb/YvusCPwF75c/cLoxWKq8A 4lgILyUKrBmhI0ZDZYtcZn/iE+RDgAtYmvu8zk5Oe0rbPRJysHjoTDFrT/SahHm10mkG 4KSZphTwTCnXcgYijLskyFwVCVuIjRP512lsUvPMpKjhUvM72iAA9NwFSFVd0R/SALYt 06xTrqZ5S7PDozNJUHbfcZUSpJH5jFfJeqbrH0OVE69eUaLpVT1Vlgz62v9Y3jpKGcLa 5QfHXtdYzcT6PYa9luAAMgPuDlJlyuMdwjlkRxhbEcSdH995RRGmWlclcy5WPegO8mPU nqRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o+IQD9uA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si1726488pfd.228.2019.05.15.04.46.19; Wed, 15 May 2019 04:46:34 -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=@kernel.org header.s=default header.b=o+IQD9uA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732143AbfEOL0Y (ORCPT + 99 others); Wed, 15 May 2019 07:26:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:37100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732090AbfEOL0P (ORCPT ); Wed, 15 May 2019 07:26:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DAE6120818; Wed, 15 May 2019 11:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919575; bh=oiJOyLPDWRvk2Wus+Qtzhl3VbMKgPsCI12Y4tdz2gjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o+IQD9uAJk9Jzizx1gUtbBVS9zgGuUOkXKnv4Bdc+6CvtIXVQ6/BDpsq0iA+nWSjp nErpBzn3OJWO/dYoUETZpKiWI7m9hBU7yHhhviOUCYoSFhQNq4ZWa1KdzphMUnRVRF b+LZ/o+Atn/z9WFgVJKMPtiCw93bEp7L8Sh6Z7Gk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vishal Verma , Dan Williams , Sasha Levin Subject: [PATCH 5.0 014/137] acpi/nfit: Always dump _DSM output payload Date: Wed, 15 May 2019 12:54:55 +0200 Message-Id: <20190515090654.386390171@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 351f339faa308c1c1461314a18c832239a841ca0 ] The dynamic-debug statements for command payload output only get emitted when the command is not ND_CMD_CALL. Move the output payload dumping ahead of the early return path for ND_CMD_CALL. Fixes: 31eca76ba2fc9 ("...whitelisted dimm command marshaling mechanism") Reported-by: Vishal Verma Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/acpi/nfit/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 4be4dc3e8aa62..38ec79bb3edde 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -563,6 +563,12 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, goto out; } + dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name, + cmd_name, out_obj->buffer.length); + print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4, + out_obj->buffer.pointer, + min_t(u32, 128, out_obj->buffer.length), true); + if (call_pkg) { call_pkg->nd_fw_size = out_obj->buffer.length; memcpy(call_pkg->nd_payload + call_pkg->nd_size_in, @@ -581,12 +587,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, return 0; } - dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name, - cmd_name, out_obj->buffer.length); - print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4, - out_obj->buffer.pointer, - min_t(u32, 128, out_obj->buffer.length), true); - for (i = 0, offset = 0; i < desc->out_num; i++) { u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, (u32 *) out_obj->buffer.pointer, -- 2.20.1