Hi, Has anyone wrote EP software for PCI h/w running Linux and would like to share your experience? If so, please continue to read below and provide your feedback. Some of the PCI h/w such as Designware h/w that I work with support both EP and RC functions in the same h/w. It needs to be configured to work in one of the mode. So far I have seen only such h/w work in RC mode such as pcie-designware.c. But I haven't come across any driver in Linux that implements a EP controller similar to RC controller. At this point I am trying to do some research to educate myself on what is required to be implemented in Linux and what is the available software in PCI subsystem to support EP controller and EP device function. To support an EP such as a Ethernet NIC or FPGA, there is a firmaware/software in the EP h/w which as a standalone entity does setup the Link, initialize the PCI h/w, configure its BAR sizes etc and initialize itself so that it is detectable when RC side boots up and do the enumeration. In addition, there is PCI device driver running on RC side that communicates with the EP H/w to implement a specific PCI device function such as NIC. My focus is only on the EP side. >From my understanding, at a high level, EP s/w needs to implement 3 main components similar to RC side. 1. EP Controller. This is what initialize the PCI H/W so that it becomes discoverable on a PCIe bus. It initialize the PCI h/w, setup PCI bus (SerDes), and make sure PCI Link is up and register itself with PCI sub system (assuming PCI in Linux does support EP controller as well). But I don't know, if same API such as pci_scan_root_bus(), pci_bus_add_devices() etc are used in this case. Comments? 2. PCI Core functions such as resource management, APIs etc. For example, multiple functions can be implemented at the EP and memory/config resource windows to be allocated and managed similar to RC side. PCI core support EP as well?? 3. EP PCI device functions. Device drivers for individual PCI device function. >From a high level, it appears similar to PCI RC side functions. Is my understanding correct? Does the existing PCI Core support implementing EP side software on Linux? and if so, I believe, we need to enhance the existing RC controller to work as EP and then write a PCI device driver to support the EP PCI device function to work with RC side device driver. Comments? Thanks for reading and awaiting your feedback! -- Murali Karicheri Linux Kernel, Keystone -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html