All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: unlisted-recipients:; (no To-header on input)
Cc: Yinghai Lu <yinghai@kernel.org>,
	linux-pci@vger.kernel.org, yhlu.kernel@gmail.com
Subject: Re: PICe hotplug problems
Date: Wed, 11 Jul 2012 07:08:11 +0200	[thread overview]
Message-ID: <OFA10FA4B6.A121C467-ONC1257A38.001BD265-C1257A38.001C3762@transmode.se> (raw)
In-Reply-To: <OF259177D8.B20ED592-ONC1257A38.00167C85-C1257A38.0016C890@LocalDomain>

Joakim Tjernlund/Transmode wrote on 2012/07/11 06:08:51:
>
> yhlu.kernel@gmail.com wrote on 2012/07/11 03:33:05:
> >
> > On Tue, Jul 10, 2012 at 6:07 PM, Joakim Tjernlund
> > <joakim.tjernlund@transmode.se> wrote:
> > > yhlu.kernel@gmail.com wrote on 2012/07/11 00:09:00:
> >
> > >> No. Can you compile lspci util as static and run it ?
> > >
> > > That wasn't so hard so here:
> > >
> > > root@P2020RDB ~ # ./lspci  -vvxxx
> > > 00:00.0 Class 0604: Device 1957:0079 (rev 21)
> > >         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
> > >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> > >         Latency: 0, Cache Line Size: 32 bytes
> > >         Region 0: Memory at <ignored> (32-bit, non-prefetchable)
> > >         Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
> > >         I/O behind bridge: 00000000-00000fff
> > >         Memory behind bridge: 80000000-9fffffff
> > >         Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> > >         BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
> > >                 PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
> > >         Capabilities: [44] Power Management version 2
> > >                 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
> > >                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> > >         Capabilities: [4c] Express (v1) Root Port (Slot-), MSI 00
> > >                 DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> > >                         ExtTag- RBE- FLReset-
> > >                 DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
> > >                         RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
> > >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> > >                 DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
> > >                 LnkCap: Port #0, Speed 2.5GT/s, Width x4, ASPM L0s, Latency L0 <2us, L1 unlimited
> > >                         ClockPM- Surprise- LLActRep- BwNot-
> > >                 LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk-
> > >                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> > >                 LnkSta: Speed 2.5GT/s, Width x2, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
> > >                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
> > >                 RootCap: CRSVisible-
> > >                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> >
> > There is no slot cap etc, so pciehp will not be loaded.
> > the power of you child device can not be turned off/on.
> >
> > Not sure if can use link off/on make the clock effective.
> >
> > You can turn off and on the pcie link like following:
> >
> > 1. remove the child device
> >      echo 1 > /sys/..../0000:01:00.0/remove
> > 2. disable link
> >      echo 1 > /sys/..../0000:00.00.0/pcie_link_disable
> > 3. enable link
> >      echo 1 > /sys/..../0000:00.00.0/pcie_link_disable
> > 4. rescan the pci bus.
> >      echo 1 > /sys/..../0000:00:00.0/rescan_bridge
> >
> > please check link disable patch at
> > git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git
> > for-pci-pcie-link

> Thanks, that was really quick. However, the patches does not apply on my
> 3.4 kernel and it looks non trivial to me fixup.
>
> Could you create (even quick and dirty) patches on top of 3.4?

I noted that the msi_bus for 0000:01:00.0 return nothing (cat msi_bus)
If I cat it into a file and check the size it is zero.

Any idea what this is about:
  cat vpd
  cat: read error: Connection timed out

hmm, just saw this in dmesg:
   pci 0000:01:00.0: vpd r/w failed.  This is likely a firmware bug on this device.  Contact the card vendor for a firmware update.


  parent reply	other threads:[~2012-07-11  5:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 17:29 PICe hotplug problems Joakim Tjernlund
2012-07-10 18:22 ` Yinghai Lu
2012-07-10 21:42   ` Joakim Tjernlund
2012-07-10 22:09     ` Yinghai Lu
2012-07-10 22:20       ` Bjorn Helgaas
2012-07-10 22:22         ` Yinghai Lu
2012-07-10 22:46           ` Bjorn Helgaas
2012-07-10 22:49             ` Bjorn Helgaas
2012-07-11  1:07       ` Joakim Tjernlund
2012-07-11  1:33         ` Yinghai Lu
2012-07-11  4:08           ` Joakim Tjernlund
2012-07-11  6:09             ` Yinghai Lu
     [not found]           ` <OF259177D8.B20ED592-ONC1257A38.00167C85-C1257A38.0016C890@LocalDomain>
2012-07-11  5:08             ` Joakim Tjernlund [this message]
2012-07-11 14:13               ` Jiang Liu
2012-07-18 13:07           ` Joakim Tjernlund
     [not found]           ` <OF85CC1E00.6E804B96-ONC1257A3F.00477FD2-C1257A3F.0048111D@LocalDomain>
2012-07-18 23:34             ` Joakim Tjernlund
     [not found]             ` <OF57E68083.D4D2A234-ONC1257A3F.008141AA-C1257A3F.00817A68@LocalDomain>
2012-07-19  9:17               ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFA10FA4B6.A121C467-ONC1257A38.001BD265-C1257A38.001C3762@transmode.se \
    --to=joakim.tjernlund@transmode.se \
    --cc=linux-pci@vger.kernel.org \
    --cc=yhlu.kernel@gmail.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.