Re: [PATCH] PCI, pciehp: Turn on link a while to workaround presense detection

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

 



On Sat, Dec 7, 2013 at 8:55 PM, Ethan Zhao <ethan.kernel@xxxxxxxxx> wrote:
> On Sun, Dec 8, 2013 at 11:19 AM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>> On Sat, Dec 7, 2013 at 10:35 AM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
>>>
>>> This doesn't sound like a chipset bug.  It sounds like exactly what
>>> the spec describes: "Presence Detect State – This bit indicates the
>>> presence of an adapter in the slot, reflected by the logical “OR” of
>>> the Physical Layer in-band presence detect mechanism and, if present,
>>> any out-of-band presence detect mechanism defined for the slot’s
>>> corresponding form factor" (PCIe 3.0, sec 7.8.11).
>>
>> Not sure. the silicon does not report in-band correctly if we turn off
>> pcie link before turn the power of card.
>>
>
> Obvious there are both in-band and out-of band present detect
> mechanism on Yinghai's test platform:
>
>> case 1:
>> a. disable pci link
>> b. turn off power of pci cards
>
> in-band-present = should be 'off ', but still 'on'
> the hardware/FPGA of Yinghai's test platform has special temper here,
> it couldn't set in-band-present right if disable pci link first.
> but other platform could work well when commit 2debd9289997 applied ?
> non report that.

It happens on all intel platform from nehalem, westmere, sandybridge,
and ivybridge.

If the users are careful enough then they would find the presence is
still set even after
card is removed.

but hotadd back later is still working, as attention button pressing
will still generate interrupt,..

>
>> c. Present bit: card present.
>> d. remove the card.
>
> out-band-present = off
>
> present = n-band-present  | out-band-present
>                  on | off
>                = on
> not work well.
>> e. Present bit: card is present.
>>
>> case 2:
>> a. turn off power of pci cards
>> b. disable pci link
>
> in-band-present = off
> works well
>
>> c. Present bit: card present.
>> d. remove the card.
>
> out-band-present = off
>
>> e. Present bit: card is NOT present.
>
> present = n-band-present  | out-band-present
>                  off | off
>               = off
> works well.

We can not check in-band presence directly.

We only can check result after "OR", and out-band presence.
and out-band presence from FPGA always report correctly.

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