From patchwork Sun Sep 27 03:36:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 292651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA586C4727F for ; Sun, 27 Sep 2020 03:37:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D43021D7F for ; Sun, 27 Sep 2020 03:37:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hL5ttpEL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730273AbgI0DhI (ORCPT ); Sat, 26 Sep 2020 23:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730265AbgI0DhF (ORCPT ); Sat, 26 Sep 2020 23:37:05 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D794C0613CE for ; Sat, 26 Sep 2020 20:37:05 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id e4so1491872pln.10 for ; Sat, 26 Sep 2020 20:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WCUPmHYtcecToV38t2DlfIgpoympluaCI7mC24k2euU=; b=hL5ttpELNTHIzHTM0NXc1KB+orhq+qOuVQMdmV/HBUP85y98fg7Hdfn+Lo/bzu1RNH XWoJDDi2cKtnM0dCTYzENiIUiwJ3+z4nsLOrqNcTtlDWtoti4snZc3U/6EzF1vszsILm ZRP5EuDdvCGj9POET21nl5sEudcoCCrbc6kRPXEqMjM/7wIjXrirk2AZv6ryHUI4NLqA rZflNKVy6vhuQjEQ70ow/XxIotdleVYGkWDgtQ1vVlAd2NTqgbTRAWl490JY6Ze4BnLu UIPo+Z0UsZgF1LOnA7sPyztsprdrORYiSayhkd5J2Ye6qwvG1gFCMz0NntyZ4siQUUAF axLQ== 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:mime-version:content-transfer-encoding; bh=WCUPmHYtcecToV38t2DlfIgpoympluaCI7mC24k2euU=; b=ipm2+daTK/kC92WAHlFSQosRC1cdQIkoGk2r/m03KLfW7Gqa1WD/bo5HdktODxG/7L sxniARvaqShKG96tX7aG0O3AMwHgEa+MoB6THRgllfgN4qhZONOK72jXFxG70TEZChcU C4NVPJo/R9/UjydyUCPg9LHQHdOmVWaROCot4ZNiP4ygaTFIXBPgHy6h3GqENzRUfsQl Tjun/bFkUGGwUFYiy+K3HN5Rx4w/kDF+WhjTLJoSw8Oi3C3A++MD0RG9rlC3RnthX1TX jNxtoKgPbq6LLXLHiazuMGBUCX7OOt64hJx4Gq81ivuTKA6BMLzMAlUmIDuAFznrADue dObw== X-Gm-Message-State: AOAM532CgS5qDN+2BiXWQHvj/mOUblxCPHZwWmyLYT4gIAt1TCtfgKB1 fRNmpire8dsCmsQvOrtBek7B X-Google-Smtp-Source: ABdhPJwWDGBZpsLbbF/gWY0cgCUr4ze7esNeitBNIYDCgOsRqkuPCkOkxKqCkOC8VJhGuocTpbym8Q== X-Received: by 2002:a17:90a:e291:: with SMTP id d17mr4033617pjz.156.1601177824025; Sat, 26 Sep 2020 20:37:04 -0700 (PDT) Received: from Mani-XPS-13-9360.localdomain ([2409:4072:980:cb63:5c53:a3bf:dd6b:614d]) by smtp.gmail.com with ESMTPSA id gx5sm2821439pjb.57.2020.09.26.20.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 20:37:03 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Date: Sun, 27 Sep 2020 09:06:48 +0530 Message-Id: <20200927033652.11789-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> References: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org For exposing the addresses of read/write pointers and doorbell register, let's use the correct format specifiers. This fixes the following issues generated using W=1 build in ARM32 and reported by Kbuild bot: All warnings (new ones prefixed by >>): >> drivers/bus/mhi/core/debugfs.c:75:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat] mhi_event->db_cfg.db_val); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/bus/mhi/core/debugfs.c:123:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat] mhi_chan->db_cfg.db_val); ^~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_events_show’: drivers/bus/mhi/core/debugfs.c:74:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] seq_printf(m, " local rp: 0x%llx db: 0x%pad\n", (u64)ring->rp, ^ drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_channels_show’: drivers/bus/mhi/core/debugfs.c:122:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u64)ring->rp, (u64)ring->wp, ^ drivers/bus/mhi/core/debugfs.c:122:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u64)ring->rp, (u64)ring->wp, ^ drivers/bus/mhi/core/debugfs.c:121:62: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=] seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n", ~~~^ %x drivers/bus/mhi/core/debugfs.c:123:7: mhi_chan->db_cfg.db_val); Reported-by: kernel test robot Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/bus/mhi/core/debugfs.c b/drivers/bus/mhi/core/debugfs.c index 53d05a8e168d..f50d73054db4 100644 --- a/drivers/bus/mhi/core/debugfs.c +++ b/drivers/bus/mhi/core/debugfs.c @@ -71,8 +71,8 @@ static int mhi_debugfs_events_show(struct seq_file *m, void *d) seq_printf(m, " rp: 0x%llx wp: 0x%llx", er_ctxt->rp, er_ctxt->wp); - seq_printf(m, " local rp: 0x%llx db: 0x%llx\n", (u64)ring->rp, - mhi_event->db_cfg.db_val); + seq_printf(m, " local rp: 0x%pK db: 0x%pad\n", ring->rp, + &mhi_event->db_cfg.db_val); } return 0; @@ -118,9 +118,9 @@ static int mhi_debugfs_channels_show(struct seq_file *m, void *d) seq_printf(m, " base: 0x%llx len: 0x%llx wp: 0x%llx", chan_ctxt->rbase, chan_ctxt->rlen, chan_ctxt->wp); - seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n", - (u64)ring->rp, (u64)ring->wp, - mhi_chan->db_cfg.db_val); + seq_printf(m, " local rp: 0x%pK local wp: 0x%pK db: 0x%pad\n", + ring->rp, ring->wp, + &mhi_chan->db_cfg.db_val); } return 0; From patchwork Sun Sep 27 03:36:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 250048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18D7AC4741F for ; Sun, 27 Sep 2020 03:37:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEA3121D95 for ; Sun, 27 Sep 2020 03:37:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mDm4W3yz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730274AbgI0DhK (ORCPT ); Sat, 26 Sep 2020 23:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730191AbgI0DhI (ORCPT ); Sat, 26 Sep 2020 23:37:08 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB49CC0613D3 for ; Sat, 26 Sep 2020 20:37:08 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id u3so1621786pjr.3 for ; Sat, 26 Sep 2020 20:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=maouQTMrsxpLVka2tVtG0rlrDbgTOcw+DDAUcgByUy4=; b=mDm4W3yzeoJY+tZFkjPI3tfkbfyNUclLCUL1s58y4r+qkYirCaTDVbgkut8Qk/0O1W nSwlT58KMxitVWUO6r6WO5Fa4euN7/laD0prLOVlixZEP4Sp/AaCSpJPwov8pFq8PYGJ miVC1DPcUag2RjgjoO2w8zXByus1aWk6LfnwwIF1aKmCGzhemSjUbvQklwokKL/kVdwO WYM2tCKaxIuYpaXo1ykKA5GDrrZzcTglmJk0MU21O6Ykwq0m0Z1O+BEaiMQmUovcti7+ hIV20ljHjTC5w4tmJ7fQWTbG5Sr+W2Z1EjjiWlw4f5cayc9QDvP95dfsIdyYiHZMcFpG bm/Q== 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=maouQTMrsxpLVka2tVtG0rlrDbgTOcw+DDAUcgByUy4=; b=BeD6OLVMNifM7ME1UDVZ0kDi6SPqawpIEcXAJuOnJj15TJdBezHayyGOps5r0Kq25E YZrJkf65xlEaqi8N57p50603A3jlS+4bxInzSaqltbCQfbCirWIgPwdRyJQV5pA53k3M +pWggCQeCvySu5q8OJHs3IgRm3YCHXJhk28H1TjMsCxTcwBrl53SIzGo/ZcLESGL5tA4 h7J6Gkoxt+HVp2eUwcHu7jDLLaBHm85fMZsGsqYmEt3Xqc09sv9umkGJurD0LZD6N52i 02KNSdVBhFZr+PvMf+6l701iyxrOh3LnSDKyt/oQhW+CItqG5ZUvfh+tZTPeDdXF/2cn QzQg== X-Gm-Message-State: AOAM533ddrJOfB2vivxJyFvoFIxROymLX39FBP5zkbPq1ND7K2r1zQs3 37H06T/RpZPlGENSxn0dAAlF X-Google-Smtp-Source: ABdhPJwrErclynGaEZE5sPmYLXCSncUJHBxojuovN4E4lY20+mh0jHBYSckPwV8wQyqYHjyjdKAvyQ== X-Received: by 2002:a17:90a:81:: with SMTP id a1mr4033993pja.136.1601177828330; Sat, 26 Sep 2020 20:37:08 -0700 (PDT) Received: from Mani-XPS-13-9360.localdomain ([2409:4072:980:cb63:5c53:a3bf:dd6b:614d]) by smtp.gmail.com with ESMTPSA id gx5sm2821439pjb.57.2020.09.26.20.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 20:37:07 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Loic Poulain , Manivannan Sadhasivam Subject: [PATCH 2/5] bus: mhi: debugfs: Print channel context read-pointer Date: Sun, 27 Sep 2020 09:06:49 +0530 Message-Id: <20200927033652.11789-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> References: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Loic Poulain This value was missing in the channel debugfs output. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/bus/mhi/core/debugfs.c b/drivers/bus/mhi/core/debugfs.c index f50d73054db4..3a48801e01f4 100644 --- a/drivers/bus/mhi/core/debugfs.c +++ b/drivers/bus/mhi/core/debugfs.c @@ -115,8 +115,9 @@ static int mhi_debugfs_channels_show(struct seq_file *m, void *d) seq_printf(m, " type: 0x%x event ring: %u", chan_ctxt->chtype, chan_ctxt->erindex); - seq_printf(m, " base: 0x%llx len: 0x%llx wp: 0x%llx", - chan_ctxt->rbase, chan_ctxt->rlen, chan_ctxt->wp); + seq_printf(m, " base: 0x%llx len: 0x%llx rp: 0x%llx wp: 0x%llx", + chan_ctxt->rbase, chan_ctxt->rlen, chan_ctxt->rp, + chan_ctxt->wp); seq_printf(m, " local rp: 0x%pK local wp: 0x%pK db: 0x%pad\n", ring->rp, ring->wp, From patchwork Sun Sep 27 03:36:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 292650 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61314C4346E for ; Sun, 27 Sep 2020 03:37:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B15421D95 for ; Sun, 27 Sep 2020 03:37:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eJJ+VlCY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730286AbgI0DhR (ORCPT ); Sat, 26 Sep 2020 23:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730270AbgI0DhN (ORCPT ); Sat, 26 Sep 2020 23:37:13 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFD85C0613D3 for ; Sat, 26 Sep 2020 20:37:12 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id l126so6426226pfd.5 for ; Sat, 26 Sep 2020 20:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4rYZko/KXwX0Ei8mPrv2OMWNNkvBQRw/74JATiFZ2Us=; b=eJJ+VlCYw861DcrP/FOaEpc/WDz1P0Yfn6dl8s0rzQpCtG8XktUuiTPk78jnvhpb7A pD7xvhC/hGk4bI/Iq281ylq97g6qxw5vWaIULfyjduLZ17X1kdLNWtK9bcXBtKuK4r4H ysIn8+r4QJcbsMh/zk7UQhCJ5NpOaZNFpy2g+kmTLuj9upw/Km6EULurPzODJTg830XZ VBHEhsREKTRercEP3nkQT5lkIAxZYrykRhoCsy97bL3RdQAekiEN0+8z/9knVf7qeufn 2eZcnP6vwRMhFH1EKKaMu5LPStCn/ZycdQAuskMeJUK+7NBP4kGKEKb/hJtv8GWPg4/W cslQ== 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=4rYZko/KXwX0Ei8mPrv2OMWNNkvBQRw/74JATiFZ2Us=; b=VQmEnVw3pOGRaddcU75dyrgaBKFokv4ez+GrnOdYq7JgpZcvq3vIutFoEfbrKTfuMv PMMWTz96XeoORoIuwQEBGQgFVL/BrJ9hj1w47kfCLp4pgEmexCnIl957pCSGVwrdbOym QAElwSrcuf+w53NpyW5LJ+A0MlUBP2yxZERx8v4gXrXxWhvbVSDW/otvZ7UvRAzYj99P zeArg4GYF9ZbufPt++SQLzZAhG+jIx61a4Mx2LeM61hMkaTqnmU0vtlN7qqcYLP6a3ii bBuN2Df0D7E4gBd8QeFywYX7apiIdpyuc8kFaiJBa4JyD9TFcBI6KoYmTc7Y5xi6qwQO I0Ww== X-Gm-Message-State: AOAM531ROKFkjuAtDeKkeBgx7SVwYIucwHXMIkMPInsnNPpbBe7onLMa dtXzRD8EjnPfjt7/1nrlDagD X-Google-Smtp-Source: ABdhPJxfnfNs/JJ82Mi0BAt/zLQqVX/uARq5Jvw44z5nAzahLUbKkJ9/DxyjQMoBMp+vzzCdsfF27g== X-Received: by 2002:a63:784:: with SMTP id 126mr884746pgh.428.1601177832424; Sat, 26 Sep 2020 20:37:12 -0700 (PDT) Received: from Mani-XPS-13-9360.localdomain ([2409:4072:980:cb63:5c53:a3bf:dd6b:614d]) by smtp.gmail.com with ESMTPSA id gx5sm2821439pjb.57.2020.09.26.20.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 20:37:11 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Loic Poulain , Manivannan Sadhasivam Subject: [PATCH 3/5] bus: mhi: Remove auto-start option Date: Sun, 27 Sep 2020 09:06:50 +0530 Message-Id: <20200927033652.11789-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> References: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Loic Poulain There is really no point having an auto-start for channels. This is confusing for the device drivers, some have to enable the channels, others don't have... and waste resources (e.g. pre allocated buffers) that may never be used. This is really up to the MHI device(channel) driver to manage the state of its channels. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/init.c | 9 --------- drivers/bus/mhi/core/internal.h | 1 - include/linux/mhi.h | 2 -- 3 files changed, 12 deletions(-) diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c index 799111baceba..ca08437dffd6 100644 --- a/drivers/bus/mhi/core/init.c +++ b/drivers/bus/mhi/core/init.c @@ -772,7 +772,6 @@ static int parse_ch_cfg(struct mhi_controller *mhi_cntrl, mhi_chan->offload_ch = ch_cfg->offload_channel; mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch; mhi_chan->pre_alloc = ch_cfg->auto_queue; - mhi_chan->auto_start = ch_cfg->auto_start; /* * If MHI host allocates buffers, then the channel direction @@ -1177,11 +1176,6 @@ static int mhi_driver_probe(struct device *dev) goto exit_probe; ul_chan->xfer_cb = mhi_drv->ul_xfer_cb; - if (ul_chan->auto_start) { - ret = mhi_prepare_channel(mhi_cntrl, ul_chan); - if (ret) - goto exit_probe; - } } ret = -EINVAL; @@ -1215,9 +1209,6 @@ static int mhi_driver_probe(struct device *dev) if (ret) goto exit_probe; - if (dl_chan && dl_chan->auto_start) - mhi_prepare_channel(mhi_cntrl, dl_chan); - mhi_device_put(mhi_dev); return ret; diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/core/internal.h index 7989269ddd96..33c23203c531 100644 --- a/drivers/bus/mhi/core/internal.h +++ b/drivers/bus/mhi/core/internal.h @@ -563,7 +563,6 @@ struct mhi_chan { bool configured; bool offload_ch; bool pre_alloc; - bool auto_start; bool wake_capable; }; diff --git a/include/linux/mhi.h b/include/linux/mhi.h index d4841e5a5f45..6522a4adc794 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -214,7 +214,6 @@ enum mhi_db_brst_mode { * @offload_channel: The client manages the channel completely * @doorbell_mode_switch: Channel switches to doorbell mode on M0 transition * @auto_queue: Framework will automatically queue buffers for DL traffic - * @auto_start: Automatically start (open) this channel * @wake-capable: Channel capable of waking up the system */ struct mhi_channel_config { @@ -232,7 +231,6 @@ struct mhi_channel_config { bool offload_channel; bool doorbell_mode_switch; bool auto_queue; - bool auto_start; bool wake_capable; }; From patchwork Sun Sep 27 03:36:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 250047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9A61C4346E for ; Sun, 27 Sep 2020 03:37:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0377221E5 for ; Sun, 27 Sep 2020 03:37:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fhdDdL8E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730292AbgI0DhR (ORCPT ); Sat, 26 Sep 2020 23:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730284AbgI0DhR (ORCPT ); Sat, 26 Sep 2020 23:37:17 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DE09C0613D4 for ; Sat, 26 Sep 2020 20:37:17 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id s19so1510660plp.3 for ; Sat, 26 Sep 2020 20:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2a29PGE7XTP2XdT1J2AnCKNgX28qIiZ+/+2Zu4a2uQE=; b=fhdDdL8E05WQHKrOKWK5qT9OlOg8GnhnYtli9FeqYHIuqfdNMU7sCnG9qh4nRrDoRt aMD4I+TKMarcB7oi5g+c88JHjOOb32MAIpvc5Q8CvjnKh4WYvdeA5pEPiGp+g2g9QLHW Abzz2gNhEmwzj5on/mChvlRdGI5ACKlVDMRxx1NYU4beRIFliQsF2dGvvuILEVMumjb+ YABUMyR49fjMIKIXIcjFw/4SmSKysDikSLLagUBSSFUMWNIQCThJEDXwHsj03/pKANku 3R5BcKmT/F5NGUkTVHv9w3nJFhVFVWV3s6CZOUaJ03jNIyc7iV0CMmqAfnSD1gB3YAuA NiUQ== 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=2a29PGE7XTP2XdT1J2AnCKNgX28qIiZ+/+2Zu4a2uQE=; b=qSMi1s+gYhBDLtdPwVbUEwBI40sxljBZPtYmGpCOFBk8pj0FdZPuQm2s2JzDCSJCx2 4aWLx+BkzZqOObagD1nGTcvB/PJssCF1eI4Hk1iH93mr9Co4j+qaFxXLvG2VMRhdW1RC uL/9vnPittvy7nWQ1eVn0nd6OP4ZXMNLDErAZ7gGK+/SItfzLdWKA8JV8PDlljcgwcc4 jxvAculHH0mNTMOa571PYzuE/e5p+njd3NFWqyU/LOtANBBTpDZTkGvV82VPmuHYSXSF cMATXNN92GKS1DUmKuG40cfNt5H1Kw2OHHASkIcJhjnTHR4x9w/Hxdz4OoEInea7l0QZ otrQ== X-Gm-Message-State: AOAM533KpnFIT7uLQC2alcrbTRY18nyfgOv4WbvxSZOpVV1ONQoEVbkG 8d7RQ9uEnwzuvqAR2g6DXMsnmda26IFJ4kk= X-Google-Smtp-Source: ABdhPJyYz8jA0RgFc1iLqQrAalCxXpyFKMohA/fqUfh4rO0uATYFhZY0qqtgFK7O3ITsHvYlcKUsoA== X-Received: by 2002:a17:90a:6e45:: with SMTP id s5mr4028288pjm.12.1601177836840; Sat, 26 Sep 2020 20:37:16 -0700 (PDT) Received: from Mani-XPS-13-9360.localdomain ([2409:4072:980:cb63:5c53:a3bf:dd6b:614d]) by smtp.gmail.com with ESMTPSA id gx5sm2821439pjb.57.2020.09.26.20.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 20:37:16 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Loic Poulain , Manivannan Sadhasivam Subject: [PATCH 4/5] net: qrtr: Start MHI channels during init Date: Sun, 27 Sep 2020 09:06:51 +0530 Message-Id: <20200927033652.11789-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> References: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Loic Poulain Start MHI device channels so that transfers can be performed. The MHI stack does not auto-start channels anymore. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Acked-by: David S. Miller Signed-off-by: Manivannan Sadhasivam --- net/qrtr/mhi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/qrtr/mhi.c b/net/qrtr/mhi.c index ff0c41467fc1..7100f0bac4c6 100644 --- a/net/qrtr/mhi.c +++ b/net/qrtr/mhi.c @@ -76,6 +76,11 @@ static int qcom_mhi_qrtr_probe(struct mhi_device *mhi_dev, struct qrtr_mhi_dev *qdev; int rc; + /* start channels */ + rc = mhi_prepare_for_transfer(mhi_dev); + if (rc) + return rc; + qdev = devm_kzalloc(&mhi_dev->dev, sizeof(*qdev), GFP_KERNEL); if (!qdev) return -ENOMEM; From patchwork Sun Sep 27 03:36:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 292649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28407C4727F for ; Sun, 27 Sep 2020 03:37:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E027C221E5 for ; Sun, 27 Sep 2020 03:37:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Gm7+b5ET" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730303AbgI0DhV (ORCPT ); Sat, 26 Sep 2020 23:37:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730301AbgI0DhV (ORCPT ); Sat, 26 Sep 2020 23:37:21 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 628E9C0613D3 for ; Sat, 26 Sep 2020 20:37:21 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id q12so1483947plr.12 for ; Sat, 26 Sep 2020 20:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DdES/Vq1PmYk4fpVLK/fAaZVLR8AEvP+LlTNygV5c/w=; b=Gm7+b5ETti6f6Mm+chzD9X8OacoppQNJNyp7/tD65olZneAxORM1rO/goBjocQHcEN 5pKUCnfuanQ2boGYnNTDiRaR3XP8ctKCJaXJ7Mn3OXFBLbtlJyz8QINoiyroxKsOmAHO T9+gVrNHWgrCr59FmU2ZXpt59nO+e17HRwlKHKvj4AatPQLs4u1XQnzz9adsPgURcKfS SF1CG5lfrHi0dRXuRkpUQ1J8Qwjy8Q7hXW5sPeZH4S3pHz9o43cBaTWOxrZE57+BdG8h ZyOOyHoM3seidO1Y1/3KFFgdZsG5LkDegb4WYcwCHlx/NnWXhXLLwDWEtx1nupjJQxdz t3vA== 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=DdES/Vq1PmYk4fpVLK/fAaZVLR8AEvP+LlTNygV5c/w=; b=FiEPuMXM0tKhWhEwBDp0EtC3KmMOSSOlQ2dEpGz8ZqzrJUKz+VDOUmR0eorf+ji9ii XCrnTHb0xcOZFt2KqfBfxcf/V+o6YR9W3G/12LURc2m6VNG+RjMxjGFem1o6srsLDyCB 6OBYtDB1CM8OwMcjDqMFqI3WF8SoSj6oSzmm2F2skiSjcWqH7T3PYfUpccS8RYe0Q6sS FvPdJVcSV5/+jhV7h4aIOIHc/jxPJixozxlKOVRcRSHNQXDkc8X0qjJLZ1QLuNzKz3ds Leub2goW6q+TJixO5/TDa2uBhbxB5xQzTtcpGfBhxqJOR+LqfAD5c5OQaLhYsofSkxlq 9QJA== X-Gm-Message-State: AOAM531KWDePrGUayQqPsgQWWSHx754zhtiPQa+UBD5tYW5dhIRG7uiM N4gjSvh6IG4rmClv4Lgc7GHA X-Google-Smtp-Source: ABdhPJz1PUO3o77Nd5w3/nAobQJiQXA7mG8ihCHTvu+LbAIfWCrcV5WvVVduXbwCYye+oZ9Yvndy9A== X-Received: by 2002:a17:90a:71c9:: with SMTP id m9mr4003418pjs.146.1601177840934; Sat, 26 Sep 2020 20:37:20 -0700 (PDT) Received: from Mani-XPS-13-9360.localdomain ([2409:4072:980:cb63:5c53:a3bf:dd6b:614d]) by smtp.gmail.com with ESMTPSA id gx5sm2821439pjb.57.2020.09.26.20.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 20:37:20 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file Date: Sun, 27 Sep 2020 09:06:52 +0530 Message-Id: <20200927033652.11789-6-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> References: <20200927033652.11789-1-manivannan.sadhasivam@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Hemant Kumar Currently this macro is defined in internal MHI header as a TRE length mask. Moving it to external header allows MHI client drivers to set this upper bound for the transmit buffer size. Signed-off-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/internal.h | 1 - include/linux/mhi.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/core/internal.h index 33c23203c531..3e41edae829c 100644 --- a/drivers/bus/mhi/core/internal.h +++ b/drivers/bus/mhi/core/internal.h @@ -453,7 +453,6 @@ enum mhi_pm_state { #define CMD_EL_PER_RING 128 #define PRIMARY_CMD_RING 0 #define MHI_DEV_WAKE_DB 127 -#define MHI_MAX_MTU 0xffff #define MHI_RANDOM_U32_NONZERO(bmsk) (prandom_u32_max(bmsk) + 1) enum mhi_er_type { diff --git a/include/linux/mhi.h b/include/linux/mhi.h index 6522a4adc794..10ebda44ea3c 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -15,6 +15,9 @@ #include #include +/* MHI client drivers to set this upper bound for tx buffer */ +#define MHI_MAX_MTU 0xffff + #define MHI_MAX_OEM_PK_HASH_SEGMENTS 16 struct mhi_chan;