* Re: No controller seen in /sys/kernel/config/pci_ep/controllers
[not found] <CAHP4M8VuX6NrqyKQU1KS3DdTzZRQTdPK+nF0-eXXeQqhHyOypw@mail.gmail.com>
@ 2022-07-13 18:18 ` Bjorn Helgaas
2022-07-21 10:24 ` Ajay Garg
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2022-07-13 18:18 UTC (permalink / raw)
To: Ajay Garg, Kishon Vijay Abraham I; +Cc: linux-pci, linux-kernel
[+to Kishon, endpoint maintainer, +cc LKML]
On Wed, Jul 13, 2022 at 12:53:06PM +0530, Ajay Garg wrote:
> Hello everyone.
>
> The kernel has been built with :
>
> ###################################
> CONFIG_PCI_ENDPOINT=y
> CONFIG_PCI_ENDPOINT_CONFIGFS=y
> CONFIG_PCI_EPF_TEST=y
> CONFIG_PCI_ENDPOINT_TEST=y
> ###################################
>
>
> Thereafter, following are seen :
>
> ###################################
> $ sudo mount none /sys/kernel/config/ -t configfs
> mount: /sys/kernel/config: none already mounted or mount point busy.
>
> $ ls -lrth /sys/class/pci_epc/
> total 0
>
> $ ls -lrth /sys/kernel/config
> total 0
> drwxr-xr-x 4 root root 0 Jul 13 10:58 pci_ep
> drwxr-xr-x 2 root root 0 Jul 13 10:58 usb_gadget
>
> $ ls -lrth /sys/kernel/config/pci_ep/functions
> total 0
> drwxr-xr-x 2 root root 0 Jul 13 10:58 pci_epf_test
>
> $ ls -lrth /sys/kernel/config/pci_ep/controllers
> total 0
>
> $
> ###################################
>
> What is being missed?
>
> Side Queries : Is the controller that is expected to be listed, a
> virtual-controller (like the one provided by CONFIG_USB_DUMMY_HCD in
> case of USB)?
>
> Or there must be a real additional controller for pci-endpoint purpose?
> If yes, then :
>
> * I guess no listing is expected currently, as my machine has just
> one controller (as pci-host).
>
> * Is there a way to have an additional virtual pci-controller?
>
>
> Thanks and Regards,
> Ajay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No controller seen in /sys/kernel/config/pci_ep/controllers
2022-07-13 18:18 ` No controller seen in /sys/kernel/config/pci_ep/controllers Bjorn Helgaas
@ 2022-07-21 10:24 ` Ajay Garg
2022-07-21 10:32 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 4+ messages in thread
From: Ajay Garg @ 2022-07-21 10:24 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Kishon Vijay Abraham I, linux-pci, linux-kernel
Any pointers please?
Thanks and Regards,
Ajay
On Wed, Jul 13, 2022 at 11:48 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> [+to Kishon, endpoint maintainer, +cc LKML]
>
> On Wed, Jul 13, 2022 at 12:53:06PM +0530, Ajay Garg wrote:
> > Hello everyone.
> >
> > The kernel has been built with :
> >
> > ###################################
> > CONFIG_PCI_ENDPOINT=y
> > CONFIG_PCI_ENDPOINT_CONFIGFS=y
> > CONFIG_PCI_EPF_TEST=y
> > CONFIG_PCI_ENDPOINT_TEST=y
> > ###################################
> >
> >
> > Thereafter, following are seen :
> >
> > ###################################
> > $ sudo mount none /sys/kernel/config/ -t configfs
> > mount: /sys/kernel/config: none already mounted or mount point busy.
> >
> > $ ls -lrth /sys/class/pci_epc/
> > total 0
> >
> > $ ls -lrth /sys/kernel/config
> > total 0
> > drwxr-xr-x 4 root root 0 Jul 13 10:58 pci_ep
> > drwxr-xr-x 2 root root 0 Jul 13 10:58 usb_gadget
> >
> > $ ls -lrth /sys/kernel/config/pci_ep/functions
> > total 0
> > drwxr-xr-x 2 root root 0 Jul 13 10:58 pci_epf_test
> >
> > $ ls -lrth /sys/kernel/config/pci_ep/controllers
> > total 0
> >
> > $
> > ###################################
> >
> > What is being missed?
> >
> > Side Queries : Is the controller that is expected to be listed, a
> > virtual-controller (like the one provided by CONFIG_USB_DUMMY_HCD in
> > case of USB)?
> >
> > Or there must be a real additional controller for pci-endpoint purpose?
> > If yes, then :
> >
> > * I guess no listing is expected currently, as my machine has just
> > one controller (as pci-host).
> >
> > * Is there a way to have an additional virtual pci-controller?
> >
> >
> > Thanks and Regards,
> > Ajay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No controller seen in /sys/kernel/config/pci_ep/controllers
2022-07-21 10:24 ` Ajay Garg
@ 2022-07-21 10:32 ` Kishon Vijay Abraham I
2022-07-21 12:23 ` Ajay Garg
0 siblings, 1 reply; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2022-07-21 10:32 UTC (permalink / raw)
To: Ajay Garg, Bjorn Helgaas; +Cc: linux-pci, linux-kernel
On 21/07/22 15:54, Ajay Garg wrote:
> Any pointers please?
>
> Thanks and Regards,
> Ajay
>
> On Wed, Jul 13, 2022 at 11:48 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>>
>> [+to Kishon, endpoint maintainer, +cc LKML]
>>
>> On Wed, Jul 13, 2022 at 12:53:06PM +0530, Ajay Garg wrote:
>>> Hello everyone.
>>>
>>> The kernel has been built with :
>>>
>>> ###################################
>>> CONFIG_PCI_ENDPOINT=y
>>> CONFIG_PCI_ENDPOINT_CONFIGFS=y
>>> CONFIG_PCI_EPF_TEST=y
>>> CONFIG_PCI_ENDPOINT_TEST=y
>>> ###################################
>>>
>>>
>>> Thereafter, following are seen :
>>>
>>> ###################################
>>> $ sudo mount none /sys/kernel/config/ -t configfs
>>> mount: /sys/kernel/config: none already mounted or mount point busy.
>>>
>>> $ ls -lrth /sys/class/pci_epc/
>>> total 0
>>>
>>> $ ls -lrth /sys/kernel/config
>>> total 0
>>> drwxr-xr-x 4 root root 0 Jul 13 10:58 pci_ep
>>> drwxr-xr-x 2 root root 0 Jul 13 10:58 usb_gadget
>>>
>>> $ ls -lrth /sys/kernel/config/pci_ep/functions
>>> total 0
>>> drwxr-xr-x 2 root root 0 Jul 13 10:58 pci_epf_test
>>>
>>> $ ls -lrth /sys/kernel/config/pci_ep/controllers
>>> total 0
>>>
>>> $
>>> ###################################
>>>
>>> What is being missed?
>>>
>>> Side Queries : Is the controller that is expected to be listed, a
>>> virtual-controller (like the one provided by CONFIG_USB_DUMMY_HCD in
>>> case of USB)?
There are no virtual PCIe endpoint controllers in Linux.
>>>
>>> Or there must be a real additional controller for pci-endpoint purpose?
right, there should be an endpoint controller and the driver for it
should register with the Linux endpoint framework.
>>> If yes, then :
>>>
>>> * I guess no listing is expected currently, as my machine has just
>>> one controller (as pci-host).
correct.
>>>
>>> * Is there a way to have an additional virtual pci-controller?
Not sure what exactly your use case is. All it's going to need is the
driver to use devm_pci_epc_create() to register a endpoint controller.
You can refer existing endpoint controller drivers
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/cadence/pcie-cadence-ep.c
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pcie-designware-ep.c
Thanks,
Kishon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: No controller seen in /sys/kernel/config/pci_ep/controllers
2022-07-21 10:32 ` Kishon Vijay Abraham I
@ 2022-07-21 12:23 ` Ajay Garg
0 siblings, 0 replies; 4+ messages in thread
From: Ajay Garg @ 2022-07-21 12:23 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: Bjorn Helgaas, linux-pci, linux-kernel
Thank you, that helps.
> Not sure what exactly your use case is.
Nothing complicated, I was stuck on the first step of having the
pci-controller in endpoint-mode :)
Your reply has given me a direction : I will try and find a
hardware/setup wherein I can have a pci-controller in endpoint-mode.
Thanks and Regards,
Ajay
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-21 12:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAHP4M8VuX6NrqyKQU1KS3DdTzZRQTdPK+nF0-eXXeQqhHyOypw@mail.gmail.com>
2022-07-13 18:18 ` No controller seen in /sys/kernel/config/pci_ep/controllers Bjorn Helgaas
2022-07-21 10:24 ` Ajay Garg
2022-07-21 10:32 ` Kishon Vijay Abraham I
2022-07-21 12:23 ` Ajay Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).