All of lore.kernel.org
 help / color / mirror / Atom feed
* PCIe endpoint generic driver
@ 2015-11-24 12:26 Ramon Fried
  2015-11-24 14:46 ` Gabriele Paoloni
  0 siblings, 1 reply; 7+ messages in thread
From: Ramon Fried @ 2015-11-24 12:26 UTC (permalink / raw)
  To: linux-pci

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 ?
I didn't find any, and I guess that I'm left with a platform driver.

If indeed the platform driver is the way to go, are there any implementations upstream I can look at ?

Thanks !
Ramon.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PCIe endpoint generic driver
  2015-11-24 12:26 PCIe endpoint generic driver Ramon Fried
@ 2015-11-24 14:46 ` Gabriele Paoloni
  2015-11-24 15:02   ` Ramon Fried
  0 siblings, 1 reply; 7+ messages in thread
From: Gabriele Paoloni @ 2015-11-24 14:46 UTC (permalink / raw)
  To: Ramon Fried, linux-pci

> -----Original Message-----
> From: linux-pci-owner@vger.kernel.org [mailto:linux-pci-
> owner@vger.kernel.org] On Behalf Of Ramon Fried
> Sent: Tuesday, November 24, 2015 12:27 PM
> To: linux-pci@vger.kernel.org
> Subject: 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

> I didn't find any, and I guess that I'm left with a platform driver.
> 
> If indeed the platform driver is the way to go, are there any
> implementations upstream I can look at ?
> 
> Thanks !
> Ramon.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PCIe endpoint generic driver
  2015-11-24 14:46 ` Gabriele Paoloni
@ 2015-11-24 15:02   ` Ramon Fried
  2015-11-24 15:18     ` Gabriele Paoloni
  0 siblings, 1 reply; 7+ messages in thread
From: Ramon Fried @ 2015-11-24 15:02 UTC (permalink / raw)
  To: linux-pci

> > 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.

> > I didn't find any, and I guess that I'm left with a platform driver.
> > 
> > If indeed the platform driver is the way to go, are there any 
> > implementations upstream I can look at ?
> > 
> > Thanks !
> > Ramon. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PCIe endpoint generic driver
  2015-11-24 15:02   ` Ramon Fried
@ 2015-11-24 15:18     ` Gabriele Paoloni
  2015-11-24 15:33       ` Ramon Fried
  0 siblings, 1 reply; 7+ messages in thread
From: Gabriele Paoloni @ 2015-11-24 15:18 UTC (permalink / raw)
  To: Ramon Fried, linux-pci

> -----Original Message-----
> From: linux-pci-owner@vger.kernel.org [mailto:linux-pci-owner@vger.kernel.org]
> On Behalf Of Ramon Fried
> Sent: 24 November 2015 15:02
> To: linux-pci@vger.kernel.org
> 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.

> 
> > > I didn't find any, and I guess that I'm left with a platform driver.
> > >
> > > If indeed the platform driver is the way to go, are there any
> > > implementations upstream I can look at ?
> > >
> > > Thanks !
> > > Ramon.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PCIe endpoint generic driver
  2015-11-24 15:18     ` Gabriele Paoloni
@ 2015-11-24 15:33       ` Ramon Fried
  2015-11-24 15:57         ` Gabriele Paoloni
  0 siblings, 1 reply; 7+ messages in thread
From: Ramon Fried @ 2015-11-24 15:33 UTC (permalink / raw)
  To: Gabriele Paoloni; +Cc: linux-pci


>> -----Original Message-----
>> From: linux-pci-owner@vger.kernel.org 
>> [mailto:linux-pci-owner@vger.kernel.org]
>> On Behalf Of Ramon Fried
>> Sent: 24 November 2015 15:02
>> To: linux-pci@vger.kernel.org
>> 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.

On the device side, pci_register_driver() doesn't make any sense. There's no root complex, no enumeration, etc.
I need for instance a method to send a MSI/MSIx interrupt to the host. I need to develop a function that does it.

My original question was if there's a framework/guidelines for achieving that.

Thanks.
Ramon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PCIe endpoint generic driver
  2015-11-24 15:33       ` Ramon Fried
@ 2015-11-24 15:57         ` Gabriele Paoloni
       [not found]           ` <56548D46.8000201@tandemg.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Gabriele Paoloni @ 2015-11-24 15:57 UTC (permalink / raw)
  To: Ramon Fried; +Cc: linux-pci

> -----Original Message-----
> From: Ramon Fried [mailto:ramon.fried@tandemg.com]
> Sent: Tuesday, November 24, 2015 3:33 PM
> To: Gabriele Paoloni
> Cc: linux-pci@vger.kernel.org
> Subject: RE: PCIe endpoint generic driver
> 
> 
> >> -----Original Message-----
> >> From: linux-pci-owner@vger.kernel.org
> >> [mailto:linux-pci-owner@vger.kernel.org]
> >> On Behalf Of Ramon Fried
> >> Sent: 24 November 2015 15:02
> >> To: linux-pci@vger.kernel.org
> >> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: PCIe endpoint generic driver
       [not found]           ` <56548D46.8000201@tandemg.com>
@ 2015-11-24 16:17             ` Ramon Fried
  0 siblings, 0 replies; 7+ messages in thread
From: Ramon Fried @ 2015-11-24 16:17 UTC (permalink / raw)
  To: Gabriele Paoloni; +Cc: linux-pci


On 24/11/2015 17:57, Gabriele Paoloni wrote:
>> -----Original Message-----
>> From: Ramon Fried [mailto:ramon.fried@tandemg.com]
>> Sent: Tuesday, November 24, 2015 3:33 PM
>> To: Gabriele Paoloni
>> Cc: linux-pci@vger.kernel.org
>> Subject: RE: PCIe endpoint generic driver
>>
>>
>>>> -----Original Message-----
>>>> From: linux-pci-owner@vger.kernel.org 
>>>> [mailto:linux-pci-owner@vger.kernel.org]
>>>> On Behalf Of Ramon Fried
>>>> Sent: 24 November 2015 15:02
>>>> To: linux-pci@vger.kernel.org
>>>> 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-24 16:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24 12:26 PCIe endpoint generic driver Ramon Fried
2015-11-24 14:46 ` Gabriele Paoloni
2015-11-24 15:02   ` Ramon Fried
2015-11-24 15:18     ` Gabriele Paoloni
2015-11-24 15:33       ` Ramon Fried
2015-11-24 15:57         ` Gabriele Paoloni
     [not found]           ` <56548D46.8000201@tandemg.com>
2015-11-24 16:17             ` Ramon Fried

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.