Message ID | 20230314044623.10254-3-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1568355wrd; Mon, 13 Mar 2023 22:03:21 -0700 (PDT) X-Google-Smtp-Source: AK7set+r01VBH+QbuSycgWgk94sYokT7FloTRvSOJnGwAzC4TR1zdR2C4ztYqLrHJDKFQxXIgXc9 X-Received: by 2002:a05:6870:631b:b0:17a:b060:7b0d with SMTP id s27-20020a056870631b00b0017ab0607b0dmr84292oao.7.1678770201133; Mon, 13 Mar 2023 22:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678770201; cv=none; d=google.com; s=arc-20160816; b=MRXgYS6anrzUNV3R2X0f9mIUHo6ZdLTZSg8Ct/G8DCO+gCcnYTNaTdGIqA5JQo/Y5Z qypaLOnxjLMQqJeFbYxcw0jQnNXTDiUBeoZQpELAcsjk3CfvI53IDKw8VmdfGT8lC2dk ytl0AUkRv1Q2qsdnJRedHw/RlcEa9g2nXd2rjYDnEtxSnx0YBMNqE+0Kr6XXtBapURHQ 2d5ntd8OGC9fOtz/PonFYny6ObFOxSc46ThLfknSSjqArdJkMNnJtIeoXPr6Y1q7QOMu 2aZK7I14g0O2bcTgCu/Q+HFXUgrmWB2Rg/2+OYcGtnWLNM9wnVsWQ15suz4A2sGNFhoh POsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wvfvphEax9rDC9DBLoGwM3hS+dg6woN4JsLGnKLFC0E=; b=Rvt2/G9eL5gnW81OUz8Hq8xFqOstiZjhQ2gLwo/fPNhA8vtV1UNZ4Ui8f1kgXjPbOl aKrEp3ZtYlGsPZX6561iSu284/eVTYydZDZSoyewKIpJHmESqEocPavRCGeDaYeq8ywr jetW1WkVUdgExLfElli72sB3I5SOfDcbeEP7+43A7d8VLURpsbbJiU8fbtQMLo7313jV v+vC7G0tYwKtj5ylWOQniQsYkIohvw3M2zu/wnYn22lK6/8irul7uQnruSvNki/7c2fb WUh/5UeAwbpBLuoyOf8rcG/MtNVl0LvoLa7Q4WcnM9pj9ajBjjzJWUuGaoUZl5kvAt65 AMGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x9dbAT+U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s22-20020a0568080b1600b00384570b7fb1si1258646oij.212.2023.03.13.22.03.07; Mon, 13 Mar 2023 22:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x9dbAT+U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjCNEqr (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 00:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbjCNEqn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 00:46:43 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017A39225D for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 21:46:40 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id p6so15385300plf.0 for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 21:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678769200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wvfvphEax9rDC9DBLoGwM3hS+dg6woN4JsLGnKLFC0E=; b=x9dbAT+U55WpGhZBn9XjA1sU8XP2hJCiwXGEZLHNnpcNKsQQPTcTifF4u8u1X6bFqx 4H+rRYxH67YPKQvBdwJSwzg/g+5NDOkJPtcKZILIlOJ11CvgNpLM1x2QU5JuXopxYw1C pgFV4zkm8zwHAPpHNXgiN2Y/9kTxHj4tnsFw0KQR6Rbjx+NwrIO8tLg12MgtvXfMDE6o vxvcemOyZFeSWVXFnlLYIhQnP0myhuJRATOAxu+AbLZ8ykEwtkMKX6y5o4WTE8ZgSHqL LOwIz50CMcQlhpmJm+GsbsmPpemHO10ExwxYNaFwkIGyslc/caR/Ryt+1pM0lAGrauYN M8pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678769200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wvfvphEax9rDC9DBLoGwM3hS+dg6woN4JsLGnKLFC0E=; b=XvkzphZ0+/OG2bQxXJ5w3VBOoPQRAQV9s34uQj9CvqIxriDLhnslgXcPgQ1yImmG/I FW+RgPoO6LTybr88VJycBiImEeAj7Nu3OzxBDC96MMAGn1HWJISicfphD0oJULVl35Ia Jss/DIuk1yAZu9ERvCe1M/MuexmAeJt41m9oQA03QXAhre5uC0zXdfdfwL3Sg28Rj+Mu n9/yJ7WT69ydFvMcxWcEzCQqR9wXRUZDifxs6BHhAExrgasO0eMkFDe11kLFgeVTJLLC HlCDQdQ0+ggPalYhiAbS/3u4EdCnIzx2Mordfeo5atzr8RsCXTG+400pNcqeYpD0blVq c8dw== X-Gm-Message-State: AO0yUKVcrK8b8wRiQasJ5l7D9avXXa0EP9rJSUtKay/K5+6ng2semmn9 GA1gZN9CuGf886JhKXneZsVL X-Received: by 2002:a17:902:d512:b0:196:704e:2c9a with SMTP id b18-20020a170902d51200b00196704e2c9amr43011634plg.22.1678769199864; Mon, 13 Mar 2023 21:46:39 -0700 (PDT) Received: from localhost.localdomain ([117.217.177.49]) by smtp.gmail.com with ESMTPSA id lh13-20020a170903290d00b0019c2b1c4ad4sm690125plb.6.2023.03.13.21.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 21:46:39 -0700 (PDT) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: lpieralisi@kernel.org, kw@linux.com Cc: kishon@kernel.org, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH v3 2/7] PCI: endpoint: Warn and return if EPC is started/stopped multiple times Date: Tue, 14 Mar 2023 10:16:18 +0530 Message-Id: <20230314044623.10254-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314044623.10254-1-manivannan.sadhasivam@linaro.org> References: <20230314044623.10254-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760318142727458427?= X-GMAIL-MSGID: =?utf-8?q?1760318142727458427?= |
Series |
Add support for MHI Endpoint function driver
|
|
Commit Message
Manivannan Sadhasivam
March 14, 2023, 4:46 a.m. UTC
When the EPC is started or stopped multiple times from configfs, just emit
a once time warning and return. There is no need to call the EPC start/stop
functions in those cases.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/pci/endpoint/pci-ep-cfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index 4b8ac0ac84d5..62c8e09c59f4 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -178,6 +178,9 @@ static ssize_t pci_epc_start_store(struct config_item *item, const char *page, if (kstrtobool(page, &start) < 0) return -EINVAL; + if (WARN_ON_ONCE(start == epc_group->start)) + return 0; + if (!start) { pci_epc_stop(epc); epc_group->start = 0;