Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1831286pxu; Sun, 6 Dec 2020 08:46:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5A7hHpzQZpPXYqY4L1iF8/nRRBkqCaABa1dVd92PbNCvpyRiehY++9/ogK88I7V/wyfuB X-Received: by 2002:a17:906:cf81:: with SMTP id um1mr14845382ejb.122.1607273167235; Sun, 06 Dec 2020 08:46:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607273167; cv=none; d=google.com; s=arc-20160816; b=lJClZKjazUeRgT+lApeW/dPOuXu0i+r8E4JORcnwxoIH1Swf8T9eMp8l6l/XGmini/ 9dy6c60etF3fv72363sfjDVVnIIspEhC5Mstj/ixS5VZAbgLrjbiLEP/51goumL/UWDc N1A8wpUO3vkI+2K6dyXdrJgngmf4BuhJhbwOo8fodavAuSj+NeVbAWWb1XReadTZ2zjJ Tm54z/3N+B+xhkHuEOHISZyHoEAY/eRfqW4qzBn13fU8htwpfIw5rMjeErwGdOlX0wlm L1x7EPNQtwnMdaRe/y0R+2cq7DwzHZqtufjTwYa1VC3cLUngK47AVXd/VDqd2pFfngyI nZQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=q3yNP+sFnB3A5+UyZ6nIR07gloyNzZH21j8nTX4SFvo=; b=Ycr/xWirGNE3OCElDuFoGEo5NJkWc3drixRLtBEQykMBKaNA6N5+4rI9T0yD+kKZQF 9+oDkwUyGlNbGQprCjHZVgRXmr0ni/3klFLm4rSsUXcrHe8NAVV+HKRo98scnAEE2WcH c6/1hh75rX/8pOGQ3vjrBB8m+7AOQhqd3WRP/SdNvcRdEgrJeiaYfwZk3bPkEIi1V1MM T5SNySXey5bpNuWIOXPAvOGDdQmo3a8ms90Lri8vnfJH9geQjY4ZRY2/QE5sv67VL3HX JSKZ4RzQ2qVKIoYgpotzROsmqOJBoCHfs7migI1XEnwOuxqx/ZCRytfLb5ky/1CRnc4V 8/PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EZIyyKm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si6773480edf.269.2020.12.06.08.45.45; Sun, 06 Dec 2020 08:46:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EZIyyKm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727639AbgLFQn1 (ORCPT + 99 others); Sun, 6 Dec 2020 11:43:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgLFQn0 (ORCPT ); Sun, 6 Dec 2020 11:43:26 -0500 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26957C0613D2; Sun, 6 Dec 2020 08:42:45 -0800 (PST) Received: by mail-ej1-x642.google.com with SMTP id n26so16001875eju.6; Sun, 06 Dec 2020 08:42:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q3yNP+sFnB3A5+UyZ6nIR07gloyNzZH21j8nTX4SFvo=; b=EZIyyKm+fEhUMIH2fZq3L+gMqH9O+1TbeM7rU6DXZdppU2LV5YIp7wBLMlPdsWfiH1 xiL4irCJQi6K97+K4z66FCjLpd9LtaK0WpIy5C0/0inlfd4EeDIHS1UIH8bM5o9NB1B3 uQxT+3+S93aGgng7lRx72WS9zPNnaj0UjXjOIJNp3G47kJWbIqN/V5z+vbiM+ThGG9B3 y/lxxpWc4vF8FpwOi1kHyQMrJgmC/R57wA/CsvNusfsGlwFa0K0UaocPxwOYr1QbAoPA bPjuxg5Vy+G1q+wq1amBGnPHtSiU742Tc5r0Cz4y0y6kPZF8mr6dim3lh91jVC1AANxn xKyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=q3yNP+sFnB3A5+UyZ6nIR07gloyNzZH21j8nTX4SFvo=; b=IRhCBO9aF66ztDNhFt53RZe2ulnDkXG5LVUO0tDD4+Laj9T5HMD7OaVHClVyzLxf4r 9aB/dsuyFxY3kqXOaHydk12gIJ4FC6Xx+gjkkw9t+nwvx6w9y2uEbH16KuvQR54E0o11 xB7O8kDMvOLPGqgsfTx6Nvv3CrBatFMzTMBATimbB207cOYZ7tCc0dy0E28xnCjAgkNn Rrn0R3eVbUhXDxkdSF/dtQWHOBR6RFjN7v2k0u7dYtjAZXP5QGGoz4R4ZWwiI8p/PSWn vZeERQNIuR768NJINYlN4bXYWM8g2KQAhczqLIi8vWJqHwUYcZp6Yopbb7msYLTsxJaL UZ5Q== X-Gm-Message-State: AOAM533+M/VHGxNOmOHgIqp0cBrXLlhW5iBcwkD10rEyMzBDATDDw1Jx BWWVxryEQYYDyDnOoC0Osgs= X-Received: by 2002:a17:906:3a84:: with SMTP id y4mr15741502ejd.425.1607272963923; Sun, 06 Dec 2020 08:42:43 -0800 (PST) Received: from localhost.localdomain (ip5f5bfce9.dynamic.kabel-deutschland.de. [95.91.252.233]) by smtp.gmail.com with ESMTPSA id e19sm9157524edr.61.2020.12.06.08.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 08:42:43 -0800 (PST) From: Bean Huo To: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org Subject: [PATCH v1 2/3] scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace Date: Sun, 6 Dec 2020 17:42:25 +0100 Message-Id: <20201206164226.6595-3-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201206164226.6595-1-huobean@gmail.com> References: <20201206164226.6595-1-huobean@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo Distinguish between TM request UPIU and response UPIU in TM UPIU trace, for the TM response, let TM UPIU trace print its TM response UPIU. Signed-off-by: Bean Huo --- drivers/scsi/ufs/ufshcd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index e10de94adb3f..29d7240a61bf 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -338,8 +338,12 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag, int off = (int)tag - hba->nutrs; struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off]; - trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->req_header, - &descp->input_param1); + if (!strcmp("tm_send", str)) + trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->req_header, + &descp->input_param1); + else + trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->rsp_header, + &descp->output_param1); } static void ufshcd_add_uic_command_trace(struct ufs_hba *hba, -- 2.17.1