> -----Original Message----- > From: Ramon Fried [mailto:ramon.fried@xxxxxxxxxxx] > Sent: Tuesday, November 24, 2015 3:33 PM > To: Gabriele Paoloni > Cc: linux-pci@xxxxxxxxxxxxxxx > Subject: RE: PCIe endpoint generic driver > > > >> -----Original Message----- > >> From: linux-pci-owner@xxxxxxxxxxxxxxx > >> [mailto:linux-pci-owner@xxxxxxxxxxxxxxx] > >> On Behalf Of Ramon Fried > >> Sent: 24 November 2015 15:02 > >> To: linux-pci@xxxxxxxxxxxxxxx > >> Subject: RE: PCIe endpoint generic driver > >> > >> > > Hi. > >> > > Sorry for the noob question :) > >> > > I'm currently developing a PCIe endpoint driver for a board that > >> > > runs Linux. > >> > > The board will be used as an expansion PCIe card for x86 PC's. > >> > > Is there any guidelines, documentation related to PCI endpoint > >> > > drivers for Linux kernel ? > >>> > >> > Hi Ramon > >> > > >> > Have you looked at > >> > http://lxr.free-electrons.com/source/Documentation/PCI/pci.txt > >> >? > >> > > >> > Regards > >> > > >> > Gab > >> > >> Hi Gab, you misunderstood my driver type. > >> This is not a host driver, that I'm writing, but the actual endpoint > driver. > >> Then Linux is on the PCIe board. > > > > Hi Ramon, I understood your driver type. > > I think you misunderstood the Documentation. > > Host Bridges are under drivers/pci/host and none of them use > pci_register_driver() API. > > > > pci_register_driver() is actually for endpoints. Please read the link > above again. > > Hi Gab. > Host bridges AFAIK are supposed to connect between the host CPU, main > memory and the PCI itself. > This is not what I need as I'm not at the host side. > pci_register_driver() is a host driver for pci endpoints. pci_register_driver() is an API to register an endpoint PCI driver (try to grep for it in the linux source tree). > > On the device side, pci_register_driver() doesn't make any sense. > There's no root complex, no enumeration, etc. Ah, so how comes that all EP drivers at the end call it? > I need for instance a method to send a MSI/MSIx interrupt to the host. That depends on your HW and on your driver type AFAIK One of many examples you can find in the Kernel source tree can be http://lxr.free-electrons.com/source/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c#L9284 You can see how the driver is structured... > I need to develop a function that does it. > > My original question was if there's a framework/guidelines for > achieving that. > > Thanks. > Ramon -- 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