* [PCIe spec question] How to get PCI express link up / link down notifications?
@ 2013-10-04 1:40 Rajat Jain
2013-10-04 2:36 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Rajat Jain @ 2013-10-04 1:40 UTC (permalink / raw)
To: linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org
Cc: Guenter Roeck, kernelnewbies@kernelnewbies.org,
linux-newbie@vger.kernel.org
Hello,
I have a HW which is not compliant with the PCI Express hot-plug (as described in the PCI express spec) because the HP signals from the downstream port are simply not connected. And I have a PCI express endpoint, that in the course of its life, will routinely undergo power-off and power-on on cycles. Hence the PCIe link to this device is expected to come down, and come up as part of regular operation.
I'm reading the PCI express spec trying to understand if it is possible to get notification interrupts, whenever the PCIe link to this device goes down or goes up. Can someone please help me understand if it is possible?
In the link control register, I only see the capability to generate interrupts when "link bandwidth" changes and looking at the text, I doubt if Link down or link up counts as "link bandwidth change". Is there a way to generate and interrupt / notification when the Link goes up or down?
Thanks,
Rajat Jain
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PCIe spec question] How to get PCI express link up / link down notifications?
2013-10-04 1:40 [PCIe spec question] How to get PCI express link up / link down notifications? Rajat Jain
@ 2013-10-04 2:36 ` Greg KH
2013-10-04 3:31 ` Rajat Jain
2013-10-04 6:48 ` Rajat Jain
0 siblings, 2 replies; 4+ messages in thread
From: Greg KH @ 2013-10-04 2:36 UTC (permalink / raw)
To: Rajat Jain
Cc: linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org,
Guenter Roeck, kernelnewbies@kernelnewbies.org,
linux-newbie@vger.kernel.org
On Fri, Oct 04, 2013 at 01:40:49AM +0000, Rajat Jain wrote:
> Hello,
>
> I have a HW which is not compliant with the PCI Express hot-plug (as
> described in the PCI express spec) because the HP signals from the
> downstream port are simply not connected. And I have a PCI express
> endpoint, that in the course of its life, will routinely undergo
> power-off and power-on on cycles. Hence the PCIe link to this device
> is expected to come down, and come up as part of regular operation.
What hardware is this? Why not ask the manufacturer of it as they are
the ones in control of this type of thing.
> I'm reading the PCI express spec trying to understand if it is
> possible to get notification interrupts, whenever the PCIe link to
> this device goes down or goes up. Can someone please help me
> understand if it is possible?
Notification where?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PCIe spec question] How to get PCI express link up / link down notifications?
2013-10-04 2:36 ` Greg KH
@ 2013-10-04 3:31 ` Rajat Jain
2013-10-04 6:48 ` Rajat Jain
1 sibling, 0 replies; 4+ messages in thread
From: Rajat Jain @ 2013-10-04 3:31 UTC (permalink / raw)
To: Greg KH
Cc: linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org,
Guenter Roeck, kernelnewbies@kernelnewbies.org,
linux-newbie@vger.kernel.org
Hello Greg,
>
> On Fri, Oct 04, 2013 at 01:40:49AM +0000, Rajat Jain wrote:
> > Hello,
> >
> > I have a HW which is not compliant with the PCI Express hot-plug (as
> > described in the PCI express spec) because the HP signals from the
> > downstream port are simply not connected. And I have a PCI express
> > endpoint, that in the course of its life, will routinely undergo
> > power-off and power-on on cycles. Hence the PCIe link to this device
> > is expected to come down, and come up as part of regular operation.
>
> What hardware is this? Why not ask the manufacturer of it as they are
> the ones in control of this type of thing.
OK, Understood :-).
Actually my question was generic. For e.g. say I have a topology where root port connects to a PCIe switch-1 that in turn connects to a PCIe switch-2. My question is if the PCIe link between the switch-1 and switch-2 goes down or up for some reason (say a power fault, or due to RESET pin assertion on the switch etc), is there a way to get notification interrupt at the root port or CPU? Essentially I am looking for a notification from downstream port of switch-1, that it saw a change in the link status.
>
> > I'm reading the PCI express spec trying to understand if it is
> > possible to get notification interrupts, whenever the PCIe link to
> > this device goes down or goes up. Can someone please help me
> > understand if it is possible?
>
> Notification where?
Notification to the CPU via the root port.
Thanks a bunch,
Rajat
>
> thanks,
>
> greg k-h
> --
> 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] 4+ messages in thread
* RE: [PCIe spec question] How to get PCI express link up / link down notifications?
2013-10-04 2:36 ` Greg KH
2013-10-04 3:31 ` Rajat Jain
@ 2013-10-04 6:48 ` Rajat Jain
1 sibling, 0 replies; 4+ messages in thread
From: Rajat Jain @ 2013-10-04 6:48 UTC (permalink / raw)
To: Rajat Jain, Greg KH
Cc: linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org,
Guenter Roeck, kernelnewbies@kernelnewbies.org,
linux-newbie@vger.kernel.org
Hi,
I found the answer to my original question. I found the "Data Link Layer State Changed Enable" bit in the Slot Control register which seems to provide interrupt on link state changes.
6.7.3.3. Data Link Layer State Changed Events
=======================
The Data Link Layer State Changed event provides an indication that the state of the Data Link Layer Link Active bit in the Link Status register has changed. Support for Data Link Layer State Changed events and software notification of these events are required for hot-plug capable Downstream Ports. If this event is supported, the Port sets the status field associated with the event
5 when the value in the Data Link Layer Link Active bit changes.
Thanks a bunch!
Rajat
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-04 6:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-04 1:40 [PCIe spec question] How to get PCI express link up / link down notifications? Rajat Jain
2013-10-04 2:36 ` Greg KH
2013-10-04 3:31 ` Rajat Jain
2013-10-04 6:48 ` Rajat Jain
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).