All of lore.kernel.org
 help / color / mirror / Atom feed
* Pcie Linux HotPlug Driver Automatic Scripts
@ 2013-05-31 17:35 Paulo Fortuna Carvalho
  2013-05-31 19:26 ` Yinghai Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Paulo Fortuna Carvalho @ 2013-05-31 17:35 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Yinghai Lu, linux-pci

Hello,
Yes all is working.
Although I need to automatize the all process.
I want to unplug the ATCA card and run the script i made to remove
power and so remove driver and want to plug ATCA card and to rescan
pci bus and so insert driver.
I know i have to use udev apporach but dont know what steps are required.

Also, How can I perform an entire pcie express bus reset from linux terminal?
Paulo.

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

* Re: Pcie Linux HotPlug Driver Automatic Scripts
  2013-05-31 17:35 Pcie Linux HotPlug Driver Automatic Scripts Paulo Fortuna Carvalho
@ 2013-05-31 19:26 ` Yinghai Lu
  2013-05-31 20:24   ` Paulo Fortuna Carvalho
  0 siblings, 1 reply; 4+ messages in thread
From: Yinghai Lu @ 2013-05-31 19:26 UTC (permalink / raw)
  To: Paulo Ricardo Carvalho; +Cc: Bjorn Helgaas, linux-pci

On Fri, May 31, 2013 at 10:35 AM, Paulo Fortuna Carvalho
<pricardofc@ipfn.ist.utl.pt> wrote:

> Also, How can I perform an entire pcie express bus reset from linux terminal?

disable_pcie_link and reenable the pcie link?

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

* Re: Pcie Linux HotPlug Driver Automatic Scripts
  2013-05-31 19:26 ` Yinghai Lu
@ 2013-05-31 20:24   ` Paulo Fortuna Carvalho
  2013-06-01 17:55     ` Paulo Fortuna Carvalho
  0 siblings, 1 reply; 4+ messages in thread
From: Paulo Fortuna Carvalho @ 2013-05-31 20:24 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Bjorn Helgaas, linux-pci

I'll explain better.
We have the following architecture.
PC (Intel Root Port) downstream->Upstream OneStopSystems RootComplex
8733 downstream->upstream PCIe Switch 8696 in a ATCA card downstream->
another ATCA card.
When another ATCA card is removed from the system all the process goes ok.
When the first ATCA card that has the PCIe 8696 onboard is removed
from system and inserted again all the PEX show rev (ff) and also the
2 ATCA cards have rev (ff)
The only thing in system with rev (ba) ok is the Root Complex 8733.
The ATCA card with PCIE Switch 8696 onboard is plugged to the PC via a
HotPlug cable and we dont actually remove the card only the cable (is
the same thing I guess). So when we plug the cable back i think we
have to send a reset signal to the pciexpress bus in order to
initialize all the pci bus, detect and power on all the tree from Root
Complex 8733 until PCIe Switch 8696 and at last ATCA cards in order to
insert ATCA cards device drivers.

So I tryed echo 1 > /sys/bus/pci/rescan didnt work. Then I identify
from which device the rev ff was and found that from device
0000:04:08.0 rev was ff and so all the nodes below this one were also
with rev ff. then I tryed
echo 1 > /sys/bus/pci/devices/0000\:04\:08.0/power but also nothing happened.
So is there a command that I can execute to activate all the pci bus
from that node?
My work colleague told me that after plug the pci express cable he
always had to reboot the pc (because it needs a reset signal in that
hw line) but I think that there should be a linux command that would
be able to send this reset signal.
I also tryed echo 1 > /sys/bus/pci/devices/0000\:04\:08.0/reset but
this file doenst exist...
Paulo.

2013/5/31, Yinghai Lu <yinghai@kernel.org>:
> On Fri, May 31, 2013 at 10:35 AM, Paulo Fortuna Carvalho
> <pricardofc@ipfn.ist.utl.pt> wrote:
>
>> Also, How can I perform an entire pcie express bus reset from linux
>> terminal?
>
> disable_pcie_link and reenable the pcie link?
>

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

* Re: Pcie Linux HotPlug Driver Automatic Scripts
  2013-05-31 20:24   ` Paulo Fortuna Carvalho
@ 2013-06-01 17:55     ` Paulo Fortuna Carvalho
  0 siblings, 0 replies; 4+ messages in thread
From: Paulo Fortuna Carvalho @ 2013-06-01 17:55 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Bjorn Helgaas, linux-pci

Hello,
Bjorn and Yinghai,

Everything is working as expected now.
Both boards are hotplugging.
Im working in the udev configuration to run scripts automatically but
i think its the easiest part.
Thanks for your help,
Paulo.


2013/5/31, Paulo Fortuna Carvalho <pricardofc@ipfn.ist.utl.pt>:
> I'll explain better.
> We have the following architecture.
> PC (Intel Root Port) downstream->Upstream OneStopSystems RootComplex
> 8733 downstream->upstream PCIe Switch 8696 in a ATCA card downstream->
> another ATCA card.
> When another ATCA card is removed from the system all the process goes ok.
> When the first ATCA card that has the PCIe 8696 onboard is removed
> from system and inserted again all the PEX show rev (ff) and also the
> 2 ATCA cards have rev (ff)
> The only thing in system with rev (ba) ok is the Root Complex 8733.
> The ATCA card with PCIE Switch 8696 onboard is plugged to the PC via a
> HotPlug cable and we dont actually remove the card only the cable (is
> the same thing I guess). So when we plug the cable back i think we
> have to send a reset signal to the pciexpress bus in order to
> initialize all the pci bus, detect and power on all the tree from Root
> Complex 8733 until PCIe Switch 8696 and at last ATCA cards in order to
> insert ATCA cards device drivers.
>
> So I tryed echo 1 > /sys/bus/pci/rescan didnt work. Then I identify
> from which device the rev ff was and found that from device
> 0000:04:08.0 rev was ff and so all the nodes below this one were also
> with rev ff. then I tryed
> echo 1 > /sys/bus/pci/devices/0000\:04\:08.0/power but also nothing
> happened.
> So is there a command that I can execute to activate all the pci bus
> from that node?
> My work colleague told me that after plug the pci express cable he
> always had to reboot the pc (because it needs a reset signal in that
> hw line) but I think that there should be a linux command that would
> be able to send this reset signal.
> I also tryed echo 1 > /sys/bus/pci/devices/0000\:04\:08.0/reset but
> this file doenst exist...
> Paulo.
>
> 2013/5/31, Yinghai Lu <yinghai@kernel.org>:
>> On Fri, May 31, 2013 at 10:35 AM, Paulo Fortuna Carvalho
>> <pricardofc@ipfn.ist.utl.pt> wrote:
>>
>>> Also, How can I perform an entire pcie express bus reset from linux
>>> terminal?
>>
>> disable_pcie_link and reenable the pcie link?
>>
>

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

end of thread, other threads:[~2013-06-01 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 17:35 Pcie Linux HotPlug Driver Automatic Scripts Paulo Fortuna Carvalho
2013-05-31 19:26 ` Yinghai Lu
2013-05-31 20:24   ` Paulo Fortuna Carvalho
2013-06-01 17:55     ` Paulo Fortuna Carvalho

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.