public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Aksh Garg <a-garg7@ti•com>
To: Manivannan Sadhasivam <mani@kernel•org>
Cc: <linux-pci@vger•kernel.org>, <linux-doc@vger•kernel.org>,
	<kwilczynski@kernel•org>, <bhelgaas@google•com>, <corbet@lwn•net>,
	<kishon@kernel•org>, <skhan@linuxfoundation•org>,
	<lukas@wunner•de>, <cassel@kernel•org>, <alistair@alistair23•me>,
	<linux-arm-kernel@lists•infradead.org>,
	<linux-kernel@vger•kernel.org>, <s-vadapalli@ti•com>,
	<danishanwar@ti•com>, <srk@ti•com>
Subject: Re: [PATCH v3 3/4] PCI: endpoint: Add API for DOE initialization and setup in EPC core
Date: Tue, 19 May 2026 11:00:39 +0530	[thread overview]
Message-ID: <b7fc62b7-a73a-4201-98e1-ea6a628e9dce@ti.com> (raw)
In-Reply-To: <mn7rnqdunp4mq45a7ypf26rfpzjr2gik7w4p7hpj4x3r3fzfzz@dlrsn27u5mbf>



On 15/05/26 18:17, Manivannan Sadhasivam wrote:
> On Fri, May 15, 2026 at 10:21:52AM +0530, Aksh Garg wrote:
>>
>>
>> On 14/05/26 13:38, Manivannan Sadhasivam wrote:
>>> On Mon, Apr 27, 2026 at 10:47:24AM +0530, Aksh Garg wrote:
>>>> Add pci_epc_setup_doe() API in EPC core driver to initialize and setup
>>>> the DOE framework for an endpoint controller. The API discovers the DOE
>>>> capabilities (extended capability ID 0x2E), and registers each discovered
>>>> DOE mailbox for all the functions in the endpoint controller. This API
>>>> should be invoked by the controller driver during probe based on the
>>>> doe_capable feature.
>>>>
>>>> Add pci_epc_destroy_doe() API in EPC core driver for cleanup of DOE
>>>> resources, which should be invoked by the controller driver during
>>>> controller cleanup based on the doe_capable feature.
>>>>
>>>> Co-developed-by: Siddharth Vadapalli <s-vadapalli@ti•com>
>>>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti•com>
>>>> Signed-off-by: Aksh Garg <a-garg7@ti•com>
>>>> ---
>>>>
>>>> Changes from v2 to v3:
>>>> - Rebased on 7.1-rc1.
>>>>
>>>> Changes since v1:
>>>> - New patch added to v2 (not present in v1)
>>>>
>>>> v2: https://lore.kernel.org/all/20260401073022.215805-4-a-garg7@ti.com/
>>>>
>>>> This patch is introduced based on the feedback provided by Manivannan
>>>> Sadhasivam at [1].
>>>>
>>>
>>> Sweet! But I was expecting you to add atleast one EPC driver implementation to
>>> make use of these APIs.
>>>
>>> Also, why can't you call these APIs from the EPC core directly? Maybe during
>>> pci_epc_init_notify() once the register accesses become valid.
>>
>> Can we add the DOE initialization API to pci_epc_init_notify()? This
>> API seems to be called to notify the EPF drivers that the EPC device's
>> initialization has been completed, as the name and description suggests.
> 
> That's correct. But there is no harm in calling something like
> pci_epc_init_capabilities() inside its definition. Only concern would be that
> pci_epc_init_notify() is mostly called from threaded IRQ handlers. So loading
> the handler would not be recommended. But since it is threaded anyway and we
> don't have a better place to call, it would be OK.
> 
> We could've called this from pci_epc_{create/start}, but some controllers won't
> allow accessing CSRs without REFCLK. So only after pci_init_notify(), CSRs can
> be accessed.
> 
>> As 'pci_epc_doe_setup' is a part of EPC initialization, I thought the
>> EPC drivers should call this API before calling the pci_epc_init_notify().
>>
>> However, I agree with your suggestion to call the DOE setup API directly
>> from the EPC core instead of sprinkling over the EPC drivers. I would
>> recommend renaming the pci_epc_init_notify() API (and hence the
>> pci_epc_deinit_notify() as well) to something like pci_epc_init_complete(),
>> and add the DOE setup API/logic just before the
>> logic of notifying the EPF devices.
>>
> 
> No need to rename this API. Just use as is:
> 
> 	pci_epc_init_notify()
> 		-> pci_epc_init_capabilities()
> 			-> pci_epc_init_doe()
> 		-> epf->event_ops->epc_init()

Thank you for the suggestion, I will incorporate these changes in v4 series.

Regards,
Aksh Garg

> 
> - Mani
> 



  reply	other threads:[~2026-05-19  5:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27  5:17 [PATCH v3 0/4] PCI: Add DOE support for endpoint Aksh Garg
2026-04-27  5:17 ` [PATCH v3 1/4] PCI/DOE: Move common definitions to the header file Aksh Garg
2026-04-27  5:17 ` [PATCH v3 2/4] PCI: endpoint: Add DOE mailbox support for endpoint functions Aksh Garg
2026-05-14  8:03   ` Manivannan Sadhasivam
2026-05-15  5:35     ` Aksh Garg
2026-05-15 12:40       ` Manivannan Sadhasivam
2026-05-19  5:23         ` Aksh Garg
2026-04-27  5:17 ` [PATCH v3 3/4] PCI: endpoint: Add API for DOE initialization and setup in EPC core Aksh Garg
2026-05-14  8:08   ` Manivannan Sadhasivam
2026-05-15  4:51     ` Aksh Garg
2026-05-15 12:47       ` Manivannan Sadhasivam
2026-05-19  5:30         ` Aksh Garg [this message]
2026-04-27  5:17 ` [PATCH v3 4/4] Documentation: PCI: Add documentation for DOE endpoint support Aksh Garg
2026-05-14  8:11   ` Manivannan Sadhasivam
2026-05-14  8:12 ` [PATCH v3 0/4] PCI: Add DOE support for endpoint Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7fc62b7-a73a-4201-98e1-ea6a628e9dce@ti.com \
    --to=a-garg7@ti$(echo .)com \
    --cc=alistair@alistair23$(echo .)me \
    --cc=bhelgaas@google$(echo .)com \
    --cc=cassel@kernel$(echo .)org \
    --cc=corbet@lwn$(echo .)net \
    --cc=danishanwar@ti$(echo .)com \
    --cc=kishon@kernel$(echo .)org \
    --cc=kwilczynski@kernel$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-doc@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=lukas@wunner$(echo .)de \
    --cc=mani@kernel$(echo .)org \
    --cc=s-vadapalli@ti$(echo .)com \
    --cc=skhan@linuxfoundation$(echo .)org \
    --cc=srk@ti$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox