From patchwork Mon Jul 6 09:19:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 11645279 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A66BA60D for ; Mon, 6 Jul 2020 09:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DD2920774 for ; Mon, 6 Jul 2020 09:19:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X6nGjErv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728495AbgGFJTX (ORCPT ); Mon, 6 Jul 2020 05:19:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728024AbgGFJTW (ORCPT ); Mon, 6 Jul 2020 05:19:22 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34800C061794; Mon, 6 Jul 2020 02:19:22 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id dg28so34130898edb.3; Mon, 06 Jul 2020 02:19:22 -0700 (PDT) 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=rxNKX4qgET6W7+Q6DfO+W4zdUlMjHSivwGjx5M+xeHE=; b=X6nGjErv9Sb3srFr77TdMGs/RZ6JCT9nI+dkekYyyUtv0SEoG2Ms7KnFGEIEABYtD4 C1HzQnEQd9a570yIJec7glblPfQ3/V4Nli76Ge8gGIKt9ZMhGlDYvGrJ7pVh1d5KDKdn twrzqh29SHIk9GFfgvcfXG6JznwOAitbxlFdRnXpsnYzOmGkqLymaVY8mpba7TmI/ZOA UvBd4xw+B0hzA1sLGfR7G4pQmtaXDxhXjqgDpfTOVUTsU1jYzqRvwpdrbV+fS+g0Ohfq ZRupWV9xPIfFC8y9Sjkqz5q5tC+8hmjdaJvcLsDPQ90O0eFozi/acwQAbnvtkIQMXJNO Y58Q== 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=rxNKX4qgET6W7+Q6DfO+W4zdUlMjHSivwGjx5M+xeHE=; b=dZcCAbEkxmIVfbeR36lXBRjMrtSYQieFbKaho1M3RB4q1diG3+Me3T8Hj/8pCJ9pxC MT2c49qygnyHkKIF/SMf3VqC/uqvAaNjmojD1+V9DXPhE2D3/znYHjQCTlx3Z3QG9OIm 98MnjyBosNZDm7DsBrV95uO+yxpq/zYzHIzp1vL0ndZbeT/QlcvWYnVgJyK1A5/28KLn zb/Mh4ZR1oAtDmWv0vD5gN6GE8OLihfCNWOF+OvWCk9x4W2GIY1EWMVTa7Q2xfYvtaxV 9j2dW63B7NIh4vZK37oTf8gpPyAurrZNaIZkwyuEqzQ3K6RwJY1xYfB+vA7eQJH+wF3c Qm6w== X-Gm-Message-State: AOAM532aOIdvhBIaiDzDwzzYhHwWh8TnGW+Xxvn+LlRfNCfnPUDkPb7J zmQ2h0WZk7+AackFGnPO8+w= X-Google-Smtp-Source: ABdhPJxAvlbDd0vBwz968MQk0IsSJI2V6HTcdem236VsSWmyaeKpkWNjjcajQynEC3yOUHezWnjQNw== X-Received: by 2002:aa7:dd14:: with SMTP id i20mr11807283edv.41.1594027161019; Mon, 06 Jul 2020 02:19:21 -0700 (PDT) Received: from ubuntu-laptop.micron.com ([165.225.203.62]) by smtp.gmail.com with ESMTPSA id d23sm15975386eja.27.2020.07.06.02.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 02:19:20 -0700 (PDT) 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 Subject: [PATCH v1 1/2] scsi: ufs: differentiate dev_cmd trace message Date: Mon, 6 Jul 2020 11:19:04 +0200 Message-Id: <20200706091905.12885-2-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706091905.12885-1-huobean@gmail.com> References: <20200706091905.12885-1-huobean@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Bean Huo fshcd_exec_dev_cmd() can send query request and NOP request, and it is confusing that ufshcd_add_query_upiu_trace() prints us the "query_send" string in the trace log. Change it and add NOP key message in the trace print according to the dev_cmd type. Signed-off-by: Bean Huo --- drivers/scsi/ufs/ufshcd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 59358bb75014..173deee37e26 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2727,7 +2727,9 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, hba->dev_cmd.complete = &wait; - ufshcd_add_query_upiu_trace(hba, tag, "query_send"); + ufshcd_add_query_upiu_trace(hba, tag, + cmd_type == DEV_CMD_TYPE_QUERY ? + "send QUERY" : "send NOP"); /* Make sure descriptors are ready before ringing the doorbell */ wmb(); spin_lock_irqsave(hba->host->host_lock, flags); @@ -2738,7 +2740,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, err = ufshcd_wait_for_dev_cmd(hba, lrbp, timeout); ufshcd_add_query_upiu_trace(hba, tag, - err ? "query_complete_err" : "query_complete"); + err ? "dev_cmd err" : "dev_cmd complete"); out_put_tag: blk_put_request(req); From patchwork Mon Jul 6 09:19:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 11645281 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B918B60D for ; Mon, 6 Jul 2020 09:19:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AF7920773 for ; Mon, 6 Jul 2020 09:19:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hdsgjP2h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728595AbgGFJT0 (ORCPT ); Mon, 6 Jul 2020 05:19:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728024AbgGFJTZ (ORCPT ); Mon, 6 Jul 2020 05:19:25 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E748C061794; Mon, 6 Jul 2020 02:19:25 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id lx13so22954292ejb.4; Mon, 06 Jul 2020 02:19:25 -0700 (PDT) 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=lchUO1dlDfUYCYrUAqvNoMb8oBzYvbwPwcFLBL/UWM8=; b=hdsgjP2hE8yxjHEjYbHidV9MmgUg2X8wLco4PI2MV4THSoaLVuAxVibtoJ/7MdT0le kSLbc7Ke2zi0m40r4i+TMctLB1V8+WYs1hAOs3fgKcQcBJ2hOYYcG8l74YafFHkBjHIT akYHK/Lz51XpPiZJmmsE3pkyPEtgCkqqNa14TXSc8rACURMT1c/vBY5TT6qaiuH9fnYl xd64Tygyv7TLEqTwQodBVss80qPg4bMipzM16WVN4z3aHWZg+byY9t/7U4d9ek0X0hNr DYVhM/6c5hyGgtapHebdwbGhsE+FWFQlUcNfZVJrFELFMi5vFzyJtUwJhtu5+wVsy77t imcQ== 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=lchUO1dlDfUYCYrUAqvNoMb8oBzYvbwPwcFLBL/UWM8=; b=oHP2xbtulwhAyDLS7ybVu+mFBEdkqMHLzC7QLEcjs4RX+zco2kynRF1Buj9coDdXaN haYY+NABC7Hr+/FhVOqOwIGbEL39BndRtADeaHZVz57OoJW7Luqh6Ad0y4bkrSbfPhOW 1opAGmTXWERcxQfuh+FlFSr6r03OHe2GlavLlykXH9trR1+XGFNHL08HOWjSynlu3PoW 5iHwowaHubInPFRMy/wAEm3mCqaGwf06RYVcykgTWTb7IOICR4Nbau8iTgNwuGT1kZaP JeHOcRxuBMnQeJwgt/4cOadvkwgsmo/qMdPyhscGqon4oc+3wKlhos03d1HrSVbiEQrL eFQA== X-Gm-Message-State: AOAM533Sb43D/hMEC72ZjvygWBUUG9DWr0z4KTUsWX9MVf1k+pv1o8zg R9301Cto7FnXIJkt5+VJv5k= X-Google-Smtp-Source: ABdhPJxpdvG7Y1T+/SfT/eLp8ctUJncfeDiIOqgWi6ZkRfuFvfNr2HxlP92Ub7FGcIabbNuCaewyJA== X-Received: by 2002:a17:906:b0d3:: with SMTP id bk19mr45172900ejb.167.1594027163884; Mon, 06 Jul 2020 02:19:23 -0700 (PDT) Received: from ubuntu-laptop.micron.com ([165.225.203.62]) by smtp.gmail.com with ESMTPSA id d23sm15975386eja.27.2020.07.06.02.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 02:19:23 -0700 (PDT) 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 Subject: [PATCH v1 2/2] scsi: ufs: change ufshcd_comp_devman_upiu() to ufshcd_compose_devman_upiu() Date: Mon, 6 Jul 2020 11:19:05 +0200 Message-Id: <20200706091905.12885-3-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706091905.12885-1-huobean@gmail.com> References: <20200706091905.12885-1-huobean@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Bean Huo ufshcd_comp_devman_upiu() alwasy make me confuse that it is a request completion calling function. Change it to ufshcd_compose_devman_upiu(). Signed-off-by: Bean Huo Acked-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 173deee37e26..96d830bb900f 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2368,12 +2368,13 @@ static inline void ufshcd_prepare_utp_nop_upiu(struct ufshcd_lrb *lrbp) } /** - * ufshcd_comp_devman_upiu - UFS Protocol Information Unit(UPIU) + * ufshcd_compose_devman_upiu - UFS Protocol Information Unit(UPIU) * for Device Management Purposes * @hba: per adapter instance * @lrbp: pointer to local reference block */ -static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) +static int ufshcd_compose_devman_upiu(struct ufs_hba *hba, + struct ufshcd_lrb *lrbp) { u32 upiu_flags; int ret = 0; @@ -2564,7 +2565,7 @@ static int ufshcd_compose_dev_cmd(struct ufs_hba *hba, lrbp->intr_cmd = true; /* No interrupt aggregation */ hba->dev_cmd.type = cmd_type; - return ufshcd_comp_devman_upiu(hba, lrbp); + return ufshcd_compose_devman_upiu(hba, lrbp); } static int