RE: PCIe endpoint generic driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/11/2015 17:57, Gabriele Paoloni wrote:
>> -----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?
It's not the device side. it's the host side.
>
>> 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
I'm writing the HW software, that's the driver I'm writing.
>
> 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...
This is on the host side. I can assure you there's a FPGA / ROM code on the device(Intel 10Gb)  that configures that PCI end point.
>
>> 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



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux