Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp713283rwb; Thu, 27 Jul 2023 21:19:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHLYTyj4PKBkeA3NRb+BYptXqLbo3FIv4mxnPH+bf+A9WlXoVBxKvTOcIptCKrtPR5YOke4 X-Received: by 2002:a05:6a00:24d0:b0:668:8705:57cf with SMTP id d16-20020a056a0024d000b00668870557cfmr934584pfv.25.1690517952170; Thu, 27 Jul 2023 21:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690517952; cv=none; d=google.com; s=arc-20160816; b=USjwVbDekfsbvUt1LihsuOlt+VJTC4nk6+wFMPqHgFoH/+5LY5l/2QUy0XFPrkAdsx czvRfS5qH1hIIOvOKnurc7ElmTZ9J6K2LCDBw4HmICxlve5ojvnpT/dOrc3YHoJxg11n Xlpe8fmT6AoqIJ2eTy3/TG2paAx8tnPFLGNyyn7RKm+swlEqhGXnGqYncLizk4E1EF3p 59Fy8yzHfFMhd61L4XNQGvjUHHRR725ytaaAU5g7xtpbgjoekfWn+VE5lL205LfEs0Dx 2/AQNzAuG9YfuneHpg2S9wpB2SakF5WeRWK3jVDRYymj+Jlka1tORXDQD2HpBmAx+Yf/ RX1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oDCZZW9T2kywZsnE7TkIdbj8hf8dZ6cXyifLByiV/Us=; fh=inAFxM2k1ib7lFwFkcMuXtnhdgFLcmYwaataQYTkZ3A=; b=ikWiQYfEVMUEJrxJISkqFgcoDh5rxTUKJwAsp9T40d/wOcjd4lSgWi79+Vo8Fcb8pZ 9IkvvxhbtR+q2fms3ZZTwq2tYfsgYlpyPrwV2A1llu4VMFfvRpVUhWbo2nTCK+skeVBM Gpf4oM2kPOeW59PUvNM+cLnKZ7cJ4wQBEuD5zk5ObweosWEJTjxt/MAvr5vARMQMJ6pb VkElDS7UlHwO4HS+n6XCk4CLGgB5wK9sSm27r+s+gm8cp0PhsLTymqp9wddHVxUUkvt8 QjIDFPv44J6GKuS2gVs21tuL2vYlghkhl5uUQPuc6BPTyh5jCzTsESdmcgi6pQUC/uOo 5XyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BZcyH9CU; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a056a000c8b00b0067a4d4dfde4si2579173pfv.104.2023.07.27.21.18.59; Thu, 27 Jul 2023 21:19:12 -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=@kernel.org header.s=k20201202 header.b=BZcyH9CU; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232664AbjG1EKV (ORCPT + 99 others); Fri, 28 Jul 2023 00:10:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233343AbjG1EKF (ORCPT ); Fri, 28 Jul 2023 00:10:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12DB63582; Thu, 27 Jul 2023 21:10:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7489661FB1; Fri, 28 Jul 2023 04:10:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0FB2C433C7; Fri, 28 Jul 2023 04:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690517399; bh=F8nIXDxD0F3z4YhoSjTSX8IFJ05consSO36yJuwugAk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BZcyH9CUFjVD/kmcWvRjY26aS/D4op8pp77H84DWIpJv94e0GEPw7+uOCdDMXqGf0 39nobliSYFMMRLTA596u1qX1uyANoihapqb2WoSIFakLzMNBivxEwCz9BD3/GpBN5C wqYmdrJnnMj88neGR3PSdGMuQDmkyEyxLKfgfSizvai3Z++n1UXSGcgFDhC7W4BQYW t0uHufHuesfAcKZu/NEArkrvJg04VwQngW3LMZPKUHjWCv1YXUlBNwgQ7KRvuxV0wh jsWDeUDUJnqIZkSYnq8vxrIrAgDaOywLaYEBQwcBLAX+5R2tbRmoJ1bVnGbU54nard quTxyiI2FKFzA== Date: Fri, 28 Jul 2023 09:39:49 +0530 From: Manivannan Sadhasivam To: Krishna chaitanya chundru Cc: manivannan.sadhasivam@linaro.org, helgaas@kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com, quic_nitegupt@quicinc.com, quic_skananth@quicinc.com, quic_ramkri@quicinc.com, krzysztof.kozlowski@linaro.org, Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas , Jeffrey Hugo , "open list:MHI BUS" Subject: Re: [PATCH v4 3/9] PCI: epf-mhi: Add support for handling D-state notify from EPC Message-ID: <20230728040949.GF4433@thinkpad> References: <1689232218-28265-1-git-send-email-quic_krichai@quicinc.com> <1689232218-28265-4-git-send-email-quic_krichai@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1689232218-28265-4-git-send-email-quic_krichai@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 13, 2023 at 12:40:12PM +0530, Krishna chaitanya chundru wrote: > Add support for handling D-state notify for MHI EPF. > > Signed-off-by: Krishna chaitanya chundru > --- > drivers/pci/endpoint/functions/pci-epf-mhi.c | 11 +++++++++++ > include/linux/mhi_ep.h | 3 +++ > 2 files changed, 14 insertions(+) > > diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c > index 9c1f5a1..ee91bfc 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c > +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c > @@ -339,6 +339,16 @@ static int pci_epf_mhi_bme(struct pci_epf *epf) > return 0; > } > > +static int pci_epf_mhi_dstate_notify(struct pci_epf *epf, pci_power_t state) > +{ > + struct pci_epf_mhi *epf_mhi = epf_get_drvdata(epf); > + struct mhi_ep_cntrl *mhi_cntrl = &epf_mhi->mhi_cntrl; > + > + mhi_cntrl->dstate = state; Where is this variable being used? Also, don't we need any locking? - Mani > + > + return 0; > +} > + > static int pci_epf_mhi_bind(struct pci_epf *epf) > { > struct pci_epf_mhi *epf_mhi = epf_get_drvdata(epf); > @@ -394,6 +404,7 @@ static struct pci_epc_event_ops pci_epf_mhi_event_ops = { > .link_up = pci_epf_mhi_link_up, > .link_down = pci_epf_mhi_link_down, > .bme = pci_epf_mhi_bme, > + .dstate_notify = pci_epf_mhi_dstate_notify, > }; > > static int pci_epf_mhi_probe(struct pci_epf *epf, > diff --git a/include/linux/mhi_ep.h b/include/linux/mhi_ep.h > index f198a8a..c3a0685 100644 > --- a/include/linux/mhi_ep.h > +++ b/include/linux/mhi_ep.h > @@ -8,6 +8,7 @@ > > #include > #include > +#include > > #define MHI_EP_DEFAULT_MTU 0x8000 > > @@ -139,6 +140,8 @@ struct mhi_ep_cntrl { > > enum mhi_state mhi_state; > > + pci_power_t dstate; > + > u32 max_chan; > u32 mru; > u32 event_rings; > -- > 2.7.4 > -- மணிவண்ணன் சதாசிவம்