mbox series

[0/5] PCI: endpoint: Add support for additional notifiers

Message ID 20210616115913.138778-1-manivannan.sadhasivam@linaro.org
Headers show
Series PCI: endpoint: Add support for additional notifiers | expand

Message

Manivannan Sadhasivam June 16, 2021, 11:59 a.m. UTC
Hello,

This series adds support for additional notifiers in the PCI endpoint
framework. The notifiers LINK_DOWN, BME, PME, and D_STATE are generic
for all PCI endpoints but there is also a custom notifier (CUSTOM) added
to pass the device/vendor specific events to EPF from EPC.

The example usage of all notifiers is provided in the commit description.

Thanks,
Mani

Manivannan Sadhasivam (5):
  PCI: endpoint: Add linkdown notifier support
  PCI: endpoint: Add BME notifier support
  PCI: endpoint: Add PME notifier support
  PCI: endpoint: Add D_STATE notifier support
  PCI: endpoint: Add custom notifier support

 drivers/pci/endpoint/pci-epc-core.c | 89 +++++++++++++++++++++++++++++
 include/linux/pci-epc.h             |  5 ++
 include/linux/pci-epf.h             |  5 ++
 3 files changed, 99 insertions(+)

-- 
2.25.1

Comments

Om Prakash Singh June 16, 2021, 7:12 p.m. UTC | #1
Hi Mani,
Adding more notifier types will surely help but I believe the list is 
not exhaustive. What you are trying here is to pass various 
vendor-specific epc interrupts to EPF driver. That can be taken care by 
a single notifier interface as well, "pci_epc_custom_notify" from your 
implementation. This also requires to have pre-defined values of "data" 
argument to standardize the interface.

your thoughts?

Thanks,
Om

On 6/16/2021 5:29 PM, Manivannan Sadhasivam wrote:
> External email: Use caution opening links or attachments

> 

> 

> Hello,

> 

> This series adds support for additional notifiers in the PCI endpoint

> framework. The notifiers LINK_DOWN, BME, PME, and D_STATE are generic

> for all PCI endpoints but there is also a custom notifier (CUSTOM) added

> to pass the device/vendor specific events to EPF from EPC.

> 

> The example usage of all notifiers is provided in the commit description.

> 

> Thanks,

> Mani

> 

> Manivannan Sadhasivam (5):

>    PCI: endpoint: Add linkdown notifier support

>    PCI: endpoint: Add BME notifier support

>    PCI: endpoint: Add PME notifier support

>    PCI: endpoint: Add D_STATE notifier support

>    PCI: endpoint: Add custom notifier support

> 

>   drivers/pci/endpoint/pci-epc-core.c | 89 +++++++++++++++++++++++++++++

>   include/linux/pci-epc.h             |  5 ++

>   include/linux/pci-epf.h             |  5 ++

>   3 files changed, 99 insertions(+)

> 

> --

> 2.25.1

>
Manivannan Sadhasivam June 17, 2021, 5:05 p.m. UTC | #2
Hi,

On Thu, Jun 17, 2021 at 12:42:07AM +0530, Om Prakash Singh wrote:
> Hi Mani,

> Adding more notifier types will surely help but I believe the list is not

> exhaustive. What you are trying here is to pass various vendor-specific epc

> interrupts to EPF driver. That can be taken care by a single notifier

> interface as well, "pci_epc_custom_notify" from your implementation.


That's what I initially thought eventhough not all the notifiers are
vendor specific. But Kishon suggested to add notifiers for generic ones
such as BME, PME etc... and that sounded reasonable to me.

> This

> also requires to have pre-defined values of "data" argument to standardize

> the interface.

> 


No, I don't think we can standardize the arguments to "custom" notifier.
The custom notifier is supposed to deal with vendor specific events and
I don't see any benefit on standardizing it. I see it more like an
opaque driver_data field where we pass driver specific arguments.

Thanks,
Mani

> your thoughts?

> 

> Thanks,

> Om

> 

> On 6/16/2021 5:29 PM, Manivannan Sadhasivam wrote:

> > External email: Use caution opening links or attachments

> > 

> > 

> > Hello,

> > 

> > This series adds support for additional notifiers in the PCI endpoint

> > framework. The notifiers LINK_DOWN, BME, PME, and D_STATE are generic

> > for all PCI endpoints but there is also a custom notifier (CUSTOM) added

> > to pass the device/vendor specific events to EPF from EPC.

> > 

> > The example usage of all notifiers is provided in the commit description.

> > 

> > Thanks,

> > Mani

> > 

> > Manivannan Sadhasivam (5):

> >    PCI: endpoint: Add linkdown notifier support

> >    PCI: endpoint: Add BME notifier support

> >    PCI: endpoint: Add PME notifier support

> >    PCI: endpoint: Add D_STATE notifier support

> >    PCI: endpoint: Add custom notifier support

> > 

> >   drivers/pci/endpoint/pci-epc-core.c | 89 +++++++++++++++++++++++++++++

> >   include/linux/pci-epc.h             |  5 ++

> >   include/linux/pci-epf.h             |  5 ++

> >   3 files changed, 99 insertions(+)

> > 

> > --

> > 2.25.1

> >
Manivannan Sadhasivam Aug. 19, 2021, 1:06 p.m. UTC | #3
On Wed, Jun 16, 2021 at 05:29:08PM +0530, Manivannan Sadhasivam wrote:
> Hello,

> 

> This series adds support for additional notifiers in the PCI endpoint

> framework. The notifiers LINK_DOWN, BME, PME, and D_STATE are generic

> for all PCI endpoints but there is also a custom notifier (CUSTOM) added

> to pass the device/vendor specific events to EPF from EPC.

> 

> The example usage of all notifiers is provided in the commit description.

> 


Ping on this series!

Thanks,
Mani

> Thanks,

> Mani

> 

> Manivannan Sadhasivam (5):

>   PCI: endpoint: Add linkdown notifier support

>   PCI: endpoint: Add BME notifier support

>   PCI: endpoint: Add PME notifier support

>   PCI: endpoint: Add D_STATE notifier support

>   PCI: endpoint: Add custom notifier support

> 

>  drivers/pci/endpoint/pci-epc-core.c | 89 +++++++++++++++++++++++++++++

>  include/linux/pci-epc.h             |  5 ++

>  include/linux/pci-epf.h             |  5 ++

>  3 files changed, 99 insertions(+)

> 

> -- 

> 2.25.1

>
Kishon Vijay Abraham I Aug. 19, 2021, 2:15 p.m. UTC | #4
Hi Manivannan,

On 16/06/21 5:29 pm, Manivannan Sadhasivam wrote:
> Hello,

> 

> This series adds support for additional notifiers in the PCI endpoint

> framework. The notifiers LINK_DOWN, BME, PME, and D_STATE are generic

> for all PCI endpoints but there is also a custom notifier (CUSTOM) added

> to pass the device/vendor specific events to EPF from EPC.

> 

> The example usage of all notifiers is provided in the commit description.


In my earlier comment I didn't mean you to provide example usage in
commit description. Rather to be used in a existing endpoint controller
driver and handled in endpoint function drivers. Otherwise no point in
adding them to the upstream kernel.

Thanks
Kishon

> 

> Thanks,

> Mani

> 

> Manivannan Sadhasivam (5):

>   PCI: endpoint: Add linkdown notifier support

>   PCI: endpoint: Add BME notifier support

>   PCI: endpoint: Add PME notifier support

>   PCI: endpoint: Add D_STATE notifier support

>   PCI: endpoint: Add custom notifier support

> 

>  drivers/pci/endpoint/pci-epc-core.c | 89 +++++++++++++++++++++++++++++

>  include/linux/pci-epc.h             |  5 ++

>  include/linux/pci-epf.h             |  5 ++

>  3 files changed, 99 insertions(+)

>
Manivannan Sadhasivam Aug. 19, 2021, 2:22 p.m. UTC | #5
On Thu, Aug 19, 2021 at 07:45:06PM +0530, Kishon Vijay Abraham I wrote:
> Hi Manivannan,

> 

> On 16/06/21 5:29 pm, Manivannan Sadhasivam wrote:

> > Hello,

> > 

> > This series adds support for additional notifiers in the PCI endpoint

> > framework. The notifiers LINK_DOWN, BME, PME, and D_STATE are generic

> > for all PCI endpoints but there is also a custom notifier (CUSTOM) added

> > to pass the device/vendor specific events to EPF from EPC.

> > 

> > The example usage of all notifiers is provided in the commit description.

> 

> In my earlier comment I didn't mean you to provide example usage in

> commit description. Rather to be used in a existing endpoint controller

> driver and handled in endpoint function drivers. Otherwise no point in

> adding them to the upstream kernel.

> 


Oh, sorry then I must have misinterpreted your comments. I'll submit this series
along with the MHI stack that makes use of these notifiers.

Thanks,
Mani

> Thanks

> Kishon

> 

> > 

> > Thanks,

> > Mani

> > 

> > Manivannan Sadhasivam (5):

> >   PCI: endpoint: Add linkdown notifier support

> >   PCI: endpoint: Add BME notifier support

> >   PCI: endpoint: Add PME notifier support

> >   PCI: endpoint: Add D_STATE notifier support

> >   PCI: endpoint: Add custom notifier support

> > 

> >  drivers/pci/endpoint/pci-epc-core.c | 89 +++++++++++++++++++++++++++++

> >  include/linux/pci-epc.h             |  5 ++

> >  include/linux/pci-epf.h             |  5 ++

> >  3 files changed, 99 insertions(+)

> >