All of lore.kernel.org
 help / color / mirror / Atom feed
* 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
@ 2013-03-12  1:00 Martin Mokrejs
  2013-03-12  2:51 ` Yijing Wang
  2013-03-13  2:42 ` Yijing Wang
  0 siblings, 2 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-12  1:00 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi,
  I cold-booted a computer with the card inserted before power-on and collected
lspci output and express card slot status every second. Then I tried eject and
hotplug inserts and it appearts the card is not detected, actually maybe pciehp
is not even suppoosed to work in this case as the slot was occupied during boot.
But let me come to it later.

I noted the following on the very first eject of the so far cold-plugged card
that lspci properly reports PresDet change on the Changed: line. The only time
I ever saw it. ;-)
However, for any following inserts and ejects the value is not updated but slot
status bits are updated. I had BIOS defaults loaded and additionally, disabled
MediaCardReader.

The slot status bits read by setpci were changing in this path:
card in slot and cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100



--- lspci_loop.23:58:50 2013-03-11 23:58:50.000000000 +0100
+++ lspci_loop.23:58:51 2013-03-11 23:58:51.000000000 +0100
@@ -439,7 +439,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -453,13 +453,13 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet+ LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -478,11 +478,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 08 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -490,7 +490,7 @@
 a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
+d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 40
 e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
 
@@ -797,55 +797,23 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
-40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
-60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
-80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
-90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
--- lspci_loop.23:58:51 2013-03-11 23:58:51.000000000 +0100
+++ lspci_loop.23:58:52 2013-03-11 23:58:52.000000000 +0100
@@ -459,7 +459,7 @@
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
-                       Changed: MRL- PresDet+ LinkState+
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -482,7 +482,7 @@
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 08 01 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -490,7 +490,7 @@
 a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 40
+d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
 e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
--- lspci_loop.23:58:58 2013-03-11 23:58:58.000000000 +0100
+++ lspci_loop.23:58:59 2013-03-11 23:58:59.000000000 +0100
@@ -101,7 +101,7 @@
        Capabilities: [98] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
-               AFStatus: TP-
+               AFStatus: TP+
        Kernel driver in use: ehci-pci
 00: 86 80 2d 1c 06 00 90 02 05 20 03 0c 00 00 00 00
 10: 00 80 f0 f7 00 00 00 00 00 00 00 00 00 00 00 00
--- lspci_loop.23:58:59 2013-03-11 23:58:59.000000000 +0100
+++ lspci_loop.23:59:00 2013-03-11 23:59:00.000000000 +0100
@@ -101,7 +101,7 @@
        Capabilities: [98] PCI Advanced Features
                AFCap: TP+ FLR+
                AFCtrl: FLR-
-               AFStatus: TP+
+               AFStatus: TP-
        Kernel driver in use: ehci-pci
 00: 86 80 2d 1c 06 00 90 02 05 20 03 0c 00 00 00 00
 10: 00 80 f0 f7 00 00 00 00 00 00 00 00 00 00 00 00



Below is the first hotplug of the card.

--- lspci_loop.23:59:09 2013-03-11 23:59:09.000000000 +0100
+++ lspci_loop.23:59:10 2013-03-11 23:59:10.000000000 +0100
@@ -453,12 +453,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -482,7 +482,7 @@
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -797,23 +797,54 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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-
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
+10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
+20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
+40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
+60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
+80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
+90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--- lspci_loop.23:59:15 2013-03-11 23:59:15.000000000 +0100
+++ lspci_loop.23:59:16 2013-03-11 23:59:16.000000000 +0100
@@ -519,7 +519,7 @@
 60: 20 20 ff 07 00 00 00 00 01 00 00 01 00 00 08 40
 70: 00 00 df 3f 00 00 00 00 00 00 00 00 00 00 00 00
 80: 00 00 80 00 11 88 0c 93 30 0d 00 24 00 00 00 00
-90: 00 00 00 00 00 00 00 00 13 00 06 03 00 00 00 00
+90: 00 00 00 00 00 00 00 00 13 00 06 03 00 01 00 00
 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--- lspci_loop.23:59:16 2013-03-11 23:59:16.000000000 +0100
+++ lspci_loop.23:59:17 2013-03-11 23:59:17.000000000 +0100
@@ -519,7 +519,7 @@
 60: 20 20 ff 07 00 00 00 00 01 00 00 01 00 00 08 40
 70: 00 00 df 3f 00 00 00 00 00 00 00 00 00 00 00 00
 80: 00 00 80 00 11 88 0c 93 30 0d 00 24 00 00 00 00
-90: 00 00 00 00 00 00 00 00 13 00 06 03 00 01 00 00
+90: 00 00 00 00 00 00 00 00 13 00 06 03 00 00 00 00
 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


And later unplug of the hotplugged device:

--- lspci_loop.23:59:18 2013-03-11 23:59:18.000000000 +0100
+++ lspci_loop.23:59:19 2013-03-11 23:59:19.000000000 +0100
@@ -453,12 +453,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -482,7 +482,7 @@
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -797,54 +797,23 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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-
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
-       Region 4: I/O ports at c000 [disabled] [size=128]
-       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
-10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
-20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
-40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
-60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
-80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
-90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff





Already from other tests I realized a hotplugged eSATA has some "[virtual]
Expansion ROM". Here is a reasonably complete diff between a coldplugged
state of the same card and after a hotplug. In dmesg pciehp complained
upon its loading that Cache Line Size 64 is not supported so maybe the below
difference is a direct result of that? Similarly, MaxReadReq is different
and I bet the lines

+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]

actually mean the card is left disabled. Then, I am not surprised nothing
is shown upon its hotplug insert/eject in dmesg. ;-) In this particular setup
I don't think we are facing a PresDet issue. Either, the value is overwritten
by some other process, or the bug is somewhere else.


--- lspci_loop.23:58:26 2013-03-11 23:58:26.000000000 +0100
+++ lspci_loop.23:59:10 2013-03-11 23:59:10.000000000 +0100
@@ -439,7 +439,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -459,7 +459,7 @@
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -478,11 +478,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -799,14 +799,13 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
+       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: 64 bytes
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
@@ -817,7 +816,7 @@
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+                       MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
@@ -832,14 +831,14 @@
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
+00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
+10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
+20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
+70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
 80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00



Sadly, although the very first eject was notified the sata_sila24 neither
did "release" the device nor did it complain that it suddenly disappeared.
That was so far always in dmesg output (like for example):

[  251.632928] sata_sil24 0000:11:00.0: PME# disabled
[  251.636498] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?


I re-plugged the card and ejected several times while the while loops
collecting lspci and slot_status via the setpci shell command harvested
data. Still, in dmesg there was nothing logged regarding card insert/eject.
Eventually, I tried rmmod sata_sil24 (did NOT need 'rmmod -f') and that
did log something new.

[  529.571040] ata8.00: disabled
[  529.576365] sd 7:0:0:0: [sdb] Synchronizing SCSI cache
[  529.577202] sd 7:0:0:0: [sdb]  
[  529.577204] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[  529.577205] sd 7:0:0:0: [sdb] Stopping disk
[  529.577251] sd 7:0:0:0: [sdb] START_STOP FAILED
[  529.577253] sd 7:0:0:0: [sdb]  
[  529.577254] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[  529.578309] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
[  605.818905] sata_sil24 0000:11:00.0: version 1.1
[  605.818923] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
[  605.914722] sata_sil24 0000:11:00.0: failed to clear port RST
[  606.014860] sata_sil24 0000:11:00.0: failed to clear port RST
[  606.014882] sata_sil24 0000:11:00.0: enabling bus mastering
[  606.017741] scsi8 : sata_sil24
[  606.019388] scsi9 : sata_sil24
[  606.019898] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
[  606.019902] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
[  606.115003] ata9: controller in dubious state, performing PORT_RST
[  608.327747] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[  608.427847] ata10: controller in dubious state, performing PORT_RST
[  610.640619] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)




Finally, I am tempted to say that pciehp does not work at all under 3.9-rc1
if the slot was occupied during boot. It does NOT contain the usual debug
info spanning several lines and it only said:

[    2.109629] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    2.110225] pciehp: pcie_port_service_register = 0
[    2.110226] pciehp: PCI Express Hot Plug Controller Driver version: 0.4

If that is intentional the driver should complain loudly. Please educate me
what those "[virtual] Expansion ROM's" were in lspci above and whether those
"[disabled]" memory ranges relate to that as well. If the card is not thought
to be present or just not recognized ... why is that printed in lspci at all?
Similarly, what can you tell me if lspci output shows only:

Latency: 0

or even lacks the whole "Latency" line altoghether, is that also a disabled device?

I believe in working cases there is "Latency: 0, Cache Line Size: 64 bytes" instead.



Details and raw files at: http://195.113.57.32/~mmokrejs/tmp/3.9-rc1_disabled_MediaCard_reader_eSATA_coldplugged.tar.bz2

To inspect the incremental diffs of lspci output I used:

prev='/dev/null'; ls -latr lspci_* | awk '{print $9}' | while read cur; do diff -u -w $prev $cur | less; prev=$cur; done

Thank you,
Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-12  1:00 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI Martin Mokrejs
@ 2013-03-12  2:51 ` Yijing Wang
  2013-03-12  9:57   ` Martin Mokrejs
  2013-03-13  2:42 ` Yijing Wang
  1 sibling, 1 reply; 41+ messages in thread
From: Yijing Wang @ 2013-03-12  2:51 UTC (permalink / raw)
  To: Martin Mokrejs; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

On 2013/3/12 9:00, Martin Mokrejs wrote:
> Hi,
>   I cold-booted a computer with the card inserted before power-on and collected
> lspci output and express card slot status every second. Then I tried eject and
> hotplug inserts and it appearts the card is not detected, actually maybe pciehp
> is not even suppoosed to work in this case as the slot was occupied during boot.
> But let me come to it later.
> 
> I noted the following on the very first eject of the so far cold-plugged card
> that lspci properly reports PresDet change on the Changed: line. The only time
> I ever saw it. ;-)

Hi Martin,
   PresDet change bit will be cleaned as soon as pciehp driver received the inturrupt from hardware,
So it's difficult to capture the change.

> 
> 
> I re-plugged the card and ejected several times while the while loops
> collecting lspci and slot_status via the setpci shell command harvested
> data. Still, in dmesg there was nothing logged regarding card insert/eject.
> Eventually, I tried rmmod sata_sil24 (did NOT need 'rmmod -f') and that
> did log something new.

No new dmesg info when insert/eject maybe indicate the pciehp driver never received the
interrupt or there is no bit set about Presence Detect Changed here. Or there is debug info
like :
pcie_isr: intr_loc %x at least.

eSATA card SiI 3132, no XHCI, hotplug only got problem with 3.9-rc1? or both at 3.7 3.8?


-- 
Thanks!
Yijing


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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-12  2:51 ` Yijing Wang
@ 2013-03-12  9:57   ` Martin Mokrejs
  0 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-12  9:57 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Yijing Wang wrote:
> On 2013/3/12 9:00, Martin Mokrejs wrote:
>> Hi,
>>   I cold-booted a computer with the card inserted before power-on and collected
>> lspci output and express card slot status every second. Then I tried eject and
>> hotplug inserts and it appearts the card is not detected, actually maybe pciehp
>> is not even suppoosed to work in this case as the slot was occupied during boot.
>> But let me come to it later.
>>
>> I noted the following on the very first eject of the so far cold-plugged card
>> that lspci properly reports PresDet change on the Changed: line. The only time
>> I ever saw it. ;-)
> 
> Hi Martin,
>    PresDet change bit will be cleaned as soon as pciehp driver received the
> inturrupt from hardware, so it's difficult to capture the change.

Why? What is the purpose of having PresDet+ on the Status: line and PresDet- on
the Changed: line? Why isn't LinkState+ cleared on the Changed: line as well
at least? Sometimes I was even thinking that maybe some broken code in hotplug
changes LinkState instead of the PresDet on the Changed: line.

> 
>>
>>
>> I re-plugged the card and ejected several times while the while loops
>> collecting lspci and slot_status via the setpci shell command harvested
>> data. Still, in dmesg there was nothing logged regarding card insert/eject.
>> Eventually, I tried rmmod sata_sil24 (did NOT need 'rmmod -f') and that
>> did log something new.
> 
> No new dmesg info when insert/eject maybe indicate the pciehp driver never received the
> interrupt or there is no bit set about Presence Detect Changed here.

But it seems it is received - per the Status: line. What the driver does with
the PresDet value on the Changed: line should not matter in this regard, right?

> Or there is debug info like :
> pcie_isr: intr_loc %x at least.

Sorry, this does not help me. Would you please modify the setpci shell command
to print more values in the while loop? Or even better, provide me with a debug
patch showing whenever a value in those registers and additionally derived variables
is changed (0000, 0040, 0100, 0108, 0140, 0148)?



In the "Dell Vostro 3550: pci_hotplug+acpiphp require 'pcie_aspm=force' on kernel command-line for hotplug to work"
thread I already reported how pciehp hotplug under same 3.9-rc1 like here works for the eSATA card:

pciehp hotplug:
    [  211.879397] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
coldplug+(unnoticed ejects+inserts)+rmmod sata_sil24:
    [  605.818923] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)

The cold-plugged eSATA card gave somewhat different output during coldboot
compared to those lines when hotplug happens, so I am not able to compare the
output directly. In the mentioned tar.bz2 archive you could have found yourself
in dmesg_after_rmmod_and_modprobe_sata_sil24.txt file:

[    9.662550] sata_sil24 0000:11:00.0: version 1.1
[    9.665780] scsi6 : sata_sil24
[    9.667526] scsi7 : sata_sil24
[    9.668028] ata7: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
[    9.668032] ata8: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19

Not much verbose on coldboot, isn't it?


> 
> eSATA card SiI 3132, no XHCI, hotplug only got problem with 3.9-rc1? or both at 3.7 3.8?

In earlier times I never fiddled xhci disabled under 3.7 nor 3.8. Second, I had to use
acpiphp instead due to the breakage around 3.5. But you might compare with locks
held by sata_sil24 in dmesg files in 
"3.7.10: acpiphp with pcie_aspm=off and eSATA card Sil 3132" thread. That could give
you a clue. Maybe. ;-)

Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-12  1:00 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI Martin Mokrejs
  2013-03-12  2:51 ` Yijing Wang
@ 2013-03-13  2:42 ` Yijing Wang
  2013-03-14  0:05   ` Martin Mokrejs
  1 sibling, 1 reply; 41+ messages in thread
From: Yijing Wang @ 2013-03-13  2:42 UTC (permalink / raw)
  To: Martin Mokrejs; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi Martin,
   From your diff info, maybe we can analyze this problem step by step.
1、According to your diff info about first eject and first hot add, the pci device 11:00.0 Mass storage
   controller was removed and was added ok at pci device level;
2、The main problem is 11:00.0 Mass storage controller can not bind its driver normally, right?
3、According to diff info about first hotadd and coldplug, the mainly diff is
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]

and
MaxReadReq 4096 bytes ----> MaxReadReq 512 bytes

So maybe we can try to find why the memory range was disabled after hot add.

Martin, can you provide  /proc/iomem info when the system bootup, after first eject and
first hot-add?

I suspect the driver release its MMIO successfully after first eject.

Thanks!
Yijing.


On 2013/3/12 9:00, Martin Mokrejs wrote:
> Hi,
>   I cold-booted a computer with the card inserted before power-on and collected
> lspci output and express card slot status every second. Then I tried eject and
> hotplug inserts and it appearts the card is not detected, actually maybe pciehp
> is not even suppoosed to work in this case as the slot was occupied during boot.
> But let me come to it later.
> 
> I noted the following on the very first eject of the so far cold-plugged card
> that lspci properly reports PresDet change on the Changed: line. The only time
> I ever saw it. ;-)
> However, for any following inserts and ejects the value is not updated but slot
> status bits are updated. I had BIOS defaults loaded and additionally, disabled
> MediaCardReader.
> 
> The slot status bits read by setpci were changing in this path:
> card in slot and cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100
> 
> 
> 
> --- lspci_loop.23:58:50 2013-03-11 23:58:50.000000000 +0100
> +++ lspci_loop.23:58:51 2013-03-11 23:58:51.000000000 +0100
> @@ -439,7 +439,7 @@
>         I/O behind bridge: 0000c000-0000dfff
>         Memory behind bridge: f6c00000-f7cfffff
>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
> @@ -453,13 +453,13 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> -                       Changed: MRL- PresDet- LinkState-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> +                       Changed: MRL- PresDet+ LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> @@ -478,11 +478,11 @@
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>         Kernel driver in use: pcieport
>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
> +10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
> +50: 40 00 11 50 60 b2 3c 00 00 00 08 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> @@ -490,7 +490,7 @@
>  a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
> +d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 40
>  e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
>  
> @@ -797,55 +797,23 @@
>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       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: 64 bytes
> -       Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
> -       Region 4: I/O ports at c000 [size=128]
> -       Expansion ROM at f6c00000 [disabled] [size=512K]
> -       Capabilities: [54] 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=1 PME-
> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> -               Address: 0000000000000000  Data: 0000
> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> -                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
> -               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> -                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
> -               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
> -               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> -                       ClockPM- Surprise- LLActRep- BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> -       Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
>         Kernel driver in use: sata_sil24
> -00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
> -10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
> -20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> -30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
> -40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
> -60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
> -80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
> -90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> --- lspci_loop.23:58:51 2013-03-11 23:58:51.000000000 +0100
> +++ lspci_loop.23:58:52 2013-03-11 23:58:52.000000000 +0100
> @@ -459,7 +459,7 @@
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> -                       Changed: MRL- PresDet+ LinkState+
> +                       Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> @@ -482,7 +482,7 @@
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 50 60 b2 3c 00 00 00 08 01 00 00 00 00
> +50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> @@ -490,7 +490,7 @@
>  a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 40
> +d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
>  e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
> --- lspci_loop.23:58:58 2013-03-11 23:58:58.000000000 +0100
> +++ lspci_loop.23:58:59 2013-03-11 23:58:59.000000000 +0100
> @@ -101,7 +101,7 @@
>         Capabilities: [98] PCI Advanced Features
>                 AFCap: TP+ FLR+
>                 AFCtrl: FLR-
> -               AFStatus: TP-
> +               AFStatus: TP+
>         Kernel driver in use: ehci-pci
>  00: 86 80 2d 1c 06 00 90 02 05 20 03 0c 00 00 00 00
>  10: 00 80 f0 f7 00 00 00 00 00 00 00 00 00 00 00 00
> --- lspci_loop.23:58:59 2013-03-11 23:58:59.000000000 +0100
> +++ lspci_loop.23:59:00 2013-03-11 23:59:00.000000000 +0100
> @@ -101,7 +101,7 @@
>         Capabilities: [98] PCI Advanced Features
>                 AFCap: TP+ FLR+
>                 AFCtrl: FLR-
> -               AFStatus: TP+
> +               AFStatus: TP-
>         Kernel driver in use: ehci-pci
>  00: 86 80 2d 1c 06 00 90 02 05 20 03 0c 00 00 00 00
>  10: 00 80 f0 f7 00 00 00 00 00 00 00 00 00 00 00 00
> 
> 
> 
> Below is the first hotplug of the card.
> 
> --- lspci_loop.23:59:09 2013-03-11 23:59:09.000000000 +0100
> +++ lspci_loop.23:59:10 2013-03-11 23:59:10.000000000 +0100
> @@ -453,12 +453,12 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>                         Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
> @@ -482,7 +482,7 @@
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
> +50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> @@ -797,23 +797,54 @@
>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> -       !!! Unknown header type 7f
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> +       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> +       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-
> +       Interrupt: pin A routed to IRQ 19
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]
> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
> +       Capabilities: [54] 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=1 PME-
> +       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> +               Address: 0000000000000000  Data: 0000
> +       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> +               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> +                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> +                       ClockPM- Surprise- LLActRep- BwNot-
> +               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> +                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> +       Capabilities: [100 v1] Advanced Error Reporting
> +               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> +               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> +               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> +               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> +               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> +               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Kernel driver in use: sata_sil24
> -00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
> +10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
> +20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> +30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
> +40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
> +60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
> +80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
> +90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> --- lspci_loop.23:59:15 2013-03-11 23:59:15.000000000 +0100
> +++ lspci_loop.23:59:16 2013-03-11 23:59:16.000000000 +0100
> @@ -519,7 +519,7 @@
>  60: 20 20 ff 07 00 00 00 00 01 00 00 01 00 00 08 40
>  70: 00 00 df 3f 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 00 00 80 00 11 88 0c 93 30 0d 00 24 00 00 00 00
> -90: 00 00 00 00 00 00 00 00 13 00 06 03 00 00 00 00
> +90: 00 00 00 00 00 00 00 00 13 00 06 03 00 01 00 00
>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> --- lspci_loop.23:59:16 2013-03-11 23:59:16.000000000 +0100
> +++ lspci_loop.23:59:17 2013-03-11 23:59:17.000000000 +0100
> @@ -519,7 +519,7 @@
>  60: 20 20 ff 07 00 00 00 00 01 00 00 01 00 00 08 40
>  70: 00 00 df 3f 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 00 00 80 00 11 88 0c 93 30 0d 00 24 00 00 00 00
> -90: 00 00 00 00 00 00 00 00 13 00 06 03 00 01 00 00
> +90: 00 00 00 00 00 00 00 00 13 00 06 03 00 00 00 00
>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> 
> And later unplug of the hotplugged device:
> 
> --- lspci_loop.23:59:18 2013-03-11 23:59:18.000000000 +0100
> +++ lspci_loop.23:59:19 2013-03-11 23:59:19.000000000 +0100
> @@ -453,12 +453,12 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>                         Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
> @@ -482,7 +482,7 @@
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
> +50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> @@ -797,54 +797,23 @@
>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       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-
> -       Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> -       Region 4: I/O ports at c000 [disabled] [size=128]
> -       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
> -       Capabilities: [54] 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=1 PME-
> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> -               Address: 0000000000000000  Data: 0000
> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> -                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> -                       ClockPM- Surprise- LLActRep- BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> -       Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
>         Kernel driver in use: sata_sil24
> -00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
> -10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
> -20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> -30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
> -40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
> -60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
> -80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
> -90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 
> 
> 
> 
> 
> Already from other tests I realized a hotplugged eSATA has some "[virtual]
> Expansion ROM". Here is a reasonably complete diff between a coldplugged
> state of the same card and after a hotplug. In dmesg pciehp complained
> upon its loading that Cache Line Size 64 is not supported so maybe the below
> difference is a direct result of that? Similarly, MaxReadReq is different
> and I bet the lines
> 
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]
> 
> actually mean the card is left disabled. Then, I am not surprised nothing
> is shown upon its hotplug insert/eject in dmesg. ;-) In this particular setup
> I don't think we are facing a PresDet issue. Either, the value is overwritten
> by some other process, or the bug is somewhere else.
> 
> 
> --- lspci_loop.23:58:26 2013-03-11 23:58:26.000000000 +0100
> +++ lspci_loop.23:59:10 2013-03-11 23:59:10.000000000 +0100
> @@ -439,7 +439,7 @@
>         I/O behind bridge: 0000c000-0000dfff
>         Memory behind bridge: f6c00000-f7cfffff
>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
> @@ -459,7 +459,7 @@
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> -                       Changed: MRL- PresDet- LinkState-
> +                       Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> @@ -478,11 +478,11 @@
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>         Kernel driver in use: pcieport
>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
> +10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
> +50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> @@ -799,14 +799,13 @@
>  
>  11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>         Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> +       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: 64 bytes
>         Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
> -       Region 4: I/O ports at c000 [size=128]
> -       Expansion ROM at f6c00000 [disabled] [size=512K]
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]
> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>         Capabilities: [54] 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=1 PME-
> @@ -817,7 +816,7 @@
>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
>                 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
> +                       MaxPayload 128 bytes, MaxReadReq 512 bytes
>                 DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
>                 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>                         ClockPM- Surprise- LLActRep- BwNot-
> @@ -832,14 +831,14 @@
>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>                 AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Kernel driver in use: sata_sil24
> -00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
> -10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
> -20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> -30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
> +00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
> +10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
> +20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> +30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>  40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>  60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
> +70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
>  80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>  90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> 
> 
> Sadly, although the very first eject was notified the sata_sila24 neither
> did "release" the device nor did it complain that it suddenly disappeared.
> That was so far always in dmesg output (like for example):
> 
> [  251.632928] sata_sil24 0000:11:00.0: PME# disabled
> [  251.636498] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
> 
> 
> I re-plugged the card and ejected several times while the while loops
> collecting lspci and slot_status via the setpci shell command harvested
> data. Still, in dmesg there was nothing logged regarding card insert/eject.
> Eventually, I tried rmmod sata_sil24 (did NOT need 'rmmod -f') and that
> did log something new.
> 
> [  529.571040] ata8.00: disabled
> [  529.576365] sd 7:0:0:0: [sdb] Synchronizing SCSI cache
> [  529.577202] sd 7:0:0:0: [sdb]  
> [  529.577204] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
> [  529.577205] sd 7:0:0:0: [sdb] Stopping disk
> [  529.577251] sd 7:0:0:0: [sdb] START_STOP FAILED
> [  529.577253] sd 7:0:0:0: [sdb]  
> [  529.577254] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
> [  529.578309] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
> [  605.818905] sata_sil24 0000:11:00.0: version 1.1
> [  605.818923] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
> [  605.914722] sata_sil24 0000:11:00.0: failed to clear port RST
> [  606.014860] sata_sil24 0000:11:00.0: failed to clear port RST
> [  606.014882] sata_sil24 0000:11:00.0: enabling bus mastering
> [  606.017741] scsi8 : sata_sil24
> [  606.019388] scsi9 : sata_sil24
> [  606.019898] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
> [  606.019902] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
> [  606.115003] ata9: controller in dubious state, performing PORT_RST
> [  608.327747] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
> [  608.427847] ata10: controller in dubious state, performing PORT_RST
> [  610.640619] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
> 
> 
> 
> 
> Finally, I am tempted to say that pciehp does not work at all under 3.9-rc1
> if the slot was occupied during boot. It does NOT contain the usual debug
> info spanning several lines and it only said:
> 
> [    2.109629] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
> [    2.110225] pciehp: pcie_port_service_register = 0
> [    2.110226] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
> 
> If that is intentional the driver should complain loudly. Please educate me
> what those "[virtual] Expansion ROM's" were in lspci above and whether those
> "[disabled]" memory ranges relate to that as well. If the card is not thought
> to be present or just not recognized ... why is that printed in lspci at all?
> Similarly, what can you tell me if lspci output shows only:
> 
> Latency: 0
> 
> or even lacks the whole "Latency" line altoghether, is that also a disabled device?
> 
> I believe in working cases there is "Latency: 0, Cache Line Size: 64 bytes" instead.
> 
> 
> 
> Details and raw files at: http://195.113.57.32/~mmokrejs/tmp/3.9-rc1_disabled_MediaCard_reader_eSATA_coldplugged.tar.bz2
> 
> To inspect the incremental diffs of lspci output I used:
> 
> prev='/dev/null'; ls -latr lspci_* | awk '{print $9}' | while read cur; do diff -u -w $prev $cur | less; prev=$cur; done
> 
> Thank you,
> Martin
> --
> 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
> 
> .
> 


-- 
Thanks!
Yijing


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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-13  2:42 ` Yijing Wang
@ 2013-03-14  0:05   ` Martin Mokrejs
  2013-03-14  0:16     ` Martin Mokrejs
                       ` (2 more replies)
  0 siblings, 3 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-14  0:05 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi Yjing,

Yijing Wang wrote:
> Hi Martin,
>    From your diff info, maybe we can analyze this problem step by step.
> 1、According to your diff info about first eject and first hot add, the pci device 11:00.0 Mass storage
>    controller was removed and was added ok at pci device level;

I can't confirm that it it was removed fine but looks like hot re-inserting the
card somewhat returns us to the anticipated state. Would I have hot added completely
different card I believe lspci would report mixture of both both, the cold-plugged-one
and of the hot-plugged one. Please see the thread
3.8.2: stale pci device info for a previously inserted express card
for what I mean (different kernel and acpiphp while here we are talking 3.9-rc1 and
pciehp but still I believe same would happen.)

> 2、The main problem is 11:00.0 Mass storage controller can not bind its driver normally, right?

Yes, and you can squeeze out few words from the driver only if you rmmod it.
Therefore I conclude the sata_sil24 cannot unbind the device and only during
rmmod it realizes it is gone. What pci driver failed to report the card was
ejected I don't know but seems per point 1. above that we agree that PresDet
worked fine (cold boot with the card inserted). So is sata_sil24 at fault?
Nobody commented on those express slot status values: 0000, 0040, 0100, 0108, 0138, 0140, 0148.
What are they?

> 3、According to diff info about first hotadd and coldplug, the mainly diff is
>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> +       Region 4: I/O ports at c000 [disabled] [size=128]
> 
> and
> MaxReadReq 4096 bytes ----> MaxReadReq 512 bytes
> 
> So maybe we can try to find why the memory range was disabled after hot add.
> 
> Martin, can you provide  /proc/iomem info when the system bootup, after first eject and
> first hot-add?

Not a single change, look:

# diff -u -w iomem.txt iomem_ejected.txt
# diff -u -w iomem_ejected.txt iomem_ejected_and_reinserted.txt

At this moment lspci reports:

# diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected_and_reinserted.txt
--- lspci_vvvxxx.txt    2013-03-14 00:23:25.000000000 +0100
+++ lspci_vvvxxx_ejected_and_reinserted.txt     2013-03-14 00:27:26.000000000 +0100
@@ -437,7 +437,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -457,7 +457,7 @@
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -476,11 +476,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -795,14 +795,13 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
+       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: 64 bytes
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
@@ -813,29 +812,29 @@
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
+                       MaxPayload 128 bytes, MaxReadReq 512 bytes
+               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
+00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
+10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
+20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
+70: 10 00 11 00 03 00 00 00 00 20 00 00 11 f4 03 00
 80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
#


I had to rmmod the driver to trigger at least some change:

# diff -u -w iomem_ejected_and_reinserted.txt iomem_ejected_and_reinserted_rmmod_sata_sil24.txt
--- iomem_ejected_and_reinserted.txt    2013-03-14 00:27:38.000000000 +0100
+++ iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
@@ -44,9 +44,7 @@
   f6c00000-f7cfffff : PCI Bus 0000:11
     f6c00000-f6c7ffff : 0000:11:00.0
     f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
     f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
# diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt
--- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
+++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
@@ -34,17 +34,12 @@
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
-  f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
   f6800000-f6bfffff : 0000:00:02.0
-  f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-    f6c84000-f6c8407f : 0000:11:00.0
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
#

accompanied lspci output showing what happened during rmmod sata_sil24:

# diff -u -w lspci_vvvxxx_ejected_and_reinserted.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt 
--- lspci_vvvxxx_ejected_and_reinserted.txt     2013-03-14 00:27:26.000000000 +0100
+++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
@@ -451,12 +451,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -473,19 +473,19 @@
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
+               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
 10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
-a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
+a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
@@ -793,54 +793,22 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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-
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
-       Region 4: I/O ports at c000 [disabled] [size=128]
-       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
-       Kernel driver in use: sata_sil24
-00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
-10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
-20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
-40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
-60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 20 00 00 11 f4 03 00
-80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
-90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 

Please note the funny broken:

+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

Who is still thinking the card is in the system? Didn't we agree above that PresDet
worked fine in this particular setup?

The rmmod sata_sil24 causes that in dmesg is every second repeatedly this, until forever:

--- dmesg_ejected.txt   2013-03-14 00:25:59.000000000 +0100
+++ dmesg_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:47.000000000 +0100
@@ -819,3 +819,277 @@
 [   37.426390] r8169 0000:05:00.0 eth0: link up
 [   38.686210] r8169 0000:05:00.0 eth0: link down
 [   42.551461] r8169 0000:05:00.0 eth0: link up
+[  432.686232] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  432.695763] pcieport 0000:00:1c.7: PME# enabled
+[  432.956104] pcieport 0000:00:1c.7: PME# disabled
+[  432.965896] pcieport 0000:00:1c.7: PME# enabled
+[  433.006119] pcieport 0000:00:1c.7: PME# disabled
+[  433.016047] pcieport 0000:00:1c.7: PME# enabled
+[  434.037451] pcieport 0000:00:1c.7: PME# disabled
+[  434.047152] pcieport 0000:00:1c.7: PME# enabled
+[  434.087516] pcieport 0000:00:1c.7: PME# disabled
[cut]



I should have tried below to remove 11.0 instead of 1.c7 but it demonstrates
that one can get rid of the partial eSATA card entry from lspci output:

# echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove

That stops the PME# storm:

+[  611.843285] pcieport 0000:00:1c.7: PME# disabled
+[  611.853086] pcieport 0000:00:1c.7: PME# enabled
+[  611.893364] pcieport 0000:00:1c.7: PME# disabled
+[  611.903283] pcieport 0000:00:1c.7: PME# enabled
+[  612.183893] pci 0000:11:00.0: PME# disabled
+[  612.184789] pcieport 0000:00:1c.7: PME# disabled
+[  612.203753] pcieport 0000:00:1c.7: PME# disabled
+[  612.205521] pci_bus 0000:11: busn_res: [bus 11-16] is released

and releases the iomem's:

# diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt 
--- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
+++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
@@ -34,17 +34,12 @@
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
-  f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
   f6800000-f6bfffff : 0000:00:02.0
-  f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-    f6c84000-f6c8407f : 0000:11:00.0
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
#

The accompanying diff in lspci:

# diff -u -w lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt 
--- lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
+++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt        2013-03-14 00:32:20.000000000 +0100
@@ -429,69 +429,6 @@
 e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
 
-00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
-       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: 64 bytes
-       Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
-       I/O behind bridge: 0000c000-0000dfff
-       Memory behind bridge: f6c00000-f7cfffff
-       Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       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: [40] Express (v2) Root Port (Slot+), MSI 00
-               DevCap: MaxPayload 128 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 128 bytes
-               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
-               LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
-                       ClockPM- Surprise- LLActRep+ BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
-               SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
-                       Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
-               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
-                       Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
-                       Changed: MRL- PresDet- LinkState+
-               RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
-               RootCap: CRSVisible-
-               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
-               DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
-               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
-               LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
-                        Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
-                        Compliance De-emphasis: -6dB
-               LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
-                        EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
-       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
-               Address: 00000000  Data: 0000
-       Capabilities: [90] Subsystem: Dell Device 04b3
-       Capabilities: [a0] Power Management version 2
-               Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
-               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
-       Kernel driver in use: pcieport
-00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
-20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
-30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
-40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
-60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
-70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
-80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
-a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
-e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
-
 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
        Subsystem: Dell Device 04b3
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
@@ -793,22 +730,3 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
-00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-
#

> 
> I suspect the driver release its MMIO successfully after first eject.

I did not think so and hope I convinced you that this is NOT the case. ;-)

Thanks for you time on this, we will find it! ;)
Martin

> 
> Thanks!
> Yijing.
> 
> 
> On 2013/3/12 9:00, Martin Mokrejs wrote:
>> Hi,
>>   I cold-booted a computer with the card inserted before power-on and collected
>> lspci output and express card slot status every second. Then I tried eject and
>> hotplug inserts and it appearts the card is not detected, actually maybe pciehp
>> is not even suppoosed to work in this case as the slot was occupied during boot.
>> But let me come to it later.
>>
>> I noted the following on the very first eject of the so far cold-plugged card
>> that lspci properly reports PresDet change on the Changed: line. The only time
>> I ever saw it. ;-)
>> However, for any following inserts and ejects the value is not updated but slot
>> status bits are updated. I had BIOS defaults loaded and additionally, disabled
>> MediaCardReader.
>>
>> The slot status bits read by setpci were changing in this path:
>> card in slot and cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100
>>
>>
>>
>> --- lspci_loop.23:58:50 2013-03-11 23:58:50.000000000 +0100
>> +++ lspci_loop.23:58:51 2013-03-11 23:58:51.000000000 +0100
>> @@ -439,7 +439,7 @@
>>         I/O behind bridge: 0000c000-0000dfff
>>         Memory behind bridge: f6c00000-f7cfffff
>>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
>> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
>> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
>> @@ -453,13 +453,13 @@
>>                         ClockPM- Surprise- LLActRep+ BwNot-
>>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
>> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>> -                       Changed: MRL- PresDet- LinkState-
>> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>> +                       Changed: MRL- PresDet+ LinkState+
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
>> @@ -478,11 +478,11 @@
>>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>>         Kernel driver in use: pcieport
>>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
>> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
>> +10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
>> +50: 40 00 11 50 60 b2 3c 00 00 00 08 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> @@ -490,7 +490,7 @@
>>  a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
>>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
>> +d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 40
>>  e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
>>  
>> @@ -797,55 +797,23 @@
>>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  
>> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
>> -       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: 64 bytes
>> -       Interrupt: pin A routed to IRQ 19
>> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
>> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
>> -       Region 4: I/O ports at c000 [size=128]
>> -       Expansion ROM at f6c00000 [disabled] [size=512K]
>> -       Capabilities: [54] 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=1 PME-
>> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
>> -               Address: 0000000000000000  Data: 0000
>> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
>> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
>> -                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
>> -               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>> -                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
>> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
>> -               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
>> -               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>> -                       ClockPM- Surprise- LLActRep- BwNot-
>> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>> -       Capabilities: [100 v1] Advanced Error Reporting
>> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
>> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> +       !!! Unknown header type 7f
>>         Kernel driver in use: sata_sil24
>> -00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
>> -10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
>> -20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> -30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
>> -40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>> -60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
>> -80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>> -90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> --- lspci_loop.23:58:51 2013-03-11 23:58:51.000000000 +0100
>> +++ lspci_loop.23:58:52 2013-03-11 23:58:52.000000000 +0100
>> @@ -459,7 +459,7 @@
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>> -                       Changed: MRL- PresDet+ LinkState+
>> +                       Changed: MRL- PresDet- LinkState+
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
>> @@ -482,7 +482,7 @@
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 50 60 b2 3c 00 00 00 08 01 00 00 00 00
>> +50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> @@ -490,7 +490,7 @@
>>  a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
>>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 40
>> +d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
>>  e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
>> --- lspci_loop.23:58:58 2013-03-11 23:58:58.000000000 +0100
>> +++ lspci_loop.23:58:59 2013-03-11 23:58:59.000000000 +0100
>> @@ -101,7 +101,7 @@
>>         Capabilities: [98] PCI Advanced Features
>>                 AFCap: TP+ FLR+
>>                 AFCtrl: FLR-
>> -               AFStatus: TP-
>> +               AFStatus: TP+
>>         Kernel driver in use: ehci-pci
>>  00: 86 80 2d 1c 06 00 90 02 05 20 03 0c 00 00 00 00
>>  10: 00 80 f0 f7 00 00 00 00 00 00 00 00 00 00 00 00
>> --- lspci_loop.23:58:59 2013-03-11 23:58:59.000000000 +0100
>> +++ lspci_loop.23:59:00 2013-03-11 23:59:00.000000000 +0100
>> @@ -101,7 +101,7 @@
>>         Capabilities: [98] PCI Advanced Features
>>                 AFCap: TP+ FLR+
>>                 AFCtrl: FLR-
>> -               AFStatus: TP+
>> +               AFStatus: TP-
>>         Kernel driver in use: ehci-pci
>>  00: 86 80 2d 1c 06 00 90 02 05 20 03 0c 00 00 00 00
>>  10: 00 80 f0 f7 00 00 00 00 00 00 00 00 00 00 00 00
>>
>>
>>
>> Below is the first hotplug of the card.
>>
>> --- lspci_loop.23:59:09 2013-03-11 23:59:09.000000000 +0100
>> +++ lspci_loop.23:59:10 2013-03-11 23:59:10.000000000 +0100
>> @@ -453,12 +453,12 @@
>>                         ClockPM- Surprise- LLActRep+ BwNot-
>>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
>>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>>                         Changed: MRL- PresDet- LinkState+
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>> @@ -482,7 +482,7 @@
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>> +50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> @@ -797,23 +797,54 @@
>>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  
>> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> -       !!! Unknown header type 7f
>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>> +       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
>> +       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-
>> +       Interrupt: pin A routed to IRQ 19
>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> +       Region 4: I/O ports at c000 [disabled] [size=128]
>> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>> +       Capabilities: [54] 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=1 PME-
>> +       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
>> +               Address: 0000000000000000  Data: 0000
>> +       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
>> +               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
>> +                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>> +                       ClockPM- Surprise- LLActRep- BwNot-
>> +               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>> +                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>> +       Capabilities: [100 v1] Advanced Error Reporting
>> +               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
>> +               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>> +               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>> +               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> +               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> +               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>>         Kernel driver in use: sata_sil24
>> -00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> -f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
>> +10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
>> +20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> +30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>> +40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>> +60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
>> +80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>> +90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> --- lspci_loop.23:59:15 2013-03-11 23:59:15.000000000 +0100
>> +++ lspci_loop.23:59:16 2013-03-11 23:59:16.000000000 +0100
>> @@ -519,7 +519,7 @@
>>  60: 20 20 ff 07 00 00 00 00 01 00 00 01 00 00 08 40
>>  70: 00 00 df 3f 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 00 00 80 00 11 88 0c 93 30 0d 00 24 00 00 00 00
>> -90: 00 00 00 00 00 00 00 00 13 00 06 03 00 00 00 00
>> +90: 00 00 00 00 00 00 00 00 13 00 06 03 00 01 00 00
>>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> --- lspci_loop.23:59:16 2013-03-11 23:59:16.000000000 +0100
>> +++ lspci_loop.23:59:17 2013-03-11 23:59:17.000000000 +0100
>> @@ -519,7 +519,7 @@
>>  60: 20 20 ff 07 00 00 00 00 01 00 00 01 00 00 08 40
>>  70: 00 00 df 3f 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 00 00 80 00 11 88 0c 93 30 0d 00 24 00 00 00 00
>> -90: 00 00 00 00 00 00 00 00 13 00 06 03 00 01 00 00
>> +90: 00 00 00 00 00 00 00 00 13 00 06 03 00 00 00 00
>>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>
>>
>> And later unplug of the hotplugged device:
>>
>> --- lspci_loop.23:59:18 2013-03-11 23:59:18.000000000 +0100
>> +++ lspci_loop.23:59:19 2013-03-11 23:59:19.000000000 +0100
>> @@ -453,12 +453,12 @@
>>                         ClockPM- Surprise- LLActRep+ BwNot-
>>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
>> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>>                         Changed: MRL- PresDet- LinkState+
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>> @@ -482,7 +482,7 @@
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>> +50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> @@ -797,54 +797,23 @@
>>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  
>> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
>> -       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-
>> -       Interrupt: pin A routed to IRQ 19
>> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> -       Region 4: I/O ports at c000 [disabled] [size=128]
>> -       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>> -       Capabilities: [54] 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=1 PME-
>> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
>> -               Address: 0000000000000000  Data: 0000
>> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
>> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
>> -                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>> -                       ClockPM- Surprise- LLActRep- BwNot-
>> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>> -       Capabilities: [100 v1] Advanced Error Reporting
>> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
>> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> +       !!! Unknown header type 7f
>>         Kernel driver in use: sata_sil24
>> -00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
>> -10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
>> -20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> -30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>> -40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>> -60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
>> -80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>> -90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>>
>>
>>
>>
>>
>> Already from other tests I realized a hotplugged eSATA has some "[virtual]
>> Expansion ROM". Here is a reasonably complete diff between a coldplugged
>> state of the same card and after a hotplug. In dmesg pciehp complained
>> upon its loading that Cache Line Size 64 is not supported so maybe the below
>> difference is a direct result of that? Similarly, MaxReadReq is different
>> and I bet the lines
>>
>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> +       Region 4: I/O ports at c000 [disabled] [size=128]
>>
>> actually mean the card is left disabled. Then, I am not surprised nothing
>> is shown upon its hotplug insert/eject in dmesg. ;-) In this particular setup
>> I don't think we are facing a PresDet issue. Either, the value is overwritten
>> by some other process, or the bug is somewhere else.
>>
>>
>> --- lspci_loop.23:58:26 2013-03-11 23:58:26.000000000 +0100
>> +++ lspci_loop.23:59:10 2013-03-11 23:59:10.000000000 +0100
>> @@ -439,7 +439,7 @@
>>         I/O behind bridge: 0000c000-0000dfff
>>         Memory behind bridge: f6c00000-f7cfffff
>>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
>> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
>> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
>> @@ -459,7 +459,7 @@
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>> -                       Changed: MRL- PresDet- LinkState-
>> +                       Changed: MRL- PresDet- LinkState+
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
>> @@ -478,11 +478,11 @@
>>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>>         Kernel driver in use: pcieport
>>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
>> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
>> +10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
>> +50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> @@ -799,14 +799,13 @@
>>  
>>  11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>>         Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
>> -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>> +       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: 64 bytes
>>         Interrupt: pin A routed to IRQ 19
>> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
>> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
>> -       Region 4: I/O ports at c000 [size=128]
>> -       Expansion ROM at f6c00000 [disabled] [size=512K]
>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> +       Region 4: I/O ports at c000 [disabled] [size=128]
>> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>>         Capabilities: [54] 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=1 PME-
>> @@ -817,7 +816,7 @@
>>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
>>                 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
>> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
>> +                       MaxPayload 128 bytes, MaxReadReq 512 bytes
>>                 DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
>>                 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>>                         ClockPM- Surprise- LLActRep- BwNot-
>> @@ -832,14 +831,14 @@
>>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>>                 AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>>         Kernel driver in use: sata_sil24
>> -00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
>> -10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
>> -20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> -30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
>> +00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
>> +10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
>> +20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> +30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>>  40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>>  60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
>> +70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
>>  80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>>  90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>
>>
>>
>> Sadly, although the very first eject was notified the sata_sila24 neither
>> did "release" the device nor did it complain that it suddenly disappeared.
>> That was so far always in dmesg output (like for example):
>>
>> [  251.632928] sata_sil24 0000:11:00.0: PME# disabled
>> [  251.636498] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
>>
>>
>> I re-plugged the card and ejected several times while the while loops
>> collecting lspci and slot_status via the setpci shell command harvested
>> data. Still, in dmesg there was nothing logged regarding card insert/eject.
>> Eventually, I tried rmmod sata_sil24 (did NOT need 'rmmod -f') and that
>> did log something new.
>>
>> [  529.571040] ata8.00: disabled
>> [  529.576365] sd 7:0:0:0: [sdb] Synchronizing SCSI cache
>> [  529.577202] sd 7:0:0:0: [sdb]  
>> [  529.577204] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
>> [  529.577205] sd 7:0:0:0: [sdb] Stopping disk
>> [  529.577251] sd 7:0:0:0: [sdb] START_STOP FAILED
>> [  529.577253] sd 7:0:0:0: [sdb]  
>> [  529.577254] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
>> [  529.578309] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
>> [  605.818905] sata_sil24 0000:11:00.0: version 1.1
>> [  605.818923] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
>> [  605.914722] sata_sil24 0000:11:00.0: failed to clear port RST
>> [  606.014860] sata_sil24 0000:11:00.0: failed to clear port RST
>> [  606.014882] sata_sil24 0000:11:00.0: enabling bus mastering
>> [  606.017741] scsi8 : sata_sil24
>> [  606.019388] scsi9 : sata_sil24
>> [  606.019898] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
>> [  606.019902] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
>> [  606.115003] ata9: controller in dubious state, performing PORT_RST
>> [  608.327747] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
>> [  608.427847] ata10: controller in dubious state, performing PORT_RST
>> [  610.640619] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
>>
>>
>>
>>
>> Finally, I am tempted to say that pciehp does not work at all under 3.9-rc1
>> if the slot was occupied during boot. It does NOT contain the usual debug
>> info spanning several lines and it only said:
>>
>> [    2.109629] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
>> [    2.110225] pciehp: pcie_port_service_register = 0
>> [    2.110226] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
>>
>> If that is intentional the driver should complain loudly. Please educate me
>> what those "[virtual] Expansion ROM's" were in lspci above and whether those
>> "[disabled]" memory ranges relate to that as well. If the card is not thought
>> to be present or just not recognized ... why is that printed in lspci at all?
>> Similarly, what can you tell me if lspci output shows only:
>>
>> Latency: 0
>>
>> or even lacks the whole "Latency" line altoghether, is that also a disabled device?
>>
>> I believe in working cases there is "Latency: 0, Cache Line Size: 64 bytes" instead.
>>
>>
>>
>> Details and raw files at: http://195.113.57.32/~mmokrejs/tmp/3.9-rc1_disabled_MediaCard_reader_eSATA_coldplugged.tar.bz2
>>
>> To inspect the incremental diffs of lspci output I used:
>>
>> prev='/dev/null'; ls -latr lspci_* | awk '{print $9}' | while read cur; do diff -u -w $prev $cur | less; prev=$cur; done
>>
>> Thank you,
>> Martin
>> --
>> 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] 41+ messages in thread

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-14  0:05   ` Martin Mokrejs
@ 2013-03-14  0:16     ` Martin Mokrejs
  2013-03-14  8:38     ` Yijing Wang
       [not found]     ` <51417C28.40402@huawei.com>
  2 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-14  0:16 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]

Martin Mokrejs wrote:
> Hi Yjing,
> 
> Yijing Wang wrote:
>> Hi Martin,
>>    From your diff info, maybe we can analyze this problem step by step.
>> 1、According to your diff info about first eject and first hot add, the pci device 11:00.0 Mass storage
>>    controller was removed and was added ok at pci device level;
> 
> I can't confirm that it it was removed fine but looks like hot re-inserting the
> card somewhat returns us to the anticipated state. Would I have hot added completely
> different card I believe lspci would report mixture of both both, the cold-plugged-one
> and of the hot-plugged one. Please see the thread
> 3.8.2: stale pci device info for a previously inserted express card
> for what I mean (different kernel and acpiphp while here we are talking 3.9-rc1 and
> pciehp but still I believe same would happen.)
> 
>> 2、The main problem is 11:00.0 Mass storage controller can not bind its driver normally, right?
> 
> Yes, and you can squeeze out few words from the driver only if you rmmod it.
> Therefore I conclude the sata_sil24 cannot unbind the device and only during
> rmmod it realizes it is gone. What pci driver failed to report the card was
> ejected I don't know but seems per point 1. above that we agree that PresDet
> worked fine (cold boot with the card inserted). So is sata_sil24 at fault?
> Nobody commented on those express slot status values: 0000, 0040, 0100, 0108, 0138, 0140, 0148.
> What are they?
> 
>> 3、According to diff info about first hotadd and coldplug, the mainly diff is
>>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>>> +       Region 4: I/O ports at c000 [disabled] [size=128]
>>
>> and
>> MaxReadReq 4096 bytes ----> MaxReadReq 512 bytes
>>
>> So maybe we can try to find why the memory range was disabled after hot add.
>>
>> Martin, can you provide  /proc/iomem info when the system bootup, after first eject and
>> first hot-add?
> 
> Not a single change, look:
> 
> # diff -u -w iomem.txt iomem_ejected.txt
> # diff -u -w iomem_ejected.txt iomem_ejected_and_reinserted.txt

You might be looking for a complete overview of allocated memory ranges, so I am attaching
dmesg from this stage (silently ejected and re-inserted card but effectively is exactly same
like what you see upon a coldboot with teh card loaded before poweron) and iomem.

I have a collection of lspci output's per every second if you want.

The slot status bits are shown here in a condensed form with just the changes:

00:25:14 SlotStatus 0040
00:25:15 SlotStatus 0100

00:26:45 SlotStatus 0100
00:26:46 SlotStatus 0148
00:26:47 SlotStatus 0140

00:28:17 SlotStatus 0140
00:28:18 SlotStatus 0140
00:28:20 SlotStatus 0100
00:28:21 SlotStatus 0100

and after the 'echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove' command of setpci
shell command complained it cannot read the value, of course.

[-- Attachment #2: dmesg_ejected_and_reinserted.txt --]
[-- Type: text/plain, Size: 54504 bytes --]

[    0.000000] Linux version 3.9.0-rc1-default (root@vostro) (gcc version 4.6.3 (Gentoo 4.6.3 p1.8, pie-0.5.2) ) #4 SMP Fri Mar 8 00:47:09 MET 2013
[    0.000000] Command line: root=/dev/sda5 pciehp.pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d3ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009d400-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000020200000-0x000000003fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000401fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040200000-0x00000000da4e4fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000da4e5000-0x00000000da527fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000da528000-0x00000000da792fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000da793000-0x00000000da966fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000da967000-0x00000000daa88fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000daa89000-0x00000000dad67fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000dad68000-0x00000000dafe7fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000dafe8000-0x00000000daffffff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000db800000-0x00000000df9fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041fdfffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.6 present.
[    0.000000] DMI: Dell Inc. Vostro 3550/, BIOS A11 08/03/2012
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] No AGP bridge found
[    0.000000] e820: last_pfn = 0x41fe00 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-CFFFF write-protect
[    0.000000]   D0000-E7FFF uncachable
[    0.000000]   E8000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask C00000000 write-back
[    0.000000]   1 base 400000000 mask FE0000000 write-back
[    0.000000]   2 base 0DB800000 mask FFF800000 uncachable
[    0.000000]   3 base 0DC000000 mask FFC000000 uncachable
[    0.000000]   4 base 0E0000000 mask FE0000000 uncachable
[    0.000000]   5 base 41FE00000 mask FFFE00000 uncachable
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000]   8 disabled
[    0.000000]   9 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820: update [mem 0xdb800000-0xffffffff] usable ==> reserved
[    0.000000] e820: last_pfn = 0xdaa89 max_arch_pfn = 0x400000000
[    0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[    0.000000] reserving inaccessible SNB gfx pages
[    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[    0.000000]  [mem 0x00000000-0x000fffff] page 4k
[    0.000000] BRK [0x02573000, 0x02573fff] PGTABLE
[    0.000000] BRK [0x02574000, 0x02574fff] PGTABLE
[    0.000000] BRK [0x02575000, 0x02575fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0x41fc00000-0x41fdfffff]
[    0.000000]  [mem 0x41fc00000-0x41fdfffff] page 2M
[    0.000000] BRK [0x02576000, 0x02576fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0x41c000000-0x41fbfffff]
[    0.000000]  [mem 0x41c000000-0x41fbfffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x400000000-0x41bffffff]
[    0.000000]  [mem 0x400000000-0x41bffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x00100000-0x1fffffff]
[    0.000000]  [mem 0x00100000-0x001fffff] page 4k
[    0.000000]  [mem 0x00200000-0x1fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x20200000-0x3fffffff]
[    0.000000]  [mem 0x20200000-0x3fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x40200000-0xda4e4fff]
[    0.000000]  [mem 0x40200000-0xda3fffff] page 2M
[    0.000000]  [mem 0xda400000-0xda4e4fff] page 4k
[    0.000000] BRK [0x02577000, 0x02577fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0xda528000-0xda792fff]
[    0.000000]  [mem 0xda528000-0xda792fff] page 4k
[    0.000000] init_memory_mapping: [mem 0xda967000-0xdaa88fff]
[    0.000000]  [mem 0xda967000-0xdaa88fff] page 4k
[    0.000000] init_memory_mapping: [mem 0x100000000-0x3ffffffff]
[    0.000000]  [mem 0x100000000-0x3ffffffff] page 2M
[    0.000000] ACPI: RSDP 00000000000f0410 00024 (v02   DELL)
[    0.000000] ACPI: XSDT 00000000dafe8078 00074 (v01 DELL    WN09    01072009 AMI  00010013)
[    0.000000] ACPI: FACP 00000000daff1d38 000F4 (v04   DELL     WN09 01072009 AMI  00010013)
[    0.000000] ACPI: DSDT 00000000dafe8180 09BB6 (v02   DELL     WN09 00000000 INTL 20051117)
[    0.000000] ACPI: FACS 00000000dafe3f80 00040
[    0.000000] ACPI: APIC 00000000daff1e30 00072 (v03   DELL     WN09 01072009 AMI  00010013)
[    0.000000] ACPI: MCFG 00000000daff1ea8 0003C (v01   DELL     WN09 01072009 MSFT 00000097)
[    0.000000] ACPI: SSDT 00000000daff1ee8 004B0 (v01 TrmRef PtidDevc 00001000 INTL 20091112)
[    0.000000] ACPI: SLIC 00000000daff2398 00176 (v01 DELL    WN09    01072009 AMI  00010013)
[    0.000000] ACPI: HPET 00000000daff2510 00038 (v01   DELL     WN09 01072009 AMI. 00000004)
[    0.000000] ACPI: SSDT 00000000daff2548 00846 (v01  PmRef  Cpu0Ist 00003000 INTL 20051117)
[    0.000000] ACPI: SSDT 00000000daff2d90 00996 (v01  PmRef    CpuPm 00003000 INTL 20051117)
[    0.000000] ACPI: DMAR 00000000daff3728 000E8 (v01 INTEL      SNB  00000001 INTL 00000001)
[    0.000000] ACPI: OSFR 00000000daff3810 00086 (v01 DELL    M08     07DC0803 ASL  00000061)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000041fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x41fdfffff]
[    0.000000]   NODE_DATA [mem 0x41fdc8000-0x41fdedfff]
[    0.000000]  [ffffea0000000000-ffffea00107fffff] PMD -> [ffff88040f400000-ffff88041f3fffff] on node 0
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00001000-0x00ffffff]
[    0.000000]   DMA32    [mem 0x01000000-0xffffffff]
[    0.000000]   Normal   [mem 0x100000000-0x41fdfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00001000-0x0009cfff]
[    0.000000]   node   0: [mem 0x00100000-0x1fffffff]
[    0.000000]   node   0: [mem 0x20200000-0x3fffffff]
[    0.000000]   node   0: [mem 0x40200000-0xda4e4fff]
[    0.000000]   node   0: [mem 0xda528000-0xda792fff]
[    0.000000]   node   0: [mem 0xda967000-0xdaa88fff]
[    0.000000]   node   0: [mem 0x100000000-0x41fdfffff]
[    0.000000] On node 0 totalpages: 4170254
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA zone: 156 pages reserved
[    0.000000]   DMA zone: 3996 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 13906 pages used for memmap
[    0.000000]   DMA32 zone: 889970 pages, LIFO batch:31
[    0.000000]   Normal zone: 51192 pages used for memmap
[    0.000000]   Normal zone: 3276288 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] enabled)
[    0.000000] ACPI: NR_CPUS/possible_cpus limit of 2 reached.  Processor 2/0x1 ignored.
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
[    0.000000] ACPI: NR_CPUS/possible_cpus limit of 2 reached.  Processor 3/0x3 ignored.
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[    0.000000] smpboot: 4 Processors exceeds NR_CPUS limit of 2
[    0.000000] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: 000000000009d000 - 000000000009e000
[    0.000000] PM: Registered nosave memory: 000000000009e000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 0000000020000000 - 0000000020200000
[    0.000000] PM: Registered nosave memory: 0000000040000000 - 0000000040200000
[    0.000000] PM: Registered nosave memory: 00000000da4e5000 - 00000000da528000
[    0.000000] PM: Registered nosave memory: 00000000da793000 - 00000000da967000
[    0.000000] PM: Registered nosave memory: 00000000daa89000 - 00000000dad68000
[    0.000000] PM: Registered nosave memory: 00000000dad68000 - 00000000dafe8000
[    0.000000] PM: Registered nosave memory: 00000000dafe8000 - 00000000db000000
[    0.000000] PM: Registered nosave memory: 00000000db000000 - 00000000db800000
[    0.000000] PM: Registered nosave memory: 00000000db800000 - 00000000dfa00000
[    0.000000] PM: Registered nosave memory: 00000000dfa00000 - 00000000f8000000
[    0.000000] PM: Registered nosave memory: 00000000f8000000 - 00000000fc000000
[    0.000000] PM: Registered nosave memory: 00000000fc000000 - 00000000fec00000
[    0.000000] PM: Registered nosave memory: 00000000fec00000 - 00000000fec01000
[    0.000000] PM: Registered nosave memory: 00000000fec01000 - 00000000fed00000
[    0.000000] PM: Registered nosave memory: 00000000fed00000 - 00000000fed04000
[    0.000000] PM: Registered nosave memory: 00000000fed04000 - 00000000fed1c000
[    0.000000] PM: Registered nosave memory: 00000000fed1c000 - 00000000fed20000
[    0.000000] PM: Registered nosave memory: 00000000fed20000 - 00000000fee00000
[    0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[    0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000ff000000
[    0.000000] PM: Registered nosave memory: 00000000ff000000 - 0000000100000000
[    0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices
[    0.000000] setup_percpu: NR_CPUS:2 nr_cpumask_bits:2 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 26 pages/cpu @ffff88041fa00000 s75776 r8192 d22528 u1048576
[    0.000000] pcpu-alloc: s75776 r8192 d22528 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 4104936
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: root=/dev/sda5 pciehp.pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
[    0.000000] PCIe ASPM is disabled
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] xsave: enabled xstate_bv 0x7, cntxt size 0x340
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Memory: 16329240k/17299456k available (6032k kernel code, 618440k absent, 351776k reserved, 3891k data, 972k init)
[    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	CONFIG_RCU_FANOUT set to non-default value of 32
[    0.000000] NR_IRQS:4352 nr_irqs:512 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 5855 kB
[    0.000000]  per task-struct memory footprint: 1920 bytes
[    0.000000] hpet clockevent registered
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.010000] tsc: Detected 2793.814 MHz processor
[    0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 5587.62 BogoMIPS (lpj=27938140)
[    0.000191] pid_max: default: 32768 minimum: 301
[    0.001833] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes)
[    0.004997] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.006386] Mount-cache hash table entries: 256
[    0.007988] CPU: Physical Processor ID: 0
[    0.008079] CPU: Processor Core ID: 0
[    0.008172] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.008324] mce: CPU supports 7 MCE banks
[    0.008427] CPU0: Thermal monitoring enabled (TM1)
[    0.008529] Last level iTLB entries: 4KB 512, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32
tlb_flushall_shift: 5
[    0.008831] Freeing SMP alternatives: 16k freed
[    0.008927] ACPI: Core revision 20130117
[    0.124487] ACPI: All ACPI Tables successfully acquired
[    0.249657] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.349887] smpboot: CPU0: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz (fam: 06, model: 2a, stepping: 07)
[    0.350157] TSC deadline timer enabled
[    0.350168] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, Intel PMU driver.
[    0.350475] perf_event_intel: PEBS disabled due to CPU errata, please upgrade microcode
[    0.350577] ... version:                3
[    0.350667] ... bit width:              48
[    0.350758] ... generic registers:      4
[    0.350849] ... value mask:             0000ffffffffffff
[    0.350942] ... max period:             000000007fffffff
[    0.351035] ... fixed-purpose events:   3
[    0.351124] ... event mask:             000000070000000f
[    0.352629] SMP alternatives: lockdep: fixing up alternatives
[    0.352736] smpboot: Booting Node   0, Processors  #1 OK
[    0.366080] Brought up 2 CPUs
[    0.366173] smpboot: Total of 2 processors activated (11175.25 BogoMIPS)
[    0.367954] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[    0.369171] devtmpfs: initialized
[    0.371321] PM: Registering ACPI NVS region [mem 0xda4e5000-0xda527fff] (274432 bytes)
[    0.371696] PM: Registering ACPI NVS region [mem 0xdad68000-0xdafe7fff] (2621440 bytes)
[    0.374619] xor: automatically using best checksumming function:
[    0.470351]    avx       : 19750.400 MB/sec
[    0.472019] regulator-dummy: no parameters
[    0.472921] NET: Registered protocol family 16
[    0.476258] ACPI: bus type pci registered
[    0.477209] dca service started, version 1.12.1
[    0.477496] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.477645] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.485146] PCI: Using configuration type 1 for base access
[    0.532895] bio: create slab <bio-0> at 0
[    0.700700] raid6: sse2x1    7611 MB/s
[    0.870945] raid6: sse2x2    9347 MB/s
[    1.041193] raid6: sse2x4   10667 MB/s
[    1.041194] raid6: using algorithm sse2x4 (10667 MB/s)
[    1.041195] raid6: using ssse3x2 recovery algorithm
[    1.041321] ACPI: Added _OSI(Module Device)
[    1.041422] ACPI: Added _OSI(Processor Device)
[    1.041522] ACPI: Added _OSI(3.0 _SCP Extensions)
[    1.041622] ACPI: Added _OSI(Processor Aggregator Device)
[    1.047385] ACPI: EC: Look up EC in DSDT
[    1.057686] ACPI: Executed 1 blocks of module-level executable AML code
[    1.148992] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    1.203997] ACPI: SSDT 00000000dad51698 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.207172] ACPI: Dynamic OEM Table Load:
[    1.207175] ACPI: SSDT           (null) 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.238946] ACPI: SSDT 00000000dad52a98 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.243751] ACPI: Dynamic OEM Table Load:
[    1.243753] ACPI: SSDT           (null) 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.283010] ACPI: SSDT 00000000dad50d98 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.285587] ACPI: Dynamic OEM Table Load:
[    1.285590] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.325546] ACPI: Interpreter enabled
[    1.325642] ACPI: (supports S0 S1ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
[    1.326030]  S3 S4 S5)
[    1.326111] ACPI: Using IOAPIC for interrupt routing
[    1.326673] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.657203] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    1.663288] acpi PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x19)
[    1.680058] PCI host bridge to bus 0000:00
[    1.680159] pci_bus 0000:00: root bus resource [bus 00-3e]
[    1.680260] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    1.680361] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    1.680463] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    1.680565] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff]
[    1.680667] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff]
[    1.680770] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff]
[    1.680873] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff]
[    1.680975] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff]
[    1.681077] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff]
[    1.681179] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff]
[    1.681281] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff]
[    1.681384] pci_bus 0000:00: scanning bus
[    1.681423] pci 0000:00:00.0: [8086:0104] type 00 class 0x060000
[    1.681431] pci 0000:00:00.0: calling quirk_mmio_always_on+0x0/0xa
[    1.683339] pci 0000:00:02.0: [8086:0126] type 00 class 0x030000
[    1.683355] pci 0000:00:02.0: reg 10: [mem 0xf6800000-0xf6bfffff 64bit]
[    1.683363] pci 0000:00:02.0: reg 18: [mem 0xe0000000-0xefffffff 64bit pref]
[    1.683369] pci 0000:00:02.0: reg 20: [io  0xf000-0xf03f]
[    1.685169] pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000
[    1.685209] pci 0000:00:16.0: reg 10: [mem 0xf7f0a000-0xf7f0a00f 64bit]
[    1.685341] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    1.685374] pci 0000:00:16.0: PME# disabled
[    1.687284] pci 0000:00:1a.0: [8086:1c2d] type 00 class 0x0c0320
[    1.687319] pci 0000:00:1a.0: reg 10: [mem 0xf7f08000-0xf7f083ff]
[    1.687478] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    1.687483] pci 0000:00:1a.0: PME# disabled
[    1.707586] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    1.708260] pci 0000:00:1b.0: [8086:1c20] type 00 class 0x040300
[    1.708292] pci 0000:00:1b.0: reg 10: [mem 0xf7f00000-0xf7f03fff 64bit]
[    1.708441] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    1.708447] pci 0000:00:1b.0: PME# disabled
[    1.709684] pci 0000:00:1b.0: System wakeup disabled by ACPI
[    1.710282] pci 0000:00:1c.0: [8086:1c10] type 01 class 0x060400
[    1.710354] pci 0000:00:1c.0: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.710441] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.710447] pci 0000:00:1c.0: PME# disabled
[    1.711075] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    1.711663] pci 0000:00:1c.1: [8086:1c12] type 01 class 0x060400
[    1.711733] pci 0000:00:1c.1: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.711820] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    1.711826] pci 0000:00:1c.1: PME# disabled
[    1.712493] pci 0000:00:1c.1: System wakeup disabled by ACPI
[    1.713095] pci 0000:00:1c.3: [8086:1c16] type 01 class 0x060400
[    1.713166] pci 0000:00:1c.3: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.713251] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.713257] pci 0000:00:1c.3: PME# disabled
[    1.714010] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    1.714606] pci 0000:00:1c.4: [8086:1c18] type 01 class 0x060400
[    1.714676] pci 0000:00:1c.4: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.714762] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    1.714767] pci 0000:00:1c.4: PME# disabled
[    1.715563] pci 0000:00:1c.4: System wakeup disabled by ACPI
[    1.716161] pci 0000:00:1c.7: [8086:1c1e] type 01 class 0x060400
[    1.716231] pci 0000:00:1c.7: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.716318] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
[    1.716323] pci 0000:00:1c.7: PME# disabled
[    1.717447] pci 0000:00:1c.7: System wakeup disabled by ACPI
[    1.719375] pci 0000:00:1d.0: [8086:1c26] type 00 class 0x0c0320
[    1.719410] pci 0000:00:1d.0: reg 10: [mem 0xf7f07000-0xf7f073ff]
[    1.719570] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    1.719576] pci 0000:00:1d.0: PME# disabled
[    1.740754] pci 0000:00:1d.0: System wakeup disabled by ACPI
[    1.741381] pci 0000:00:1f.0: [8086:1c4b] type 00 class 0x060100
[    1.742114] pci 0000:00:1f.2: [8086:1c03] type 00 class 0x010601
[    1.742153] pci 0000:00:1f.2: reg 10: [io  0xf0b0-0xf0b7]
[    1.742168] pci 0000:00:1f.2: reg 14: [io  0xf0a0-0xf0a3]
[    1.742183] pci 0000:00:1f.2: reg 18: [io  0xf090-0xf097]
[    1.742198] pci 0000:00:1f.2: reg 1c: [io  0xf080-0xf083]
[    1.742214] pci 0000:00:1f.2: reg 20: [io  0xf060-0xf07f]
[    1.742229] pci 0000:00:1f.2: reg 24: [mem 0xf7f06000-0xf7f067ff]
[    1.742328] pci 0000:00:1f.2: PME# supported from D3hot
[    1.742334] pci 0000:00:1f.2: PME# disabled
[    1.743971] pci 0000:00:1f.3: [8086:1c22] type 00 class 0x0c0500
[    1.744001] pci 0000:00:1f.3: reg 10: [mem 0xf7f05000-0xf7f050ff 64bit]
[    1.744042] pci 0000:00:1f.3: reg 20: [io  0xf040-0xf05f]
[    1.745703] pci_bus 0000:00: fixups for bus
[    1.745707] pci 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
[    1.746149] pci_bus 0000:03: scanning bus
[    1.746153] pci_bus 0000:03: fixups for bus
[    1.746155] pci 0000:00:1c.0: PCI bridge to [bus 03-04]
[    1.746264] pci_bus 0000:03: bus scan returning with max=03
[    1.746270] pci 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
[    1.746710] pci_bus 0000:05: scanning bus
[    1.746760] pci 0000:05:00.0: [10ec:8168] type 00 class 0x020000
[    1.746788] pci 0000:05:00.0: reg 10: [io  0xe000-0xe0ff]
[    1.746837] pci 0000:05:00.0: reg 18: [mem 0xf1104000-0xf1104fff 64bit pref]
[    1.746867] pci 0000:05:00.0: reg 20: [mem 0xf1100000-0xf1103fff 64bit pref]
[    1.747007] pci 0000:05:00.0: supports D1 D2
[    1.747008] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.747015] pci 0000:05:00.0: PME# disabled
[    1.747295] pci 0000:05:00.0: System wakeup disabled by ACPI
[    1.747884] pci_bus 0000:05: fixups for bus
[    1.747886] pci 0000:00:1c.1: PCI bridge to [bus 05-06]
[    1.747985] pci 0000:00:1c.1:   bridge window [io  0xe000-0xefff]
[    1.747998] pci 0000:00:1c.1:   bridge window [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.748000] pci_bus 0000:05: bus scan returning with max=05
[    1.748006] pci 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
[    1.748439] pci_bus 0000:09: scanning bus
[    1.748712] pci 0000:09:00.0: [8086:008a] type 00 class 0x028000
[    1.749005] pci 0000:09:00.0: reg 10: [mem 0xf7e00000-0xf7e01fff 64bit]
[    1.750614] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
[    1.750665] pci 0000:09:00.0: PME# disabled
[    1.751111] pci 0000:09:00.0: System wakeup disabled by ACPI
[    1.751702] pci_bus 0000:09: fixups for bus
[    1.751704] pci 0000:00:1c.3: PCI bridge to [bus 09-0a]
[    1.751806] pci 0000:00:1c.3:   bridge window [mem 0xf7e00000-0xf7efffff]
[    1.751815] pci_bus 0000:09: bus scan returning with max=09
[    1.751821] pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
[    1.752250] pci_bus 0000:0b: scanning bus
[    1.752303] pci 0000:0b:00.0: [104c:8241] type 00 class 0x0c0330
[    1.752340] pci 0000:0b:00.0: reg 10: [mem 0xf7d00000-0xf7d0ffff 64bit]
[    1.752369] pci 0000:0b:00.0: reg 18: [mem 0xf7d10000-0xf7d11fff 64bit]
[    1.752533] pci 0000:0b:00.0: supports D1 D2
[    1.752534] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.752541] pci 0000:0b:00.0: PME# disabled
[    1.752792] pci 0000:0b:00.0: System wakeup disabled by ACPI
[    1.753387] pci_bus 0000:0b: fixups for bus
[    1.753389] pci 0000:00:1c.4: PCI bridge to [bus 0b-0c]
[    1.753490] pci 0000:00:1c.4:   bridge window [mem 0xf7d00000-0xf7dfffff]
[    1.753498] pci_bus 0000:0b: bus scan returning with max=0b
[    1.753504] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
[    1.753935] pci_bus 0000:11: scanning bus
[    1.753989] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[    1.754032] pci 0000:11:00.0: reg 10: [mem 0xf6c84000-0xf6c8407f 64bit]
[    1.754065] pci 0000:11:00.0: reg 18: [mem 0xf6c80000-0xf6c83fff 64bit]
[    1.754087] pci 0000:11:00.0: reg 20: [io  0xc000-0xc07f]
[    1.754128] pci 0000:11:00.0: reg 30: [mem 0xf6c00000-0xf6c7ffff pref]
[    1.754243] pci 0000:11:00.0: supports D1 D2
[    1.754891] pci_bus 0000:11: fixups for bus
[    1.754893] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[    1.754990] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
[    1.754996] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
[    1.755005] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.755007] pci_bus 0000:11: bus scan returning with max=11
[    1.755013] pci 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
[    1.755022] pci 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
[    1.755031] pci 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
[    1.755041] pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
[    1.755050] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
[    1.755057] pci_bus 0000:00: bus scan returning with max=16
[    1.755058] ACPI _OSC control for PCIe not granted, disabling ASPM
[    1.762262] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.764217] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.766170] ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 10 11 12 14 15)
[    1.768121] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.770057] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.772070] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.774091] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.776049] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.778821] ACPI: Enabled 4 GPEs in block 00 to 3F
[    1.778840] acpi root: \_SB_.PCI0 notify handler is installed
[    1.779011] Found 1 acpi root devices
[    1.781095] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    1.781201] vgaarb: loaded
[    1.781290] vgaarb: bridge control possible 0000:00:02.0
[    1.787518] SCSI subsystem initialized
[    1.787614] ACPI: bus type scsi registered
[    1.788227] libata version 3.00 loaded.
[    1.789516] media: Linux media interface: v0.10
[    1.789807] Linux video capture interface: v2.00
[    1.790594] EDAC MC: Ver: 3.0.0
[    1.794371] wmi: Mapper loaded
[    1.794820] Advanced Linux Sound Architecture Driver Initialized.
[    1.794915] PCI: Using ACPI for IRQ routing
[    1.798765] PCI: pci_cache_line_size set to 64 bytes
[    1.798776] pci 0000:00:02.0: BAR 0: reserving [mem 0xf6800000-0xf6bfffff flags 0x140204] (d=0, p=0)
[    1.798778] pci 0000:00:02.0: BAR 2: reserving [mem 0xe0000000-0xefffffff flags 0x14220c] (d=0, p=0)
[    1.798780] pci 0000:00:02.0: BAR 4: reserving [io  0xf000-0xf03f flags 0x40101] (d=0, p=0)
[    1.798785] pci 0000:00:16.0: BAR 0: reserving [mem 0xf7f0a000-0xf7f0a00f flags 0x140204] (d=0, p=0)
[    1.798789] pci 0000:00:1a.0: BAR 0: reserving [mem 0xf7f08000-0xf7f083ff flags 0x40200] (d=0, p=0)
[    1.798794] pci 0000:00:1b.0: BAR 0: reserving [mem 0xf7f00000-0xf7f03fff flags 0x140204] (d=0, p=0)
[    1.798803] pci 0000:05:00.0: BAR 0: reserving [io  0xe000-0xe0ff flags 0x40101] (d=0, p=0)
[    1.798805] pci 0000:05:00.0: BAR 2: reserving [mem 0xf1104000-0xf1104fff flags 0x14220c] (d=0, p=0)
[    1.798807] pci 0000:05:00.0: BAR 4: reserving [mem 0xf1100000-0xf1103fff flags 0x14220c] (d=0, p=0)
[    1.798839] pci 0000:09:00.0: BAR 0: reserving [mem 0xf7e00000-0xf7e01fff flags 0x140204] (d=0, p=0)
[    1.798848] pci 0000:0b:00.0: BAR 0: reserving [mem 0xf7d00000-0xf7d0ffff flags 0x140204] (d=0, p=0)
[    1.798850] pci 0000:0b:00.0: BAR 2: reserving [mem 0xf7d10000-0xf7d11fff flags 0x140204] (d=0, p=0)
[    1.798858] pci 0000:11:00.0: BAR 0: reserving [mem 0xf6c84000-0xf6c8407f flags 0x140204] (d=0, p=0)
[    1.798860] pci 0000:11:00.0: BAR 2: reserving [mem 0xf6c80000-0xf6c83fff flags 0x140204] (d=0, p=0)
[    1.798862] pci 0000:11:00.0: BAR 4: reserving [io  0xc000-0xc07f flags 0x40101] (d=0, p=0)
[    1.798866] pci 0000:00:1d.0: BAR 0: reserving [mem 0xf7f07000-0xf7f073ff flags 0x40200] (d=0, p=0)
[    1.798873] pci 0000:00:1f.2: BAR 0: reserving [io  0xf0b0-0xf0b7 flags 0x40101] (d=0, p=0)
[    1.798875] pci 0000:00:1f.2: BAR 1: reserving [io  0xf0a0-0xf0a3 flags 0x40101] (d=0, p=0)
[    1.798877] pci 0000:00:1f.2: BAR 2: reserving [io  0xf090-0xf097 flags 0x40101] (d=0, p=0)
[    1.798879] pci 0000:00:1f.2: BAR 3: reserving [io  0xf080-0xf083 flags 0x40101] (d=0, p=0)
[    1.798881] pci 0000:00:1f.2: BAR 4: reserving [io  0xf060-0xf07f flags 0x40101] (d=0, p=0)
[    1.798883] pci 0000:00:1f.2: BAR 5: reserving [mem 0xf7f06000-0xf7f067ff flags 0x40200] (d=0, p=0)
[    1.798887] pci 0000:00:1f.3: BAR 0: reserving [mem 0xf7f05000-0xf7f050ff flags 0x140204] (d=0, p=0)
[    1.798889] pci 0000:00:1f.3: BAR 4: reserving [io  0xf040-0xf05f flags 0x40101] (d=0, p=0)
[    1.798956] e820: reserve RAM buffer [mem 0x0009d400-0x0009ffff]
[    1.798977] e820: reserve RAM buffer [mem 0xda4e5000-0xdbffffff]
[    1.798983] e820: reserve RAM buffer [mem 0xda793000-0xdbffffff]
[    1.798992] e820: reserve RAM buffer [mem 0xdaa89000-0xdbffffff]
[    1.799000] e820: reserve RAM buffer [mem 0x41fe00000-0x41fffffff]
[    1.800539] Bluetooth: Core ver 2.16
[    1.800791] NET: Registered protocol family 31
[    1.800883] Bluetooth: HCI device and connection manager initialized
[    1.801000] Bluetooth: HCI socket layer initialized
[    1.801104] Bluetooth: L2CAP socket layer initialized
[    1.801237] Bluetooth: SCO socket layer initialized
[    1.802296] cfg80211: Calling CRDA to update world regulatory domain
[    1.803002] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    1.803448] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    1.805562] Switching to clocksource hpet
[    1.806293] pnp: PnP ACPI init
[    1.806486] ACPI: bus type pnp registered
[    1.806809] pnp 00:00: [dma 4]
[    1.807163] pnp 00:00: Plug and Play ACPI device, IDs PNP0200 (active)
[    1.807605] pnp 00:01: Plug and Play ACPI device, IDs INT0800 (active)
[    1.809494] pnp 00:02: Plug and Play ACPI device, IDs PNP0103 (active)
[    1.810133] system 00:03: [io  0x0680-0x069f] has been reserved
[    1.810242] system 00:03: [io  0x1000-0x100f] has been reserved
[    1.810351] system 00:03: [io  0xffff] has been reserved
[    1.810458] system 00:03: [io  0xffff] has been reserved
[    1.810565] system 00:03: [io  0x0400-0x0453] has been reserved
[    1.810672] system 00:03: [io  0x0458-0x047f] has been reserved
[    1.810781] system 00:03: [io  0x0500-0x057f] has been reserved
[    1.810889] system 00:03: [io  0x164e-0x164f] has been reserved
[    1.810986] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.811440] pnp 00:04: Plug and Play ACPI device, IDs PNP0b00 (active)
[    1.812324] system 00:05: [io  0x0454-0x0457] has been reserved
[    1.812422] system 00:05: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    1.812863] pnp 00:06: Plug and Play ACPI device, IDs PNP0c04 (active)
[    1.813516] system 00:07: [io  0x04d0-0x04d1] has been reserved
[    1.813626] system 00:07: [mem 0xfe800000-0xfe802fff] has been reserved
[    1.813723] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.814264] pnp 00:08: Plug and Play ACPI device, IDs DLL04b3 SYN0600 SYN0002 PNP0f13 (active)
[    1.814818] pnp 00:09: Plug and Play ACPI device, IDs PNP0303 (active)
[    1.819742] system 00:0a: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    1.819851] system 00:0a: [mem 0xfed10000-0xfed17fff] has been reserved
[    1.819959] system 00:0a: [mem 0xfed18000-0xfed18fff] has been reserved
[    1.820078] system 00:0a: [mem 0xfed19000-0xfed19fff] has been reserved
[    1.820189] system 00:0a: [mem 0xf8000000-0xfbffffff] has been reserved
[    1.820300] system 00:0a: [mem 0xfed20000-0xfed3ffff] has been reserved
[    1.820411] system 00:0a: [mem 0xfed90000-0xfed93fff] has been reserved
[    1.820522] system 00:0a: [mem 0xfed45000-0xfed8ffff] has been reserved
[    1.820632] system 00:0a: [mem 0xff000000-0xffffffff] has been reserved
[    1.820754] system 00:0a: [mem 0xfee00000-0xfeefffff] could not be reserved
[    1.820866] system 00:0a: [mem 0xdfa00000-0xdfa00fff] has been reserved
[    1.820965] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.822456] pnp 00:0b: Plug and Play ACPI device, IDs SMO8800 (active)
[    1.825391] system 00:0c: [mem 0x20000000-0x201fffff] has been reserved
[    1.825502] system 00:0c: [mem 0x40000000-0x401fffff] has been reserved
[    1.825601] system 00:0c: Plug and Play ACPI device, IDs PNP0c01 (active)
[    1.827529] pnp: PnP ACPI: found 13 devices
[    1.827620] ACPI: ACPI bus type pnp unregistered
[    1.827712] INFO_MDMA: LNW DMA Driver Version 1.1.0
[    1.860298] pci 0000:00:1c.0: PCI bridge to [bus 03-04]
[    1.860410] pci 0000:00:1c.1: PCI bridge to [bus 05-06]
[    1.860506] pci 0000:00:1c.1:   bridge window [io  0xe000-0xefff]
[    1.860611] pci 0000:00:1c.1:   bridge window [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.860716] pci 0000:00:1c.3: PCI bridge to [bus 09-0a]
[    1.860815] pci 0000:00:1c.3:   bridge window [mem 0xf7e00000-0xf7efffff]
[    1.860921] pci 0000:00:1c.4: PCI bridge to [bus 0b-0c]
[    1.861021] pci 0000:00:1c.4:   bridge window [mem 0xf7d00000-0xf7dfffff]
[    1.861128] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[    1.861224] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
[    1.861324] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
[    1.861424] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.869156] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7]
[    1.869158] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff]
[    1.869160] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[    1.869161] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000d3fff]
[    1.869163] pci_bus 0000:00: resource 8 [mem 0x000d4000-0x000d7fff]
[    1.869164] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000dbfff]
[    1.869166] pci_bus 0000:00: resource 10 [mem 0x000dc000-0x000dffff]
[    1.869168] pci_bus 0000:00: resource 11 [mem 0x000e0000-0x000e3fff]
[    1.869169] pci_bus 0000:00: resource 12 [mem 0x000e4000-0x000e7fff]
[    1.869171] pci_bus 0000:00: resource 13 [mem 0xdfa00000-0xfeafffff]
[    1.869172] pci_bus 0000:00: resource 14 [mem 0xfed40000-0xfed44fff]
[    1.869175] pci_bus 0000:05: resource 0 [io  0xe000-0xefff]
[    1.869176] pci_bus 0000:05: resource 2 [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.869178] pci_bus 0000:09: resource 1 [mem 0xf7e00000-0xf7efffff]
[    1.869180] pci_bus 0000:0b: resource 1 [mem 0xf7d00000-0xf7dfffff]
[    1.869181] pci_bus 0000:11: resource 0 [io  0xc000-0xdfff]
[    1.869183] pci_bus 0000:11: resource 1 [mem 0xf6c00000-0xf7cfffff]
[    1.869184] pci_bus 0000:11: resource 2 [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.869402] NET: Registered protocol family 2
[    1.870473] TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
[    1.871182] TCP bind hash table entries: 65536 (order: 10, 4194304 bytes)
[    1.874839] TCP: Hash tables configured (established 131072 bind 65536)
[    1.875031] TCP: reno registered
[    1.875232] UDP hash table entries: 8192 (order: 8, 1310720 bytes)
[    1.876354] UDP-Lite hash table entries: 8192 (order: 8, 1310720 bytes)
[    1.877711] NET: Registered protocol family 1
[    1.878381] RPC: Registered named UNIX socket transport module.
[    1.878476] RPC: Registered udp transport module.
[    1.878568] RPC: Registered tcp transport module.
[    1.878661] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.878768] pci 0000:00:02.0: calling pci_fixup_video+0x0/0xa6
[    1.878771] pci 0000:00:02.0: Boot video device
[    1.878780] pci 0000:00:1a.0: calling quirk_usb_early_handoff+0x0/0x63d
[    2.007513] pci 0000:00:1d.0: calling quirk_usb_early_handoff+0x0/0x63d
[    2.127697] pci 0000:0b:00.0: calling quirk_usb_early_handoff+0x0/0x63d
[    2.128714] PCI: CLS 64 bytes, default 64
[    2.129062] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    2.129160] software IO TLB [mem 0xd64e5000-0xda4e5000] (64MB) mapped at [ffff8800d64e5000-ffff8800da4e4fff]
[    2.132575] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x1b
[    2.132700] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
[    2.133160] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    2.139473] sha1_ssse3: Using AVX optimized SHA-1 implementation
[    2.141385] audit: initializing netlink socket (disabled)
[    2.141538] type=2000 audit(1363220483.010:1): initialized
[    2.144564] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    2.185118] DLM installed
[    2.198782] msgmni has been set to 31893
[    2.203453] NET: Registered protocol family 38
[    2.203573] async_tx: api initialized (async)
[    2.203673] Key type asymmetric registered
[    2.203773] Asymmetric key parser 'x509' registered
[    2.204390] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    2.204497] io scheduler noop registered
[    2.204589] io scheduler deadline registered (default)
[    2.205343] io scheduler cfq registered
[    2.208332] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    2.208954] pciehp: pcie_port_service_register = 0
[    2.208955] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    2.209224] intel_idle: MWAIT substates: 0x21120
[    2.209225] intel_idle: v0.4 model 0x2A
[    2.209226] intel_idle: lapic_timer_reliable_states 0xffffffff
[    2.210510] ACPI: AC Adapter [AC] (on-line)
[    2.212202] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[    2.214446] ACPI: Lid Switch [LID0]
[    2.215061] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
[    2.215200] ACPI: Power Button [PWRB]
[    2.215899] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
[    2.216008] ACPI: Sleep Button [SBTN]
[    2.217619] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    2.217727] ACPI: Power Button [PWRF]
[    2.218975] ACPI: Requesting acpi_cpufreq
[    2.319932] thermal LNXTHERM:00: registered as thermal_zone0
[    2.320029] ACPI: Thermal Zone [THM] (67 C)
[    2.325735] GHES: HEST is not enabled!
[    2.325827] ERST DBG: ERST support is disabled.
[    2.325919] ioatdma: Intel(R) QuickData Technology Driver 4.00
[    2.428894] ACPI: Battery Slot [BAT0] (battery present)
[    2.504579] Non-volatile memory driver v1.3
[    2.504945] Linux agpgart interface v0.103
[    2.505222] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds).
[    2.505223] Hangcheck: Using getrawmonotonic().
[    2.514482] loop: module loaded
[    2.516098] ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 1 (20130117/utaddress-251)
[    2.516107] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.516265] ACPI Warning: 0x0000000000000540-0x000000000000054f SystemIO conflicts with Region \GPIO 1 (20130117/utaddress-251)
[    2.516272] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.516426] ACPI Warning: 0x0000000000000530-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20130117/utaddress-251)
[    2.516433] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.518654] ACPI Warning: 0x0000000000000500-0x000000000000052f SystemIO conflicts with Region \GPIO 1 (20130117/utaddress-251)
[    2.518662] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.518812] lpc_ich: Resource conflict(s) found affecting gpio_ich
[    2.520361] ahci 0000:00:1f.2: version 3.0
[    2.522344] ahci 0000:00:1f.2: irq 40 for MSI/MSI-X
[    2.522491] ahci: SSS flag set, parallel bus scan disabled
[    2.536990] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x31 impl SATA mode
[    2.537089] ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pio slum part ems sxs apst 
[    2.537240] ahci 0000:00:1f.2: setting latency timer to 64
[    2.586195] scsi0 : ahci
[    2.588203] scsi1 : ahci
[    2.589118] scsi2 : ahci
[    2.590050] scsi3 : ahci
[    2.590974] scsi4 : ahci
[    2.591897] scsi5 : ahci
[    2.592750] ata1: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06100 irq 40
[    2.592847] ata2: DUMMY
[    2.592936] ata3: DUMMY
[    2.593024] ata4: DUMMY
[    2.593113] ata5: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06300 irq 40
[    2.593210] ata6: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06380 irq 40
[    2.594669] tun: Universal TUN/TAP device driver, 1.6
[    2.594764] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.595332] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    2.596062] r8169 0000:05:00.0: enabling Mem-Wr-Inval
[    2.596348] r8169 0000:05:00.0: irq 41 for MSI/MSI-X
[    2.597681] r8169 0000:05:00.0 eth0: RTL8168e/8111e at 0xffffc9000183a000, 18:03:73:a0:6f:6a, XID 0c200000 IRQ 41
[    2.597831] r8169 0000:05:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    2.598251] VMware vmxnet3 virtual NIC driver - version 1.1.29.0-k-NAPI
[    2.599182] i8042: PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:PS2] at 0x60,0x64 irq 1,12
[    2.601939] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.602083] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.603477] mousedev: PS/2 mouse device common for all mice
[    2.606426] rtc_cmos 00:04: RTC can wake from S4
[    2.607923] rtc rtc0: rtc_cmos: dev (254:0)
[    2.607952] rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0
[    2.608105] rtc_cmos 00:04: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    2.608364] i2c /dev entries driver
[    2.610682] ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20130117/utaddress-251)
[    2.610690] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.611142] Driver for 1-wire Dallas network protocol.
[    2.612807] coretemp coretemp.0: TjMax is 100 degrees C
[    2.612849] coretemp coretemp.0: TjMax is 100 degrees C
[    2.612889] coretemp coretemp.0: TjMax is 100 degrees C
[    2.612920] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10
[    2.613117] iTCO_wdt: Found a Cougar Point TCO device (Version=2, TCOBASE=0x0460)
[    2.614162] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[    2.614410] iTCO_vendor_support: vendor-support=0
[    2.615842] md: linear personality registered for level -1
[    2.615936] md: raid0 personality registered for level 0
[    2.616030] md: raid1 personality registered for level 1
[    2.616124] md: raid10 personality registered for level 10
[    2.616217] md: raid6 personality registered for level 6
[    2.616311] md: raid5 personality registered for level 5
[    2.616403] md: raid4 personality registered for level 4
[    2.617579] device-mapper: uevent: version 1.0.3
[    2.618777] device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
[    2.620802] device-mapper: dm-log-userspace: version 1.1.0 loaded
[    2.621749] Intel P-state driver initializing.
[    2.621889] Intel pstate controlling: cpu 0
[    2.622149] Intel pstate controlling: cpu 1
[    2.623328] cpuidle: using governor ladder
[    2.624765] cpuidle: using governor menu
[    2.625267] sdhci: Secure Digital Host Controller Interface driver
[    2.625362] sdhci: Copyright(c) Pierre Ossman
[    2.630053] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    2.630984] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2)
[    2.631569] hidraw: raw HID events driver (C) Jiri Kosina
[    2.634692] input: Dell WMI hotkeys as /devices/virtual/input/input5
[    2.642919] snd_hda_intel 0000:00:1b.0: irq 42 for MSI/MSI-X
[    2.686561] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input6
[    2.716403] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7
[    2.720093] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[    2.723114] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[    2.740541] TCP: cubic registered
[    2.740679] NET: Registered protocol family 17
[    2.741293] Bluetooth: RFCOMM TTY layer initialized
[    2.741521] Bluetooth: RFCOMM socket layer initialized
[    2.741654] Bluetooth: RFCOMM ver 1.11
[    2.741791] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.741925] Bluetooth: BNEP filters: protocol multicast
[    2.742103] Bluetooth: BNEP socket layer initialized
[    2.742237] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.742414] Bluetooth: HIDP socket layer initialized
[    2.767772] sctp: Hash tables configured (established 65536 bind 65536)
[    2.770227] Key type dns_resolver registered
[    2.776353] PM: Checking hibernation image partition /dev/sda6
[    2.937229] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.955804] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    2.956262] ata1.00: ATA-8: WDC WD7500BPKT-75PK4T0, 01.01A01, max UDMA/133
[    2.956405] ata1.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    2.970397] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    2.970885] ata1.00: configured for UDMA/133
[    2.989723] scsi 0:0:0:0: Direct-Access     ATA      WDC WD7500BPKT-7 01.0 PQ: 0 ANSI: 5
[    2.997386] sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
[    2.997535] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.999290] sd 0:0:0:0: [sda] Write Protect is off
[    2.999428] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.000098] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.001038] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.108655]  sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
[    3.122142] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.127622] tsc: Refined TSC clocksource calibration: 2793.653 MHz
[    3.127811] Switching to clocksource tsc
[    3.347729] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    3.354143] ata5.00: ATAPI: PLDS DVD+/-RW DS-8A8SH, KD11, max UDMA/100
[    3.366148] ata5.00: configured for UDMA/100
[    3.389478] scsi 4:0:0:0: CD-ROM            PLDS     DVD+-RW DS-8A8SH KD11 PQ: 0 ANSI: 5
[    3.412100] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[    3.412119] cdrom: Uniform CD-ROM driver Revision: 3.20
[    3.416910] sr 4:0:0:0: Attached scsi CD-ROM sr0
[    3.419962] sr 4:0:0:0: Attached scsi generic sg1 type 5
[    3.768229] ata6: SATA link down (SStatus 0 SControl 300)
[    3.835323] input: DualPoint Stick as /devices/platform/i8042/serio1/input/input10
[    3.854743] input: AlpsPS/2 ALPS DualPoint TouchPad as /devices/platform/i8042/serio1/input/input11
[    3.861285] PM: Hibernation image partition 8:6 present
[    3.861291] PM: Looking for hibernation image.
[    3.900254] PM: Image not found (code -22)
[    3.900261] PM: Hibernation image not present or could not be loaded.
[    3.900997] kmemleak: Kernel memory leak detector initialized
[    3.901056] kmemleak: Automatic memory scanning thread started
[    3.914921] BIOS EDD facility v0.16 2004-Jun-25, 1 devices found
[    3.924367] ALSA device list:
[    3.924500]   #0: HDA Intel PCH at 0xf7f00000 irq 42
[    3.925999] md: Waiting for all devices to be available before autodetect
[    3.926139] md: If you don't use raid, use raid=noautodetect
[    3.933647] md: Autodetecting RAID arrays.
[    3.933784] md: Scanned 0 and added 0 devices.
[    3.933916] md: autorun ...
[    3.934040] md: ... autorun DONE.
[    4.001855] kjournald starting.  Commit interval 5 seconds
[    4.002204] EXT3-fs (sda5): mounted filesystem with writeback data mode
[    4.002373] VFS: Mounted root (ext3 filesystem) readonly on device 8:5.
[    4.043210] devtmpfs: mounted
[    4.045913] Freeing unused kernel memory: 972k freed
[    8.377596] systemd-udevd[1860]: starting version 197
[    9.693942] sata_sil24 0000:11:00.0: version 1.1
[    9.702811] scsi6 : sata_sil24
[    9.703410] scsi7 : sata_sil24
[    9.703899] ata7: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
[    9.703903] ata8: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
[   10.154753] Intel(R) Wireless WiFi driver for Linux, in-tree:d
[   10.154756] Copyright(c) 2003-2013 Intel Corporation
[   10.156719] iwlwifi 0000:09:00.0: irq 43 for MSI/MSI-X
[   10.243009] [drm] Initialized drm 1.1.0 20060810
[   10.312205] iwlwifi 0000:09:00.0: loaded firmware version 18.168.6.1
[   10.970283] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUG enabled
[   10.970288] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[   10.970290] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
[   10.970293] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled
[   10.970295] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_P2P disabled
[   10.970299] iwlwifi 0000:09:00.0: Detected Intel(R) Centrino(R) Wireless-N 1030 BGN, REV=0xB0
[   10.970473] iwlwifi 0000:09:00.0: L1 Enabled; Disabling L0S
[   10.977555] iwlwifi 0000:09:00.0: RF_KILL bit toggled to disable radio.
[   10.990555] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   11.788178] ata7: SATA link down (SStatus 0 SControl 0)
[   13.207793] [drm] Memory usable by graphics device = 2048M
[   13.207843] i915 0000:00:02.0: setting latency timer to 64
[   13.253394] i915 0000:00:02.0: irq 44 for MSI/MSI-X
[   13.253528] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[   13.253529] [drm] Driver supports precise vblank timestamp query.
[   13.254033] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   13.280532] [drm] Wrong MCH_SSKPD value: 0x16040307
[   13.280534] [drm] This can cause pipe underruns and display issues.
[   13.280534] [drm] Please upgrade your BIOS to fix this.
[   13.423439] fbcon: inteldrmfb (fb0) is primary device
[   13.890727] ata8: SATA link down (SStatus 0 SControl 0)
[   14.561970] Console: switching to colour frame buffer device 170x48
[   14.568006] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[   14.568008] i915 0000:00:02.0: registered panic notifier
[   14.657445] acpi device:34: registered as cooling_device2
[   14.662434] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   14.662970] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input12
[   14.663676] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[   14.666892] r8169 0000:05:00.0: PME# enabled
[   14.671878] pcieport 0000:00:1c.0: PME# enabled
[   15.183073] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[   17.344291] EXT3-fs (sda5): using internal journal
[   17.920159] Adding 4998972k swap on /dev/sda6.  Priority:-1 extents:1 across:4998972k 
[   22.692651] r8169 0000:05:00.0: PME# disabled
[   22.709086] r8169 0000:05:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168e-2.fw (-2)
[   22.735717] r8169 0000:05:00.0 eth0: link down
[   22.735909] r8169 0000:05:00.0 eth0: link down
[   24.387385] r8169 0000:05:00.0 eth0: link up
[   35.636011] r8169 0000:05:00.0 eth0: link down
[   36.227759] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x1b
[   36.228279] microcode: CPU0 updated to revision 0x28, date = 2012-04-24
[   36.228921] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
[   36.229186] microcode: CPU1 updated to revision 0x28, date = 2012-04-24
[   36.229188] perf_event_intel: PEBS enabled due to microcode update
[   37.426390] r8169 0000:05:00.0 eth0: link up
[   38.686210] r8169 0000:05:00.0 eth0: link down
[   42.551461] r8169 0000:05:00.0 eth0: link up

[-- Attachment #3: iomem_ejected_and_reinserted.txt --]
[-- Type: text/plain, Size: 2966 bytes --]

00000000-00000fff : reserved
00001000-0009d3ff : System RAM
0009d400-0009ffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000cedff : Video ROM
000cf000-000cffff : Adapter ROM
000d0000-000d3fff : PCI Bus 0000:00
000d4000-000d7fff : PCI Bus 0000:00
000d8000-000dbfff : PCI Bus 0000:00
000dc000-000dffff : PCI Bus 0000:00
000e0000-000fffff : reserved
  000e0000-000e3fff : PCI Bus 0000:00
  000e4000-000e7fff : PCI Bus 0000:00
  000f0000-000fffff : System ROM
00100000-1fffffff : System RAM
  01000000-015e4009 : Kernel code
  015e400a-019b0d7f : Kernel data
  01aaa000-02571fff : Kernel bss
20000000-201fffff : reserved
  20000000-201fffff : pnp 00:0c
20200000-3fffffff : System RAM
40000000-401fffff : reserved
  40000000-401fffff : pnp 00:0c
40200000-da4e4fff : System RAM
da4e5000-da527fff : ACPI Non-volatile Storage
da528000-da792fff : System RAM
da793000-da966fff : reserved
da967000-daa88fff : System RAM
daa89000-dad67fff : reserved
dad68000-dafe7fff : ACPI Non-volatile Storage
dafe8000-daffffff : ACPI Tables
db000000-db7fffff : RAM buffer
db800000-df9fffff : reserved
dfa00000-feafffff : PCI Bus 0000:00
  dfa00000-dfa00fff : pnp 00:0a
  e0000000-efffffff : 0000:00:02.0
  f0000000-f10fffff : PCI Bus 0000:11
  f1100000-f11fffff : PCI Bus 0000:05
    f1100000-f1103fff : 0000:05:00.0
      f1100000-f1103fff : r8169
    f1104000-f1104fff : 0000:05:00.0
      f1104000-f1104fff : r8169
  f6800000-f6bfffff : 0000:00:02.0
  f6c00000-f7cfffff : PCI Bus 0000:11
    f6c00000-f6c7ffff : 0000:11:00.0
    f6c80000-f6c83fff : 0000:11:00.0
      f6c80000-f6c83fff : sata_sil24
    f6c84000-f6c8407f : 0000:11:00.0
      f6c84000-f6c8407f : sata_sil24
  f7d00000-f7dfffff : PCI Bus 0000:0b
    f7d00000-f7d0ffff : 0000:0b:00.0
    f7d10000-f7d11fff : 0000:0b:00.0
  f7e00000-f7efffff : PCI Bus 0000:09
    f7e00000-f7e01fff : 0000:09:00.0
      f7e00000-f7e01fff : iwlwifi
  f7f00000-f7f03fff : 0000:00:1b.0
    f7f00000-f7f03fff : ICH HD audio
  f7f05000-f7f050ff : 0000:00:1f.3
  f7f06000-f7f067ff : 0000:00:1f.2
    f7f06000-f7f067ff : ahci
  f7f07000-f7f073ff : 0000:00:1d.0
  f7f08000-f7f083ff : 0000:00:1a.0
  f7f0a000-f7f0a00f : 0000:00:16.0
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
    f8000000-fbffffff : reserved
      f8000000-fbffffff : pnp 00:0a
  fe800000-fe802fff : pnp 00:07
fec00000-fec00fff : reserved
  fec00000-fec003ff : IOAPIC 0
fed00000-fed03fff : reserved
  fed00000-fed003ff : HPET 0
fed10000-fed17fff : pnp 00:0a
fed18000-fed18fff : pnp 00:0a
fed19000-fed19fff : pnp 00:0a
fed1c000-fed1ffff : reserved
  fed1c000-fed1ffff : pnp 00:0a
    fed1f410-fed1f414 : iTCO_wdt
      fed1f410-fed1f414 : iTCO_wdt
fed20000-fed3ffff : pnp 00:0a
fed40000-fed44fff : PCI Bus 0000:00
fed45000-fed8ffff : pnp 00:0a
fed90000-fed93fff : pnp 00:0a
fee00000-fee00fff : Local APIC
  fee00000-fee00fff : reserved
ff000000-ffffffff : reserved
  ff000000-ffffffff : pnp 00:0a
100000000-41fdfffff : System RAM
41fe00000-41fffffff : RAM buffer

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-14  0:05   ` Martin Mokrejs
  2013-03-14  0:16     ` Martin Mokrejs
@ 2013-03-14  8:38     ` Yijing Wang
       [not found]     ` <51417C28.40402@huawei.com>
  2 siblings, 0 replies; 41+ messages in thread
From: Yijing Wang @ 2013-03-14  8:38 UTC (permalink / raw)
  To: Martin Mokrejs; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

On 2013/3/14 8:05, Martin Mokrejs wrote:
> Hi Yjing,
>
> Yijing Wang wrote:
>> Hi Martin,
>>    From your diff info, maybe we can analyze this problem step by step.
>> 1、According to your diff info about first eject and first hot add, the pci device 11:00.0 Mass storage
>>    controller was removed and was added ok at pci device level;
>
> I can't confirm that it it was removed fine but looks like hot re-inserting the
> card somewhat returns us to the anticipated state. Would I have hot added completely
> different card I believe lspci would report mixture of both both, the cold-plugged-one
> and of the hot-plugged one. Please see the thread
> 3.8.2: stale pci device info for a previously inserted express card
> for what I mean (different kernel and acpiphp while here we are talking 3.9-rc1 and
> pciehp but still I believe same would happen.)

Hmm, that's a issue, I am not sure it's a memleak problem.

>
>> 2、The main problem is 11:00.0 Mass storage controller can not bind its driver normally, right?
>
> Yes, and you can squeeze out few words from the driver only if you rmmod it.
> Therefore I conclude the sata_sil24 cannot unbind the device and only during
> rmmod it realizes it is gone. What pci driver failed to report the card was
> ejected I don't know but seems per point 1. above that we agree that PresDet
> worked fine (cold boot with the card inserted). So is sata_sil24 at fault?
> Nobody commented on those express slot status values: 0000, 0040, 0100, 0108, 0138, 0140, 0148.
> What are they?

As you mentioned before
cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100
cold boot(PCIe card detected in slot)-->eject(Data Link state changed detected)-->.....
detail info reference at PCIe Spec 3.0  7.8.11

>
>> 3、According to diff info about first hotadd and coldplug, the mainly diff is
>>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>>> +       Region 4: I/O ports at c000 [disabled] [size=128]
>>
>> and
>> MaxReadReq 4096 bytes ----> MaxReadReq 512 bytes
>>
>> So maybe we can try to find why the memory range was disabled after hot add.
>>
>> Martin, can you provide  /proc/iomem info when the system bootup, after first eject and
>> first hot-add?
>
> Not a single change, look:
>
> # diff -u -w iomem.txt iomem_ejected.txt

According to this, the Mass storage controller device MMIO was not released when the eject.
So, If we insert this card again, driver cannot get a MMIO range for the newly inserted card, because
old MMIO range is still in system.

> # diff -u -w iomem_ejected.txt iomem_ejected_and_reinserted.txt
>
> At this moment lspci reports:
>
> # diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected_and_reinserted.txt
> --- lspci_vvvxxx.txt    2013-03-14 00:23:25.000000000 +0100
> +++ lspci_vvvxxx_ejected_and_reinserted.txt     2013-03-14 00:27:26.000000000 +0100
> @@ -437,7 +437,7 @@
>         I/O behind bridge: 0000c000-0000dfff
>         Memory behind bridge: f6c00000-f7cfffff
>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> +       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-

Master Abort Error detected.

>         BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
>                 PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
>         Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
> @@ -457,7 +457,7 @@
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> -                       Changed: MRL- PresDet- LinkState-
> +                       Changed: MRL- PresDet- LinkState+

Every you eject and insert card LinkState Change bit changed detected, so when do hotplug link state change is ok.

>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> @@ -476,11 +476,11 @@
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>         Kernel driver in use: pcieport
>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
> +10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
> +50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> @@ -795,14 +795,13 @@
>
>  11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>         Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> +       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: 64 bytes
>         Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
> -       Region 4: I/O ports at c000 [size=128]
> -       Expansion ROM at f6c00000 [disabled] [size=512K]
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]

I guess these memory ranges disabled because the original MMIO(coldplug boot) is still in system after eject device,
the new device insert cannot get the needed MMIO in system.

> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>         Capabilities: [54] 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=1 PME-
> @@ -813,29 +812,29 @@
>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
>                 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
> -               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
> +                       MaxPayload 128 bytes, MaxReadReq 512 bytes
> +               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
I don't think this will cause device hotplug fail.
>                 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>                         ClockPM- Surprise- LLActRep- BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>                 LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>         Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> +               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>                 UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
> +               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Kernel driver in use: sata_sil24
> -00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
> -10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
> -20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> -30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
> +00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
> +10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
> +20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> +30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>  40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>  60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
> +70: 10 00 11 00 03 00 00 00 00 20 00 00 11 f4 03 00
>  80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>  90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> #
>
>
> I had to rmmod the driver to trigger at least some change:
>

When you do rmmod sata driver, the MMIO seems to be released ok.
Martin, what about try to do hotplug like this?
1、coldplug boot up;
2、eject device;
3、rmmod sata driver;
4、modprobe sata driver;
5、insert card;

> # diff -u -w iomem_ejected_and_reinserted.txt iomem_ejected_and_reinserted_rmmod_sata_sil24.txt
> --- iomem_ejected_and_reinserted.txt    2013-03-14 00:27:38.000000000 +0100
> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
> @@ -44,9 +44,7 @@
>    f6c00000-f7cfffff : PCI Bus 0000:11
>      f6c00000-f6c7ffff : 0000:11:00.0
>      f6c80000-f6c83fff : 0000:11:00.0
> -      f6c80000-f6c83fff : sata_sil24
>      f6c84000-f6c8407f : 0000:11:00.0
> -      f6c84000-f6c8407f : sata_sil24
>    f7d00000-f7dfffff : PCI Bus 0000:0b
>      f7d00000-f7d0ffff : 0000:0b:00.0
>      f7d10000-f7d11fff : 0000:0b:00.0
> # diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt
> --- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
> @@ -34,17 +34,12 @@
>  dfa00000-feafffff : PCI Bus 0000:00
>    dfa00000-dfa00fff : pnp 00:0a
>    e0000000-efffffff : 0000:00:02.0
> -  f0000000-f10fffff : PCI Bus 0000:11
>    f1100000-f11fffff : PCI Bus 0000:05
>      f1100000-f1103fff : 0000:05:00.0
>        f1100000-f1103fff : r8169
>      f1104000-f1104fff : 0000:05:00.0
>        f1104000-f1104fff : r8169
>    f6800000-f6bfffff : 0000:00:02.0
> -  f6c00000-f7cfffff : PCI Bus 0000:11
> -    f6c00000-f6c7ffff : 0000:11:00.0
> -    f6c80000-f6c83fff : 0000:11:00.0
> -    f6c84000-f6c8407f : 0000:11:00.0
>    f7d00000-f7dfffff : PCI Bus 0000:0b
>      f7d00000-f7d0ffff : 0000:0b:00.0
>      f7d10000-f7d11fff : 0000:0b:00.0
> #
>
> accompanied lspci output showing what happened during rmmod sata_sil24:
>
> # diff -u -w lspci_vvvxxx_ejected_and_reinserted.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt
> --- lspci_vvvxxx_ejected_and_reinserted.txt     2013-03-14 00:27:26.000000000 +0100
> +++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
> @@ -451,12 +451,12 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>                         Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
> @@ -473,19 +473,19 @@
>         Capabilities: [90] Subsystem: Dell Device 04b3
>         Capabilities: [a0] 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-
> +               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
>         Kernel driver in use: pcieport
>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
>  10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
> +50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
> -a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
> +a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
> @@ -793,54 +793,22 @@
>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       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-
> -       Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> -       Region 4: I/O ports at c000 [disabled] [size=128]
> -       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
> -       Capabilities: [54] 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=1 PME-
> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> -               Address: 0000000000000000  Data: 0000
> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> -                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> -                       ClockPM- Surprise- LLActRep- BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> -       Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
> -       Kernel driver in use: sata_sil24
> -00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
> -10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
> -20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
> -30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
> -40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
> -60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -70: 10 00 11 00 03 00 00 00 00 20 00 00 11 f4 03 00
> -80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
> -90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>

This is so strange, seems like 11:00.0 Mass storage controller device is still in OS, but the real hardware is removed,OS
can not access device configure space, so all config register return ff.

But why the device become stale after eject? Mass storage controller driver should unregister and release itself.

>
> Please note the funny broken:
>
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>
> Who is still thinking the card is in the system? Didn't we agree above that PresDet
> worked fine in this particular setup?
>
> The rmmod sata_sil24 causes that in dmesg is every second repeatedly this, until forever:
>
> --- dmesg_ejected.txt   2013-03-14 00:25:59.000000000 +0100
> +++ dmesg_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:47.000000000 +0100
> @@ -819,3 +819,277 @@
>  [   37.426390] r8169 0000:05:00.0 eth0: link up
>  [   38.686210] r8169 0000:05:00.0 eth0: link down
>  [   42.551461] r8169 0000:05:00.0 eth0: link up
> +[  432.686232] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
> +[  432.695763] pcieport 0000:00:1c.7: PME# enabled
> +[  432.956104] pcieport 0000:00:1c.7: PME# disabled
> +[  432.965896] pcieport 0000:00:1c.7: PME# enabled
> +[  433.006119] pcieport 0000:00:1c.7: PME# disabled
> +[  433.016047] pcieport 0000:00:1c.7: PME# enabled
> +[  434.037451] pcieport 0000:00:1c.7: PME# disabled
> +[  434.047152] pcieport 0000:00:1c.7: PME# enabled
> +[  434.087516] pcieport 0000:00:1c.7: PME# disabled
> [cut]
>
>
>
> I should have tried below to remove 11.0 instead of 1.c7 but it demonstrates
> that one can get rid of the partial eSATA card entry from lspci output:
>
> # echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove
>
> That stops the PME# storm:
>
> +[  611.843285] pcieport 0000:00:1c.7: PME# disabled
> +[  611.853086] pcieport 0000:00:1c.7: PME# enabled
> +[  611.893364] pcieport 0000:00:1c.7: PME# disabled
> +[  611.903283] pcieport 0000:00:1c.7: PME# enabled
> +[  612.183893] pci 0000:11:00.0: PME# disabled
> +[  612.184789] pcieport 0000:00:1c.7: PME# disabled
> +[  612.203753] pcieport 0000:00:1c.7: PME# disabled
> +[  612.205521] pci_bus 0000:11: busn_res: [bus 11-16] is released
>
> and releases the iomem's:
>
> # diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt
> --- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
> @@ -34,17 +34,12 @@
>  dfa00000-feafffff : PCI Bus 0000:00
>    dfa00000-dfa00fff : pnp 00:0a
>    e0000000-efffffff : 0000:00:02.0
> -  f0000000-f10fffff : PCI Bus 0000:11
>    f1100000-f11fffff : PCI Bus 0000:05
>      f1100000-f1103fff : 0000:05:00.0
>        f1100000-f1103fff : r8169
>      f1104000-f1104fff : 0000:05:00.0
>        f1104000-f1104fff : r8169
>    f6800000-f6bfffff : 0000:00:02.0
> -  f6c00000-f7cfffff : PCI Bus 0000:11
> -    f6c00000-f6c7ffff : 0000:11:00.0
> -    f6c80000-f6c83fff : 0000:11:00.0
> -    f6c84000-f6c8407f : 0000:11:00.0
>    f7d00000-f7dfffff : PCI Bus 0000:0b
>      f7d00000-f7d0ffff : 0000:0b:00.0
>      f7d10000-f7d11fff : 0000:0b:00.0
> #
>
> The accompanying diff in lspci:
>
> # diff -u -w lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt
> --- lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
> +++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt        2013-03-14 00:32:20.000000000 +0100
> @@ -429,69 +429,6 @@
>  e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
>

After you remove 00:1c.7 PCI bridge device. The 11:00.0 Mass storage controller device  still shown in lspci?
If 11:00.0 Mass storage controller device was removed now. you can try to echo 1 > /sys/bus/pci/rescan, rescan the 00:1c.7 PCI bridge
device and its child devices.
Then try to insert the card.

I use pciehp module in my machine and add pciehp_debug=1,debug info will print while I doing eject or insert.
I don't know why pciehp cannot print debug info in your system, maybe you can try to build it as module.
We can only trace eject action now, if eject action cannot complete normally, hot insert won't success.


> -00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
> -       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: 64 bytes
> -       Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
> -       I/O behind bridge: 0000c000-0000dfff
> -       Memory behind bridge: f6c00000-f7cfffff
> -       Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       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: [40] Express (v2) Root Port (Slot+), MSI 00
> -               DevCap: MaxPayload 128 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 128 bytes
> -               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
> -               LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
> -                       ClockPM- Surprise- LLActRep+ BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> -               SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
> -                       Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
> -               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
> -                       Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> -                       Changed: MRL- PresDet- LinkState+
> -               RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
> -               RootCap: CRSVisible-
> -               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> -               DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
> -               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
> -               LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
> -                        Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
> -                        Compliance De-emphasis: -6dB
> -               LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
> -                        EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
> -       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
> -               Address: 00000000  Data: 0000
> -       Capabilities: [90] Subsystem: Dell Device 04b3
> -       Capabilities: [a0] Power Management version 2
> -               Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> -               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
> -       Kernel driver in use: pcieport
> -00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
> -20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
> -30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
> -40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
> -50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
> -60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
> -70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
> -80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
> -a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> -d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
> -e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
> -f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
> -
>  00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
>         Subsystem: Dell Device 04b3
>         Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> @@ -793,22 +730,3 @@
>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> -       !!! Unknown header type 7f
> -00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> -
> #
>
>>
>> I suspect the driver release its MMIO successfully after first eject.
>
> I did not think so and hope I convinced you that this is NOT the case.
>
> Thanks for you time on this, we will find it!
> Martin
>
>>
>> Thanks!
>> Yijing.
>>
>>


-- Thanks! Yijing


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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
       [not found]     ` <51417C28.40402@huawei.com>
@ 2013-03-14 13:00       ` Martin Mokrejs
  2013-03-15  2:41         ` Yijing Wang
  2013-03-14 15:18       ` Martin Mokrejs
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-14 13:00 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Yijing Wang wrote:
> On 2013/3/14 8:05, Martin Mokrejs wrote:
>> Hi Yjing,
>>
>> Yijing Wang wrote:
>>> Hi Martin,
>>>    From your diff info, maybe we can analyze this problem step by step.
>>> 1、According to your diff info about first eject and first hot add, the pci device 11:00.0 Mass storage
>>>    controller was removed and was added ok at pci device level;
>>
>> I can't confirm that it it was removed fine but looks like hot re-inserting the
>> card somewhat returns us to the anticipated state. Would I have hot added completely
>> different card I believe lspci would report mixture of both both, the cold-plugged-one
>> and of the hot-plugged one. Please see the thread
>> 3.8.2: stale pci device info for a previously inserted express card
>> for what I mean (different kernel and acpiphp while here we are talking 3.9-rc1 and
>> pciehp but still I believe same would happen.)
> 
> Hmm, that's a issue, I am not sure it's a memleak problem.
> 
>>
>>> 2、The main problem is 11:00.0 Mass storage controller can not bind its driver normally, right?
>>
>> Yes, and you can squeeze out few words from the driver only if you rmmod it.
>> Therefore I conclude the sata_sil24 cannot unbind the device and only during
>> rmmod it realizes it is gone. What pci driver failed to report the card was
>> ejected I don't know but seems per point 1. above that we agree that PresDet
>> worked fine (cold boot with the card inserted). So is sata_sil24 at fault?
>> Nobody commented on those express slot status values: 0000, 0040, 0100, 0108, 0138, 0140, 0148.
>> What are they?
> 
> As you mentioned before
> cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100
> cold boot(PCIe card detected in slot)-->eject(Data Link state changed detected)-->.....
> detail info reference at PCIe Spec 3.0  7.8.11

So doesn't pciehp/acpiphp complain when values 0000, 0108, 0138, 0148 appear?

> 
>>
>>> 3、According to diff info about first hotadd and coldplug, the mainly diff is
>>>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>>>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>>>> +       Region 4: I/O ports at c000 [disabled] [size=128]
>>>
>>> and
>>> MaxReadReq 4096 bytes ----> MaxReadReq 512 bytes
>>>
>>> So maybe we can try to find why the memory range was disabled after hot add.
>>>
>>> Martin, can you provide  /proc/iomem info when the system bootup, after first eject and
>>> first hot-add?
>>
>> Not a single change, look:
>>
>> # diff -u -w iomem.txt iomem_ejected.txt
> 
> According to this, the Mass storage controller device MMIO was not released when the eject.
> So, If we insert this card again, driver cannot get a MMIO range for the newly inserted card, because
> old MMIO range is still in system.

Was my impression as well, but all I could have added.

> 
>> # diff -u -w iomem_ejected.txt iomem_ejected_and_reinserted.txt
>>
>> At this moment lspci reports:
>>
>> # diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected_and_reinserted.txt
>> --- lspci_vvvxxx.txt    2013-03-14 00:23:25.000000000 +0100
>> +++ lspci_vvvxxx_ejected_and_reinserted.txt     2013-03-14 00:27:26.000000000 +0100
>> @@ -437,7 +437,7 @@
>>         I/O behind bridge: 0000c000-0000dfff
>>         Memory behind bridge: f6c00000-f7cfffff
>>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
>> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
>> +       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
> 
> Master Abort Error detected.
> 
>>         BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
>>                 PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
>>         Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
>> @@ -457,7 +457,7 @@
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>> -                       Changed: MRL- PresDet- LinkState-
>> +                       Changed: MRL- PresDet- LinkState+
> 
> Every you eject and insert card LinkState Change bit changed detected, so when do hotplug link state change is ok.
> 
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
>> @@ -476,11 +476,11 @@
>>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>>         Kernel driver in use: pcieport
>>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
>> -10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
>> +10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
>> +50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> @@ -795,14 +795,13 @@
>>  
>>  11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>>         Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
>> -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>> +       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: 64 bytes
>>         Interrupt: pin A routed to IRQ 19
>> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
>> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
>> -       Region 4: I/O ports at c000 [size=128]
>> -       Expansion ROM at f6c00000 [disabled] [size=512K]
>> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> +       Region 4: I/O ports at c000 [disabled] [size=128]
> 
> I guess these memory ranges disabled because the original MMIO(coldplug boot) is still in system after eject device,
> the new device insert cannot get the needed MMIO in system.

But then some driver is stupid and should loudly complain. Looks nobody even knows
why lspci prints those "[disabled]" and "[virtual]" strings in its output.
What are the normal cases of "virtual" ROMs and "disabled" ranges? What *functional*
devices have them and why are they disabled? Is this like a disabled BOOT ROM on a network
card or what?

> 
>> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>>         Capabilities: [54] 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=1 PME-
>> @@ -813,29 +812,29 @@
>>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
>>                 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
>> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
>> -               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
>> +                       MaxPayload 128 bytes, MaxReadReq 512 bytes
>> +               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
> I don't think this will cause device hotplug fail.
>>                 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>>                         ClockPM- Surprise- LLActRep- BwNot-
>>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>>                 LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>>         Capabilities: [100 v1] Advanced Error Reporting
>> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
>> +               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>>                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>>                 UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>>                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>> +               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>>         Kernel driver in use: sata_sil24
>> -00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
>> -10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
>> -20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> -30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
>> +00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
>> +10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
>> +20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> +30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>>  40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>>  60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
>> +70: 10 00 11 00 03 00 00 00 00 20 00 00 11 f4 03 00
>>  80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>>  90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> #
>>
>>
>> I had to rmmod the driver to trigger at least some change:
>>
> 
> When you do rmmod sata driver, the MMIO seems to be released ok.
> Martin, what about try to do hotplug like this?
> 1、coldplug boot up;
> 2、eject device;
> 3、rmmod sata driver;
> 4、modprobe sata driver;
> 5、insert card;

# diff -u -w dmesg.txt dmesg_ejected.txt
# diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected.txt 
--- lspci_vvvxxx.txt    2013-03-14 11:01:06.000000000 +0100
+++ lspci_vvvxxx_ejected.txt    2013-03-14 11:03:26.000000000 +0100
@@ -437,7 +437,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -451,12 +451,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -476,11 +476,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -793,55 +793,23 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
-40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
-60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
-80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
-90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

# diff -u -w iomem.txt iomem_ejected.txt 
# diff -u -w dmesg_ejected.txt dmesg_ejected_rmmod_sata_sil24.txt 
--- dmesg_ejected.txt   2013-03-14 11:03:42.000000000 +0100
+++ dmesg_ejected_rmmod_sata_sil24.txt  2013-03-14 11:05:00.000000000 +0100
@@ -824,3 +824,173 @@
 [   38.223082] r8169 0000:05:00.0 eth0: link up
 [   39.471099] r8169 0000:05:00.0 eth0: link down
 [   41.857999] r8169 0000:05:00.0 eth0: link up
+[  270.090796] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  270.091728] pcieport 0000:00:1c.7: PME# enabled
+[  270.972562] pcieport 0000:00:1c.7: PME# disabled
+[  270.982338] pcieport 0000:00:1c.7: PME# enabled
+[  271.022611] pcieport 0000:00:1c.7: PME# disabled
+[  271.032560] pcieport 0000:00:1c.7: PME# enabled
+[  272.053850] pcieport 0000:00:1c.7: PME# disabled
+[  272.063619] pcieport 0000:00:1c.7: PME# enabled
+[  272.103916] pcieport 0000:00:1c.7: PME# disabled
+[  272.113838] pcieport 0000:00:1c.7: PME# enabled
+[  273.145186] pcieport 0000:00:1c.7: PME# disabled
+[  273.156282] pcieport 0000:00:1c.7: PME# enabled
+[  273.195718] pcieport 0000:00:1c.7: PME# disabled
+[  273.205228] pcieport 0000:00:1c.7: PME# enabled
+[  274.226918] pcieport 0000:00:1c.7: PME# disabled
[cut] repeated forever

# diff -u -w lspci_vvvxxx_ejected.txt lspci_vvvxxx_ejected_rmmod_sata_sil24.txt 
--- lspci_vvvxxx_ejected.txt    2013-03-14 11:03:26.000000000 +0100
+++ lspci_vvvxxx_ejected_rmmod_sata_sil24.txt   2013-03-14 11:04:32.000000000 +0100
@@ -473,7 +473,7 @@
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
+               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
 10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
@@ -485,7 +485,7 @@
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
-a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
+a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
@@ -795,7 +795,6 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
 00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

# diff -u -w iomem_ejected.txt iomem_ejected_rmmod_sata_sil24.txt 
--- iomem_ejected.txt   2013-03-14 11:03:18.000000000 +0100
+++ iomem_ejected_rmmod_sata_sil24.txt  2013-03-14 11:04:53.000000000 +0100
@@ -44,9 +44,7 @@
   f6c00000-f7cfffff : PCI Bus 0000:11
     f6c00000-f6c7ffff : 0000:11:00.0
     f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
     f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
#


So now you want me to modprobe the sata driver back and re-insert the card
to check what hotplug does:

# diff -u -w dmesg_ejected_rmmod_sata_sil24.txt dmesg_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt 
--- dmesg_ejected_rmmod_sata_sil24.txt  2013-03-14 11:05:00.000000000 +0100
+++ dmesg_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt      2013-03-14 11:06:11.000000000 +0100
[cut away the PME# game]
+[  352.132379] pcieport 0000:00:1c.7: PME# disabled
+[  352.142358] pcieport 0000:00:1c.7: PME# enabled
+[  352.993844] pcieport 0000:00:1c.7: PME# disabled
+[  352.993852] sata_sil24 0000:11:00.0: version 1.1
+[  353.013329] sata_sil24 0000:11:00.0: Refused to change power state, currently in D3
+[  353.113327] sata_sil24 0000:11:00.0: failed to clear port RST
+[  353.213438] sata_sil24 0000:11:00.0: failed to clear port RST
+[  353.216233] scsi8 : sata_sil24
+[  353.216927] scsi9 : sata_sil24
+[  353.217460] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
+[  353.217463] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
+[  353.313587] ata9: controller in dubious state, performing PORT_RST
+[  355.526301] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
+[  355.626420] ata10: controller in dubious state, performing PORT_RST
+[  357.839141] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
#
# diff -u -w lspci_vvvxxx_ejected_rmmod_sata_sil24.txt lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt 
--- lspci_vvvxxx_ejected_rmmod_sata_sil24.txt   2013-03-14 11:04:32.000000000 +0100
+++ lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt       2013-03-14 11:06:51.000000000 +0100
@@ -473,7 +473,7 @@
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
-               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
+               Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
 10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
@@ -485,7 +485,7 @@
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
-a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
+a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
@@ -795,6 +795,7 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
+       Kernel driver in use: sata_sil24
 00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
#

Actualy comparing the states before rmmod+modprobe and after boild down just to:

# diff -u -w lspci_vvvxxx_ejected.txt lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt 
--- lspci_vvvxxx_ejected.txt    2013-03-14 11:03:26.000000000 +0100
+++ lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt       2013-03-14 11:06:51.000000000 +0100
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
#
# diff -u -w iomem_ejected.txt iomem_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt 
#

Finally we are getting to hotinsert the card:

# diff -u -w dmesg_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt dmesg_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt 
#
# diff -u -w lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt 
--- lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt       2013-03-14 11:06:51.000000000 +0100
+++ lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt     2013-03-14 11:10:43.000000000 +0100
@@ -451,12 +451,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -480,7 +480,7 @@
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -793,23 +793,54 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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-
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
+10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
+20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
+40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
+60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
+80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
+90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
#
# diff -u -w iomem_ejected_rmmod_sata_sil24_modprobe_sata_sil24.txt iomem_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt 
#


Now, to recapitulate, comparing current hotplug state to the initial cold boot state:

# diff -u -w iomem.txt iomem_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt
#
# diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt 
--- lspci_vvvxxx.txt    2013-03-14 11:01:06.000000000 +0100
+++ lspci_vvvxxx_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt     2013-03-14 11:10:43.000000000 +0100
@@ -437,7 +437,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -476,7 +476,7 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
@@ -795,14 +795,13 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
+       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: 64 bytes
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
@@ -813,7 +812,7 @@
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+                       MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
@@ -828,14 +827,14 @@
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
+00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
+10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
+20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
+70: 10 00 11 00 03 00 00 00 00 20 0a 00 11 f4 03 00
 80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

# diff -u -w dmesg.txt dmesg_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt

--- dmesg.txt   2013-03-14 11:00:51.000000000 +0100
+++ dmesg_ejected_rmmod_sata_sil24_modprobe_sata_sil24_hotinsert.txt    2013-03-14 11:10:58.000000000 +0100
@@ -824,3 +824,324 @@
 [   38.223082] r8169 0000:05:00.0 eth0: link up
 [   39.471099] r8169 0000:05:00.0 eth0: link down
 [   41.857999] r8169 0000:05:00.0 eth0: link up
+[  270.090796] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  270.091728] pcieport 0000:00:1c.7: PME# enabled
+[  270.972562] pcieport 0000:00:1c.7: PME# disabled
+[  270.982338] pcieport 0000:00:1c.7: PME# enabled
+[  271.022611] pcieport 0000:00:1c.7: PME# disabled
[cut]
+[  348.828290] pcieport 0000:00:1c.7: PME# disabled
+[  348.838079] pcieport 0000:00:1c.7: PME# enabled
+[  348.878351] pcieport 0000:00:1c.7: PME# disabled
+[  348.888342] pcieport 0000:00:1c.7: PME# enabled
+[  349.919473] pcieport 0000:00:1c.7: PME# disabled
+[  349.929450] pcieport 0000:00:1c.7: PME# enabled
+[  349.969697] pcieport 0000:00:1c.7: PME# disabled
+[  349.979638] pcieport 0000:00:1c.7: PME# enabled
+[  351.001127] pcieport 0000:00:1c.7: PME# disabled
+[  351.010718] pcieport 0000:00:1c.7: PME# enabled
+[  351.051021] pcieport 0000:00:1c.7: PME# disabled
+[  351.060979] pcieport 0000:00:1c.7: PME# enabled
+[  352.082294] pcieport 0000:00:1c.7: PME# disabled
+[  352.092056] pcieport 0000:00:1c.7: PME# enabled
+[  352.132379] pcieport 0000:00:1c.7: PME# disabled
+[  352.142358] pcieport 0000:00:1c.7: PME# enabled
+[  352.993844] pcieport 0000:00:1c.7: PME# disabled
+[  352.993852] sata_sil24 0000:11:00.0: version 1.1
+[  353.013329] sata_sil24 0000:11:00.0: Refused to change power state, currently in D3
+[  353.113327] sata_sil24 0000:11:00.0: failed to clear port RST
+[  353.213438] sata_sil24 0000:11:00.0: failed to clear port RST
+[  353.216233] scsi8 : sata_sil24
+[  353.216927] scsi9 : sata_sil24
+[  353.217460] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
+[  353.217463] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
+[  353.313587] ata9: controller in dubious state, performing PORT_RST
+[  355.526301] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
+[  355.626420] ata10: controller in dubious state, performing PORT_RST
+[  357.839141] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
#


I will answer your remaining following questions in a next reply.

Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
       [not found]     ` <51417C28.40402@huawei.com>
  2013-03-14 13:00       ` Martin Mokrejs
@ 2013-03-14 15:18       ` Martin Mokrejs
  2013-03-14 15:20       ` Martin Mokrejs
  2013-03-14 17:54       ` Martin Mokrejs
  3 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-14 15:18 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

[re-sending without attachment]

Yijing Wang wrote:
> On 2013/3/14 8:05, Martin Mokrejs wrote:
>> Hi Yjing,
>>

> 
>> # diff -u -w iomem_ejected_and_reinserted.txt iomem_ejected_and_reinserted_rmmod_sata_sil24.txt
>> --- iomem_ejected_and_reinserted.txt    2013-03-14 00:27:38.000000000 +0100
>> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
>> @@ -44,9 +44,7 @@
>>    f6c00000-f7cfffff : PCI Bus 0000:11
>>      f6c00000-f6c7ffff : 0000:11:00.0
>>      f6c80000-f6c83fff : 0000:11:00.0
>> -      f6c80000-f6c83fff : sata_sil24
>>      f6c84000-f6c8407f : 0000:11:00.0
>> -      f6c84000-f6c8407f : sata_sil24
>>    f7d00000-f7dfffff : PCI Bus 0000:0b
>>      f7d00000-f7d0ffff : 0000:0b:00.0
>>      f7d10000-f7d11fff : 0000:0b:00.0
>> # diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt
>> --- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
>> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
>> @@ -34,17 +34,12 @@
>>  dfa00000-feafffff : PCI Bus 0000:00
>>    dfa00000-dfa00fff : pnp 00:0a
>>    e0000000-efffffff : 0000:00:02.0
>> -  f0000000-f10fffff : PCI Bus 0000:11
>>    f1100000-f11fffff : PCI Bus 0000:05
>>      f1100000-f1103fff : 0000:05:00.0
>>        f1100000-f1103fff : r8169
>>      f1104000-f1104fff : 0000:05:00.0
>>        f1104000-f1104fff : r8169
>>    f6800000-f6bfffff : 0000:00:02.0
>> -  f6c00000-f7cfffff : PCI Bus 0000:11
>> -    f6c00000-f6c7ffff : 0000:11:00.0
>> -    f6c80000-f6c83fff : 0000:11:00.0
>> -    f6c84000-f6c8407f : 0000:11:00.0
>>    f7d00000-f7dfffff : PCI Bus 0000:0b
>>      f7d00000-f7d0ffff : 0000:0b:00.0
>>      f7d10000-f7d11fff : 0000:0b:00.0
>> #
>>
>> accompanied lspci output showing what happened during rmmod sata_sil24:
>>
>> # diff -u -w lspci_vvvxxx_ejected_and_reinserted.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt 
>> --- lspci_vvvxxx_ejected_and_reinserted.txt     2013-03-14 00:27:26.000000000 +0100
>> +++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
>> @@ -451,12 +451,12 @@
>>                         ClockPM- Surprise- LLActRep+ BwNot-
>>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
>> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>>                         Changed: MRL- PresDet- LinkState+
>>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>>                 RootCap: CRSVisible-
>> @@ -473,19 +473,19 @@
>>         Capabilities: [90] Subsystem: Dell Device 04b3
>>         Capabilities: [a0] 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-
>> +               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
>>         Kernel driver in use: pcieport
>>  00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
>>  10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
>>  20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
>>  30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
>>  40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
>> -50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
>> +50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
>>  60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
>>  70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
>> -a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
>> +a0: 01 00 02 c8 03 01 00 00 00 00 00 00 00 00 00 00
>>  b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
>> @@ -793,54 +793,22 @@
>>  e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>  
>> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
>> -       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-
>> -       Interrupt: pin A routed to IRQ 19
>> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
>> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
>> -       Region 4: I/O ports at c000 [disabled] [size=128]
>> -       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>> -       Capabilities: [54] 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=1 PME-
>> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
>> -               Address: 0000000000000000  Data: 0000
>> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
>> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
>> -                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>> -                       ClockPM- Surprise- LLActRep- BwNot-
>> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
>> -       Capabilities: [100 v1] Advanced Error Reporting
>> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>> -               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>> -       Kernel driver in use: sata_sil24
>> -00: 95 10 32 31 00 00 10 00 01 00 80 01 00 00 00 00
>> -10: 04 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
>> -20: 01 00 00 00 00 00 00 00 00 00 00 00 95 10 32 31
>> -30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
>> -40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
>> -60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -70: 10 00 11 00 03 00 00 00 00 20 00 00 11 f4 03 00
>> -80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
>> -90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> -f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> +       !!! Unknown header type 7f
>> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>>  
> 
> This is so strange, seems like 11:00.0 Mass storage controller device is still in OS, but the real hardware is removed,OS
> can not access device configure space, so all config register return ff.
> 
> But why the device become stale after eject? Mass storage controller driver should unregister and release itself.

I think the answer is in the PME# messages. In this particular situation
they are flipped from enabled to disabled and back in a never ending loop.
I do not want to try what happens hen I drop pcie_aspm=off from the comandline
yet ;) but somewhat fear things could start working and PME# messages would
disappear. ;-)

> 
>>
>> Please note the funny broken:
>>
>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> +       !!! Unknown header type 7f
>> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>>
>> Who is still thinking the card is in the system? Didn't we agree above that PresDet
>> worked fine in this particular setup?
>>
>> The rmmod sata_sil24 causes that in dmesg is every second repeatedly this, until forever:
>>
>> --- dmesg_ejected.txt   2013-03-14 00:25:59.000000000 +0100
>> +++ dmesg_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:47.000000000 +0100
>> @@ -819,3 +819,277 @@
>>  [   37.426390] r8169 0000:05:00.0 eth0: link up
>>  [   38.686210] r8169 0000:05:00.0 eth0: link down
>>  [   42.551461] r8169 0000:05:00.0 eth0: link up
>> +[  432.686232] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
>> +[  432.695763] pcieport 0000:00:1c.7: PME# enabled
>> +[  432.956104] pcieport 0000:00:1c.7: PME# disabled
>> +[  432.965896] pcieport 0000:00:1c.7: PME# enabled
>> +[  433.006119] pcieport 0000:00:1c.7: PME# disabled
>> +[  433.016047] pcieport 0000:00:1c.7: PME# enabled
>> +[  434.037451] pcieport 0000:00:1c.7: PME# disabled
>> +[  434.047152] pcieport 0000:00:1c.7: PME# enabled
>> +[  434.087516] pcieport 0000:00:1c.7: PME# disabled
>> [cut]
>>
>>
>>
>> I should have tried below to remove 11.0 instead of 1.c7 but it demonstrates
>> that one can get rid of the partial eSATA card entry from lspci output:
>>
>> # echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove
>>
>> That stops the PME# storm:
>>
>> +[  611.843285] pcieport 0000:00:1c.7: PME# disabled
>> +[  611.853086] pcieport 0000:00:1c.7: PME# enabled
>> +[  611.893364] pcieport 0000:00:1c.7: PME# disabled
>> +[  611.903283] pcieport 0000:00:1c.7: PME# enabled
>> +[  612.183893] pci 0000:11:00.0: PME# disabled
>> +[  612.184789] pcieport 0000:00:1c.7: PME# disabled
>> +[  612.203753] pcieport 0000:00:1c.7: PME# disabled
>> +[  612.205521] pci_bus 0000:11: busn_res: [bus 11-16] is released
>>
>> and releases the iomem's:
>>
>> # diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt 
>> --- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
>> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
>> @@ -34,17 +34,12 @@
>>  dfa00000-feafffff : PCI Bus 0000:00
>>    dfa00000-dfa00fff : pnp 00:0a
>>    e0000000-efffffff : 0000:00:02.0
>> -  f0000000-f10fffff : PCI Bus 0000:11
>>    f1100000-f11fffff : PCI Bus 0000:05
>>      f1100000-f1103fff : 0000:05:00.0
>>        f1100000-f1103fff : r8169
>>      f1104000-f1104fff : 0000:05:00.0
>>        f1104000-f1104fff : r8169
>>    f6800000-f6bfffff : 0000:00:02.0
>> -  f6c00000-f7cfffff : PCI Bus 0000:11
>> -    f6c00000-f6c7ffff : 0000:11:00.0
>> -    f6c80000-f6c83fff : 0000:11:00.0
>> -    f6c84000-f6c8407f : 0000:11:00.0
>>    f7d00000-f7dfffff : PCI Bus 0000:0b
>>      f7d00000-f7d0ffff : 0000:0b:00.0
>>      f7d10000-f7d11fff : 0000:0b:00.0
>> #
>>
>> The accompanying diff in lspci:
>>
>> # diff -u -w lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt 
>> --- lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
>> +++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt        2013-03-14 00:32:20.000000000 +0100
>> @@ -429,69 +429,6 @@
>>  e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
>>  
> 
> After you remove 00:1c.7 PCI bridge device. The 11:00.0 Mass storage controller device  still shown in lspci?

No. I thought I showed that in the diffs clearly. Please check again. ;-)
A note: It was in the diff output immediately below this place where you
wrote the question. ;))


> If 11:00.0 Mass storage controller device was removed now. you can try to echo 1 > /sys/bus/pci/rescan, rescan the 00:1c.7 PCI bridge
> device and its child devices.
> Then try to insert the card.

Will do below.

> 
> I use pciehp module in my machine and add pciehp_debug=1,debug info will print while I doing eject or insert.
> I don't know why pciehp cannot print debug info in your system, maybe you can try to build it as module.
> We can only trace eject action now, if eject action cannot complete normally, hot insert won't success.

Hmm, I did the following to my kernel commandline to be sure:

-pciehp.pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
+pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off


So now the test what happens if I remove 1c.7 and do a bus rescan. I can tell you
in advance the hotplugged card was not picked up until I did a second pci rescan.
But please check the diffs below. I tried to say it short but omit many details
which are out of my knowledge. ;)






The eject of a coldplugged card. Note that PresDet on the Changed: line is not set
to PresDet+ or is it because it was overwritten too early (as you said elsewhere)?

--- lspci_loop.11:19:01 2013-03-14 11:19:01.000000000 +0100
+++ lspci_loop.11:19:02 2013-03-14 11:19:02.000000000 +0100
@@ -437,7 +437,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -451,13 +451,13 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -476,11 +476,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -793,55 +793,23 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
-40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
-60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
-80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
-90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

--- lspci_loop.11:19:24 2013-03-14 11:19:24.000000000 +0100
+++ lspci_loop.11:19:25 2013-03-14 11:19:25.000000000 +0100
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel

# diff -u -w dmesg.txt dmesg_ejected.txt 
# diff -u -w iomem.txt iomem_ejected.txt 
#


# echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove


--- lspci_loop.11:20:46 2013-03-14 11:20:46.000000000 +0100
+++ lspci_loop.11:20:47 2013-03-14 11:20:47.000000000 +0100
@@ -429,69 +429,6 @@
 e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
 
-00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
-       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: 64 bytes
-       Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
-       I/O behind bridge: 0000c000-0000dfff
-       Memory behind bridge: f6c00000-f7cfffff
-       Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       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: [40] Express (v2) Root Port (Slot+), MSI 00
-               DevCap: MaxPayload 128 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 128 bytes
-               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
-               LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
-                       ClockPM- Surprise- LLActRep+ BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
-               SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
-                       Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
-               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
-                       Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
-                       Changed: MRL- PresDet- LinkState+
-               RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
-               RootCap: CRSVisible-
-               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
-               DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
-               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
-               LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
-                        Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
-                        Compliance De-emphasis: -6dB
-               LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
-                        EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
-       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
-               Address: 00000000  Data: 0000
-       Capabilities: [90] Subsystem: Dell Device 04b3
-       Capabilities: [a0] 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-
-       Kernel driver in use: pcieport
-00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
-20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
-30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
-40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
-60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
-70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
-80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
-a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
-e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
-
 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
        Subsystem: Dell Device 04b3
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
@@ -793,23 +730,3 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
-00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-

Hmm, I forgot to catch the iomem and dmesg at this stage.


# echo 1 > /sys/bus/pci/rescan
#

# diff -u -w iomem_ejected.txt iomem_ejected_removed_1c.7__pci_rescan.txt 
--- iomem_ejected.txt   2013-03-14 11:19:04.000000000 +0100
+++ iomem_ejected_removed_1c.7__pci_rescan.txt  2013-03-14 11:22:16.000000000 +0100
@@ -34,19 +34,14 @@
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
-  f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
+  f1200000-f24fffff : PCI Bus 0000:11
+  f2500000-f37fffff : PCI Bus 0000:11
   f6800000-f6bfffff : 0000:00:02.0
-  f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
-    f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0

--- lspci_loop.11:21:17 2013-03-14 11:21:17.000000000 +0100
+++ lspci_loop.11:21:18 2013-03-14 11:21:18.000000000 +0100
@@ -429,6 +429,69 @@
 e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
 
+00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
+       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: 64 bytes
+       Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
+       I/O behind bridge: 00002000-00003fff
+       Memory behind bridge: f1200000-f24fffff
+       Prefetchable memory behind bridge: 00000000f2500000-00000000f37fffff
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
+               DevCap: MaxPayload 128 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 128 bytes
+               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
+               LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
+                       ClockPM- Surprise- LLActRep+ BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
+                       Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
+               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
+                       Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
+               RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
+               RootCap: CRSVisible-
+               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
+               DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
+               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
+               LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
+                        Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
+                        Compliance De-emphasis: -6dB
+               LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
+                        EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
+       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
+               Address: 00000000  Data: 0000
+       Capabilities: [90] Subsystem: Dell Device 04b3
+       Capabilities: [a0] 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-
+       Kernel driver in use: pcieport
+00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 20 30 00 00
+20: 20 f1 40 f2 51 f2 71 f3 00 00 00 00 00 00 00 00
+30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
+40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
+60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
+70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
+80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
+a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
+b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
+e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
+f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
+
 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
        Subsystem: Dell Device 04b3
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

# diff -u -w dmesg_ejected.txt dmesg_ejected_removed_1c.7__pci_rescan.txt 
--- dmesg_ejected.txt   2013-03-14 11:19:14.000000000 +0100
+++ dmesg_ejected_removed_1c.7__pci_rescan.txt  2013-03-14 11:22:07.000000000 +0100
@@ -824,3 +824,52 @@
 [   36.491646] r8169 0000:05:00.0 eth0: link up
 [   37.742951] r8169 0000:05:00.0 eth0: link down
 [   40.590057] r8169 0000:05:00.0 eth0: link up
+[  301.976189] sata_sil24 0000:11:00.0: PME# disabled
+[  301.979812] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  301.981627] pcieport 0000:00:1c.7: PME# disabled
+[  301.984689] pci_bus 0000:11: busn_res: [bus 11-16] is released
+[  333.819564] pci_bus 0000:00: scanning bus
+[  333.819676] pci 0000:00:1c.7: [8086:1c1e] type 01 class 0x060400
+[  333.819753] pci 0000:00:1c.7: calling pci_fixup_transparent_bridge+0x0/0x1d
+[  333.819855] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
+[  333.819862] pci 0000:00:1c.7: PME# disabled
+[  333.820811] pci 0000:00:1c.7: System wakeup disabled by ACPI
+[  333.821238] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
+[  333.821244] pci_bus 0000:03: scanning bus
+[  333.821248] pci_bus 0000:03: bus scan returning with max=03
+[  333.821254] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
+[  333.821260] pci_bus 0000:05: scanning bus
+[  333.821262] pci_bus 0000:05: bus scan returning with max=05
+[  333.821268] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
+[  333.821273] pci_bus 0000:09: scanning bus
+[  333.821275] pci_bus 0000:09: bus scan returning with max=09
+[  333.821281] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
+[  333.821286] pci_bus 0000:0b: scanning bus
+[  333.821288] pci_bus 0000:0b: bus scan returning with max=0b
+[  333.821293] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
+[  333.821624] pci_bus 0000:11: scanning bus
+[  333.821629] pci_bus 0000:11: fixups for bus
+[  333.821630] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
+[  333.821637] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
+[  333.821643] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
+[  333.821652] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
+[  333.821653] pci_bus 0000:11: bus scan returning with max=11
+[  333.821658] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
+[  333.821668] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
+[  333.821677] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
+[  333.821686] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
+[  333.821695] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
+[  333.821702] pci_bus 0000:00: bus scan returning with max=16
+[  333.821788] pci 0000:00:1c.7: bridge window [mem 0x00100000-0x011fffff 64bit pref] to [bus 11-16] add_size 200000
+[  333.821795] pci 0000:00:1c.7: bridge window [mem 0x00100000-0x011fffff] to [bus 11-16] add_size 200000
+[  333.821798] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
+[  333.821828] pci 0000:00:1c.7: res[14]=[mem 0x00100000-0x011fffff] get_res_add_size add_size 200000
+[  333.821830] pci 0000:00:1c.7: res[15]=[mem 0x00100000-0x011fffff 64bit pref] get_res_add_size add_size 200000
+[  333.821836] pci 0000:00:1c.7: BAR 14: assigned [mem 0xf1200000-0xf24fffff]
+[  333.821840] pci 0000:00:1c.7: BAR 15: assigned [mem 0xf2500000-0xf37fffff 64bit pref]
+[  333.821843] pci 0000:00:1c.7: BAR 13: assigned [io  0x2000-0x3fff]
+[  333.821862] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
+[  333.821866] pci 0000:00:1c.7:   bridge window [io  0x2000-0x3fff]
+[  333.821873] pci 0000:00:1c.7:   bridge window [mem 0xf1200000-0xf24fffff]
+[  333.821879] pci 0000:00:1c.7:   bridge window [mem 0xf2500000-0xf37fffff 64bit pref]
+[  333.823391] pci 0000:00:1c.7: enabling bus mastering
#




Hot insert of the card:

--- lspci_loop.11:23:22 2013-03-14 11:23:22.000000000 +0100
+++ lspci_loop.11:23:23 2013-03-14 11:23:23.000000000 +0100
@@ -451,12 +451,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -480,7 +480,7 @@
 20: 20 f1 40 f2 51 f2 71 f3 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00

# diff -u -w dmesg_ejected_removed_1c.7__pci_rescan.txt dmesg_ejected_removed_1c.7__pci_rescan_hotinsert.txt 
# diff -u -w iomem_ejected_removed_1c.7__pci_rescan.txt iomem_ejected_removed_1c.7__pci_rescan_hotinsert.txt 
#



Yet another "echo 1 > /sys/bus/pci/rescan"


--- lspci_loop.11:25:04 2013-03-14 11:25:04.000000000 +0100
+++ lspci_loop.11:25:05 2013-03-14 11:25:05.000000000 +0100
@@ -793,3 +793,55 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f1204000 (64-bit, non-prefetchable) [size=128]
+       Region 2: Memory at f1200000 (64-bit, non-prefetchable) [size=16K]
+       Region 4: I/O ports at 2000 [size=128]
+       [virtual] Expansion ROM at f2500000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
+               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
+                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
+                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
+               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+       Kernel driver in use: sata_sil24
+00: 95 10 32 31 07 00 10 00 01 00 80 01 00 00 00 00
+10: 04 40 20 f1 00 00 00 00 04 00 20 f1 00 00 00 00
+20: 01 20 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
+40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
+60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
+80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
+90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+

# diff -u -w iomem_ejected_removed_1c.7__pci_rescan_hotinsert.txt iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- iomem_ejected_removed_1c.7__pci_rescan_hotinsert.txt        2013-03-14 11:23:36.000000000 +0100
+++ iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt     2013-03-14 11:25:39.000000000 +0100
@@ -40,7 +40,12 @@
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
   f1200000-f24fffff : PCI Bus 0000:11
+    f1200000-f1203fff : 0000:11:00.0
+      f1200000-f1203fff : sata_sil24
+    f1204000-f120407f : 0000:11:00.0
+      f1204000-f120407f : sata_sil24
   f2500000-f37fffff : PCI Bus 0000:11
+    f2500000-f257ffff : 0000:11:00.0
   f6800000-f6bfffff : 0000:00:02.0
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0

# diff -u -w dmesg_ejected_removed_1c.7__pci_rescan_hotinsert.txt dmesg_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- dmesg_ejected_removed_1c.7__pci_rescan_hotinsert.txt        2013-03-14 11:23:46.000000000 +0100
+++ dmesg_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt     2013-03-14 11:25:30.000000000 +0100
@@ -873,3 +873,47 @@
 [  333.821873] pci 0000:00:1c.7:   bridge window [mem 0xf1200000-0xf24fffff]
 [  333.821879] pci 0000:00:1c.7:   bridge window [mem 0xf2500000-0xf37fffff 64bit pref]
 [  333.823391] pci 0000:00:1c.7: enabling bus mastering
+[  560.970367] pci_bus 0000:00: scanning bus
+[  560.970458] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
+[  560.970465] pci_bus 0000:03: scanning bus
+[  560.970468] pci_bus 0000:03: bus scan returning with max=03
+[  560.970474] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
+[  560.970479] pci_bus 0000:05: scanning bus
+[  560.970481] pci_bus 0000:05: bus scan returning with max=05
+[  560.970487] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
+[  560.970492] pci_bus 0000:09: scanning bus
+[  560.970493] pci_bus 0000:09: bus scan returning with max=09
+[  560.970499] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
+[  560.970504] pci_bus 0000:0b: scanning bus
+[  560.970505] pci_bus 0000:0b: bus scan returning with max=0b
+[  560.970511] pcieport 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
+[  560.970516] pci_bus 0000:11: scanning bus
+[  560.970568] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
+[  560.970613] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
+[  560.970645] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
+[  560.970666] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
+[  560.970707] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
+[  560.970825] pci 0000:11:00.0: supports D1 D2
+[  560.971265] pci_bus 0000:11: bus scan returning with max=11
+[  560.971271] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
+[  560.971280] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
+[  560.971289] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
+[  560.971298] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
+[  560.971307] pcieport 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
+[  560.971314] pci_bus 0000:00: bus scan returning with max=16
+[  560.971378] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
+[  560.971403] pci 0000:11:00.0: BAR 6: assigned [mem 0xf2500000-0xf257ffff pref]
+[  560.971406] pci 0000:11:00.0: BAR 2: assigned [mem 0xf1200000-0xf1203fff 64bit]
+[  560.971428] pci 0000:11:00.0: BAR 2: set to [mem 0xf1200000-0xf1203fff 64bit] (PCI address [0xf1200000-0xf1203fff])
+[  560.971429] pci 0000:11:00.0: BAR 0: assigned [mem 0xf1204000-0xf120407f 64bit]
+[  560.971451] pci 0000:11:00.0: BAR 0: set to [mem 0xf1204000-0xf120407f 64bit] (PCI address [0xf1204000-0xf120407f])
+[  560.971453] pci 0000:11:00.0: BAR 4: assigned [io  0x2000-0x207f]
+[  560.971460] pci 0000:11:00.0: BAR 4: set to [io  0x2000-0x207f] (PCI address [0x2000-0x207f])
+[  560.971693] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
+[  560.972478] sata_sil24 0000:11:00.0: enabling bus mastering
+[  560.975779] scsi8 : sata_sil24
+[  560.978910] scsi9 : sata_sil24
+[  560.979497] ata9: SATA max UDMA/100 host m128@0xf1204000 port 0xf1200000 irq 19
+[  560.979502] ata10: SATA max UDMA/100 host m128@0xf1204000 port 0xf1202000 irq 19
+[  563.067179] ata9: SATA link down (SStatus 0 SControl 0)
+[  565.159741] ata10: SATA link down (SStatus 0 SControl 0)
#


Let me note that in usually saw instead:
[  211.879397] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)

During cold boot, the the bus scanning messages are much more verbose, call some quirks,
etc. Please see the attached dmesg to have something to compare with the above rescan output .

Whether the i915 thing relates to skipped quirks, I don't know.

Why is there  [bus 03-04] , [bus 05-06] ,  [bus 09-0a] , [bus 0b-0c] but then [bus 11-16]?
Is that in decimal?




Again, a closing comparison of a coldboot state to the one after the eject,
removal of 1c.7, pci rescan, hotinsert, another pci rescan:

# diff -u -w iomem.txt iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- iomem.txt   2013-03-14 11:17:26.000000000 +0100
+++ iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt     2013-03-14 11:25:39.000000000 +0100
@@ -34,19 +34,19 @@
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
-  f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
+  f1200000-f24fffff : PCI Bus 0000:11
+    f1200000-f1203fff : 0000:11:00.0
+      f1200000-f1203fff : sata_sil24
+    f1204000-f120407f : 0000:11:00.0
+      f1204000-f120407f : sata_sil24
+  f2500000-f37fffff : PCI Bus 0000:11
+    f2500000-f257ffff : 0000:11:00.0
   f6800000-f6bfffff : 0000:00:02.0
-  f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
-    f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
#
# diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- lspci_vvvxxx.txt    2013-03-14 11:18:14.000000000 +0100
+++ lspci_vvvxxx_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt      2013-03-14 11:25:21.000000000 +0100
@@ -434,9 +434,9 @@
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
-       I/O behind bridge: 0000c000-0000dfff
-       Memory behind bridge: f6c00000-f7cfffff
-       Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
+       I/O behind bridge: 00002000-00003fff
+       Memory behind bridge: f1200000-f24fffff
+       Prefetchable memory behind bridge: 00000000f2500000-00000000f37fffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
@@ -457,7 +457,7 @@
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -476,11 +476,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
-20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 20 30 00 00
+20: 20 f1 40 f2 51 f2 71 f3 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
@@ -797,12 +797,12 @@
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
        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: 64 bytes
+       Latency: 0
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f1204000 (64-bit, non-prefetchable) [size=128]
+       Region 2: Memory at f1200000 (64-bit, non-prefetchable) [size=16K]
+       Region 4: I/O ports at 2000 [size=128]
+       [virtual] Expansion ROM at f2500000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
@@ -828,10 +828,10 @@
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
+00: 95 10 32 31 07 00 10 00 01 00 80 01 00 00 00 00
+10: 04 40 20 f1 00 00 00 00 04 00 20 f1 00 00 00 00
+20: 01 20 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

#

The slot status changes were from coldboot with card loaded:

11:18:26 SlotStatus 0040
11:19:01 SlotStatus 0040

eject 

11:19:02 SlotStatus 0100
11:20:46 SlotStatus 0100

removed 1.c7, rescan

11:21:19 SlotStatus 0100

hot insert

11:23:22 SlotStatus 0100
11:23:23 SlotStatus 0140



Martin


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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
       [not found]     ` <51417C28.40402@huawei.com>
  2013-03-14 13:00       ` Martin Mokrejs
  2013-03-14 15:18       ` Martin Mokrejs
@ 2013-03-14 15:20       ` Martin Mokrejs
  2013-03-14 17:54       ` Martin Mokrejs
  3 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-14 15:20 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

[re-sending just the attachment and showing below just the tail of the message it belongs to]


The slot status changes were from coldboot with card loaded:

11:18:26 SlotStatus 0040
11:19:01 SlotStatus 0040

eject 

11:19:02 SlotStatus 0100
11:20:46 SlotStatus 0100

removed 1.c7, rescan

11:21:19 SlotStatus 0100

hot insert

11:23:22 SlotStatus 0100
11:23:23 SlotStatus 0140



Martin


[-- Attachment #2: dmesg_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt --]
[-- Type: text/plain, Size: 61481 bytes --]

[    0.000000] Linux version 3.9.0-rc1-default (root@vostro) (gcc version 4.6.3 (Gentoo 4.6.3 p1.8, pie-0.5.2) ) #4 SMP Fri Mar 8 00:47:09 MET 2013
[    0.000000] Command line: root=/dev/sda5 pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d3ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009d400-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000020200000-0x000000003fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000401fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040200000-0x00000000da4e4fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000da4e5000-0x00000000da527fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000da528000-0x00000000da792fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000da793000-0x00000000da966fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000da967000-0x00000000daa88fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000daa89000-0x00000000dad67fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000dad68000-0x00000000dafe7fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000dafe8000-0x00000000daffffff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000db800000-0x00000000df9fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000041fdfffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.6 present.
[    0.000000] DMI: Dell Inc. Vostro 3550/, BIOS A11 08/03/2012
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] No AGP bridge found
[    0.000000] e820: last_pfn = 0x41fe00 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-CFFFF write-protect
[    0.000000]   D0000-E7FFF uncachable
[    0.000000]   E8000-FFFFF write-protect
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask C00000000 write-back
[    0.000000]   1 base 400000000 mask FE0000000 write-back
[    0.000000]   2 base 0DB800000 mask FFF800000 uncachable
[    0.000000]   3 base 0DC000000 mask FFC000000 uncachable
[    0.000000]   4 base 0E0000000 mask FE0000000 uncachable
[    0.000000]   5 base 41FE00000 mask FFFE00000 uncachable
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000]   8 disabled
[    0.000000]   9 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820: update [mem 0xdb800000-0xffffffff] usable ==> reserved
[    0.000000] e820: last_pfn = 0xdaa89 max_arch_pfn = 0x400000000
[    0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[    0.000000] reserving inaccessible SNB gfx pages
[    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[    0.000000]  [mem 0x00000000-0x000fffff] page 4k
[    0.000000] BRK [0x02573000, 0x02573fff] PGTABLE
[    0.000000] BRK [0x02574000, 0x02574fff] PGTABLE
[    0.000000] BRK [0x02575000, 0x02575fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0x41fc00000-0x41fdfffff]
[    0.000000]  [mem 0x41fc00000-0x41fdfffff] page 2M
[    0.000000] BRK [0x02576000, 0x02576fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0x41c000000-0x41fbfffff]
[    0.000000]  [mem 0x41c000000-0x41fbfffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x400000000-0x41bffffff]
[    0.000000]  [mem 0x400000000-0x41bffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x00100000-0x1fffffff]
[    0.000000]  [mem 0x00100000-0x001fffff] page 4k
[    0.000000]  [mem 0x00200000-0x1fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x20200000-0x3fffffff]
[    0.000000]  [mem 0x20200000-0x3fffffff] page 2M
[    0.000000] init_memory_mapping: [mem 0x40200000-0xda4e4fff]
[    0.000000]  [mem 0x40200000-0xda3fffff] page 2M
[    0.000000]  [mem 0xda400000-0xda4e4fff] page 4k
[    0.000000] BRK [0x02577000, 0x02577fff] PGTABLE
[    0.000000] init_memory_mapping: [mem 0xda528000-0xda792fff]
[    0.000000]  [mem 0xda528000-0xda792fff] page 4k
[    0.000000] init_memory_mapping: [mem 0xda967000-0xdaa88fff]
[    0.000000]  [mem 0xda967000-0xdaa88fff] page 4k
[    0.000000] init_memory_mapping: [mem 0x100000000-0x3ffffffff]
[    0.000000]  [mem 0x100000000-0x3ffffffff] page 2M
[    0.000000] ACPI: RSDP 00000000000f0410 00024 (v02   DELL)
[    0.000000] ACPI: XSDT 00000000dafe8078 00074 (v01 DELL    WN09    01072009 AMI  00010013)
[    0.000000] ACPI: FACP 00000000daff1d38 000F4 (v04   DELL     WN09 01072009 AMI  00010013)
[    0.000000] ACPI: DSDT 00000000dafe8180 09BB6 (v02   DELL     WN09 00000000 INTL 20051117)
[    0.000000] ACPI: FACS 00000000dafe3f80 00040
[    0.000000] ACPI: APIC 00000000daff1e30 00072 (v03   DELL     WN09 01072009 AMI  00010013)
[    0.000000] ACPI: MCFG 00000000daff1ea8 0003C (v01   DELL     WN09 01072009 MSFT 00000097)
[    0.000000] ACPI: SSDT 00000000daff1ee8 004B0 (v01 TrmRef PtidDevc 00001000 INTL 20091112)
[    0.000000] ACPI: SLIC 00000000daff2398 00176 (v01 DELL    WN09    01072009 AMI  00010013)
[    0.000000] ACPI: HPET 00000000daff2510 00038 (v01   DELL     WN09 01072009 AMI. 00000004)
[    0.000000] ACPI: SSDT 00000000daff2548 00846 (v01  PmRef  Cpu0Ist 00003000 INTL 20051117)
[    0.000000] ACPI: SSDT 00000000daff2d90 00996 (v01  PmRef    CpuPm 00003000 INTL 20051117)
[    0.000000] ACPI: DMAR 00000000daff3728 000E8 (v01 INTEL      SNB  00000001 INTL 00000001)
[    0.000000] ACPI: OSFR 00000000daff3810 00086 (v01 DELL    M08     07DC0803 ASL  00000061)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000041fdfffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x41fdfffff]
[    0.000000]   NODE_DATA [mem 0x41fdc8000-0x41fdedfff]
[    0.000000]  [ffffea0000000000-ffffea00107fffff] PMD -> [ffff88040f400000-ffff88041f3fffff] on node 0
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00001000-0x00ffffff]
[    0.000000]   DMA32    [mem 0x01000000-0xffffffff]
[    0.000000]   Normal   [mem 0x100000000-0x41fdfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00001000-0x0009cfff]
[    0.000000]   node   0: [mem 0x00100000-0x1fffffff]
[    0.000000]   node   0: [mem 0x20200000-0x3fffffff]
[    0.000000]   node   0: [mem 0x40200000-0xda4e4fff]
[    0.000000]   node   0: [mem 0xda528000-0xda792fff]
[    0.000000]   node   0: [mem 0xda967000-0xdaa88fff]
[    0.000000]   node   0: [mem 0x100000000-0x41fdfffff]
[    0.000000] On node 0 totalpages: 4170254
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA zone: 156 pages reserved
[    0.000000]   DMA zone: 3996 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 13906 pages used for memmap
[    0.000000]   DMA32 zone: 889970 pages, LIFO batch:31
[    0.000000]   Normal zone: 51192 pages used for memmap
[    0.000000]   Normal zone: 3276288 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] enabled)
[    0.000000] ACPI: NR_CPUS/possible_cpus limit of 2 reached.  Processor 2/0x1 ignored.
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
[    0.000000] ACPI: NR_CPUS/possible_cpus limit of 2 reached.  Processor 3/0x3 ignored.
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[    0.000000] smpboot: 4 Processors exceeds NR_CPUS limit of 2
[    0.000000] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: 000000000009d000 - 000000000009e000
[    0.000000] PM: Registered nosave memory: 000000000009e000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 0000000020000000 - 0000000020200000
[    0.000000] PM: Registered nosave memory: 0000000040000000 - 0000000040200000
[    0.000000] PM: Registered nosave memory: 00000000da4e5000 - 00000000da528000
[    0.000000] PM: Registered nosave memory: 00000000da793000 - 00000000da967000
[    0.000000] PM: Registered nosave memory: 00000000daa89000 - 00000000dad68000
[    0.000000] PM: Registered nosave memory: 00000000dad68000 - 00000000dafe8000
[    0.000000] PM: Registered nosave memory: 00000000dafe8000 - 00000000db000000
[    0.000000] PM: Registered nosave memory: 00000000db000000 - 00000000db800000
[    0.000000] PM: Registered nosave memory: 00000000db800000 - 00000000dfa00000
[    0.000000] PM: Registered nosave memory: 00000000dfa00000 - 00000000f8000000
[    0.000000] PM: Registered nosave memory: 00000000f8000000 - 00000000fc000000
[    0.000000] PM: Registered nosave memory: 00000000fc000000 - 00000000fec00000
[    0.000000] PM: Registered nosave memory: 00000000fec00000 - 00000000fec01000
[    0.000000] PM: Registered nosave memory: 00000000fec01000 - 00000000fed00000
[    0.000000] PM: Registered nosave memory: 00000000fed00000 - 00000000fed04000
[    0.000000] PM: Registered nosave memory: 00000000fed04000 - 00000000fed1c000
[    0.000000] PM: Registered nosave memory: 00000000fed1c000 - 00000000fed20000
[    0.000000] PM: Registered nosave memory: 00000000fed20000 - 00000000fee00000
[    0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[    0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000ff000000
[    0.000000] PM: Registered nosave memory: 00000000ff000000 - 0000000100000000
[    0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices
[    0.000000] setup_percpu: NR_CPUS:2 nr_cpumask_bits:2 nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 26 pages/cpu @ffff88041fa00000 s75776 r8192 d22528 u1048576
[    0.000000] pcpu-alloc: s75776 r8192 d22528 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 4104936
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: root=/dev/sda5 pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
[    0.000000] PCIe ASPM is disabled
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] xsave: enabled xstate_bv 0x7, cntxt size 0x340
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Memory: 16329240k/17299456k available (6032k kernel code, 618440k absent, 351776k reserved, 3891k data, 972k init)
[    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	CONFIG_RCU_FANOUT set to non-default value of 32
[    0.000000] NR_IRQS:4352 nr_irqs:512 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
[    0.000000] ... CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 5855 kB
[    0.000000]  per task-struct memory footprint: 1920 bytes
[    0.000000] hpet clockevent registered
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.010000] tsc: Detected 2793.485 MHz processor
[    0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 5586.97 BogoMIPS (lpj=27934850)
[    0.000190] pid_max: default: 32768 minimum: 301
[    0.001836] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes)
[    0.004987] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.006375] Mount-cache hash table entries: 256
[    0.007978] CPU: Physical Processor ID: 0
[    0.008067] CPU: Processor Core ID: 0
[    0.008159] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.008311] mce: CPU supports 7 MCE banks
[    0.008413] CPU0: Thermal monitoring enabled (TM1)
[    0.008517] Last level iTLB entries: 4KB 512, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32
tlb_flushall_shift: 5
[    0.008820] Freeing SMP alternatives: 16k freed
[    0.008916] ACPI: Core revision 20130117
[    0.124555] ACPI: All ACPI Tables successfully acquired
[    0.155823] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.256043] smpboot: CPU0: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz (fam: 06, model: 2a, stepping: 07)
[    0.256314] TSC deadline timer enabled
[    0.256324] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, Intel PMU driver.
[    0.256629] perf_event_intel: PEBS disabled due to CPU errata, please upgrade microcode
[    0.256732] ... version:                3
[    0.256823] ... bit width:              48
[    0.256913] ... generic registers:      4
[    0.257004] ... value mask:             0000ffffffffffff
[    0.257097] ... max period:             000000007fffffff
[    0.257189] ... fixed-purpose events:   3
[    0.257280] ... event mask:             000000070000000f
[    0.258786] SMP alternatives: lockdep: fixing up alternatives
[    0.258892] smpboot: Booting Node   0, Processors  #1 OK
[    0.272229] Brought up 2 CPUs
[    0.272322] smpboot: Total of 2 processors activated (11173.94 BogoMIPS)
[    0.274103] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[    0.275321] devtmpfs: initialized
[    0.277485] PM: Registering ACPI NVS region [mem 0xda4e5000-0xda527fff] (274432 bytes)
[    0.277860] PM: Registering ACPI NVS region [mem 0xdad68000-0xdafe7fff] (2621440 bytes)
[    0.280795] xor: automatically using best checksumming function:
[    0.376494]    avx       : 19748.000 MB/sec
[    0.378166] regulator-dummy: no parameters
[    0.379067] NET: Registered protocol family 16
[    0.382420] ACPI: bus type pci registered
[    0.383371] dca service started, version 1.12.1
[    0.383657] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.383804] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.391293] PCI: Using configuration type 1 for base access
[    0.437237] bio: create slab <bio-0> at 0
[    0.606815] raid6: sse2x1    7595 MB/s
[    0.777040] raid6: sse2x2    9349 MB/s
[    0.947266] raid6: sse2x4   10671 MB/s
[    0.947267] raid6: using algorithm sse2x4 (10671 MB/s)
[    0.947268] raid6: using ssse3x2 recovery algorithm
[    0.947390] ACPI: Added _OSI(Module Device)
[    0.947489] ACPI: Added _OSI(Processor Device)
[    0.947588] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.947690] ACPI: Added _OSI(Processor Aggregator Device)
[    0.953451] ACPI: EC: Look up EC in DSDT
[    0.963743] ACPI: Executed 1 blocks of module-level executable AML code
[    1.056160] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    1.110079] ACPI: SSDT 00000000dad51698 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.113242] ACPI: Dynamic OEM Table Load:
[    1.113244] ACPI: SSDT           (null) 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.145031] ACPI: SSDT 00000000dad52a98 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.149845] ACPI: Dynamic OEM Table Load:
[    1.149847] ACPI: SSDT           (null) 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.189059] ACPI: SSDT 00000000dad50d98 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.191631] ACPI: Dynamic OEM Table Load:
[    1.191633] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.231575] ACPI: Interpreter enabled
[    1.231670] ACPI: (supports S0 S1ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
[    1.232060]  S3 S4 S5)
[    1.232142] ACPI: Using IOAPIC for interrupt routing
[    1.232707] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.563366] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    1.569487] acpi PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x19)
[    1.586292] PCI host bridge to bus 0000:00
[    1.586393] pci_bus 0000:00: root bus resource [bus 00-3e]
[    1.586495] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    1.586596] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    1.586697] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    1.586799] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff]
[    1.586900] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff]
[    1.587003] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff]
[    1.587105] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff]
[    1.587208] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff]
[    1.587311] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff]
[    1.587414] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff]
[    1.587517] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff]
[    1.587621] pci_bus 0000:00: scanning bus
[    1.587658] pci 0000:00:00.0: [8086:0104] type 00 class 0x060000
[    1.587667] pci 0000:00:00.0: calling quirk_mmio_always_on+0x0/0xa
[    1.589580] pci 0000:00:02.0: [8086:0126] type 00 class 0x030000
[    1.589596] pci 0000:00:02.0: reg 10: [mem 0xf6800000-0xf6bfffff 64bit]
[    1.589605] pci 0000:00:02.0: reg 18: [mem 0xe0000000-0xefffffff 64bit pref]
[    1.589611] pci 0000:00:02.0: reg 20: [io  0xf000-0xf03f]
[    1.591413] pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000
[    1.591451] pci 0000:00:16.0: reg 10: [mem 0xf7f0a000-0xf7f0a00f 64bit]
[    1.591588] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    1.591615] pci 0000:00:16.0: PME# disabled
[    1.593530] pci 0000:00:1a.0: [8086:1c2d] type 00 class 0x0c0320
[    1.593566] pci 0000:00:1a.0: reg 10: [mem 0xf7f08000-0xf7f083ff]
[    1.593723] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    1.593729] pci 0000:00:1a.0: PME# disabled
[    1.613679] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    1.614359] pci 0000:00:1b.0: [8086:1c20] type 00 class 0x040300
[    1.614388] pci 0000:00:1b.0: reg 10: [mem 0xf7f00000-0xf7f03fff 64bit]
[    1.614534] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    1.614540] pci 0000:00:1b.0: PME# disabled
[    1.615775] pci 0000:00:1b.0: System wakeup disabled by ACPI
[    1.616374] pci 0000:00:1c.0: [8086:1c10] type 01 class 0x060400
[    1.616447] pci 0000:00:1c.0: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.616533] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.616538] pci 0000:00:1c.0: PME# disabled
[    1.617169] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    1.617760] pci 0000:00:1c.1: [8086:1c12] type 01 class 0x060400
[    1.617831] pci 0000:00:1c.1: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.617914] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    1.617920] pci 0000:00:1c.1: PME# disabled
[    1.618596] pci 0000:00:1c.1: System wakeup disabled by ACPI
[    1.619199] pci 0000:00:1c.3: [8086:1c16] type 01 class 0x060400
[    1.619267] pci 0000:00:1c.3: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.619351] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.619357] pci 0000:00:1c.3: PME# disabled
[    1.620108] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    1.620703] pci 0000:00:1c.4: [8086:1c18] type 01 class 0x060400
[    1.620773] pci 0000:00:1c.4: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.620858] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    1.620864] pci 0000:00:1c.4: PME# disabled
[    1.621660] pci 0000:00:1c.4: System wakeup disabled by ACPI
[    1.623581] pci 0000:00:1c.7: [8086:1c1e] type 01 class 0x060400
[    1.623650] pci 0000:00:1c.7: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.623733] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
[    1.623739] pci 0000:00:1c.7: PME# disabled
[    1.624871] pci 0000:00:1c.7: System wakeup disabled by ACPI
[    1.625482] pci 0000:00:1d.0: [8086:1c26] type 00 class 0x0c0320
[    1.625517] pci 0000:00:1d.0: reg 10: [mem 0xf7f07000-0xf7f073ff]
[    1.625674] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    1.625680] pci 0000:00:1d.0: PME# disabled
[    1.645960] pci 0000:00:1d.0: System wakeup disabled by ACPI
[    1.646584] pci 0000:00:1f.0: [8086:1c4b] type 00 class 0x060100
[    1.647320] pci 0000:00:1f.2: [8086:1c03] type 00 class 0x010601
[    1.647359] pci 0000:00:1f.2: reg 10: [io  0xf0b0-0xf0b7]
[    1.647374] pci 0000:00:1f.2: reg 14: [io  0xf0a0-0xf0a3]
[    1.647387] pci 0000:00:1f.2: reg 18: [io  0xf090-0xf097]
[    1.647402] pci 0000:00:1f.2: reg 1c: [io  0xf080-0xf083]
[    1.647417] pci 0000:00:1f.2: reg 20: [io  0xf060-0xf07f]
[    1.647432] pci 0000:00:1f.2: reg 24: [mem 0xf7f06000-0xf7f067ff]
[    1.647533] pci 0000:00:1f.2: PME# supported from D3hot
[    1.647539] pci 0000:00:1f.2: PME# disabled
[    1.649182] pci 0000:00:1f.3: [8086:1c22] type 00 class 0x0c0500
[    1.649211] pci 0000:00:1f.3: reg 10: [mem 0xf7f05000-0xf7f050ff 64bit]
[    1.649253] pci 0000:00:1f.3: reg 20: [io  0xf040-0xf05f]
[    1.650916] pci_bus 0000:00: fixups for bus
[    1.650920] pci 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
[    1.651367] pci_bus 0000:03: scanning bus
[    1.651371] pci_bus 0000:03: fixups for bus
[    1.651373] pci 0000:00:1c.0: PCI bridge to [bus 03-04]
[    1.651480] pci_bus 0000:03: bus scan returning with max=03
[    1.651486] pci 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
[    1.651926] pci_bus 0000:05: scanning bus
[    1.651976] pci 0000:05:00.0: [10ec:8168] type 00 class 0x020000
[    1.652005] pci 0000:05:00.0: reg 10: [io  0xe000-0xe0ff]
[    1.652053] pci 0000:05:00.0: reg 18: [mem 0xf1104000-0xf1104fff 64bit pref]
[    1.652083] pci 0000:05:00.0: reg 20: [mem 0xf1100000-0xf1103fff 64bit pref]
[    1.652223] pci 0000:05:00.0: supports D1 D2
[    1.652224] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.652232] pci 0000:05:00.0: PME# disabled
[    1.652513] pci 0000:05:00.0: System wakeup disabled by ACPI
[    1.653108] pci_bus 0000:05: fixups for bus
[    1.653109] pci 0000:00:1c.1: PCI bridge to [bus 05-06]
[    1.653208] pci 0000:00:1c.1:   bridge window [io  0xe000-0xefff]
[    1.653221] pci 0000:00:1c.1:   bridge window [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.653222] pci_bus 0000:05: bus scan returning with max=05
[    1.653228] pci 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
[    1.653661] pci_bus 0000:09: scanning bus
[    1.653987] pci 0000:09:00.0: [8086:008a] type 00 class 0x028000
[    1.654273] pci 0000:09:00.0: reg 10: [mem 0xf7e00000-0xf7e01fff 64bit]
[    1.655951] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
[    1.656002] pci 0000:09:00.0: PME# disabled
[    1.656466] pci 0000:09:00.0: System wakeup disabled by ACPI
[    1.657060] pci_bus 0000:09: fixups for bus
[    1.657062] pci 0000:00:1c.3: PCI bridge to [bus 09-0a]
[    1.657163] pci 0000:00:1c.3:   bridge window [mem 0xf7e00000-0xf7efffff]
[    1.657172] pci_bus 0000:09: bus scan returning with max=09
[    1.657178] pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
[    1.657611] pci_bus 0000:0b: scanning bus
[    1.657667] pci 0000:0b:00.0: [104c:8241] type 00 class 0x0c0330
[    1.657703] pci 0000:0b:00.0: reg 10: [mem 0xf7d00000-0xf7d0ffff 64bit]
[    1.657732] pci 0000:0b:00.0: reg 18: [mem 0xf7d10000-0xf7d11fff 64bit]
[    1.657895] pci 0000:0b:00.0: supports D1 D2
[    1.657896] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.657903] pci 0000:0b:00.0: PME# disabled
[    1.658154] pci 0000:0b:00.0: System wakeup disabled by ACPI
[    1.658749] pci_bus 0000:0b: fixups for bus
[    1.658750] pci 0000:00:1c.4: PCI bridge to [bus 0b-0c]
[    1.658852] pci 0000:00:1c.4:   bridge window [mem 0xf7d00000-0xf7dfffff]
[    1.658862] pci_bus 0000:0b: bus scan returning with max=0b
[    1.658868] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
[    1.659296] pci_bus 0000:11: scanning bus
[    1.659350] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[    1.659393] pci 0000:11:00.0: reg 10: [mem 0xf6c84000-0xf6c8407f 64bit]
[    1.659427] pci 0000:11:00.0: reg 18: [mem 0xf6c80000-0xf6c83fff 64bit]
[    1.659448] pci 0000:11:00.0: reg 20: [io  0xc000-0xc07f]
[    1.659489] pci 0000:11:00.0: reg 30: [mem 0xf6c00000-0xf6c7ffff pref]
[    1.659605] pci 0000:11:00.0: supports D1 D2
[    1.660257] pci_bus 0000:11: fixups for bus
[    1.660259] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[    1.660356] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
[    1.660362] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
[    1.660371] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.660373] pci_bus 0000:11: bus scan returning with max=11
[    1.660379] pci 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
[    1.660388] pci 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
[    1.660397] pci 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
[    1.660405] pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
[    1.660414] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
[    1.660421] pci_bus 0000:00: bus scan returning with max=16
[    1.660423] ACPI _OSC control for PCIe not granted, disabling ASPM
[    1.667589] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.669549] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.671508] ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 10 11 12 14 15)
[    1.673462] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.675403] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.677419] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.679442] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.681399] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.684180] ACPI: Enabled 4 GPEs in block 00 to 3F
[    1.684199] acpi root: \_SB_.PCI0 notify handler is installed
[    1.684369] Found 1 acpi root devices
[    1.686459] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    1.686567] vgaarb: loaded
[    1.686655] vgaarb: bridge control possible 0000:00:02.0
[    1.692898] SCSI subsystem initialized
[    1.692994] ACPI: bus type scsi registered
[    1.693601] libata version 3.00 loaded.
[    1.694616] media: Linux media interface: v0.10
[    1.694914] Linux video capture interface: v2.00
[    1.695865] EDAC MC: Ver: 3.0.0
[    1.699545] wmi: Mapper loaded
[    1.699994] Advanced Linux Sound Architecture Driver Initialized.
[    1.700088] PCI: Using ACPI for IRQ routing
[    1.703919] PCI: pci_cache_line_size set to 64 bytes
[    1.703929] pci 0000:00:02.0: BAR 0: reserving [mem 0xf6800000-0xf6bfffff flags 0x140204] (d=0, p=0)
[    1.703931] pci 0000:00:02.0: BAR 2: reserving [mem 0xe0000000-0xefffffff flags 0x14220c] (d=0, p=0)
[    1.703934] pci 0000:00:02.0: BAR 4: reserving [io  0xf000-0xf03f flags 0x40101] (d=0, p=0)
[    1.703938] pci 0000:00:16.0: BAR 0: reserving [mem 0xf7f0a000-0xf7f0a00f flags 0x140204] (d=0, p=0)
[    1.703942] pci 0000:00:1a.0: BAR 0: reserving [mem 0xf7f08000-0xf7f083ff flags 0x40200] (d=0, p=0)
[    1.703947] pci 0000:00:1b.0: BAR 0: reserving [mem 0xf7f00000-0xf7f03fff flags 0x140204] (d=0, p=0)
[    1.703956] pci 0000:05:00.0: BAR 0: reserving [io  0xe000-0xe0ff flags 0x40101] (d=0, p=0)
[    1.703959] pci 0000:05:00.0: BAR 2: reserving [mem 0xf1104000-0xf1104fff flags 0x14220c] (d=0, p=0)
[    1.703961] pci 0000:05:00.0: BAR 4: reserving [mem 0xf1100000-0xf1103fff flags 0x14220c] (d=0, p=0)
[    1.703992] pci 0000:09:00.0: BAR 0: reserving [mem 0xf7e00000-0xf7e01fff flags 0x140204] (d=0, p=0)
[    1.704001] pci 0000:0b:00.0: BAR 0: reserving [mem 0xf7d00000-0xf7d0ffff flags 0x140204] (d=0, p=0)
[    1.704003] pci 0000:0b:00.0: BAR 2: reserving [mem 0xf7d10000-0xf7d11fff flags 0x140204] (d=0, p=0)
[    1.704010] pci 0000:11:00.0: BAR 0: reserving [mem 0xf6c84000-0xf6c8407f flags 0x140204] (d=0, p=0)
[    1.704013] pci 0000:11:00.0: BAR 2: reserving [mem 0xf6c80000-0xf6c83fff flags 0x140204] (d=0, p=0)
[    1.704015] pci 0000:11:00.0: BAR 4: reserving [io  0xc000-0xc07f flags 0x40101] (d=0, p=0)
[    1.704019] pci 0000:00:1d.0: BAR 0: reserving [mem 0xf7f07000-0xf7f073ff flags 0x40200] (d=0, p=0)
[    1.704025] pci 0000:00:1f.2: BAR 0: reserving [io  0xf0b0-0xf0b7 flags 0x40101] (d=0, p=0)
[    1.704028] pci 0000:00:1f.2: BAR 1: reserving [io  0xf0a0-0xf0a3 flags 0x40101] (d=0, p=0)
[    1.704029] pci 0000:00:1f.2: BAR 2: reserving [io  0xf090-0xf097 flags 0x40101] (d=0, p=0)
[    1.704032] pci 0000:00:1f.2: BAR 3: reserving [io  0xf080-0xf083 flags 0x40101] (d=0, p=0)
[    1.704033] pci 0000:00:1f.2: BAR 4: reserving [io  0xf060-0xf07f flags 0x40101] (d=0, p=0)
[    1.704036] pci 0000:00:1f.2: BAR 5: reserving [mem 0xf7f06000-0xf7f067ff flags 0x40200] (d=0, p=0)
[    1.704040] pci 0000:00:1f.3: BAR 0: reserving [mem 0xf7f05000-0xf7f050ff flags 0x140204] (d=0, p=0)
[    1.704042] pci 0000:00:1f.3: BAR 4: reserving [io  0xf040-0xf05f flags 0x40101] (d=0, p=0)
[    1.704109] e820: reserve RAM buffer [mem 0x0009d400-0x0009ffff]
[    1.704130] e820: reserve RAM buffer [mem 0xda4e5000-0xdbffffff]
[    1.704136] e820: reserve RAM buffer [mem 0xda793000-0xdbffffff]
[    1.704145] e820: reserve RAM buffer [mem 0xdaa89000-0xdbffffff]
[    1.704153] e820: reserve RAM buffer [mem 0x41fe00000-0x41fffffff]
[    1.705688] Bluetooth: Core ver 2.16
[    1.705938] NET: Registered protocol family 31
[    1.706030] Bluetooth: HCI device and connection manager initialized
[    1.706149] Bluetooth: HCI socket layer initialized
[    1.706253] Bluetooth: L2CAP socket layer initialized
[    1.706387] Bluetooth: SCO socket layer initialized
[    1.707454] cfg80211: Calling CRDA to update world regulatory domain
[    1.708173] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    1.708621] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    1.710734] Switching to clocksource hpet
[    1.711464] pnp: PnP ACPI init
[    1.711656] ACPI: bus type pnp registered
[    1.711979] pnp 00:00: [dma 4]
[    1.712337] pnp 00:00: Plug and Play ACPI device, IDs PNP0200 (active)
[    1.712779] pnp 00:01: Plug and Play ACPI device, IDs INT0800 (active)
[    1.714361] pnp 00:02: Plug and Play ACPI device, IDs PNP0103 (active)
[    1.715002] system 00:03: [io  0x0680-0x069f] has been reserved
[    1.715419] system 00:03: [io  0x1000-0x100f] has been reserved
[    1.715528] system 00:03: [io  0xffff] has been reserved
[    1.715636] system 00:03: [io  0xffff] has been reserved
[    1.715742] system 00:03: [io  0x0400-0x0453] has been reserved
[    1.715850] system 00:03: [io  0x0458-0x047f] has been reserved
[    1.715957] system 00:03: [io  0x0500-0x057f] has been reserved
[    1.716063] system 00:03: [io  0x164e-0x164f] has been reserved
[    1.716162] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.716618] pnp 00:04: Plug and Play ACPI device, IDs PNP0b00 (active)
[    1.717497] system 00:05: [io  0x0454-0x0457] has been reserved
[    1.717596] system 00:05: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    1.718033] pnp 00:06: Plug and Play ACPI device, IDs PNP0c04 (active)
[    1.718688] system 00:07: [io  0x04d0-0x04d1] has been reserved
[    1.718799] system 00:07: [mem 0xfe800000-0xfe802fff] has been reserved
[    1.718897] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.719445] pnp 00:08: Plug and Play ACPI device, IDs DLL04b3 SYN0600 SYN0002 PNP0f13 (active)
[    1.720003] pnp 00:09: Plug and Play ACPI device, IDs PNP0303 (active)
[    1.724954] system 00:0a: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    1.725063] system 00:0a: [mem 0xfed10000-0xfed17fff] has been reserved
[    1.725170] system 00:0a: [mem 0xfed18000-0xfed18fff] has been reserved
[    1.725290] system 00:0a: [mem 0xfed19000-0xfed19fff] has been reserved
[    1.725400] system 00:0a: [mem 0xf8000000-0xfbffffff] has been reserved
[    1.725511] system 00:0a: [mem 0xfed20000-0xfed3ffff] has been reserved
[    1.725621] system 00:0a: [mem 0xfed90000-0xfed93fff] has been reserved
[    1.725732] system 00:0a: [mem 0xfed45000-0xfed8ffff] has been reserved
[    1.725842] system 00:0a: [mem 0xff000000-0xffffffff] has been reserved
[    1.725961] system 00:0a: [mem 0xfee00000-0xfeefffff] could not be reserved
[    1.726071] system 00:0a: [mem 0xdfa00000-0xdfa00fff] has been reserved
[    1.726171] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.727669] pnp 00:0b: Plug and Play ACPI device, IDs SMO8800 (active)
[    1.730594] system 00:0c: [mem 0x20000000-0x201fffff] has been reserved
[    1.730705] system 00:0c: [mem 0x40000000-0x401fffff] has been reserved
[    1.730804] system 00:0c: Plug and Play ACPI device, IDs PNP0c01 (active)
[    1.732821] pnp: PnP ACPI: found 13 devices
[    1.732913] ACPI: ACPI bus type pnp unregistered
[    1.733005] INFO_MDMA: LNW DMA Driver Version 1.1.0
[    1.765605] pci 0000:00:1c.0: PCI bridge to [bus 03-04]
[    1.765719] pci 0000:00:1c.1: PCI bridge to [bus 05-06]
[    1.765816] pci 0000:00:1c.1:   bridge window [io  0xe000-0xefff]
[    1.765920] pci 0000:00:1c.1:   bridge window [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.766025] pci 0000:00:1c.3: PCI bridge to [bus 09-0a]
[    1.766125] pci 0000:00:1c.3:   bridge window [mem 0xf7e00000-0xf7efffff]
[    1.766233] pci 0000:00:1c.4: PCI bridge to [bus 0b-0c]
[    1.766333] pci 0000:00:1c.4:   bridge window [mem 0xf7d00000-0xf7dfffff]
[    1.766441] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[    1.766536] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
[    1.766637] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
[    1.766735] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.774483] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7]
[    1.774485] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff]
[    1.774487] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[    1.774489] pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000d3fff]
[    1.774490] pci_bus 0000:00: resource 8 [mem 0x000d4000-0x000d7fff]
[    1.774492] pci_bus 0000:00: resource 9 [mem 0x000d8000-0x000dbfff]
[    1.774493] pci_bus 0000:00: resource 10 [mem 0x000dc000-0x000dffff]
[    1.774495] pci_bus 0000:00: resource 11 [mem 0x000e0000-0x000e3fff]
[    1.774496] pci_bus 0000:00: resource 12 [mem 0x000e4000-0x000e7fff]
[    1.774498] pci_bus 0000:00: resource 13 [mem 0xdfa00000-0xfeafffff]
[    1.774499] pci_bus 0000:00: resource 14 [mem 0xfed40000-0xfed44fff]
[    1.774501] pci_bus 0000:05: resource 0 [io  0xe000-0xefff]
[    1.774503] pci_bus 0000:05: resource 2 [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.774505] pci_bus 0000:09: resource 1 [mem 0xf7e00000-0xf7efffff]
[    1.774506] pci_bus 0000:0b: resource 1 [mem 0xf7d00000-0xf7dfffff]
[    1.774508] pci_bus 0000:11: resource 0 [io  0xc000-0xdfff]
[    1.774510] pci_bus 0000:11: resource 1 [mem 0xf6c00000-0xf7cfffff]
[    1.774511] pci_bus 0000:11: resource 2 [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.774728] NET: Registered protocol family 2
[    1.775804] TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
[    1.776513] TCP bind hash table entries: 65536 (order: 10, 4194304 bytes)
[    1.780176] TCP: Hash tables configured (established 131072 bind 65536)
[    1.780364] TCP: reno registered
[    1.780567] UDP hash table entries: 8192 (order: 8, 1310720 bytes)
[    1.781688] UDP-Lite hash table entries: 8192 (order: 8, 1310720 bytes)
[    1.783044] NET: Registered protocol family 1
[    1.783715] RPC: Registered named UNIX socket transport module.
[    1.783810] RPC: Registered udp transport module.
[    1.783902] RPC: Registered tcp transport module.
[    1.783995] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.784103] pci 0000:00:02.0: calling pci_fixup_video+0x0/0xa6
[    1.784105] pci 0000:00:02.0: Boot video device
[    1.784114] pci 0000:00:1a.0: calling quirk_usb_early_handoff+0x0/0x63d
[    1.912690] pci 0000:00:1d.0: calling quirk_usb_early_handoff+0x0/0x63d
[    2.032866] pci 0000:0b:00.0: calling quirk_usb_early_handoff+0x0/0x63d
[    2.033879] PCI: CLS 64 bytes, default 64
[    2.034228] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    2.034326] software IO TLB [mem 0xd64e5000-0xda4e5000] (64MB) mapped at [ffff8800d64e5000-ffff8800da4e4fff]
[    2.037747] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x1b
[    2.037872] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
[    2.038332] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    2.044626] sha1_ssse3: Using AVX optimized SHA-1 implementation
[    2.046545] audit: initializing netlink socket (disabled)
[    2.046699] type=2000 audit(1363259746.010:1): initialized
[    2.049724] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    2.090255] DLM installed
[    2.103950] msgmni has been set to 31893
[    2.108604] NET: Registered protocol family 38
[    2.108724] async_tx: api initialized (async)
[    2.108826] Key type asymmetric registered
[    2.108925] Asymmetric key parser 'x509' registered
[    2.109544] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    2.109650] io scheduler noop registered
[    2.109742] io scheduler deadline registered (default)
[    2.110491] io scheduler cfq registered
[    2.113166] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    2.113787] pciehp: pcie_port_service_register = 0
[    2.113788] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    2.114057] intel_idle: MWAIT substates: 0x21120
[    2.114058] intel_idle: v0.4 model 0x2A
[    2.114059] intel_idle: lapic_timer_reliable_states 0xffffffff
[    2.115352] ACPI: AC Adapter [AC] (on-line)
[    2.117038] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[    2.119649] ACPI: Lid Switch [LID0]
[    2.120263] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
[    2.120403] ACPI: Power Button [PWRB]
[    2.121112] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
[    2.121220] ACPI: Sleep Button [SBTN]
[    2.122821] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    2.122928] ACPI: Power Button [PWRF]
[    2.124183] ACPI: Requesting acpi_cpufreq
[    2.225158] thermal LNXTHERM:00: registered as thermal_zone0
[    2.225255] ACPI: Thermal Zone [THM] (68 C)
[    2.230819] GHES: HEST is not enabled!
[    2.230911] ERST DBG: ERST support is disabled.
[    2.231003] ioatdma: Intel(R) QuickData Technology Driver 4.00
[    2.334417] ACPI: Battery Slot [BAT0] (battery present)
[    2.409513] Non-volatile memory driver v1.3
[    2.409876] Linux agpgart interface v0.103
[    2.410154] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds).
[    2.410156] Hangcheck: Using getrawmonotonic().
[    2.419391] loop: module loaded
[    2.421008] ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 1 (20130117/utaddress-251)
[    2.421018] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.421178] ACPI Warning: 0x0000000000000540-0x000000000000054f SystemIO conflicts with Region \GPIO 1 (20130117/utaddress-251)
[    2.421184] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.421340] ACPI Warning: 0x0000000000000530-0x000000000000053f SystemIO conflicts with Region \GPIO 1 (20130117/utaddress-251)
[    2.421347] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.421501] ACPI Warning: 0x0000000000000500-0x000000000000052f SystemIO conflicts with Region \GPIO 1 (20130117/utaddress-251)
[    2.421508] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.421656] lpc_ich: Resource conflict(s) found affecting gpio_ich
[    2.425284] ahci 0000:00:1f.2: version 3.0
[    2.427258] ahci 0000:00:1f.2: irq 40 for MSI/MSI-X
[    2.427405] ahci: SSS flag set, parallel bus scan disabled
[    2.442149] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x31 impl SATA mode
[    2.442249] ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pio slum part ems sxs apst 
[    2.442399] ahci 0000:00:1f.2: setting latency timer to 64
[    2.491342] scsi0 : ahci
[    2.493800] scsi1 : ahci
[    2.494716] scsi2 : ahci
[    2.495648] scsi3 : ahci
[    2.496574] scsi4 : ahci
[    2.497506] scsi5 : ahci
[    2.498359] ata1: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06100 irq 40
[    2.498457] ata2: DUMMY
[    2.498544] ata3: DUMMY
[    2.498632] ata4: DUMMY
[    2.498721] ata5: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06300 irq 40
[    2.498819] ata6: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06380 irq 40
[    2.500329] tun: Universal TUN/TAP device driver, 1.6
[    2.500422] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    2.500995] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    2.501725] r8169 0000:05:00.0: enabling Mem-Wr-Inval
[    2.502011] r8169 0000:05:00.0: irq 41 for MSI/MSI-X
[    2.503359] r8169 0000:05:00.0 eth0: RTL8168e/8111e at 0xffffc9000183a000, 18:03:73:a0:6f:6a, XID 0c200000 IRQ 41
[    2.503509] r8169 0000:05:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    2.503917] VMware vmxnet3 virtual NIC driver - version 1.1.29.0-k-NAPI
[    2.504894] i8042: PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:PS2] at 0x60,0x64 irq 1,12
[    2.507719] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.507866] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.509381] mousedev: PS/2 mouse device common for all mice
[    2.513072] rtc_cmos 00:04: RTC can wake from S4
[    2.513412] rtc (null): alarm rollover: day
[    2.513889] rtc rtc0: rtc_cmos: dev (254:0)
[    2.513916] rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0
[    2.514069] rtc_cmos 00:04: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    2.514327] i2c /dev entries driver
[    2.516639] ACPI Warning: 0x000000000000f040-0x000000000000f05f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20130117/utaddress-251)
[    2.516647] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.517095] Driver for 1-wire Dallas network protocol.
[    2.518756] coretemp coretemp.0: TjMax is 100 degrees C
[    2.518792] coretemp coretemp.0: TjMax is 100 degrees C
[    2.518833] coretemp coretemp.0: TjMax is 100 degrees C
[    2.518864] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10
[    2.519065] iTCO_wdt: Found a Cougar Point TCO device (Version=2, TCOBASE=0x0460)
[    2.520095] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[    2.521668] iTCO_vendor_support: vendor-support=0
[    2.521772] md: linear personality registered for level -1
[    2.521872] md: raid0 personality registered for level 0
[    2.521966] md: raid1 personality registered for level 1
[    2.522060] md: raid10 personality registered for level 10
[    2.522153] md: raid6 personality registered for level 6
[    2.522246] md: raid5 personality registered for level 5
[    2.522339] md: raid4 personality registered for level 4
[    2.523481] device-mapper: uevent: version 1.0.3
[    2.524633] device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
[    2.526626] device-mapper: dm-log-userspace: version 1.1.0 loaded
[    2.527545] Intel P-state driver initializing.
[    2.527685] Intel pstate controlling: cpu 0
[    2.527944] Intel pstate controlling: cpu 1
[    2.529204] cpuidle: using governor ladder
[    2.529258] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
[    2.530813] cpuidle: using governor menu
[    2.531308] sdhci: Secure Digital Host Controller Interface driver
[    2.531403] sdhci: Copyright(c) Pierre Ossman
[    2.535942] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2)
[    2.536557] hidraw: raw HID events driver (C) Jiri Kosina
[    2.540328] input: Dell WMI hotkeys as /devices/virtual/input/input5
[    2.545620] snd_hda_intel 0000:00:1b.0: irq 42 for MSI/MSI-X
[    2.631739] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input6
[    2.661259] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7
[    2.665180] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[    2.668498] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[    2.687189] TCP: cubic registered
[    2.687329] NET: Registered protocol family 17
[    2.687952] Bluetooth: RFCOMM TTY layer initialized
[    2.688188] Bluetooth: RFCOMM socket layer initialized
[    2.688327] Bluetooth: RFCOMM ver 1.11
[    2.688456] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.688591] Bluetooth: BNEP filters: protocol multicast
[    2.688769] Bluetooth: BNEP socket layer initialized
[    2.688903] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.689080] Bluetooth: HIDP socket layer initialized
[    2.713514] sctp: Hash tables configured (established 65536 bind 65536)
[    2.715734] Key type dns_resolver registered
[    2.721758] PM: Checking hibernation image partition /dev/sda6
[    2.842418] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.857293] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    2.857918] ata1.00: ATA-8: WDC WD7500BPKT-75PK4T0, 01.01A01, max UDMA/133
[    2.858039] ata1.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    2.873118] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[    2.873749] ata1.00: configured for UDMA/133
[    2.894928] scsi 0:0:0:0: Direct-Access     ATA      WDC WD7500BPKT-7 01.0 PQ: 0 ANSI: 5
[    2.903436] sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
[    2.903585] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.905442] sd 0:0:0:0: [sda] Write Protect is off
[    2.905581] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.906254] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.906333] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.008804]  sda: sda1 sda2 sda3 sda4 < sda5 sda6 >
[    3.019875] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.032688] tsc: Refined TSC clocksource calibration: 2793.653 MHz
[    3.032874] Switching to clocksource tsc
[    3.252900] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    3.261279] ata5.00: ATAPI: PLDS DVD+/-RW DS-8A8SH, KD11, max UDMA/100
[    3.273417] ata5.00: configured for UDMA/100
[    3.296704] scsi 4:0:0:0: CD-ROM            PLDS     DVD+-RW DS-8A8SH KD11 PQ: 0 ANSI: 5
[    3.319350] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[    3.319369] cdrom: Uniform CD-ROM driver Revision: 3.20
[    3.324332] sr 4:0:0:0: Attached scsi CD-ROM sr0
[    3.327098] sr 4:0:0:0: Attached scsi generic sg1 type 5
[    3.673401] ata6: SATA link down (SStatus 0 SControl 300)
[    3.726037] input: DualPoint Stick as /devices/platform/i8042/serio1/input/input10
[    3.745425] input: AlpsPS/2 ALPS DualPoint TouchPad as /devices/platform/i8042/serio1/input/input11
[    3.752162] PM: Hibernation image partition 8:6 present
[    3.752168] PM: Looking for hibernation image.
[    3.791878] PM: Image not found (code -22)
[    3.791883] PM: Hibernation image not present or could not be loaded.
[    3.792274] kmemleak: Kernel memory leak detector initialized
[    3.792318] kmemleak: Automatic memory scanning thread started
[    3.800395] BIOS EDD facility v0.16 2004-Jun-25, 1 devices found
[    3.805885] ALSA device list:
[    3.805986]   #0: HDA Intel PCH at 0xf7f00000 irq 42
[    3.806735] md: Waiting for all devices to be available before autodetect
[    3.806842] md: If you don't use raid, use raid=noautodetect
[    3.810682] md: Autodetecting RAID arrays.
[    3.810785] md: Scanned 0 and added 0 devices.
[    3.810886] md: autorun ...
[    3.810984] md: ... autorun DONE.
[    3.876764] kjournald starting.  Commit interval 5 seconds
[    3.877151] EXT3-fs (sda5): mounted filesystem with writeback data mode
[    3.877302] VFS: Mounted root (ext3 filesystem) readonly on device 8:5.
[    3.918258] devtmpfs: mounted
[    3.920415] Freeing unused kernel memory: 972k freed
[    8.254033] systemd-udevd[1860]: starting version 197
[    9.702836] sata_sil24 0000:11:00.0: version 1.1
[    9.708585] scsi6 : sata_sil24
[    9.709910] scsi7 : sata_sil24
[    9.710517] ata7: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
[    9.710521] ata8: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
[    9.728889] Intel(R) Wireless WiFi driver for Linux, in-tree:d
[    9.728891] Copyright(c) 2003-2013 Intel Corporation
[    9.730402] iwlwifi 0000:09:00.0: irq 43 for MSI/MSI-X
[   10.270857] iwlwifi 0000:09:00.0: loaded firmware version 18.168.6.1
[   10.543639] [drm] Initialized drm 1.1.0 20060810
[   10.869527] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUG enabled
[   10.869531] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[   10.869533] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
[   10.869535] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled
[   10.869536] iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_P2P disabled
[   10.869540] iwlwifi 0000:09:00.0: Detected Intel(R) Centrino(R) Wireless-N 1030 BGN, REV=0xB0
[   10.869679] iwlwifi 0000:09:00.0: L1 Enabled; Disabling L0S
[   10.887339] iwlwifi 0000:09:00.0: RF_KILL bit toggled to disable radio.
[   10.890010] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   11.793528] ata7: SATA link down (SStatus 0 SControl 0)
[   13.112947] r8169 0000:05:00.0: PME# enabled
[   13.115250] pcieport 0000:00:1c.0: PME# enabled
[   13.323272] [drm] Memory usable by graphics device = 2048M
[   13.323354] i915 0000:00:02.0: setting latency timer to 64
[   13.373105] i915 0000:00:02.0: irq 44 for MSI/MSI-X
[   13.373237] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[   13.373238] [drm] Driver supports precise vblank timestamp query.
[   13.373721] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   13.400761] [drm] Wrong MCH_SSKPD value: 0x16040307
[   13.400763] [drm] This can cause pipe underruns and display issues.
[   13.400764] [drm] Please upgrade your BIOS to fix this.
[   13.528854] fbcon: inteldrmfb (fb0) is primary device
[   13.868728] r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
[   13.869747] r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
[   13.870593] r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
[   13.871440] r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
[   13.886371] ata8: SATA link down (SStatus 0 SControl 0)
[   14.628968] Console: switching to colour frame buffer device 170x48
[   14.638126] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[   14.638129] i915 0000:00:02.0: registered panic notifier
[   14.754827] acpi device:34: registered as cooling_device2
[   14.760165] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   14.760767] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input12
[   14.762209] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[   15.098187] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[   16.768813] EXT3-fs (sda5): using internal journal
[   17.277345] Adding 4998972k swap on /dev/sda6.  Priority:-1 extents:1 across:4998972k 
[   22.128208] r8169 0000:05:00.0: PME# disabled
[   22.141913] r8169 0000:05:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168e-2.fw (-2)
[   22.170343] r8169 0000:05:00.0 eth0: link down
[   22.170502] r8169 0000:05:00.0 eth0: link down
[   23.789233] r8169 0000:05:00.0 eth0: link up
[   34.831111] r8169 0000:05:00.0 eth0: link down
[   35.443689] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x1b
[   35.444179] microcode: CPU0 updated to revision 0x28, date = 2012-04-24
[   35.444711] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
[   35.444978] microcode: CPU1 updated to revision 0x28, date = 2012-04-24
[   35.444981] perf_event_intel: PEBS enabled due to microcode update
[   36.491646] r8169 0000:05:00.0 eth0: link up
[   37.742951] r8169 0000:05:00.0 eth0: link down
[   40.590057] r8169 0000:05:00.0 eth0: link up
[  301.976189] sata_sil24 0000:11:00.0: PME# disabled
[  301.979812] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
[  301.981627] pcieport 0000:00:1c.7: PME# disabled
[  301.984689] pci_bus 0000:11: busn_res: [bus 11-16] is released
[  333.819564] pci_bus 0000:00: scanning bus
[  333.819676] pci 0000:00:1c.7: [8086:1c1e] type 01 class 0x060400
[  333.819753] pci 0000:00:1c.7: calling pci_fixup_transparent_bridge+0x0/0x1d
[  333.819855] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
[  333.819862] pci 0000:00:1c.7: PME# disabled
[  333.820811] pci 0000:00:1c.7: System wakeup disabled by ACPI
[  333.821238] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
[  333.821244] pci_bus 0000:03: scanning bus
[  333.821248] pci_bus 0000:03: bus scan returning with max=03
[  333.821254] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
[  333.821260] pci_bus 0000:05: scanning bus
[  333.821262] pci_bus 0000:05: bus scan returning with max=05
[  333.821268] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
[  333.821273] pci_bus 0000:09: scanning bus
[  333.821275] pci_bus 0000:09: bus scan returning with max=09
[  333.821281] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
[  333.821286] pci_bus 0000:0b: scanning bus
[  333.821288] pci_bus 0000:0b: bus scan returning with max=0b
[  333.821293] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
[  333.821624] pci_bus 0000:11: scanning bus
[  333.821629] pci_bus 0000:11: fixups for bus
[  333.821630] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[  333.821637] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
[  333.821643] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
[  333.821652] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
[  333.821653] pci_bus 0000:11: bus scan returning with max=11
[  333.821658] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
[  333.821668] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
[  333.821677] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
[  333.821686] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
[  333.821695] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
[  333.821702] pci_bus 0000:00: bus scan returning with max=16
[  333.821788] pci 0000:00:1c.7: bridge window [mem 0x00100000-0x011fffff 64bit pref] to [bus 11-16] add_size 200000
[  333.821795] pci 0000:00:1c.7: bridge window [mem 0x00100000-0x011fffff] to [bus 11-16] add_size 200000
[  333.821798] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[  333.821828] pci 0000:00:1c.7: res[14]=[mem 0x00100000-0x011fffff] get_res_add_size add_size 200000
[  333.821830] pci 0000:00:1c.7: res[15]=[mem 0x00100000-0x011fffff 64bit pref] get_res_add_size add_size 200000
[  333.821836] pci 0000:00:1c.7: BAR 14: assigned [mem 0xf1200000-0xf24fffff]
[  333.821840] pci 0000:00:1c.7: BAR 15: assigned [mem 0xf2500000-0xf37fffff 64bit pref]
[  333.821843] pci 0000:00:1c.7: BAR 13: assigned [io  0x2000-0x3fff]
[  333.821862] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[  333.821866] pci 0000:00:1c.7:   bridge window [io  0x2000-0x3fff]
[  333.821873] pci 0000:00:1c.7:   bridge window [mem 0xf1200000-0xf24fffff]
[  333.821879] pci 0000:00:1c.7:   bridge window [mem 0xf2500000-0xf37fffff 64bit pref]
[  333.823391] pci 0000:00:1c.7: enabling bus mastering
[  560.970367] pci_bus 0000:00: scanning bus
[  560.970458] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
[  560.970465] pci_bus 0000:03: scanning bus
[  560.970468] pci_bus 0000:03: bus scan returning with max=03
[  560.970474] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
[  560.970479] pci_bus 0000:05: scanning bus
[  560.970481] pci_bus 0000:05: bus scan returning with max=05
[  560.970487] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
[  560.970492] pci_bus 0000:09: scanning bus
[  560.970493] pci_bus 0000:09: bus scan returning with max=09
[  560.970499] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
[  560.970504] pci_bus 0000:0b: scanning bus
[  560.970505] pci_bus 0000:0b: bus scan returning with max=0b
[  560.970511] pcieport 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
[  560.970516] pci_bus 0000:11: scanning bus
[  560.970568] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[  560.970613] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
[  560.970645] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
[  560.970666] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
[  560.970707] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
[  560.970825] pci 0000:11:00.0: supports D1 D2
[  560.971265] pci_bus 0000:11: bus scan returning with max=11
[  560.971271] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
[  560.971280] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
[  560.971289] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
[  560.971298] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
[  560.971307] pcieport 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
[  560.971314] pci_bus 0000:00: bus scan returning with max=16
[  560.971378] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[  560.971403] pci 0000:11:00.0: BAR 6: assigned [mem 0xf2500000-0xf257ffff pref]
[  560.971406] pci 0000:11:00.0: BAR 2: assigned [mem 0xf1200000-0xf1203fff 64bit]
[  560.971428] pci 0000:11:00.0: BAR 2: set to [mem 0xf1200000-0xf1203fff 64bit] (PCI address [0xf1200000-0xf1203fff])
[  560.971429] pci 0000:11:00.0: BAR 0: assigned [mem 0xf1204000-0xf120407f 64bit]
[  560.971451] pci 0000:11:00.0: BAR 0: set to [mem 0xf1204000-0xf120407f 64bit] (PCI address [0xf1204000-0xf120407f])
[  560.971453] pci 0000:11:00.0: BAR 4: assigned [io  0x2000-0x207f]
[  560.971460] pci 0000:11:00.0: BAR 4: set to [io  0x2000-0x207f] (PCI address [0x2000-0x207f])
[  560.971693] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
[  560.972478] sata_sil24 0000:11:00.0: enabling bus mastering
[  560.975779] scsi8 : sata_sil24
[  560.978910] scsi9 : sata_sil24
[  560.979497] ata9: SATA max UDMA/100 host m128@0xf1204000 port 0xf1200000 irq 19
[  560.979502] ata10: SATA max UDMA/100 host m128@0xf1204000 port 0xf1202000 irq 19
[  563.067179] ata9: SATA link down (SStatus 0 SControl 0)
[  565.159741] ata10: SATA link down (SStatus 0 SControl 0)

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
       [not found]     ` <51417C28.40402@huawei.com>
                         ` (2 preceding siblings ...)
  2013-03-14 15:20       ` Martin Mokrejs
@ 2013-03-14 17:54       ` Martin Mokrejs
  3 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-14 17:54 UTC (permalink / raw)
  To: linux-pci

[re-sending without attachment]
[again, but only to linux-pci, as it did not make it into it (shortened a bit the leading old text)]

Yijing Wang wrote:
> On 2013/3/14 8:05, Martin Mokrejs wrote:
>> Hi Yjing,
>>


>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> +       !!! Unknown header type 7f
>> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>> +f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>>  
> 
> This is so strange, seems like 11:00.0 Mass storage controller device is still in OS, but the real hardware is removed,OS
> can not access device configure space, so all config register return ff.
> 
> But why the device become stale after eject? Mass storage controller driver should unregister and release itself.

I think the answer is in the PME# messages. In this particular situation
they are flipped from enabled to disabled and back in a never ending loop.
I do not want to try what happens hen I drop pcie_aspm=off from the comandline
yet ;) but somewhat fear things could start working and PME# messages would
disappear. ;-)

> 
>>
>> Please note the funny broken:
>>
>> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
>> +       !!! Unknown header type 7f
>> +00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>>
>> Who is still thinking the card is in the system? Didn't we agree above that PresDet
>> worked fine in this particular setup?
>>
>> The rmmod sata_sil24 causes that in dmesg is every second repeatedly this, until forever:
>>
>> --- dmesg_ejected.txt   2013-03-14 00:25:59.000000000 +0100
>> +++ dmesg_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:47.000000000 +0100
>> @@ -819,3 +819,277 @@
>>  [   37.426390] r8169 0000:05:00.0 eth0: link up
>>  [   38.686210] r8169 0000:05:00.0 eth0: link down
>>  [   42.551461] r8169 0000:05:00.0 eth0: link up
>> +[  432.686232] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
>> +[  432.695763] pcieport 0000:00:1c.7: PME# enabled
>> +[  432.956104] pcieport 0000:00:1c.7: PME# disabled
>> +[  432.965896] pcieport 0000:00:1c.7: PME# enabled
>> +[  433.006119] pcieport 0000:00:1c.7: PME# disabled
>> +[  433.016047] pcieport 0000:00:1c.7: PME# enabled
>> +[  434.037451] pcieport 0000:00:1c.7: PME# disabled
>> +[  434.047152] pcieport 0000:00:1c.7: PME# enabled
>> +[  434.087516] pcieport 0000:00:1c.7: PME# disabled
>> [cut]
>>
>>
>>
>> I should have tried below to remove 11.0 instead of 1.c7 but it demonstrates
>> that one can get rid of the partial eSATA card entry from lspci output:
>>
>> # echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove
>>
>> That stops the PME# storm:
>>
>> +[  611.843285] pcieport 0000:00:1c.7: PME# disabled
>> +[  611.853086] pcieport 0000:00:1c.7: PME# enabled
>> +[  611.893364] pcieport 0000:00:1c.7: PME# disabled
>> +[  611.903283] pcieport 0000:00:1c.7: PME# enabled
>> +[  612.183893] pci 0000:11:00.0: PME# disabled
>> +[  612.184789] pcieport 0000:00:1c.7: PME# disabled
>> +[  612.203753] pcieport 0000:00:1c.7: PME# disabled
>> +[  612.205521] pci_bus 0000:11: busn_res: [bus 11-16] is released
>>
>> and releases the iomem's:
>>
>> # diff -u -w iomem_ejected_and_reinserted_rmmod_sata_sil24.txt iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt 
>> --- iomem_ejected_and_reinserted_rmmod_sata_sil24.txt   2013-03-14 00:29:02.000000000 +0100
>> +++ iomem_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt       2013-03-14 00:32:48.000000000 +0100
>> @@ -34,17 +34,12 @@
>>  dfa00000-feafffff : PCI Bus 0000:00
>>    dfa00000-dfa00fff : pnp 00:0a
>>    e0000000-efffffff : 0000:00:02.0
>> -  f0000000-f10fffff : PCI Bus 0000:11
>>    f1100000-f11fffff : PCI Bus 0000:05
>>      f1100000-f1103fff : 0000:05:00.0
>>        f1100000-f1103fff : r8169
>>      f1104000-f1104fff : 0000:05:00.0
>>        f1104000-f1104fff : r8169
>>    f6800000-f6bfffff : 0000:00:02.0
>> -  f6c00000-f7cfffff : PCI Bus 0000:11
>> -    f6c00000-f6c7ffff : 0000:11:00.0
>> -    f6c80000-f6c83fff : 0000:11:00.0
>> -    f6c84000-f6c8407f : 0000:11:00.0
>>    f7d00000-f7dfffff : PCI Bus 0000:0b
>>      f7d00000-f7d0ffff : 0000:0b:00.0
>>      f7d10000-f7d11fff : 0000:0b:00.0
>> #
>>
>> The accompanying diff in lspci:
>>
>> # diff -u -w lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt 
>> --- lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24.txt    2013-03-14 00:30:06.000000000 +0100
>> +++ lspci_vvvxxx_ejected_and_reinserted_rmmod_sata_sil24_remove_1c.7.txt        2013-03-14 00:32:20.000000000 +0100
>> @@ -429,69 +429,6 @@
>>  e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
>>  f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
>>  
> 
> After you remove 00:1c.7 PCI bridge device. The 11:00.0 Mass storage controller device  still shown in lspci?

No. I thought I showed that in the diffs clearly. Please check again. ;-)
A note: It was in the diff output immediately below this place where you
wrote the question. ;))


> If 11:00.0 Mass storage controller device was removed now. you can try to echo 1 > /sys/bus/pci/rescan, rescan the 00:1c.7 PCI bridge
> device and its child devices.
> Then try to insert the card.

Will do below.

> 
> I use pciehp module in my machine and add pciehp_debug=1,debug info will print while I doing eject or insert.
> I don't know why pciehp cannot print debug info in your system, maybe you can try to build it as module.
> We can only trace eject action now, if eject action cannot complete normally, hot insert won't success.

Hmm, I did the following to my kernel commandline to be sure:

-pciehp.pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
+pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off


So now the test what happens if I remove 1c.7 and do a bus rescan. I can tell you
in advance the hotplugged card was not picked up until I did a second pci rescan.
But please check the diffs below. I tried to say it short but omit many details
which are out of my knowledge. ;)






The eject of a coldplugged card. Note that PresDet on the Changed: line is not set
to PresDet+ or is it because it was overwritten too early (as you said elsewhere)?

--- lspci_loop.11:19:01 2013-03-14 11:19:01.000000000 +0100
+++ lspci_loop.11:19:02 2013-03-14 11:19:02.000000000 +0100
@@ -437,7 +437,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -451,13 +451,13 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -476,11 +476,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
 20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -793,55 +793,23 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
-40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
-60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
-80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
-90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

--- lspci_loop.11:19:24 2013-03-14 11:19:24.000000000 +0100
+++ lspci_loop.11:19:25 2013-03-14 11:19:25.000000000 +0100
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel

# diff -u -w dmesg.txt dmesg_ejected.txt 
# diff -u -w iomem.txt iomem_ejected.txt 
#


# echo 1 > /sys/bus/pci/devices/0000\:00\:1c.7/remove


--- lspci_loop.11:20:46 2013-03-14 11:20:46.000000000 +0100
+++ lspci_loop.11:20:47 2013-03-14 11:20:47.000000000 +0100
@@ -429,69 +429,6 @@
 e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
 
-00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
-       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: 64 bytes
-       Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
-       I/O behind bridge: 0000c000-0000dfff
-       Memory behind bridge: f6c00000-f7cfffff
-       Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       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: [40] Express (v2) Root Port (Slot+), MSI 00
-               DevCap: MaxPayload 128 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 128 bytes
-               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
-               LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
-                       ClockPM- Surprise- LLActRep+ BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
-               SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
-                       Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
-               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
-                       Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
-                       Changed: MRL- PresDet- LinkState+
-               RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
-               RootCap: CRSVisible-
-               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
-               DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
-               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
-               LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
-                        Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
-                        Compliance De-emphasis: -6dB
-               LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
-                        EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
-       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
-               Address: 00000000  Data: 0000
-       Capabilities: [90] Subsystem: Dell Device 04b3
-       Capabilities: [a0] 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-
-       Kernel driver in use: pcieport
-00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 20
-20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
-30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
-40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
-60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
-70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
-80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
-a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
-b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
-e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
-f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
-
 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
        Subsystem: Dell Device 04b3
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
@@ -793,23 +730,3 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
-00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
-

Hmm, I forgot to catch the iomem and dmesg at this stage.


# echo 1 > /sys/bus/pci/rescan
#

# diff -u -w iomem_ejected.txt iomem_ejected_removed_1c.7__pci_rescan.txt 
--- iomem_ejected.txt   2013-03-14 11:19:04.000000000 +0100
+++ iomem_ejected_removed_1c.7__pci_rescan.txt  2013-03-14 11:22:16.000000000 +0100
@@ -34,19 +34,14 @@
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
-  f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
+  f1200000-f24fffff : PCI Bus 0000:11
+  f2500000-f37fffff : PCI Bus 0000:11
   f6800000-f6bfffff : 0000:00:02.0
-  f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
-    f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0

--- lspci_loop.11:21:17 2013-03-14 11:21:17.000000000 +0100
+++ lspci_loop.11:21:18 2013-03-14 11:21:18.000000000 +0100
@@ -429,6 +429,69 @@
 e0: 00 3f 00 00 00 00 00 00 01 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
 
+00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
+       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: 64 bytes
+       Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
+       I/O behind bridge: 00002000-00003fff
+       Memory behind bridge: f1200000-f24fffff
+       Prefetchable memory behind bridge: 00000000f2500000-00000000f37fffff
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
+               DevCap: MaxPayload 128 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 128 bytes
+               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
+               LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
+                       ClockPM- Surprise- LLActRep+ BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
+                       Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
+               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
+                       Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
+               RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
+               RootCap: CRSVisible-
+               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
+               DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
+               DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
+               LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
+                        Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
+                        Compliance De-emphasis: -6dB
+               LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
+                        EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
+       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
+               Address: 00000000  Data: 0000
+       Capabilities: [90] Subsystem: Dell Device 04b3
+       Capabilities: [a0] 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-
+       Kernel driver in use: pcieport
+00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 20 30 00 00
+20: 20 f1 40 f2 51 f2 71 f3 00 00 00 00 00 00 00 00
+30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
+40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
+50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
+60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
+70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
+80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+90: 0d a0 00 00 28 10 b3 04 00 00 00 00 00 00 00 00
+a0: 01 00 02 c8 00 00 00 00 00 00 00 00 00 00 00 00
+b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+d0: 00 00 00 01 02 0b 00 00 02 80 11 c1 00 00 00 00
+e0: 00 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00
+f0: 00 00 00 00 00 00 00 00 87 0f 05 08 00 00 00 00
+
 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
        Subsystem: Dell Device 04b3
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

# diff -u -w dmesg_ejected.txt dmesg_ejected_removed_1c.7__pci_rescan.txt 
--- dmesg_ejected.txt   2013-03-14 11:19:14.000000000 +0100
+++ dmesg_ejected_removed_1c.7__pci_rescan.txt  2013-03-14 11:22:07.000000000 +0100
@@ -824,3 +824,52 @@
 [   36.491646] r8169 0000:05:00.0 eth0: link up
 [   37.742951] r8169 0000:05:00.0 eth0: link down
 [   40.590057] r8169 0000:05:00.0 eth0: link up
+[  301.976189] sata_sil24 0000:11:00.0: PME# disabled
+[  301.979812] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  301.981627] pcieport 0000:00:1c.7: PME# disabled
+[  301.984689] pci_bus 0000:11: busn_res: [bus 11-16] is released
+[  333.819564] pci_bus 0000:00: scanning bus
+[  333.819676] pci 0000:00:1c.7: [8086:1c1e] type 01 class 0x060400
+[  333.819753] pci 0000:00:1c.7: calling pci_fixup_transparent_bridge+0x0/0x1d
+[  333.819855] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
+[  333.819862] pci 0000:00:1c.7: PME# disabled
+[  333.820811] pci 0000:00:1c.7: System wakeup disabled by ACPI
+[  333.821238] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
+[  333.821244] pci_bus 0000:03: scanning bus
+[  333.821248] pci_bus 0000:03: bus scan returning with max=03
+[  333.821254] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
+[  333.821260] pci_bus 0000:05: scanning bus
+[  333.821262] pci_bus 0000:05: bus scan returning with max=05
+[  333.821268] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
+[  333.821273] pci_bus 0000:09: scanning bus
+[  333.821275] pci_bus 0000:09: bus scan returning with max=09
+[  333.821281] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
+[  333.821286] pci_bus 0000:0b: scanning bus
+[  333.821288] pci_bus 0000:0b: bus scan returning with max=0b
+[  333.821293] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
+[  333.821624] pci_bus 0000:11: scanning bus
+[  333.821629] pci_bus 0000:11: fixups for bus
+[  333.821630] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
+[  333.821637] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
+[  333.821643] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
+[  333.821652] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
+[  333.821653] pci_bus 0000:11: bus scan returning with max=11
+[  333.821658] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
+[  333.821668] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
+[  333.821677] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
+[  333.821686] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
+[  333.821695] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
+[  333.821702] pci_bus 0000:00: bus scan returning with max=16
+[  333.821788] pci 0000:00:1c.7: bridge window [mem 0x00100000-0x011fffff 64bit pref] to [bus 11-16] add_size 200000
+[  333.821795] pci 0000:00:1c.7: bridge window [mem 0x00100000-0x011fffff] to [bus 11-16] add_size 200000
+[  333.821798] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
+[  333.821828] pci 0000:00:1c.7: res[14]=[mem 0x00100000-0x011fffff] get_res_add_size add_size 200000
+[  333.821830] pci 0000:00:1c.7: res[15]=[mem 0x00100000-0x011fffff 64bit pref] get_res_add_size add_size 200000
+[  333.821836] pci 0000:00:1c.7: BAR 14: assigned [mem 0xf1200000-0xf24fffff]
+[  333.821840] pci 0000:00:1c.7: BAR 15: assigned [mem 0xf2500000-0xf37fffff 64bit pref]
+[  333.821843] pci 0000:00:1c.7: BAR 13: assigned [io  0x2000-0x3fff]
+[  333.821862] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
+[  333.821866] pci 0000:00:1c.7:   bridge window [io  0x2000-0x3fff]
+[  333.821873] pci 0000:00:1c.7:   bridge window [mem 0xf1200000-0xf24fffff]
+[  333.821879] pci 0000:00:1c.7:   bridge window [mem 0xf2500000-0xf37fffff 64bit pref]
+[  333.823391] pci 0000:00:1c.7: enabling bus mastering
#




Hot insert of the card:

--- lspci_loop.11:23:22 2013-03-14 11:23:22.000000000 +0100
+++ lspci_loop.11:23:23 2013-03-14 11:23:23.000000000 +0100
@@ -451,12 +451,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -480,7 +480,7 @@
 20: 20 f1 40 f2 51 f2 71 f3 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 50 60 b2 3c 00 00 00 00 01 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00

# diff -u -w dmesg_ejected_removed_1c.7__pci_rescan.txt dmesg_ejected_removed_1c.7__pci_rescan_hotinsert.txt 
# diff -u -w iomem_ejected_removed_1c.7__pci_rescan.txt iomem_ejected_removed_1c.7__pci_rescan_hotinsert.txt 
#



Yet another "echo 1 > /sys/bus/pci/rescan"


--- lspci_loop.11:25:04 2013-03-14 11:25:04.000000000 +0100
+++ lspci_loop.11:25:05 2013-03-14 11:25:05.000000000 +0100
@@ -793,3 +793,55 @@
 e0: 00 00 40 63 00 00 00 00 00 00 00 00 00 00 00 00
 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f1204000 (64-bit, non-prefetchable) [size=128]
+       Region 2: Memory at f1200000 (64-bit, non-prefetchable) [size=16K]
+       Region 4: I/O ports at 2000 [size=128]
+       [virtual] Expansion ROM at f2500000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
+               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
+                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
+                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
+               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+       Kernel driver in use: sata_sil24
+00: 95 10 32 31 07 00 10 00 01 00 80 01 00 00 00 00
+10: 04 40 20 f1 00 00 00 00 04 00 20 f1 00 00 00 00
+20: 01 20 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
+40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
+60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+70: 10 00 11 00 03 00 00 00 00 50 0a 00 11 f4 03 00
+80: 40 00 11 10 00 00 00 00 00 00 00 00 00 00 00 00
+90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+

# diff -u -w iomem_ejected_removed_1c.7__pci_rescan_hotinsert.txt iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- iomem_ejected_removed_1c.7__pci_rescan_hotinsert.txt        2013-03-14 11:23:36.000000000 +0100
+++ iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt     2013-03-14 11:25:39.000000000 +0100
@@ -40,7 +40,12 @@
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
   f1200000-f24fffff : PCI Bus 0000:11
+    f1200000-f1203fff : 0000:11:00.0
+      f1200000-f1203fff : sata_sil24
+    f1204000-f120407f : 0000:11:00.0
+      f1204000-f120407f : sata_sil24
   f2500000-f37fffff : PCI Bus 0000:11
+    f2500000-f257ffff : 0000:11:00.0
   f6800000-f6bfffff : 0000:00:02.0
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0

# diff -u -w dmesg_ejected_removed_1c.7__pci_rescan_hotinsert.txt dmesg_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- dmesg_ejected_removed_1c.7__pci_rescan_hotinsert.txt        2013-03-14 11:23:46.000000000 +0100
+++ dmesg_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt     2013-03-14 11:25:30.000000000 +0100
@@ -873,3 +873,47 @@
 [  333.821873] pci 0000:00:1c.7:   bridge window [mem 0xf1200000-0xf24fffff]
 [  333.821879] pci 0000:00:1c.7:   bridge window [mem 0xf2500000-0xf37fffff 64bit pref]
 [  333.823391] pci 0000:00:1c.7: enabling bus mastering
+[  560.970367] pci_bus 0000:00: scanning bus
+[  560.970458] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
+[  560.970465] pci_bus 0000:03: scanning bus
+[  560.970468] pci_bus 0000:03: bus scan returning with max=03
+[  560.970474] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
+[  560.970479] pci_bus 0000:05: scanning bus
+[  560.970481] pci_bus 0000:05: bus scan returning with max=05
+[  560.970487] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
+[  560.970492] pci_bus 0000:09: scanning bus
+[  560.970493] pci_bus 0000:09: bus scan returning with max=09
+[  560.970499] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
+[  560.970504] pci_bus 0000:0b: scanning bus
+[  560.970505] pci_bus 0000:0b: bus scan returning with max=0b
+[  560.970511] pcieport 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
+[  560.970516] pci_bus 0000:11: scanning bus
+[  560.970568] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
+[  560.970613] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
+[  560.970645] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
+[  560.970666] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
+[  560.970707] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
+[  560.970825] pci 0000:11:00.0: supports D1 D2
+[  560.971265] pci_bus 0000:11: bus scan returning with max=11
+[  560.971271] pcieport 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
+[  560.971280] pcieport 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
+[  560.971289] pcieport 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
+[  560.971298] pcieport 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
+[  560.971307] pcieport 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
+[  560.971314] pci_bus 0000:00: bus scan returning with max=16
+[  560.971378] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
+[  560.971403] pci 0000:11:00.0: BAR 6: assigned [mem 0xf2500000-0xf257ffff pref]
+[  560.971406] pci 0000:11:00.0: BAR 2: assigned [mem 0xf1200000-0xf1203fff 64bit]
+[  560.971428] pci 0000:11:00.0: BAR 2: set to [mem 0xf1200000-0xf1203fff 64bit] (PCI address [0xf1200000-0xf1203fff])
+[  560.971429] pci 0000:11:00.0: BAR 0: assigned [mem 0xf1204000-0xf120407f 64bit]
+[  560.971451] pci 0000:11:00.0: BAR 0: set to [mem 0xf1204000-0xf120407f 64bit] (PCI address [0xf1204000-0xf120407f])
+[  560.971453] pci 0000:11:00.0: BAR 4: assigned [io  0x2000-0x207f]
+[  560.971460] pci 0000:11:00.0: BAR 4: set to [io  0x2000-0x207f] (PCI address [0x2000-0x207f])
+[  560.971693] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
+[  560.972478] sata_sil24 0000:11:00.0: enabling bus mastering
+[  560.975779] scsi8 : sata_sil24
+[  560.978910] scsi9 : sata_sil24
+[  560.979497] ata9: SATA max UDMA/100 host m128@0xf1204000 port 0xf1200000 irq 19
+[  560.979502] ata10: SATA max UDMA/100 host m128@0xf1204000 port 0xf1202000 irq 19
+[  563.067179] ata9: SATA link down (SStatus 0 SControl 0)
+[  565.159741] ata10: SATA link down (SStatus 0 SControl 0)
#


Let me note that in usually saw instead:
[  211.879397] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)

During cold boot, the the bus scanning messages are much more verbose, call some quirks,
etc. Please see the attached dmesg to have something to compare with the above rescan output .

Whether the i915 thing relates to skipped quirks, I don't know.

Why is there  [bus 03-04] , [bus 05-06] ,  [bus 09-0a] , [bus 0b-0c] but then [bus 11-16]?
Is that in decimal?




Again, a closing comparison of a coldboot state to the one after the eject,
removal of 1c.7, pci rescan, hotinsert, another pci rescan:

# diff -u -w iomem.txt iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- iomem.txt   2013-03-14 11:17:26.000000000 +0100
+++ iomem_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt     2013-03-14 11:25:39.000000000 +0100
@@ -34,19 +34,19 @@
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
-  f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
+  f1200000-f24fffff : PCI Bus 0000:11
+    f1200000-f1203fff : 0000:11:00.0
+      f1200000-f1203fff : sata_sil24
+    f1204000-f120407f : 0000:11:00.0
+      f1204000-f120407f : sata_sil24
+  f2500000-f37fffff : PCI Bus 0000:11
+    f2500000-f257ffff : 0000:11:00.0
   f6800000-f6bfffff : 0000:00:02.0
-  f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
-    f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
#
# diff -u -w lspci_vvvxxx.txt lspci_vvvxxx_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt 
--- lspci_vvvxxx.txt    2013-03-14 11:18:14.000000000 +0100
+++ lspci_vvvxxx_ejected_removed_1c.7__pci_rescan_hotinsert_pci_rescan.txt      2013-03-14 11:25:21.000000000 +0100
@@ -434,9 +434,9 @@
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
-       I/O behind bridge: 0000c000-0000dfff
-       Memory behind bridge: f6c00000-f7cfffff
-       Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
+       I/O behind bridge: 00002000-00003fff
+       Memory behind bridge: f1200000-f24fffff
+       Prefetchable memory behind bridge: 00000000f2500000-00000000f37fffff
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
@@ -457,7 +457,7 @@
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -476,11 +476,11 @@
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 00: 86 80 1e 1c 07 00 10 00 b5 00 04 06 10 00 81 00
-10: 00 00 00 00 00 00 00 00 00 11 16 00 c0 d0 00 00
-20: c0 f6 c0 f7 01 f0 01 f1 00 00 00 00 00 00 00 00
+10: 00 00 00 00 00 00 00 00 00 11 16 00 20 30 00 00
+20: 20 f1 40 f2 51 f2 71 f3 00 00 00 00 00 00 00 00
 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00
 40: 10 80 42 01 00 80 00 00 00 00 10 00 12 3c 12 08
-50: 40 00 11 70 60 b2 3c 00 00 00 40 00 00 00 00 00
+50: 40 00 11 70 60 b2 3c 00 00 00 40 01 00 00 00 00
 60: 00 00 00 00 16 00 00 00 00 00 00 00 00 00 00 00
 70: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
 80: 05 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@@ -653,7 +653,7 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
+               CESta:  RxErr+ BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
@@ -797,12 +797,12 @@
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
        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: 64 bytes
+       Latency: 0
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f1204000 (64-bit, non-prefetchable) [size=128]
+       Region 2: Memory at f1200000 (64-bit, non-prefetchable) [size=16K]
+       Region 4: I/O ports at 2000 [size=128]
+       [virtual] Expansion ROM at f2500000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
@@ -828,10 +828,10 @@
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
-00: 95 10 32 31 07 00 10 00 01 00 80 01 10 00 00 00
-10: 04 40 c8 f6 00 00 00 00 04 00 c8 f6 00 00 00 00
-20: 01 c0 00 00 00 00 00 00 00 00 00 00 95 10 32 31
-30: 00 00 c0 f6 54 00 00 00 00 00 00 00 0a 01 00 00
+00: 95 10 32 31 07 00 10 00 01 00 80 01 00 00 00 00
+10: 04 40 20 f1 00 00 00 00 04 00 20 f1 00 00 00 00
+20: 01 20 00 00 00 00 00 00 00 00 00 00 95 10 32 31
+30: 00 00 00 00 54 00 00 00 00 00 00 00 00 01 00 00
 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 50: 00 00 00 00 01 5c 22 06 00 20 00 0c 05 70 80 00
 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

#

The slot status changes were from coldboot with card loaded:

11:18:26 SlotStatus 0040
11:19:01 SlotStatus 0040

eject 

11:19:02 SlotStatus 0100
11:20:46 SlotStatus 0100

removed 1.c7, rescan

11:21:19 SlotStatus 0100

hot insert

11:23:22 SlotStatus 0100
11:23:23 SlotStatus 0140



Martin


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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-14 13:00       ` Martin Mokrejs
@ 2013-03-15  2:41         ` Yijing Wang
  2013-03-28 18:38           ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Yijing Wang @ 2013-03-15  2:41 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu, Huang Ying

+CC Huang Ying <ying.huang@intel.com>
>> As you mentioned before
>> cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100
>> cold boot(PCIe card detected in slot)-->eject(Data Link state changed detected)-->.....
>> detail info reference at PCIe Spec 3.0  7.8.11
> 
> So doesn't pciehp/acpiphp complain when values 0000, 0108, 0138, 0148 appear?

I think the slot status changes is ok. The most important bit here is Presence Detect state
and Presence Detect Changed bits. And as your diff info, it seems ok.

> 
>>
>>>
>> I guess these memory ranges disabled because the original MMIO(coldplug boot) is still in system after eject device,
>> the new device insert cannot get the needed MMIO in system.

Sorry, my fault. I scan the lspci source code, and found the "[disable]" means memory/ioport decoding disabled.
This shows that the device maybe not enabled by driver.

[virtual] meaning /* Reported by the OS, but not by the device */
I also doubt this comment.

> 
> But then some driver is stupid and should loudly complain. Looks nobody even knows
> why lspci prints those "[disabled]" and "[virtual]" strings in its output.
> What are the normal cases of "virtual" ROMs and "disabled" ranges? What *functional*
> devices have them and why are they disabled? Is this like a disabled BOOT ROM on a network
> card or what?
> 


> # diff -u -w iomem.txt iomem_ejected.txt 
> # diff -u -w dmesg_ejected.txt dmesg_ejected_rmmod_sata_sil24.txt 
> --- dmesg_ejected.txt   2013-03-14 11:03:42.000000000 +0100
> +++ dmesg_ejected_rmmod_sata_sil24.txt  2013-03-14 11:05:00.000000000 +0100
> @@ -824,3 +824,173 @@
>  [   38.223082] r8169 0000:05:00.0 eth0: link up
>  [   39.471099] r8169 0000:05:00.0 eth0: link down
>  [   41.857999] r8169 0000:05:00.0 eth0: link up
> +[  270.090796] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
> +[  270.091728] pcieport 0000:00:1c.7: PME# enabled
> +[  270.972562] pcieport 0000:00:1c.7: PME# disabled
> +[  270.982338] pcieport 0000:00:1c.7: PME# enabled
> +[  271.022611] pcieport 0000:00:1c.7: PME# disabled
> +[  271.032560] pcieport 0000:00:1c.7: PME# enabled
> +[  272.053850] pcieport 0000:00:1c.7: PME# disabled
> +[  272.063619] pcieport 0000:00:1c.7: PME# enabled
> +[  272.103916] pcieport 0000:00:1c.7: PME# disabled
> +[  272.113838] pcieport 0000:00:1c.7: PME# enabled
> +[  273.145186] pcieport 0000:00:1c.7: PME# disabled
> +[  273.156282] pcieport 0000:00:1c.7: PME# enabled
> +[  273.195718] pcieport 0000:00:1c.7: PME# disabled
> +[  273.205228] pcieport 0000:00:1c.7: PME# enabled
> +[  274.226918] pcieport 0000:00:1c.7: PME# disabled
> [cut] repeated forever
> 

I added Huang Ying <ying.huang@intel.com> to cc list, Rafael and Huang Ying.
Both of them are familiar with PM. Obviously, this is an unnormal phenomenon.



-- 
Thanks!
Yijing


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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-15  2:41         ` Yijing Wang
@ 2013-03-28 18:38           ` Martin Mokrejs
  2013-03-29  8:20             ` Huang Ying
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-28 18:38 UTC (permalink / raw)
  To: Yijing Wang, Martin Mokrejs
  Cc: linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu, Huang Ying

Hi Ying,
  would you please tell me how this report relate to this patch?

[PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications

  Could you tell me why this PME was being flipped back and forth now?
Actually, does that make finally some sense to you, pci/acpi devs?


  Does is help to say that on the SandyBridge chip I have the following root ports
hooked to the following end devices?:

1.c1 -> rtl8169 05:00.0
1.c3 -> iwlwifi 09:00.0
1.c4 -> xhci_hcd 0b:00.0
1.c7 -> 00:11: express card slot


  Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
happening with the network card on 3.7.10 kernel (not broken kernel):

[138268.870070] r8169 0000:05:00.0 eth0: link down
[138270.809811] r8169 0000:05:00.0 eth0: link up
[138365.599744] r8169 0000:05:00.0 eth0: link down
[138370.594343] r8169 0000:05:00.0: PME# enabled
[138370.623852] pcieport 0000:00:1c.1: PME# enabled
[169885.247386] pcieport 0000:00:1c.1: PME# disabled
[169885.267374] r8169 0000:05:00.0: PME# disabled
[169885.330160] r8169 0000:05:00.0 eth0: link down
[169886.992531] r8169 0000:05:00.0 eth0: link up
[169904.405769] r8169 0000:05:00.0 eth0: link down
[169909.401237] r8169 0000:05:00.0: PME# enabled
[169909.430782] pcieport 0000:00:1c.1: PME# enabled
[170090.538980] pcieport 0000:00:1c.1: PME# disabled
[170090.559088] r8169 0000:05:00.0: PME# disabled
[170090.640494] r8169 0000:05:00.0: PME# enabled
[170090.678425] pcieport 0000:00:1c.1: PME# enabled
[170090.829959] pcieport 0000:00:1c.1: PME# disabled
[170090.848479] r8169 0000:05:00.0: PME# disabled
[170090.892011] r8169 0000:05:00.0 eth0: link down
[170090.892134] r8169 0000:05:00.0 eth0: link down
[170090.930998] r8169 0000:05:00.0 eth0: link down
[170092.554553] r8169 0000:05:00.0 eth0: link up


Thank you,
Martin

Yijing Wang wrote:
> +CC Huang Ying <ying.huang@intel.com>
>>> As you mentioned before
>>> cold boot 0040 -> eject 0100 hotplug insert -> 0140 eject -> 0100 hotplug insert -> 0140 eject -> 0100
>>> cold boot(PCIe card detected in slot)-->eject(Data Link state changed detected)-->.....
>>> detail info reference at PCIe Spec 3.0  7.8.11
>>
>> So doesn't pciehp/acpiphp complain when values 0000, 0108, 0138, 0148 appear?
> 
> I think the slot status changes is ok. The most important bit here is Presence Detect state
> and Presence Detect Changed bits. And as your diff info, it seems ok.
> 
>>
>>>
>>>>
>>> I guess these memory ranges disabled because the original MMIO(coldplug boot) is still in system after eject device,
>>> the new device insert cannot get the needed MMIO in system.
> 
> Sorry, my fault. I scan the lspci source code, and found the "[disable]" means memory/ioport decoding disabled.
> This shows that the device maybe not enabled by driver.
> 
> [virtual] meaning /* Reported by the OS, but not by the device */
> I also doubt this comment.
> 
>>
>> But then some driver is stupid and should loudly complain. Looks nobody even knows
>> why lspci prints those "[disabled]" and "[virtual]" strings in its output.
>> What are the normal cases of "virtual" ROMs and "disabled" ranges? What *functional*
>> devices have them and why are they disabled? Is this like a disabled BOOT ROM on a network
>> card or what?
>>
> 
> 
>> # diff -u -w iomem.txt iomem_ejected.txt 
>> # diff -u -w dmesg_ejected.txt dmesg_ejected_rmmod_sata_sil24.txt 
>> --- dmesg_ejected.txt   2013-03-14 11:03:42.000000000 +0100
>> +++ dmesg_ejected_rmmod_sata_sil24.txt  2013-03-14 11:05:00.000000000 +0100
>> @@ -824,3 +824,173 @@
>>  [   38.223082] r8169 0000:05:00.0 eth0: link up
>>  [   39.471099] r8169 0000:05:00.0 eth0: link down
>>  [   41.857999] r8169 0000:05:00.0 eth0: link up
>> +[  270.090796] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
>> +[  270.091728] pcieport 0000:00:1c.7: PME# enabled
>> +[  270.972562] pcieport 0000:00:1c.7: PME# disabled
>> +[  270.982338] pcieport 0000:00:1c.7: PME# enabled
>> +[  271.022611] pcieport 0000:00:1c.7: PME# disabled
>> +[  271.032560] pcieport 0000:00:1c.7: PME# enabled
>> +[  272.053850] pcieport 0000:00:1c.7: PME# disabled
>> +[  272.063619] pcieport 0000:00:1c.7: PME# enabled
>> +[  272.103916] pcieport 0000:00:1c.7: PME# disabled
>> +[  272.113838] pcieport 0000:00:1c.7: PME# enabled
>> +[  273.145186] pcieport 0000:00:1c.7: PME# disabled
>> +[  273.156282] pcieport 0000:00:1c.7: PME# enabled
>> +[  273.195718] pcieport 0000:00:1c.7: PME# disabled
>> +[  273.205228] pcieport 0000:00:1c.7: PME# enabled
>> +[  274.226918] pcieport 0000:00:1c.7: PME# disabled
>> [cut] repeated forever
>>
> 
> I added Huang Ying <ying.huang@intel.com> to cc list, Rafael and Huang Ying.
> Both of them are familiar with PM. Obviously, this is an unnormal phenomenon.
> 
> 
> 

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-28 18:38           ` Martin Mokrejs
@ 2013-03-29  8:20             ` Huang Ying
  2013-03-29 13:08               ` Martin Mokrejs
                                 ` (2 more replies)
  0 siblings, 3 replies; 41+ messages in thread
From: Huang Ying @ 2013-03-29  8:20 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> Hi Ying,
>   would you please tell me how this report relate to this patch?
> 
> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> 
>   Could you tell me why this PME was being flipped back and forth now?
> Actually, does that make finally some sense to you, pci/acpi devs?
> 
> 
>   Does is help to say that on the SandyBridge chip I have the following root ports
> hooked to the following end devices?:
> 
> 1.c1 -> rtl8169 05:00.0
> 1.c3 -> iwlwifi 09:00.0
> 1.c4 -> xhci_hcd 0b:00.0
> 1.c7 -> 00:11: express card slot
> 
> 
>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
> happening with the network card on 3.7.10 kernel (not broken kernel):
> 
> [138268.870070] r8169 0000:05:00.0 eth0: link down
> [138270.809811] r8169 0000:05:00.0 eth0: link up
> [138365.599744] r8169 0000:05:00.0 eth0: link down
> [138370.594343] r8169 0000:05:00.0: PME# enabled
> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
> [169885.267374] r8169 0000:05:00.0: PME# disabled
> [169885.330160] r8169 0000:05:00.0 eth0: link down
> [169886.992531] r8169 0000:05:00.0 eth0: link up
> [169904.405769] r8169 0000:05:00.0 eth0: link down
> [169909.401237] r8169 0000:05:00.0: PME# enabled
> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
> [170090.559088] r8169 0000:05:00.0: PME# disabled
> [170090.640494] r8169 0000:05:00.0: PME# enabled
> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
> [170090.848479] r8169 0000:05:00.0: PME# disabled
> [170090.892011] r8169 0000:05:00.0 eth0: link down
> [170090.892134] r8169 0000:05:00.0 eth0: link down
> [170090.930998] r8169 0000:05:00.0 eth0: link down
> [170092.554553] r8169 0000:05:00.0 eth0: link up

I don't know exactly.  Can you give me the follow output?

grep . /sys/bus/pci/devices/*/power/control
grep . /sys/bus/pci/devices/*/power/runtime_status

And can you try the following patch?

Best Regards,
Huang Ying

-------------------------->

---
 drivers/pci/hotplug/pci_hotplug_core.c |    6 ++++++
 drivers/pci/pcie/portdrv_pci.c         |    8 +++++---
 drivers/pci/slot.c                     |   18 ++++++++++++++++++
 include/linux/pci.h                    |    1 +
 4 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 202f4a9..7d4cf1a 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -39,6 +39,7 @@
 #include <linux/mutex.h>
 #include <linux/pci.h>
 #include <linux/pci_hotplug.h>
+#include <linux/pm_runtime.h>
 #include <asm/uaccess.h>
 #include "../pci.h"
 
@@ -473,6 +474,8 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
 	dbg("Added slot %s to the list\n", name);
 out:
 	mutex_unlock(&pci_hp_mutex);
+	/* Bridge runtime PM state may be influenced by hotplug */
+	pm_runtime_resume(&bus->self->dev);
 	return result;
 }
 
@@ -489,6 +492,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
 {
 	struct hotplug_slot *temp;
 	struct pci_slot *slot;
+	struct pci_bus *bus;
 
 	if (!hotplug)
 		return -ENODEV;
@@ -508,8 +512,10 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
 
 	hotplug->release(hotplug);
 	slot->hotplug = NULL;
+	bus = slot->bus;
 	pci_destroy_slot(slot);
 	mutex_unlock(&pci_hp_mutex);
+	pm_runtime_resume(&bus->self->dev);
 
 	return 0;
 }
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 08c243a..beb9c90 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -154,9 +154,11 @@ static int pcie_port_runtime_idle(struct device *dev)
 	 */
 	pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
 	/* Delay for a short while to prevent too frequent suspend/resume */
-	if (!pme_poll)
-		pm_schedule_suspend(dev, 10);
-	return -EBUSY;
+	if (pme_poll)
+		return -EBUSY;
+	if (pci_bus_has_hotplug_slots(pdev->subordinate))
+		return -EBUSY;
+	return pm_schedule_suspend(dev, 10);
 }
 #else
 #define pcie_port_runtime_suspend	NULL
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index ac6412f..10b275b 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -345,6 +345,24 @@ out:
 }
 EXPORT_SYMBOL_GPL(pci_renumber_slot);
 
+bool pci_bus_has_hotplug_slots(struct pci_bus *bus)
+{
+	struct pci_slot *slot;
+	bool has_hotplug_slots = false;
+
+	down_read(&pci_bus_sem);
+	list_for_each_entry(slot, &bus->slots, list) {
+		if (slot->hotplug) {
+			has_hotplug_slots = true;
+			break;
+		}
+	}
+	up_read(&pci_bus_sem);
+
+	return has_hotplug_slots;
+}
+EXPORT_SYMBOL_GPL(pci_bus_has_hotplug_slots);
+
 /**
  * pci_destroy_slot - decrement refcount for physical PCI slot
  * @slot: struct pci_slot to decrement
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 2461033a..0d0cc94 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -722,6 +722,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
 void pci_destroy_slot(struct pci_slot *slot);
 void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
 int pci_scan_slot(struct pci_bus *bus, int devfn);
+bool pci_bus_has_hotplug_slots(struct pci_bus *bus);
 struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
 void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
 unsigned int pci_scan_child_bus(struct pci_bus *bus);



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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29  8:20             ` Huang Ying
@ 2013-03-29 13:08               ` Martin Mokrejs
  2013-03-29 14:38                 ` Huang Ying
  2013-03-29 14:11               ` Martin Mokrejs
  2013-03-31 18:48               ` Martin Mokrejs
  2 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-29 13:08 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu



Huang Ying wrote:
> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>> Hi Ying,
>>   would you please tell me how this report relate to this patch?
>>
>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>
>>   Could you tell me why this PME was being flipped back and forth now?
>> Actually, does that make finally some sense to you, pci/acpi devs?
>>
>>
>>   Does is help to say that on the SandyBridge chip I have the following root ports
>> hooked to the following end devices?:
>>
>> 1.c1 -> rtl8169 05:00.0
>> 1.c3 -> iwlwifi 09:00.0
>> 1.c4 -> xhci_hcd 0b:00.0
>> 1.c7 -> 00:11: express card slot
>>
>>
>>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
>> happening with the network card on 3.7.10 kernel (not broken kernel):
>>
>> [138268.870070] r8169 0000:05:00.0 eth0: link down
>> [138270.809811] r8169 0000:05:00.0 eth0: link up
>> [138365.599744] r8169 0000:05:00.0 eth0: link down
>> [138370.594343] r8169 0000:05:00.0: PME# enabled
>> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
>> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
>> [169885.267374] r8169 0000:05:00.0: PME# disabled
>> [169885.330160] r8169 0000:05:00.0 eth0: link down
>> [169886.992531] r8169 0000:05:00.0 eth0: link up
>> [169904.405769] r8169 0000:05:00.0 eth0: link down
>> [169909.401237] r8169 0000:05:00.0: PME# enabled
>> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
>> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
>> [170090.559088] r8169 0000:05:00.0: PME# disabled
>> [170090.640494] r8169 0000:05:00.0: PME# enabled
>> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
>> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
>> [170090.848479] r8169 0000:05:00.0: PME# disabled
>> [170090.892011] r8169 0000:05:00.0 eth0: link down
>> [170090.892134] r8169 0000:05:00.0 eth0: link down
>> [170090.930998] r8169 0000:05:00.0 eth0: link down
>> [170092.554553] r8169 0000:05:00.0 eth0: link up
> 
> I don't know exactly.  Can you give me the follow output?
> 
> grep . /sys/bus/pci/devices/*/power/control
> grep . /sys/bus/pci/devices/*/power/runtime_status


Hi Ying,
  here is the output from the not-broken 3.7.10 kernel:

vostro ~ # uname -a
Linux vostro 3.7.10-default #2 SMP Tue Mar 5 09:52:12 MET 2013 x86_64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz GenuineIntel GNU/Linux
vostro ~ # grep . /sys/bus/pci/devices/*/power/control
/sys/bus/pci/devices/0000:00:00.0/power/control:auto
/sys/bus/pci/devices/0000:00:02.0/power/control:auto
/sys/bus/pci/devices/0000:00:16.0/power/control:auto
/sys/bus/pci/devices/0000:00:1a.0/power/control:auto
/sys/bus/pci/devices/0000:00:1b.0/power/control:auto
/sys/bus/pci/devices/0000:00:1c.0/power/control:auto
/sys/bus/pci/devices/0000:00:1c.1/power/control:auto
/sys/bus/pci/devices/0000:00:1c.3/power/control:auto
/sys/bus/pci/devices/0000:00:1c.4/power/control:auto
/sys/bus/pci/devices/0000:00:1c.7/power/control:auto
/sys/bus/pci/devices/0000:00:1d.0/power/control:auto
/sys/bus/pci/devices/0000:00:1f.0/power/control:auto
/sys/bus/pci/devices/0000:00:1f.2/power/control:auto
/sys/bus/pci/devices/0000:00:1f.3/power/control:auto
/sys/bus/pci/devices/0000:05:00.0/power/control:auto
/sys/bus/pci/devices/0000:09:00.0/power/control:auto
/sys/bus/pci/devices/0000:0b:00.0/power/control:auto
/sys/bus/pci/devices/0000:11:00.0/power/control:auto
vostro ~ # grep . /sys/bus/pci/devices/*/power/runtime_status
/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
/sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active
vostro ~ # 



Now will go and test your patch for the 3.9-rc1 PME# storm when the coldplugged eSATA
is unplugged and rmmod sata_sil24 triggers the messages.

Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29  8:20             ` Huang Ying
  2013-03-29 13:08               ` Martin Mokrejs
@ 2013-03-29 14:11               ` Martin Mokrejs
  2013-03-29 16:45                 ` Martin Mokrejs
                                   ` (2 more replies)
  2013-03-31 18:48               ` Martin Mokrejs
  2 siblings, 3 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-29 14:11 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi Ying,
  thank you for the patch. Here are the results.

Huang Ying wrote:
> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>> Hi Ying,
>>   would you please tell me how this report relate to this patch?
>>
>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>
>>   Could you tell me why this PME was being flipped back and forth now?
>> Actually, does that make finally some sense to you, pci/acpi devs?



  First of all, now, due to you patch, the following is logged after I run lspci
(I tried several time lspci with none, -v, -vvv, -tv options):

--- dmesg_initial.txt   2013-03-29 14:13:44.000000000 +0100
+++ dmesg_with_eSATA_ejected.txt        2013-03-29 14:16:37.000000000 +0100
@@ -827,3 +827,40 @@
 [   46.635843] r8169 0000:05:00.0: PME# disabled
 [   46.728762] r8169 0000:05:00.0 eth0: link down
 [   48.449706] r8169 0000:05:00.0 eth0: link up
+[  117.546597] pcieport 0000:00:1c.4: PME# enabled
+[  117.642825] pcieport 0000:00:1c.4: PME# disabled
+[  117.642913] pcieport 0000:00:1c.4: PME# enabled
+[  117.682862] pcieport 0000:00:1c.4: PME# disabled
+[  117.682950] pcieport 0000:00:1c.4: PME# enabled
+[  117.722906] pcieport 0000:00:1c.4: PME# disabled
+[  117.722994] pcieport 0000:00:1c.4: PME# enabled
+[  117.762962] pcieport 0000:00:1c.4: PME# disabled
+[  117.763055] pcieport 0000:00:1c.4: PME# enabled
+[  117.803062] pcieport 0000:00:1c.4: PME# disabled
+[  117.803149] pcieport 0000:00:1c.4: PME# enabled
+[  117.843061] pcieport 0000:00:1c.4: PME# disabled
+[  117.843156] pcieport 0000:00:1c.4: PME# enabled
+[  117.883108] pcieport 0000:00:1c.4: PME# disabled
+[  117.883204] pcieport 0000:00:1c.4: PME# enabled
+[  117.923210] pcieport 0000:00:1c.4: PME# disabled
+[  117.923297] pcieport 0000:00:1c.4: PME# enabled
+[  117.963206] pcieport 0000:00:1c.4: PME# disabled
+[  117.963295] pcieport 0000:00:1c.4: PME# enabled
+[  118.003259] pcieport 0000:00:1c.4: PME# disabled
+[  118.003348] pcieport 0000:00:1c.4: PME# enabled
+[  118.043354] pcieport 0000:00:1c.4: PME# disabled
+[  118.043453] pcieport 0000:00:1c.4: PME# enabled
+[  118.083353] pcieport 0000:00:1c.4: PME# disabled
+[  118.083441] pcieport 0000:00:1c.4: PME# enabled
+[  118.123472] pcieport 0000:00:1c.4: PME# disabled
+[  118.123564] pcieport 0000:00:1c.4: PME# enabled
+[  185.527864] pcieport 0000:00:1c.4: PME# disabled
+[  185.527989] pcieport 0000:00:1c.4: PME# enabled
+[  191.958942] pcieport 0000:00:1c.4: PME# disabled
+[  191.959067] pcieport 0000:00:1c.4: PME# enabled
+[  195.104378] pcieport 0000:00:1c.4: PME# disabled
+[  195.104501] pcieport 0000:00:1c.4: PME# enabled
+[  204.670888] pcieport 0000:00:1c.4: PME# disabled
+[  204.671012] pcieport 0000:00:1c.4: PME# enabled
+[  227.029510] pcieport 0000:00:1c.4: PME# disabled
+[  227.029636] pcieport 0000:00:1c.4: PME# enabled

Provided that on 1c.4 is the TI USB3 controller we are hitting again the weird interaction
between USB and the express card slot on this computer.

# cat lspci_tv_initial.txt
-[0000:00]-+-00.0  Intel Corporation 2nd Generation Core Processor Family DRAM Controller
           +-02.0  Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller
           +-16.0  Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1
           +-1a.0  Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
           +-1b.0  Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller
           +-1c.0-[03-04]--
           +-1c.1-[05-06]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller
           +-1c.3-[09-0a]----00.0  Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak]
           +-1c.4-[0b-0c]----00.0  Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller
           +-1c.7-[11-16]----00.0  Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
           +-1d.0  Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
           +-1f.0  Intel Corporation HM67 Express Chipset Family LPC Controller
           +-1f.2  Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
           \-1f.3  Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller
#

The 3.9-rc1-ying kernel was compiled with:

$ gzip -dc config.gz | grep USB 
# CONFIG_USB_SWITCH_FSA9480 is not set
# USB GPIO expanders:
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_ARCH_HAS_XHCI=y
# CONFIG_USB_SUPPORT is not set
$

  Kernel commandline was as in previous tests in this thread:
pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off



  Second, after I ejected the coldplugged eSATA card these 1c.4: PME# messages also
popped up in dmesg. I think just the very last two PME# lines shown above were added (so about
the [  227.029510] time).

  At the "lspci level", the eject resulted in:

# diff -u8 -w lspci_vvv_initial.txt lspci_vvv_with_eSATA_ejected.txt
--- lspci_vvv_initial.txt       2013-03-29 14:13:56.000000000 +0100
+++ lspci_vvv_with_eSATA_ejected.txt    2013-03-29 14:17:09.000000000 +0100
@@ -288,37 +288,37 @@
 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
@@ -516,44 +516,12 @@
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
 

  I think that's not new, somebody said already that the Changed: PresDet value is quickly
cleared to PresDet- (under pciehp, I believe this is not the case with acpiphp but let's
ignore this now).
  Why LinkState+ remains I don't know.




  Third, after the 'rmmod sata_sil24' there is an improvement! (no PME# flipping back and forth)
but what is going on with the root port handling XHCI controller I have no idea:

--- dmesg_with_eSATA_ejected.txt        2013-03-29 14:16:37.000000000 +0100
+++ dmesg_with_eSATA_ejected_and_rmmod_sata_sil24.txt   2013-03-29 14:19:07.000000000 +0100
@@ -864,3 +864,35 @@
 [  204.671012] pcieport 0000:00:1c.4: PME# enabled
 [  227.029510] pcieport 0000:00:1c.4: PME# disabled
 [  227.029636] pcieport 0000:00:1c.4: PME# enabled
+[  311.755721] pcieport 0000:00:1c.4: PME# disabled
+[  311.755848] pcieport 0000:00:1c.4: PME# enabled
+[  311.805807] pcieport 0000:00:1c.4: PME# disabled
+[  311.805900] pcieport 0000:00:1c.4: PME# enabled
+[  311.845877] pcieport 0000:00:1c.4: PME# disabled
+[  311.845968] pcieport 0000:00:1c.4: PME# enabled
+[  311.886058] pcieport 0000:00:1c.4: PME# disabled
+[  311.886149] pcieport 0000:00:1c.4: PME# enabled
+[  311.926012] pcieport 0000:00:1c.4: PME# disabled
+[  311.926109] pcieport 0000:00:1c.4: PME# enabled
+[  311.966080] pcieport 0000:00:1c.4: PME# disabled
+[  311.966172] pcieport 0000:00:1c.4: PME# enabled
+[  312.006146] pcieport 0000:00:1c.4: PME# disabled
+[  312.006244] pcieport 0000:00:1c.4: PME# enabled
+[  312.046220] pcieport 0000:00:1c.4: PME# disabled
+[  312.046319] pcieport 0000:00:1c.4: PME# enabled
+[  312.086359] pcieport 0000:00:1c.4: PME# disabled
+[  312.086450] pcieport 0000:00:1c.4: PME# enabled
+[  312.126359] pcieport 0000:00:1c.4: PME# disabled
+[  312.126451] pcieport 0000:00:1c.4: PME# enabled
+[  312.166432] pcieport 0000:00:1c.4: PME# disabled
+[  312.166524] pcieport 0000:00:1c.4: PME# enabled
+[  312.206550] pcieport 0000:00:1c.4: PME# disabled
+[  312.206648] pcieport 0000:00:1c.4: PME# enabled
+[  312.246565] pcieport 0000:00:1c.4: PME# disabled
+[  312.246656] pcieport 0000:00:1c.4: PME# enabled
+[  312.286635] pcieport 0000:00:1c.4: PME# disabled
+[  312.286731] pcieport 0000:00:1c.4: PME# enabled
+[  318.607575] pcieport 0000:00:1c.4: PME# disabled
+[  318.607702] pcieport 0000:00:1c.4: PME# enabled
+[  388.129192] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  388.129339] pcieport 0000:00:1c.7: PME# enabled





  Forth, the rmmod released IRQ19 of the eSATA card. I did not conenct any device to it maybe
that is why there were 0 interruputs on it?

# diff -u -w interrupts_with_eSATA_ejected.txt interrupts_with_eSATA_ejected_and_rmmod_sata_sil24.txt 
--- interrupts_with_eSATA_ejected.txt   2013-03-29 14:16:49.000000000 +0100
+++ interrupts_with_eSATA_ejected_and_rmmod_sata_sil24.txt      2013-03-29 14:19:00.000000000 +0100
@@ -1,27 +1,26 @@
            CPU0       CPU1       
   0:         24          0   IO-APIC-edge      timer
-  1:       1710          0   IO-APIC-edge      i8042
+  1:       2458          0   IO-APIC-edge      i8042
   8:         62          0   IO-APIC-edge      rtc0
-  9:         20          0   IO-APIC-fasteoi   acpi
+  9:         22          0   IO-APIC-fasteoi   acpi
  12:        520          0   IO-APIC-edge      i8042
- 19:          0          0   IO-APIC-fasteoi   sata_sil24
- 40:       4223          0   PCI-MSI-edge      ahci
- 41:        571          0   PCI-MSI-edge      eth0
+ 40:       4334          0   PCI-MSI-edge      ahci
+ 41:        728          0   PCI-MSI-edge      eth0
  42:        948          0   PCI-MSI-edge      snd_hda_intel
  43:          1          0   PCI-MSI-edge      iwlwifi
  44:        203          0   PCI-MSI-edge      i915
-NMI:         12         35   Non-maskable interrupts
-LOC:      10849       6919   Local timer interrupts
+NMI:         14         35   Non-maskable interrupts
+LOC:      13541       7743   Local timer interrupts
 SPU:          0          0   Spurious interrupts
-PMI:         12         35   Performance monitoring interrupts
+PMI:         14         35   Performance monitoring interrupts
 IWI:          0          0   IRQ work interrupts
 RTR:          0          0   APIC ICR read retries
-RES:       4073       4299   Rescheduling interrupts
-CAL:         18       2191   Function call interrupts
+RES:       4166       4519   Rescheduling interrupts
+CAL:         18       2216   Function call interrupts
 TLB:        123        100   TLB shootdowns
 TRM:          0          0   Thermal event interrupts
 THR:          0          0   Threshold APIC interrupts
 MCE:          0          0   Machine check exceptions
-MCP:          2          2   Machine check polls
+MCP:          3          3   Machine check polls
 ERR:          0
 MIS:          0
#

 Fifth, after the rmmod I grabbed these values:
# grep . /sys/bus/pci/devices/*/power/control
/sys/bus/pci/devices/0000:00:00.0/power/control:auto
/sys/bus/pci/devices/0000:00:02.0/power/control:auto
/sys/bus/pci/devices/0000:00:16.0/power/control:auto
/sys/bus/pci/devices/0000:00:1a.0/power/control:auto
/sys/bus/pci/devices/0000:00:1b.0/power/control:auto
/sys/bus/pci/devices/0000:00:1c.0/power/control:auto
/sys/bus/pci/devices/0000:00:1c.1/power/control:auto
/sys/bus/pci/devices/0000:00:1c.3/power/control:auto
/sys/bus/pci/devices/0000:00:1c.4/power/control:auto
/sys/bus/pci/devices/0000:00:1c.7/power/control:auto
/sys/bus/pci/devices/0000:00:1d.0/power/control:auto
/sys/bus/pci/devices/0000:00:1f.0/power/control:auto
/sys/bus/pci/devices/0000:00:1f.2/power/control:auto
/sys/bus/pci/devices/0000:00:1f.3/power/control:auto
/sys/bus/pci/devices/0000:05:00.0/power/control:auto
/sys/bus/pci/devices/0000:09:00.0/power/control:auto
/sys/bus/pci/devices/0000:0b:00.0/power/control:auto
/sys/bus/pci/devices/0000:11:00.0/power/control:auto
# grep . /sys/bus/pci/devices/*/power/runtime_status
/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
/sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:suspended
#



Finally, after hot-insert the eSATA card did not get IRQ (per /proc/interrupts) as before
and in lspci it reported as before the "[virtual] ROM ...." and SltSta Changed: PresDet-.

# diff -u -w lspci_vvv_with_eSATA_ejected_and_rmmod_sata_sil24.txt lspci_vvv_with_eSATA_ejected_and_rmmod_sata_sil24_and_reinserted.txt 
--- lspci_vvv_with_eSATA_ejected_and_rmmod_sata_sil24.txt       2013-03-29 14:19:18.000000000 +0100
+++ lspci_vvv_with_eSATA_ejected_and_rmmod_sata_sil24_and_reinserted.txt        2013-03-29 14:27:24.000000000 +0100
@@ -307,12 +307,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -521,6 +521,37 @@
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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-
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-




So, in summary, I think it is a bit better now for me. I get extra debug messages that something
is going on with 1c.4 port (I tested in console mode but in int level 3 but that i did also
in the past).

Hope this helps,
Martin


>>
>>
>>   Does is help to say that on the SandyBridge chip I have the following root ports
>> hooked to the following end devices?:
>>
>> 1.c1 -> rtl8169 05:00.0
>> 1.c3 -> iwlwifi 09:00.0
>> 1.c4 -> xhci_hcd 0b:00.0
>> 1.c7 -> 00:11: express card slot
>>
>>
>>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
>> happening with the network card on 3.7.10 kernel (not broken kernel):
>>
>> [138268.870070] r8169 0000:05:00.0 eth0: link down
>> [138270.809811] r8169 0000:05:00.0 eth0: link up
>> [138365.599744] r8169 0000:05:00.0 eth0: link down
>> [138370.594343] r8169 0000:05:00.0: PME# enabled
>> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
>> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
>> [169885.267374] r8169 0000:05:00.0: PME# disabled
>> [169885.330160] r8169 0000:05:00.0 eth0: link down
>> [169886.992531] r8169 0000:05:00.0 eth0: link up
>> [169904.405769] r8169 0000:05:00.0 eth0: link down
>> [169909.401237] r8169 0000:05:00.0: PME# enabled
>> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
>> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
>> [170090.559088] r8169 0000:05:00.0: PME# disabled
>> [170090.640494] r8169 0000:05:00.0: PME# enabled
>> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
>> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
>> [170090.848479] r8169 0000:05:00.0: PME# disabled
>> [170090.892011] r8169 0000:05:00.0 eth0: link down
>> [170090.892134] r8169 0000:05:00.0 eth0: link down
>> [170090.930998] r8169 0000:05:00.0 eth0: link down
>> [170092.554553] r8169 0000:05:00.0 eth0: link up
> 
> I don't know exactly.  Can you give me the follow output?
> 
> grep . /sys/bus/pci/devices/*/power/control
> grep . /sys/bus/pci/devices/*/power/runtime_status
> 
> And can you try the following patch?
> 
> Best Regards,
> Huang Ying
> 
> -------------------------->
> 
> ---
>  drivers/pci/hotplug/pci_hotplug_core.c |    6 ++++++
>  drivers/pci/pcie/portdrv_pci.c         |    8 +++++---
>  drivers/pci/slot.c                     |   18 ++++++++++++++++++
>  include/linux/pci.h                    |    1 +
>  4 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
> index 202f4a9..7d4cf1a 100644
> --- a/drivers/pci/hotplug/pci_hotplug_core.c
> +++ b/drivers/pci/hotplug/pci_hotplug_core.c
> @@ -39,6 +39,7 @@
>  #include <linux/mutex.h>
>  #include <linux/pci.h>
>  #include <linux/pci_hotplug.h>
> +#include <linux/pm_runtime.h>
>  #include <asm/uaccess.h>
>  #include "../pci.h"
>  
> @@ -473,6 +474,8 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
>  	dbg("Added slot %s to the list\n", name);
>  out:
>  	mutex_unlock(&pci_hp_mutex);
> +	/* Bridge runtime PM state may be influenced by hotplug */
> +	pm_runtime_resume(&bus->self->dev);
>  	return result;
>  }
>  
> @@ -489,6 +492,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
>  {
>  	struct hotplug_slot *temp;
>  	struct pci_slot *slot;
> +	struct pci_bus *bus;
>  
>  	if (!hotplug)
>  		return -ENODEV;
> @@ -508,8 +512,10 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
>  
>  	hotplug->release(hotplug);
>  	slot->hotplug = NULL;
> +	bus = slot->bus;
>  	pci_destroy_slot(slot);
>  	mutex_unlock(&pci_hp_mutex);
> +	pm_runtime_resume(&bus->self->dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
> index 08c243a..beb9c90 100644
> --- a/drivers/pci/pcie/portdrv_pci.c
> +++ b/drivers/pci/pcie/portdrv_pci.c
> @@ -154,9 +154,11 @@ static int pcie_port_runtime_idle(struct device *dev)
>  	 */
>  	pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
>  	/* Delay for a short while to prevent too frequent suspend/resume */
> -	if (!pme_poll)
> -		pm_schedule_suspend(dev, 10);
> -	return -EBUSY;
> +	if (pme_poll)
> +		return -EBUSY;
> +	if (pci_bus_has_hotplug_slots(pdev->subordinate))
> +		return -EBUSY;
> +	return pm_schedule_suspend(dev, 10);
>  }
>  #else
>  #define pcie_port_runtime_suspend	NULL
> diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
> index ac6412f..10b275b 100644
> --- a/drivers/pci/slot.c
> +++ b/drivers/pci/slot.c
> @@ -345,6 +345,24 @@ out:
>  }
>  EXPORT_SYMBOL_GPL(pci_renumber_slot);
>  
> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus)
> +{
> +	struct pci_slot *slot;
> +	bool has_hotplug_slots = false;
> +
> +	down_read(&pci_bus_sem);
> +	list_for_each_entry(slot, &bus->slots, list) {
> +		if (slot->hotplug) {
> +			has_hotplug_slots = true;
> +			break;
> +		}
> +	}
> +	up_read(&pci_bus_sem);
> +
> +	return has_hotplug_slots;
> +}
> +EXPORT_SYMBOL_GPL(pci_bus_has_hotplug_slots);
> +
>  /**
>   * pci_destroy_slot - decrement refcount for physical PCI slot
>   * @slot: struct pci_slot to decrement
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 2461033a..0d0cc94 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -722,6 +722,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
>  void pci_destroy_slot(struct pci_slot *slot);
>  void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
>  int pci_scan_slot(struct pci_bus *bus, int devfn);
> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus);
>  struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
>  void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
>  unsigned int pci_scan_child_bus(struct pci_bus *bus);
> 
> 
> 

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29 13:08               ` Martin Mokrejs
@ 2013-03-29 14:38                 ` Huang Ying
  2013-03-29 15:12                   ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Huang Ying @ 2013-03-29 14:38 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

On Fri, 2013-03-29 at 14:08 +0100, Martin Mokrejs wrote:
> 
> Huang Ying wrote:
> > On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> >> Hi Ying,
> >>   would you please tell me how this report relate to this patch?
> >>
> >> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> >>
> >>   Could you tell me why this PME was being flipped back and forth now?
> >> Actually, does that make finally some sense to you, pci/acpi devs?
> >>
> >>
> >>   Does is help to say that on the SandyBridge chip I have the following root ports
> >> hooked to the following end devices?:
> >>
> >> 1.c1 -> rtl8169 05:00.0
> >> 1.c3 -> iwlwifi 09:00.0
> >> 1.c4 -> xhci_hcd 0b:00.0
> >> 1.c7 -> 00:11: express card slot
> >>
> >>
> >>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
> >> happening with the network card on 3.7.10 kernel (not broken kernel):
> >>
> >> [138268.870070] r8169 0000:05:00.0 eth0: link down
> >> [138270.809811] r8169 0000:05:00.0 eth0: link up
> >> [138365.599744] r8169 0000:05:00.0 eth0: link down
> >> [138370.594343] r8169 0000:05:00.0: PME# enabled
> >> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
> >> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
> >> [169885.267374] r8169 0000:05:00.0: PME# disabled
> >> [169885.330160] r8169 0000:05:00.0 eth0: link down
> >> [169886.992531] r8169 0000:05:00.0 eth0: link up
> >> [169904.405769] r8169 0000:05:00.0 eth0: link down
> >> [169909.401237] r8169 0000:05:00.0: PME# enabled
> >> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
> >> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
> >> [170090.559088] r8169 0000:05:00.0: PME# disabled
> >> [170090.640494] r8169 0000:05:00.0: PME# enabled
> >> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
> >> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
> >> [170090.848479] r8169 0000:05:00.0: PME# disabled
> >> [170090.892011] r8169 0000:05:00.0 eth0: link down
> >> [170090.892134] r8169 0000:05:00.0 eth0: link down
> >> [170090.930998] r8169 0000:05:00.0 eth0: link down
> >> [170092.554553] r8169 0000:05:00.0 eth0: link up
> > 
> > I don't know exactly.  Can you give me the follow output?
> > 
> > grep . /sys/bus/pci/devices/*/power/control
> > grep . /sys/bus/pci/devices/*/power/runtime_status
> 
> 
> Hi Ying,
>   here is the output from the not-broken 3.7.10 kernel:
> 
> vostro ~ # uname -a
> Linux vostro 3.7.10-default #2 SMP Tue Mar 5 09:52:12 MET 2013 x86_64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz GenuineIntel GNU/Linux
> vostro ~ # grep . /sys/bus/pci/devices/*/power/control
> /sys/bus/pci/devices/0000:00:00.0/power/control:auto
> /sys/bus/pci/devices/0000:00:02.0/power/control:auto
> /sys/bus/pci/devices/0000:00:16.0/power/control:auto
> /sys/bus/pci/devices/0000:00:1a.0/power/control:auto
> /sys/bus/pci/devices/0000:00:1b.0/power/control:auto
> /sys/bus/pci/devices/0000:00:1c.0/power/control:auto
> /sys/bus/pci/devices/0000:00:1c.1/power/control:auto
> /sys/bus/pci/devices/0000:00:1c.3/power/control:auto
> /sys/bus/pci/devices/0000:00:1c.4/power/control:auto
> /sys/bus/pci/devices/0000:00:1c.7/power/control:auto
> /sys/bus/pci/devices/0000:00:1d.0/power/control:auto
> /sys/bus/pci/devices/0000:00:1f.0/power/control:auto
> /sys/bus/pci/devices/0000:00:1f.2/power/control:auto
> /sys/bus/pci/devices/0000:00:1f.3/power/control:auto
> /sys/bus/pci/devices/0000:05:00.0/power/control:auto
> /sys/bus/pci/devices/0000:09:00.0/power/control:auto
> /sys/bus/pci/devices/0000:0b:00.0/power/control:auto
> /sys/bus/pci/devices/0000:11:00.0/power/control:auto

I guess you use laptop-mode-tool to turn on runtime PM for all PCI
devices.  Is possible for you to turn off runtime PM for PCI devices in
laptop-mode-tool if you use it or by hand as follow and test it again to
check whether it is related to runtime PM support?

runtime PM for PCI devices can be turned off via the following command
line as root:

for ctrl in /sys/bus/pci/devices/*/power/control; do
	echo on > $ctrl
done

Best Regards,
Huang Ying

> vostro ~ # grep . /sys/bus/pci/devices/*/power/runtime_status
> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active
> vostro ~ # 
> 
> 
> 
> Now will go and test your patch for the 3.9-rc1 PME# storm when the coldplugged eSATA
> is unplugged and rmmod sata_sil24 triggers the messages.
> 
> Martin



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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29 14:38                 ` Huang Ying
@ 2013-03-29 15:12                   ` Martin Mokrejs
  0 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-29 15:12 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu



Huang Ying wrote:
> On Fri, 2013-03-29 at 14:08 +0100, Martin Mokrejs wrote:
>>
>> Huang Ying wrote:
>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>>> Hi Ying,
>>>>   would you please tell me how this report relate to this patch?
>>>>
>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>>
>>>>   Could you tell me why this PME was being flipped back and forth now?
>>>> Actually, does that make finally some sense to you, pci/acpi devs?
>>>>
>>>>
>>>>   Does is help to say that on the SandyBridge chip I have the following root ports
>>>> hooked to the following end devices?:
>>>>
>>>> 1.c1 -> rtl8169 05:00.0
>>>> 1.c3 -> iwlwifi 09:00.0
>>>> 1.c4 -> xhci_hcd 0b:00.0
>>>> 1.c7 -> 00:11: express card slot
>>>>
>>>>
>>>>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
>>>> happening with the network card on 3.7.10 kernel (not broken kernel):
>>>>
>>>> [138268.870070] r8169 0000:05:00.0 eth0: link down
>>>> [138270.809811] r8169 0000:05:00.0 eth0: link up
>>>> [138365.599744] r8169 0000:05:00.0 eth0: link down
>>>> [138370.594343] r8169 0000:05:00.0: PME# enabled
>>>> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
>>>> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
>>>> [169885.267374] r8169 0000:05:00.0: PME# disabled
>>>> [169885.330160] r8169 0000:05:00.0 eth0: link down
>>>> [169886.992531] r8169 0000:05:00.0 eth0: link up
>>>> [169904.405769] r8169 0000:05:00.0 eth0: link down
>>>> [169909.401237] r8169 0000:05:00.0: PME# enabled
>>>> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
>>>> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
>>>> [170090.559088] r8169 0000:05:00.0: PME# disabled
>>>> [170090.640494] r8169 0000:05:00.0: PME# enabled
>>>> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
>>>> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
>>>> [170090.848479] r8169 0000:05:00.0: PME# disabled
>>>> [170090.892011] r8169 0000:05:00.0 eth0: link down
>>>> [170090.892134] r8169 0000:05:00.0 eth0: link down
>>>> [170090.930998] r8169 0000:05:00.0 eth0: link down
>>>> [170092.554553] r8169 0000:05:00.0 eth0: link up
>>>
>>> I don't know exactly.  Can you give me the follow output?
>>>
>>> grep . /sys/bus/pci/devices/*/power/control
>>> grep . /sys/bus/pci/devices/*/power/runtime_status
>>
>>
>> Hi Ying,
>>   here is the output from the not-broken 3.7.10 kernel:
>>
>> vostro ~ # uname -a
>> Linux vostro 3.7.10-default #2 SMP Tue Mar 5 09:52:12 MET 2013 x86_64 Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz GenuineIntel GNU/Linux
>> vostro ~ # grep . /sys/bus/pci/devices/*/power/control
>> /sys/bus/pci/devices/0000:00:00.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:02.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:16.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:1a.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:1b.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:1c.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:1c.1/power/control:auto
>> /sys/bus/pci/devices/0000:00:1c.3/power/control:auto
>> /sys/bus/pci/devices/0000:00:1c.4/power/control:auto
>> /sys/bus/pci/devices/0000:00:1c.7/power/control:auto
>> /sys/bus/pci/devices/0000:00:1d.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:1f.0/power/control:auto
>> /sys/bus/pci/devices/0000:00:1f.2/power/control:auto
>> /sys/bus/pci/devices/0000:00:1f.3/power/control:auto
>> /sys/bus/pci/devices/0000:05:00.0/power/control:auto
>> /sys/bus/pci/devices/0000:09:00.0/power/control:auto
>> /sys/bus/pci/devices/0000:0b:00.0/power/control:auto
>> /sys/bus/pci/devices/0000:11:00.0/power/control:auto
> 
> I guess you use laptop-mode-tool to turn on runtime PM for all PCI
> devices.  Is possible for you to turn off runtime PM for PCI devices in
> laptop-mode-tool if you use it or by hand as follow and test it again to
> check whether it is related to runtime PM support?
> 
> runtime PM for PCI devices can be turned off via the following command
> line as root:
> 
> for ctrl in /sys/bus/pci/devices/*/power/control; do
> 	echo on > $ctrl
> done
> 

Hmm, the startup script claimed that while on AC they are turned off.
Here is part of my /etc/laptop-mode/laptop-mode.conf

#
# Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1


#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=0


#
# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
#
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0


#
# Enable all simple zero-configuration auto modules
# This option enables all simple modules (listed below) without requiring
# the user to enable each module individually
#
# List of modules which can be automatically enabled with this setting are:
#
# ac97-powersave
# cpufreq
# dpms-standby
# eee-superhe
# ethernet
# exec-commands
# hal-polling
# hdparm
# intel-hda-powersave
# intel-sata-powermgmt
# nmi-watchdog
# runtime-pm
# sched-mc-power-savings
# sched-smt-power-savings
# terminal-blanking
# usb-autosuspend
# wireless-ipw-power
# wireless-iwl-power
# wireless-power
#
# Set this to 1 to enable all simple zero-configuration auto modules listed above.
#
# NOTE: You can explicitly enable/disable any of the above modules by changing their
# values in the individual settings file
#
ENABLE_AUTO_MODULES=1



OK, will uninstall app-laptop/laptop-mode-tools-1.62-r1 now. I am sorry for the confusion.



> Best Regards,
> Huang Ying
> 
>> vostro ~ # grep . /sys/bus/pci/devices/*/power/runtime_status
>> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active
>> vostro ~ # 
>>
>>
>>
>> Now will go and test your patch for the 3.9-rc1 PME# storm when the coldplugged eSATA
>> is unplugged and rmmod sata_sil24 triggers the messages.
>>
>> Martin
> 
> 
> 

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29 14:11               ` Martin Mokrejs
@ 2013-03-29 16:45                 ` Martin Mokrejs
  2013-03-29 21:31                 ` Rafael J. Wysocki
  2013-03-30 10:54                 ` Huang Ying
  2 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-29 16:45 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki,
	Yinghai Lu, Sarah Sharp

[+sarah as it shows that I had laptop-mode-tools running even under "ON AC mode"
        and it shows a dicrepancy between XHCI versus EHCI handling]

Martin Mokrejs wrote:
> Hi Ying,
>   thank you for the patch. Here are the results.
> 
> Huang Ying wrote:
>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>> Hi Ying,
>>>   would you please tell me how this report relate to this patch?
>>>
>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>
>>>   Could you tell me why this PME was being flipped back and forth now?
>>> Actually, does that make finally some sense to you, pci/acpi devs?
> 
> 
> 
>   First of all, now, due to you patch, the following is logged after I run lspci
> (I tried several time lspci with none, -v, -vvv, -tv options):
> 
> --- dmesg_initial.txt   2013-03-29 14:13:44.000000000 +0100
> +++ dmesg_with_eSATA_ejected.txt        2013-03-29 14:16:37.000000000 +0100
> @@ -827,3 +827,40 @@
>  [   46.635843] r8169 0000:05:00.0: PME# disabled
>  [   46.728762] r8169 0000:05:00.0 eth0: link down
>  [   48.449706] r8169 0000:05:00.0 eth0: link up
> +[  117.546597] pcieport 0000:00:1c.4: PME# enabled
> +[  117.642825] pcieport 0000:00:1c.4: PME# disabled
> +[  117.642913] pcieport 0000:00:1c.4: PME# enabled
> +[  117.682862] pcieport 0000:00:1c.4: PME# disabled
> +[  117.682950] pcieport 0000:00:1c.4: PME# enabled
> +[  117.722906] pcieport 0000:00:1c.4: PME# disabled
> +[  117.722994] pcieport 0000:00:1c.4: PME# enabled
> +[  117.762962] pcieport 0000:00:1c.4: PME# disabled
> +[  117.763055] pcieport 0000:00:1c.4: PME# enabled
> +[  117.803062] pcieport 0000:00:1c.4: PME# disabled
> +[  117.803149] pcieport 0000:00:1c.4: PME# enabled
> +[  117.843061] pcieport 0000:00:1c.4: PME# disabled
> +[  117.843156] pcieport 0000:00:1c.4: PME# enabled
> +[  117.883108] pcieport 0000:00:1c.4: PME# disabled
> +[  117.883204] pcieport 0000:00:1c.4: PME# enabled
> +[  117.923210] pcieport 0000:00:1c.4: PME# disabled
> +[  117.923297] pcieport 0000:00:1c.4: PME# enabled
> +[  117.963206] pcieport 0000:00:1c.4: PME# disabled
> +[  117.963295] pcieport 0000:00:1c.4: PME# enabled
> +[  118.003259] pcieport 0000:00:1c.4: PME# disabled
> +[  118.003348] pcieport 0000:00:1c.4: PME# enabled
> +[  118.043354] pcieport 0000:00:1c.4: PME# disabled
> +[  118.043453] pcieport 0000:00:1c.4: PME# enabled
> +[  118.083353] pcieport 0000:00:1c.4: PME# disabled
> +[  118.083441] pcieport 0000:00:1c.4: PME# enabled
> +[  118.123472] pcieport 0000:00:1c.4: PME# disabled
> +[  118.123564] pcieport 0000:00:1c.4: PME# enabled
> +[  185.527864] pcieport 0000:00:1c.4: PME# disabled
> +[  185.527989] pcieport 0000:00:1c.4: PME# enabled
> +[  191.958942] pcieport 0000:00:1c.4: PME# disabled
> +[  191.959067] pcieport 0000:00:1c.4: PME# enabled
> +[  195.104378] pcieport 0000:00:1c.4: PME# disabled
> +[  195.104501] pcieport 0000:00:1c.4: PME# enabled
> +[  204.670888] pcieport 0000:00:1c.4: PME# disabled
> +[  204.671012] pcieport 0000:00:1c.4: PME# enabled
> +[  227.029510] pcieport 0000:00:1c.4: PME# disabled
> +[  227.029636] pcieport 0000:00:1c.4: PME# enabled

OK, so the above PME# messages are gone now with your path applied over 3.9-rc1
and while laptop-mode-tools uninstalled. Will have to check vanilla 3.9-rc1 later.


>   Second, after I ejected the coldplugged eSATA card these 1c.4: PME# messages also
> popped up in dmesg. I think just the very last two PME# lines shown above were added (so about
> the [  227.029510] time).

So the eject of the card does not associate with any single *new* line dmesg
output. 


> 
>   At the "lspci level", the eject resulted in:
> 
> # diff -u8 -w lspci_vvv_initial.txt lspci_vvv_with_eSATA_ejected.txt
> --- lspci_vvv_initial.txt       2013-03-29 14:13:56.000000000 +0100
> +++ lspci_vvv_with_eSATA_ejected.txt    2013-03-29 14:17:09.000000000 +0100
> @@ -288,37 +288,37 @@
>  00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
>         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: 64 bytes
>         Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
>         I/O behind bridge: 0000c000-0000dfff
>         Memory behind bridge: f6c00000-f7cfffff
>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
>                 DevCap: MaxPayload 128 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 128 bytes
>                 DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
>                 LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> -                       Changed: MRL- PresDet- LinkState-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> +                       Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
>                 DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
>                 DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
>                 LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
>                          Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
>                          Compliance De-emphasis: -6dB
> @@ -516,44 +516,12 @@
>                 UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
>                 AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       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: 64 bytes
> -       Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
> -       Region 4: I/O ports at c000 [size=128]
> -       Expansion ROM at f6c00000 [disabled] [size=512K]
> -       Capabilities: [54] 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=1 PME-
> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> -               Address: 0000000000000000  Data: 0000
> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> -                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
> -               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> -                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
> -               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
> -               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> -                       ClockPM- Surprise- LLActRep- BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> -       Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
>         Kernel driver in use: sata_sil24

The above lspci diff did not change except the PME lines once laptop-mode-tools were uninstalled
(so note the LinkState- to LinkState+ while PresDet- to PresDet- on the Changed line).



Here is for what was the result of laptop-mode-tools uninstall (quite interesting I think):

# diff -u25 -w ../3.9-rc1-ying_with_MediaCard_reader_disabled_and_nousb/lspci_vvv_with_eSATA_ejected.txt lspci_vvv_eSATA_ejected.txt
--- ../3.9-rc1-ying_with_MediaCard_reader_disabled_and_nousb/lspci_vvv_with_eSATA_ejected.txt   2013-03-29 14:17:09.000000000 +0100
+++ lspci_vvv_eSATA_ejected.txt 2013-03-29 16:19:31.000000000 +0100
@@ -119,85 +119,85 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
                        Slot #0, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState-
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
-               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
+               Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 
 00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=05, subordinate=06, sec-latency=0
        I/O behind bridge: 0000e000-0000efff
        Memory behind bridge: fff00000-000fffff
        Prefetchable memory behind bridge: 00000000f1100000-00000000f11fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
                        Slot #1, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
-               RootSta: PME ReqID 0500, PMEStatus- PMEPending-
+               RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
        Kernel driver in use: pcieport
 
@@ -260,51 +260,51 @@
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5) (prog-if 00 [Normal decode])

[cut]
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt+
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
                        Slot #4, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
-               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
+               Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 
@@ -385,75 +385,75 @@

 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)
        Subsystem: Dell Device 04b3
        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: 64 bytes
        Interrupt: pin A routed to IRQ 41
        Region 0: I/O ports at e000 [size=256]
        Region 2: Memory at f1104000 (64-bit, prefetchable) [size=4K]
        Region 4: Memory at f1100000 (64-bit, prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0300c  Data: 41a1
        Capabilities: [70] Express (v2) Endpoint, MSI 01
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr+ UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend-
+               DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
                Vector table: BAR=4 offset=00000000
                PBA: BAR=4 offset=00000800
        Capabilities: [d0] Vital Product Data
                Unknown small resource type 00, will not decode more.
        Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 01-00-00-00-68-4c-e0-00
        Kernel driver in use: r8169
 

#

The MAbort+ on 1c.1 (handling the rtl8169 eth card) is gone with uninstall of laptop-mode-tools.
with that were maybe associated the errors on the 05:00 devcie itself (the "AERCap")?


Why the following devices do NOT show a difference in PME after laptop-mode-uninstall
I don't know (maybe laptop-mode-tools did NOT fiddle with them):
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05) (prog-if 20 [EHCI])
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5) (prog-if 00 [Normal decode])
00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
09:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)
0b:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02) (prog-if 30 [XHCI])
11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)



So, looks laptop-mode-tools fiddled with 1c.4 XHCI's root port while NOT with EHCI ports, right?
Messing with both 1c.1 and 05:00 (the root port and the eth card) is probably correct, right?
what is 1c.0 don't know. Likely a TPM module (currently enabled in BIOS) or the in BIOS currently
disabled MediaCardReader?




Now, back tot he original problem. Doing 'rmmod sata_sil24' did:

# diff -u -w dmesg_eSATA_ejected.txt dmesg_eSATA_ejected_after_rmmod_sata_sil24.txt
--- dmesg_eSATA_ejected.txt     2013-03-29 16:19:22.000000000 +0100
+++ dmesg_eSATA_ejected_after_rmmod_sata_sil24.txt      2013-03-29 16:21:09.000000000 +0100
@@ -815,3 +815,4 @@
 [   36.552799] perf_event_intel: PEBS enabled due to microcode update
 [   39.075539] r8169 0000:05:00.0 eth0: link down
 [   45.523586] r8169 0000:05:00.0 eth0: link up
+[  276.940568] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
#

So, good, the PME# flipping back and forth doe snoty happen, likely a laptop-mode-tools
caused that before.


# diff -u -w lspci_vvv_eSATA_ejected.txt lspci_vvv_eSATA_ejected_after_rmmod_sata_sil24.txt
--- lspci_vvv_eSATA_ejected.txt 2013-03-29 16:19:31.000000000 +0100
+++ lspci_vvv_eSATA_ejected_after_rmmod_sata_sil24.txt  2013-03-29 16:21:00.000000000 +0100
@@ -523,5 +523,4 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
 
#


If we think of the situation with laptop-mode-tools installed and the rmmod, this
would have happened (note the 00:1c.7) lines:

# diff -u -w ../3.9-rc1-ying_with_MediaCard_reader_disabled_and_nousb/lspci_vvv_with_eSATA_ejected.txt ../3.9-rc1-ying_with_MediaCard_reader_disabled_and_nousb/lspci_vvv_with_eSATA_ejected_and_rmmod_sata_sil24.txt 
--- ../3.9-rc1-ying_with_MediaCard_reader_disabled_and_nousb/lspci_vvv_with_eSATA_ejected.txt   2013-03-29 14:17:09.000000000 +0100
+++ ../3.9-rc1-ying_with_MediaCard_reader_disabled_and_nousb/lspci_vvv_with_eSATA_ejected_and_rmmod_sata_sil24.txt      2013-03-29 14:19:18.000000000 +0100
@@ -329,7 +329,7 @@
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
+               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 
 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
@@ -523,5 +523,4 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
 
#

In both cases, the issue with PME# flipping back and forth is gone

Still talking about the rmmod sata-sil24, it does cause release of the memmory
(did not check /proc/iomem this today while tetsing your patch and laptop-mode-tools were
still instaleld):

# diff -u -w iomem_eSATA_ejected.txt iomem_eSATA_ejected_after_rmmod_sata_sil24.txt
--- iomem_eSATA_ejected.txt     2013-03-29 16:19:15.000000000 +0100
+++ iomem_eSATA_ejected_after_rmmod_sata_sil24.txt      2013-03-29 16:21:18.000000000 +0100
@@ -44,9 +44,7 @@
   f6c00000-f7cfffff : PCI Bus 0000:11
     f6c00000-f6c7ffff : 0000:11:00.0
     f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
     f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
#


Like in previous tests the IRQ19 is released during rmmod:
 # diff -u -w interrupts_eSATA_ejected.txt interrupts_eSATA_ejected_after_rmmod_sata_sil24.txt 
--- interrupts_eSATA_ejected.txt        2013-03-29 16:19:05.000000000 +0100
+++ interrupts_eSATA_ejected_after_rmmod_sata_sil24.txt 2013-03-29 16:21:27.000000000 +0100
@@ -1,27 +1,26 @@
            CPU0       CPU1       
   0:         24          0   IO-APIC-edge      timer
-  1:       1366          0   IO-APIC-edge      i8042
+  1:       2524          0   IO-APIC-edge      i8042
   8:         56          0   IO-APIC-edge      rtc0
   9:          1          0   IO-APIC-fasteoi   acpi
- 12:        256          0   IO-APIC-edge      i8042
- 19:          0          0   IO-APIC-fasteoi   sata_sil24
- 40:       3830          0   PCI-MSI-edge      ahci
- 41:        421          0   PCI-MSI-edge      eth0
+ 12:        466          0   IO-APIC-edge      i8042
+ 40:       3996          0   PCI-MSI-edge      ahci
+ 41:        594          0   PCI-MSI-edge      eth0
  42:        948          0   PCI-MSI-edge      snd_hda_intel
  43:          1          0   PCI-MSI-edge      iwlwifi
  44:        201          0   PCI-MSI-edge      i915





Finally, a hotinsert of the eSATA card now does:

# diff -u -w lspci_vvv_eSATA_ejected_after_rmmod_sata_sil24.txt lspci_vvv_eSATA_ejected_after_rmmod_sata_sil24_and_hotinsert.txt
--- lspci_vvv_eSATA_ejected_after_rmmod_sata_sil24.txt  2013-03-29 16:21:00.000000000 +0100
+++ lspci_vvv_eSATA_ejected_after_rmmod_sata_sil24_and_hotinsert.txt    2013-03-29 16:23:40.000000000 +0100
@@ -307,12 +307,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -521,6 +521,37 @@
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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-
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
 

Here is this very same hotinsert compared to the previous situation when laptop-mode-tools were installed:

 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
        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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
-               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
+               Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport
 

 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
        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-
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
        Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
        Region 4: I/O ports at c000 [disabled] [size=128]
        [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
        Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- 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-
+               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
 

Still like before, during the hotinsert, neither iomem nor interrput is assigned to the
eSATA card and not a single line appears in dmesg. The "AERCap: First Error Pointer: 14"
appeared previously during coldboot, now it pops up later, during hotplug. Please do realize
the lspci is mostly a cahced crap (e.g. note the IRQ 19 claimed to be used wheres /proc/interrupts
show it was released during rmmod and not assigtned during hotplug). so what is actually true
in the vary last diff, I don't know, but that is nothing new. Actually lines being "updated"
could be inferred from the thread "Re: 3.8.2: stale pci device info for a previously inserted express card".




The proposed patch was tested on 3.9-rc1 with laptop-mode-tools uninstalled
and while:

# grep . /sys/bus/pci/devices/*/power/control
/sys/bus/pci/devices/0000:00:00.0/power/control:on
/sys/bus/pci/devices/0000:00:02.0/power/control:on
/sys/bus/pci/devices/0000:00:16.0/power/control:on
/sys/bus/pci/devices/0000:00:1a.0/power/control:on
/sys/bus/pci/devices/0000:00:1b.0/power/control:on
/sys/bus/pci/devices/0000:00:1c.0/power/control:on
/sys/bus/pci/devices/0000:00:1c.1/power/control:on
/sys/bus/pci/devices/0000:00:1c.3/power/control:on
/sys/bus/pci/devices/0000:00:1c.4/power/control:on
/sys/bus/pci/devices/0000:00:1c.7/power/control:on
/sys/bus/pci/devices/0000:00:1d.0/power/control:on
/sys/bus/pci/devices/0000:00:1f.0/power/control:on
/sys/bus/pci/devices/0000:00:1f.2/power/control:on
/sys/bus/pci/devices/0000:00:1f.3/power/control:on
/sys/bus/pci/devices/0000:05:00.0/power/control:on
/sys/bus/pci/devices/0000:09:00.0/power/control:on
/sys/bus/pci/devices/0000:0b:00.0/power/control:on
/sys/bus/pci/devices/0000:11:00.0/power/control:on
# grep . /sys/bus/pci/devices/*/power/runtime_status
/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:active
/sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active
#

That's all I could say.
Martin

>>>   Does is help to say that on the SandyBridge chip I have the following root ports
>>> hooked to the following end devices?:
>>>
>>> 1.c1 -> rtl8169 05:00.0
>>> 1.c3 -> iwlwifi 09:00.0
>>> 1.c4 -> xhci_hcd 0b:00.0
>>> 1.c7 -> 00:11: express card slot
>>>
>>>
>>>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
>>> happening with the network card on 3.7.10 kernel (not broken kernel):
>>>
>>> [138268.870070] r8169 0000:05:00.0 eth0: link down
>>> [138270.809811] r8169 0000:05:00.0 eth0: link up
>>> [138365.599744] r8169 0000:05:00.0 eth0: link down
>>> [138370.594343] r8169 0000:05:00.0: PME# enabled
>>> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
>>> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
>>> [169885.267374] r8169 0000:05:00.0: PME# disabled
>>> [169885.330160] r8169 0000:05:00.0 eth0: link down
>>> [169886.992531] r8169 0000:05:00.0 eth0: link up
>>> [169904.405769] r8169 0000:05:00.0 eth0: link down
>>> [169909.401237] r8169 0000:05:00.0: PME# enabled
>>> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
>>> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
>>> [170090.559088] r8169 0000:05:00.0: PME# disabled
>>> [170090.640494] r8169 0000:05:00.0: PME# enabled
>>> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
>>> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
>>> [170090.848479] r8169 0000:05:00.0: PME# disabled
>>> [170090.892011] r8169 0000:05:00.0 eth0: link down
>>> [170090.892134] r8169 0000:05:00.0 eth0: link down
>>> [170090.930998] r8169 0000:05:00.0 eth0: link down
>>> [170092.554553] r8169 0000:05:00.0 eth0: link up
>>
>> I don't know exactly.  Can you give me the follow output?
>>
>> grep . /sys/bus/pci/devices/*/power/control
>> grep . /sys/bus/pci/devices/*/power/runtime_status
>>
>> And can you try the following patch?
>>
>> Best Regards,
>> Huang Ying
>>
>> -------------------------->
>>
>> ---
>>  drivers/pci/hotplug/pci_hotplug_core.c |    6 ++++++
>>  drivers/pci/pcie/portdrv_pci.c         |    8 +++++---
>>  drivers/pci/slot.c                     |   18 ++++++++++++++++++
>>  include/linux/pci.h                    |    1 +
>>  4 files changed, 30 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
>> index 202f4a9..7d4cf1a 100644
>> --- a/drivers/pci/hotplug/pci_hotplug_core.c
>> +++ b/drivers/pci/hotplug/pci_hotplug_core.c
>> @@ -39,6 +39,7 @@
>>  #include <linux/mutex.h>
>>  #include <linux/pci.h>
>>  #include <linux/pci_hotplug.h>
>> +#include <linux/pm_runtime.h>
>>  #include <asm/uaccess.h>
>>  #include "../pci.h"
>>  
>> @@ -473,6 +474,8 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
>>  	dbg("Added slot %s to the list\n", name);
>>  out:
>>  	mutex_unlock(&pci_hp_mutex);
>> +	/* Bridge runtime PM state may be influenced by hotplug */
>> +	pm_runtime_resume(&bus->self->dev);
>>  	return result;
>>  }
>>  
>> @@ -489,6 +492,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
>>  {
>>  	struct hotplug_slot *temp;
>>  	struct pci_slot *slot;
>> +	struct pci_bus *bus;
>>  
>>  	if (!hotplug)
>>  		return -ENODEV;
>> @@ -508,8 +512,10 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
>>  
>>  	hotplug->release(hotplug);
>>  	slot->hotplug = NULL;
>> +	bus = slot->bus;
>>  	pci_destroy_slot(slot);
>>  	mutex_unlock(&pci_hp_mutex);
>> +	pm_runtime_resume(&bus->self->dev);
>>  
>>  	return 0;
>>  }
>> diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
>> index 08c243a..beb9c90 100644
>> --- a/drivers/pci/pcie/portdrv_pci.c
>> +++ b/drivers/pci/pcie/portdrv_pci.c
>> @@ -154,9 +154,11 @@ static int pcie_port_runtime_idle(struct device *dev)
>>  	 */
>>  	pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
>>  	/* Delay for a short while to prevent too frequent suspend/resume */
>> -	if (!pme_poll)
>> -		pm_schedule_suspend(dev, 10);
>> -	return -EBUSY;
>> +	if (pme_poll)
>> +		return -EBUSY;
>> +	if (pci_bus_has_hotplug_slots(pdev->subordinate))
>> +		return -EBUSY;
>> +	return pm_schedule_suspend(dev, 10);
>>  }
>>  #else
>>  #define pcie_port_runtime_suspend	NULL
>> diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
>> index ac6412f..10b275b 100644
>> --- a/drivers/pci/slot.c
>> +++ b/drivers/pci/slot.c
>> @@ -345,6 +345,24 @@ out:
>>  }
>>  EXPORT_SYMBOL_GPL(pci_renumber_slot);
>>  
>> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus)
>> +{
>> +	struct pci_slot *slot;
>> +	bool has_hotplug_slots = false;
>> +
>> +	down_read(&pci_bus_sem);
>> +	list_for_each_entry(slot, &bus->slots, list) {
>> +		if (slot->hotplug) {
>> +			has_hotplug_slots = true;
>> +			break;
>> +		}
>> +	}
>> +	up_read(&pci_bus_sem);
>> +
>> +	return has_hotplug_slots;
>> +}
>> +EXPORT_SYMBOL_GPL(pci_bus_has_hotplug_slots);
>> +
>>  /**
>>   * pci_destroy_slot - decrement refcount for physical PCI slot
>>   * @slot: struct pci_slot to decrement
>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>> index 2461033a..0d0cc94 100644
>> --- a/include/linux/pci.h
>> +++ b/include/linux/pci.h
>> @@ -722,6 +722,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
>>  void pci_destroy_slot(struct pci_slot *slot);
>>  void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
>>  int pci_scan_slot(struct pci_bus *bus, int devfn);
>> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus);
>>  struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
>>  void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
>>  unsigned int pci_scan_child_bus(struct pci_bus *bus);

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29 14:11               ` Martin Mokrejs
  2013-03-29 16:45                 ` Martin Mokrejs
@ 2013-03-29 21:31                 ` Rafael J. Wysocki
  2013-03-30  1:17                   ` Martin Mokrejs
  2013-03-30 10:54                 ` Huang Ying
  2 siblings, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-03-29 21:31 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
> Hi Ying,
>   thank you for the patch. Here are the results.
> 
> Huang Ying wrote:
> > On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> >> Hi Ying,
> >>   would you please tell me how this report relate to this patch?
> >>
> >> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> >>
> >>   Could you tell me why this PME was being flipped back and forth now?
> >> Actually, does that make finally some sense to you, pci/acpi devs?

Can you please test this patch:

https://patchwork.kernel.org/patch/2359611/

and report back as I asked you?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29 21:31                 ` Rafael J. Wysocki
@ 2013-03-30  1:17                   ` Martin Mokrejs
  2013-03-30  1:48                     ` Rafael J. Wysocki
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-30  1:17 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

Rafael J. Wysocki wrote:
> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
>> Hi Ying,
>>   thank you for the patch. Here are the results.
>>
>> Huang Ying wrote:
>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>>> Hi Ying,
>>>>   would you please tell me how this report relate to this patch?
>>>>
>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>>
>>>>   Could you tell me why this PME was being flipped back and forth now?
>>>> Actually, does that make finally some sense to you, pci/acpi devs?
> 
> Can you please test this patch:
> 
> https://patchwork.kernel.org/patch/2359611/
> 
> and report back as I asked you?

Sorry for the delay I just had to sort out what belongs under what thread
and the patch was under the other. But I agree its testing with this
particular eSATA/ExpressCardSlot/PM fits better here.


The good news is that the eSATA card hotplug works almost perfectly with the patch.
I cold booted as always with the card in the slot already loaded, same kernel
.config and commandline options as described under this thread. But the kernel
was 3.8.3! Not 3.9-rc1.

What is important is the fact that this patch resulted in runtime_status set to
"active" instead of "auto" (3.8.3 with incidentally enabled laptop-mode-tools)
or "on" (also tested on 3.8.3 once laptop-mode-tools were uninstalled). With this
patch, devices did not get suspended during the tests (per /sys/*/power/runtime_status
files). I haven't realized so far that the rtl8169 card at 05:00 and the TI xHCI
controller at 0b:00 support D2 state.

# grep PME dmesg_final.txt 
[    1.571475] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    1.571500] pci 0000:00:16.0: PME# disabled
[    1.571760] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    1.571766] pci 0000:00:1a.0: PME# disabled
[    1.571991] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    1.571997] pci 0000:00:1b.0: PME# disabled
[    1.572200] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.572205] pci 0000:00:1c.0: PME# disabled
[    1.572409] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    1.572414] pci 0000:00:1c.1: PME# disabled
[    1.572618] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.572623] pci 0000:00:1c.3: PME# disabled
[    1.572826] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    1.572832] pci 0000:00:1c.4: PME# disabled
[    1.573042] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
[    1.573047] pci 0000:00:1c.7: PME# disabled
[    1.573292] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    1.573297] pci 0000:00:1d.0: PME# disabled
[    1.573765] pci 0000:00:1f.2: PME# supported from D3hot
[    1.573770] pci 0000:00:1f.2: PME# disabled
[    1.574521] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.574528] pci 0000:05:00.0: PME# disabled
[    1.587449] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
[    1.587500] pci 0000:09:00.0: PME# disabled
[    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.605575] pci 0000:0b:00.0: PME# disabled
[  362.712584] sata_sil24 0000:11:00.0: PME# disabled
[ 1069.949732] sata_sil24 0000:11:00.0: PME# disabled
[ 1083.878783] sata_sil24 0000:11:00.0: PME# disabled
[ 1096.679536] sata_sil24 0000:11:00.0: PME# disabled
[ 1107.503274] sata_sil24 0000:11:00.0: PME# disabled
#

Seems the sata_sil24 does not report an equivalent of, for example:
[    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold


The states before/after tests (did not change):
/sys/bus/pci/devices/0000:00:00.0/power/control:on
/sys/bus/pci/devices/0000:00:02.0/power/control:on
/sys/bus/pci/devices/0000:00:16.0/power/control:on
/sys/bus/pci/devices/0000:00:1a.0/power/control:on
/sys/bus/pci/devices/0000:00:1b.0/power/control:on
/sys/bus/pci/devices/0000:00:1c.0/power/control:on
/sys/bus/pci/devices/0000:00:1c.1/power/control:on
/sys/bus/pci/devices/0000:00:1c.3/power/control:on
/sys/bus/pci/devices/0000:00:1c.4/power/control:on
/sys/bus/pci/devices/0000:00:1c.7/power/control:on
/sys/bus/pci/devices/0000:00:1d.0/power/control:on
/sys/bus/pci/devices/0000:00:1f.0/power/control:on
/sys/bus/pci/devices/0000:00:1f.2/power/control:on
/sys/bus/pci/devices/0000:00:1f.3/power/control:on
/sys/bus/pci/devices/0000:05:00.0/power/control:on
/sys/bus/pci/devices/0000:09:00.0/power/control:on
/sys/bus/pci/devices/0000:0b:00.0/power/control:on
/sys/bus/pci/devices/0000:11:00.0/power/control:on

/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:active
/sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active




These 2 lines only are logged during hot eject of the eSATA card:

+[  362.712584] sata_sil24 0000:11:00.0: PME# disabled
+[  362.715773] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?



# diff -u50 -w lspci_vvv_initial_all_xHCI_tests_worked.txt lspci_vvv_initial_all_xHCI_tests_worked__eSATA_eject.txt
--- lspci_vvv_initial_all_xHCI_tests_worked.txt 2013-03-30 00:27:32.000000000 +0100
+++ lspci_vvv_initial_all_xHCI_tests_worked__eSATA_eject.txt    2013-03-30 00:28:28.000000000 +0100
 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
        Kernel driver in use: pcieport

 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Physical Slot: 1
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
-       Kernel driver in use: sata_sil24
-
#


You see, no ff anymore in registers, no stale device info about the card being
already physically removed. That's good.


Also the hot-eject results in IRQ and memory release seem correct:

# diff -u -w interrupts.txt interrupts__eSATA_eject.txt
--- interrupts.txt      2013-03-30 00:25:40.000000000 +0100
+++ interrupts_eSATA_eject.txt   2013-03-30 00:28:48.000000000 +0100
@@ -1,32 +1,31 @@
            CPU0       CPU1       
   0:         25          0   IO-APIC-edge      timer
-  1:        780          0   IO-APIC-edge      i8042
+  1:       1975          0   IO-APIC-edge      i8042
   8:          7          0   IO-APIC-edge      rtc0
-  9:          0          0   IO-APIC-fasteoi   acpi
+  9:          1          0   IO-APIC-fasteoi   acpi
  12:        241          0   IO-APIC-edge      i8042
  16:         75          0   IO-APIC-fasteoi   ehci_hcd:usb1
- 19:          0          0   IO-APIC-fasteoi   sata_sil24
  23:         77          0   IO-APIC-fasteoi   ehci_hcd:usb2
- 40:       4025          0   PCI-MSI-edge      ahci
- 41:        521          0   PCI-MSI-edge      eth0
- 42:          0          0   PCI-MSI-edge      xhci_hcd
+ 40:       4215          0   PCI-MSI-edge      ahci
+ 41:        766          0   PCI-MSI-edge      eth0
+ 42:       1300          0   PCI-MSI-edge      xhci_hcd
  43:          0          0   PCI-MSI-edge      xhci_hcd
  44:          0          0   PCI-MSI-edge      xhci_hcd
  45:        227          0   PCI-MSI-edge      snd_hda_intel
  46:          1          0   PCI-MSI-edge      iwlwifi
  47:          4          0   PCI-MSI-edge      i915
-NMI:         12         30   Non-maskable interrupts
-LOC:       7833       6076   Local timer interrupts
+NMI:         15         32   Non-maskable interrupts
+LOC:      10899       8387   Local timer interrupts
 SPU:          0          0   Spurious interrupts
-PMI:         12         30   Performance monitoring interrupts
+PMI:         15         32   Performance monitoring interrupts
 IWI:          0          0   IRQ work interrupts
 RTR:          0          0   APIC ICR read retries
-RES:       4707       3838   Rescheduling interrupts
-CAL:         12       1841   Function call interrupts
-TLB:         95         45   TLB shootdowns
+RES:       6217       6921   Rescheduling interrupts
+CAL:         15       1855   Function call interrupts
+TLB:         98         45   TLB shootdowns
 TRM:          0          0   Thermal event interrupts
 THR:          0          0   Threshold APIC interrupts
 MCE:          0          0   Machine check exceptions
-MCP:          2          2   Machine check polls
+MCP:          3          3   Machine check polls
 ERR:          0
 MIS:          0
# diff -u -w iomem.txt iomem_eSATA_eject.txt
--- iomem_initial.txt   2013-03-30 00:25:31.000000000 +0100
+++ iomem_initial_all_xHCI_tests_worked__eSATA_eject.txt        2013-03-30 00:28:39.000000000 +0100
@@ -42,11 +42,6 @@
       f1104000-f1104fff : r8169
   f6800000-f6bfffff : 0000:00:02.0
   f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
-    f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
       f7d00000-f7d0ffff : xhci_hcd
#

Even better, also hot-insert works now:

--- dmesg_eSATA_eject.txt        2013-03-30 00:28:17.000000000 +0100
+++ dmesg_eSATA_eject_hotinsert.txt      2013-03-30 00:29:40.000000000 +0100
@@ -4543,3 +4543,169 @@
+[  415.214425] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
+[  415.214470] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
+[  415.214503] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
+[  415.214524] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
+[  415.214564] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
+[  415.214692] pci 0000:11:00.0: supports D1 D2
+[  415.235200] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
+[  415.235204] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
+[  415.235227] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
+[  415.235229] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
+[  415.235250] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
+[  415.235251] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
+[  415.235259] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
+[  415.236357] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
+[  415.236580] sata_sil24 0000:11:00.0: enabling bus mastering
+[  415.239813] scsi10 : sata_sil24
+[  415.240576] scsi11 : sata_sil24
+[  415.241188] ata9: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
+[  415.241192] ata10: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
+[  417.320268] ata9: SATA link down (SStatus 0 SControl 0)
+[  419.407170] ata10: SATA link down (SStatus 0 SControl 0)


The memory allocated is a bit different (comparing cold boot state
to the one after hotplug -- I mean not empty slot against hot-inserted card state):

--- iomem.txt   2013-03-30 00:25:31.000000000 +0100
+++ iomem_eSATA_eject_and_hotinsert.txt      2013-03-30 00:29:22.000000000 +0100
@@ -35,6 +35,7 @@
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
   f0000000-f10fffff : PCI Bus 0000:11
+    f0000000-f007ffff : 0000:11:00.0
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
@@ -42,11 +43,10 @@
       f1104000-f1104fff : r8169
   f6800000-f6bfffff : 0000:00:02.0
   f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c7ffff : 0000:11:00.0
-    f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
-    f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
+    f6c00000-f6c03fff : 0000:11:00.0
+      f6c00000-f6c03fff : sata_sil24
+    f6c04000-f6c0407f : 0000:11:00.0
+      f6c04000-f6c0407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
       f7d00000-f7d0ffff : xhci_hcd



IRQ19 is picked up again by sata_sil24 (no diff compared to cold boot state).
The *zero* on the line is ... weird? ^H^H^H^H probably correct because at the
end of all the tests it was non-zero (after I connected HDD to the eSATA card):

--- interrupts_initial.txt      2013-03-30 00:25:40.000000000 +0100
+++ interrupts_initial_all_xHCI_tests_worked__eSATA_eject_hotinsert.txt 2013-03-30 00:29:15.000000000 +0100
@@ -1,32 +1,32 @@
            CPU0       CPU1       
   0:         25          0   IO-APIC-edge      timer
-  1:        780          0   IO-APIC-edge      i8042
+  1:       2064          0   IO-APIC-edge      i8042
   8:          7          0   IO-APIC-edge      rtc0
-  9:          0          0   IO-APIC-fasteoi   acpi
+  9:          2          0   IO-APIC-fasteoi   acpi
  12:        241          0   IO-APIC-edge      i8042
  16:         75          0   IO-APIC-fasteoi   ehci_hcd:usb1
  19:          0          0   IO-APIC-fasteoi   sata_sil24
  23:         77          0   IO-APIC-fasteoi   ehci_hcd:usb2
- 40:       4025          0   PCI-MSI-edge      ahci
- 41:        521          0   PCI-MSI-edge      eth0
- 42:          0          0   PCI-MSI-edge      xhci_hcd
+ 40:       4255          0   PCI-MSI-edge      ahci
+ 41:        797          0   PCI-MSI-edge      eth0
+ 42:       1300          0   PCI-MSI-edge      xhci_hcd
  43:          0          0   PCI-MSI-edge      xhci_hcd
  44:          0          0   PCI-MSI-edge      xhci_hcd
  45:        227          0   PCI-MSI-edge      snd_hda_intel
  46:          1          0   PCI-MSI-edge      iwlwifi
  47:          4          0   PCI-MSI-edge      i915



Finally lspci of the hot-insert:

--- lspci_vvv_initial_all_xHCI_tests_worked__eSATA_eject.txt    2013-03-30 00:28:28.000000000 +0100
+++ lspci_vvv_initial_all_xHCI_tests_worked__eSATA_eject_hotinsert.txt  2013-03-30 00:29:33.000000000 +0100
 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
        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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
        Kernel driver in use: pcieport
 
 
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       Physical Slot: 1
+       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
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f6c04000 (64-bit, non-prefetchable) [size=128]
+       Region 2: Memory at f6c00000 (64-bit, non-prefetchable) [size=16K]
+       Region 4: I/O ports at c000 [size=128]
+       [virtual] Expansion ROM at f0000000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
+               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
+                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
+                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
+               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+       Kernel driver in use: sata_sil24

Please note the [virtual] expansion ROM. Maybe that is related to those *different* IOMEM ranges
compared to cold boot state (see the iomem above)?

Despite the "[virtual] expansion ROM" the SATA card actually works:

+[  466.361420] ata10: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen
+[  466.361422] ata10: irq_stat 0x00b40090, PHY RDY changed
+[  466.361428] ata10: hard resetting link
+[  468.573249] ata10: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
+[  468.573963] ata10.00: ATA-8: ST3000VX000-9YW166, CV12, max UDMA/133
+[  468.573973] ata10.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
+[  468.574694] ata10.00: configured for UDMA/100
+[  468.574875] ata10: EH complete
+[  468.575422] scsi 11:0:0:0: Direct-Access     ATA      ST3000VX000-9YW1 CV12 PQ: 0 ANSI: 5
+[  468.577129] sd 11:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
+[  468.577131] sd 11:0:0:0: [sdb] 4096-byte physical blocks
+[  468.577453] sd 11:0:0:0: Attached scsi generic sg2 type 0
+[  468.577509] sd 11:0:0:0: [sdb] Write Protect is off
+[  468.577511] sd 11:0:0:0: [sdb] Mode Sense: 00 3a 00 00
+[  468.577696] sd 11:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
+[  468.623746]  sdb: sdb1
+[  468.625408] sd 11:0:0:0: [sdb] Attached SCSI disk




OK, so now we see the card generated IRQ traffic and the 'zero' increased to 183:

--- interrupts_eSATA_eject_hotinsert.txt 2013-03-30 00:29:15.000000000 +0100
+++ interrupts_eSATA_eject_hotinsert_HDD_attached.txt    2013-03-30 00:30:41.000000000 +0100
@@ -1,14 +1,14 @@
            CPU0       CPU1       
   0:         25          0   IO-APIC-edge      timer
-  1:       2064          0   IO-APIC-edge      i8042
+  1:       2982          0   IO-APIC-edge      i8042
   8:          7          0   IO-APIC-edge      rtc0
   9:          2          0   IO-APIC-fasteoi   acpi
  12:        241          0   IO-APIC-edge      i8042
  16:         75          0   IO-APIC-fasteoi   ehci_hcd:usb1
- 19:          0          0   IO-APIC-fasteoi   sata_sil24
+ 19:        183          0   IO-APIC-fasteoi   sata_sil24
  23:         77          0   IO-APIC-fasteoi   ehci_hcd:usb2


But, in the end I unplugged and reinserted the eSATA card several times and something screwed
because in the very end you will see in /proc/interrupts unoccupied IRQ 19. But first will
show the dmesg should be hiding the cause (I did "grep -v xhci_hcd" to be honest):

+[ 1069.949732] sata_sil24 0000:11:00.0: PME# disabled
+[ 1069.951167] ata10.00: disabled
+[ 1069.954126] sd 11:0:0:0: [sdb] Synchronizing SCSI cache
+[ 1069.954349] sd 11:0:0:0: [sdb]  
+[ 1069.954351] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1069.954352] sd 11:0:0:0: [sdb] Stopping disk
+[ 1069.954396] sd 11:0:0:0: [sdb] START_STOP FAILED
+[ 1069.954397] sd 11:0:0:0: [sdb]  
+[ 1069.954397] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1069.955107] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[ 1074.103645] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
+[ 1074.103690] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
+[ 1074.103722] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
+[ 1074.103743] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
+[ 1074.103783] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
+[ 1074.103900] pci 0000:11:00.0: supports D1 D2
+[ 1074.124340] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
+[ 1074.124344] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
+[ 1074.124367] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
+[ 1074.124369] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
+[ 1074.124390] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
+[ 1074.124392] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
+[ 1074.124399] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
+[ 1074.125532] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
+[ 1074.125741] sata_sil24 0000:11:00.0: enabling bus mastering
+[ 1074.129947] scsi13 : sata_sil24
+[ 1074.130840] scsi14 : sata_sil24
+[ 1074.131444] ata11: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
+[ 1074.131448] ata12: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
+[ 1076.209511] ata11: SATA link down (SStatus 0 SControl 0)
+[ 1078.426255] ata12: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
+[ 1078.426868] ata12.00: ATA-8: ST3000VX000-9YW166, CV12, max UDMA/133
+[ 1078.426876] ata12.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
+[ 1078.427569] ata12.00: configured for UDMA/100
+[ 1078.428022] scsi 14:0:0:0: Direct-Access     ATA      ST3000VX000-9YW1 CV12 PQ: 0 ANSI: 5
+[ 1078.429195] sd 14:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
+[ 1078.429197] sd 14:0:0:0: [sdb] 4096-byte physical blocks
+[ 1078.429564] sd 14:0:0:0: [sdb] Write Protect is off
+[ 1078.429566] sd 14:0:0:0: [sdb] Mode Sense: 00 3a 00 00
+[ 1078.429718] sd 14:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
+[ 1078.429884] sd 14:0:0:0: Attached scsi generic sg2 type 0
+[ 1078.481473]  sdb: sdb1
+[ 1078.483078] sd 14:0:0:0: [sdb] Attached SCSI disk
+[ 1083.878783] sata_sil24 0000:11:00.0: PME# disabled
+[ 1083.880005] ata12.00: disabled
+[ 1083.882576] sd 14:0:0:0: [sdb] Synchronizing SCSI cache
+[ 1083.882736] sd 14:0:0:0: [sdb]  
+[ 1083.882738] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1083.882740] sd 14:0:0:0: [sdb] Stopping disk
+[ 1083.882786] sd 14:0:0:0: [sdb] START_STOP FAILED
+[ 1083.882787] sd 14:0:0:0: [sdb]  
+[ 1083.882788] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1083.883436] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[ 1089.740151] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
+[ 1089.740196] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
+[ 1089.740229] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
+[ 1089.740250] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
+[ 1089.740291] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
+[ 1089.740407] pci 0000:11:00.0: supports D1 D2
+[ 1089.760794] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
+[ 1089.760798] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
+[ 1089.760821] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
+[ 1089.760823] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
+[ 1089.760844] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
+[ 1089.760846] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
+[ 1089.760853] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
+[ 1089.761960] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
+[ 1089.762171] sata_sil24 0000:11:00.0: enabling bus mastering
+[ 1089.765250] scsi15 : sata_sil24
+[ 1089.765983] scsi16 : sata_sil24
+[ 1089.766593] ata13: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
+[ 1089.766596] ata14: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
+[ 1091.846016] ata13: SATA link down (SStatus 0 SControl 0)
+[ 1094.062692] ata14: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
+[ 1094.063338] ata14.00: ATA-8: ST3000VX000-9YW166, CV12, max UDMA/133
+[ 1094.063347] ata14.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
+[ 1094.064011] ata14.00: configured for UDMA/100
+[ 1094.064462] scsi 16:0:0:0: Direct-Access     ATA      ST3000VX000-9YW1 CV12 PQ: 0 ANSI: 5
+[ 1094.065494] sd 16:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
+[ 1094.065496] sd 16:0:0:0: [sdb] 4096-byte physical blocks
+[ 1094.065920] sd 16:0:0:0: [sdb] Write Protect is off
+[ 1094.065922] sd 16:0:0:0: [sdb] Mode Sense: 00 3a 00 00
+[ 1094.065963] sd 16:0:0:0: Attached scsi generic sg2 type 0
+[ 1094.066077] sd 16:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
+[ 1094.098360]  sdb: sdb1
+[ 1094.099845] sd 16:0:0:0: [sdb] Attached SCSI disk
+[ 1096.679536] sata_sil24 0000:11:00.0: PME# disabled
+[ 1096.681263] ata14.00: disabled
+[ 1096.686887] sd 16:0:0:0: [sdb] Synchronizing SCSI cache
+[ 1096.687774] sd 16:0:0:0: [sdb]  
+[ 1096.687776] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1096.687777] sd 16:0:0:0: [sdb] Stopping disk
+[ 1096.687821] sd 16:0:0:0: [sdb] START_STOP FAILED
+[ 1096.687822] sd 16:0:0:0: [sdb]  
+[ 1096.687823] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1096.688418] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[ 1100.693672] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
+[ 1100.693718] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
+[ 1100.693750] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
+[ 1100.693771] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
+[ 1100.693812] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
+[ 1100.693929] pci 0000:11:00.0: supports D1 D2
+[ 1100.714265] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
+[ 1100.714269] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
+[ 1100.714291] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
+[ 1100.714293] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
+[ 1100.714315] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
+[ 1100.714316] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
+[ 1100.714323] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
+[ 1100.715395] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
+[ 1100.715606] sata_sil24 0000:11:00.0: enabling bus mastering
+[ 1100.718639] scsi17 : sata_sil24
+[ 1100.719369] scsi18 : sata_sil24
+[ 1100.719975] ata15: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
+[ 1100.719978] ata16: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
+[ 1102.799553] ata15: SATA link down (SStatus 0 SControl 0)
+[ 1105.016227] ata16: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
+[ 1105.016851] ata16.00: ATA-8: ST3000VX000-9YW166, CV12, max UDMA/133
+[ 1105.016860] ata16.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
+[ 1105.017557] ata16.00: configured for UDMA/100
+[ 1105.018014] scsi 18:0:0:0: Direct-Access     ATA      ST3000VX000-9YW1 CV12 PQ: 0 ANSI: 5
+[ 1105.019011] sd 18:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
+[ 1105.019013] sd 18:0:0:0: [sdb] 4096-byte physical blocks
+[ 1105.019387] sd 18:0:0:0: [sdb] Write Protect is off
+[ 1105.019389] sd 18:0:0:0: [sdb] Mode Sense: 00 3a 00 00
+[ 1105.019464] sd 18:0:0:0: Attached scsi generic sg2 type 0
+[ 1105.019543] sd 18:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
+[ 1105.055388]  sdb: sdb1
+[ 1105.057436] sd 18:0:0:0: [sdb] Attached SCSI disk
+[ 1107.503274] sata_sil24 0000:11:00.0: PME# disabled
+[ 1107.504776] ata16.00: disabled
+[ 1107.510504] sd 18:0:0:0: [sdb] Synchronizing SCSI cache
+[ 1107.510716] sd 18:0:0:0: [sdb]  
+[ 1107.510717] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1107.510719] sd 18:0:0:0: [sdb] Stopping disk
+[ 1107.510764] sd 18:0:0:0: [sdb] START_STOP FAILED
+[ 1107.510766] sd 18:0:0:0: [sdb]  
+[ 1107.510767] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
+[ 1107.511352] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?


In the above dmesg must be the answer why the first hot remove or some latter
hot event broke so that the IRQ19 was left without sata_sil24 associated
in /proc/interrupts. Unfortunately I had a look only at the very end of testing
into the file.

--- interrupts_eSATA_eject_hotinsert_HDD_attached.txt    2013-03-30 00:30:41.000000000 +0100
+++ interrupts_final.txt        2013-03-30 00:43:54.000000000 +0100
@@ -1,32 +1,32 @@
            CPU0       CPU1       
   0:         25          0   IO-APIC-edge      timer
-  1:       2982          0   IO-APIC-edge      i8042
+  1:       5708          0   IO-APIC-edge      i8042
   8:          7          0   IO-APIC-edge      rtc0
-  9:          2          0   IO-APIC-fasteoi   acpi
+  9:         11          0   IO-APIC-fasteoi   acpi
  12:        241          0   IO-APIC-edge      i8042
  16:         75          0   IO-APIC-fasteoi   ehci_hcd:usb1
- 19:        183          0   IO-APIC-fasteoi   sata_sil24
+ 19:        729          0   IO-APIC-fasteoi 
  23:         77          0   IO-APIC-fasteoi   ehci_hcd:usb2
- 40:       4384          0   PCI-MSI-edge      ahci
- 41:        894          0   PCI-MSI-edge      eth0
- 42:       1300          0   PCI-MSI-edge      xhci_hcd
+ 40:       4970          0   PCI-MSI-edge      ahci
+ 41:       1897          0   PCI-MSI-edge      eth0
+ 42:       2098          0   PCI-MSI-edge      xhci_hcd
  43:          0          0   PCI-MSI-edge      xhci_hcd
  44:          0          0   PCI-MSI-edge      xhci_hcd
  45:        227          0   PCI-MSI-edge      snd_hda_intel
  46:          1          0   PCI-MSI-edge      iwlwifi
- 47:          4          0   PCI-MSI-edge      i915

Unlike the IRQ case, memory was released fine:

--- iomem_initial_all_xHCI_tests_worked__eSATA_eject_hotinsert_HDD_attached.txt 2013-03-30 00:30:32.000000000 +0100
+++ iomem_final.txt     2013-03-30 00:43:45.000000000 +0100
@@ -35,7 +35,6 @@
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
   f0000000-f10fffff : PCI Bus 0000:11
-    f0000000-f007ffff : 0000:11:00.0
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
@@ -43,10 +42,6 @@
       f1104000-f1104fff : r8169
   f6800000-f6bfffff : 0000:00:02.0
   f6c00000-f7cfffff : PCI Bus 0000:11
-    f6c00000-f6c03fff : 0000:11:00.0
-      f6c00000-f6c03fff : sata_sil24
-    f6c04000-f6c0407f : 0000:11:00.0
-      f6c04000-f6c0407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
       f7d00000-f7d0ffff : xhci_hcd

Also from the lspci's perspective hot insert and removes were fine, so maybe the /proc/interrupts
is just a buggy cached file? [I think we came to such conclusion already under the
"Re: 3.8.2: stale pci device info for a previously inserted express card" thread.]

--- lspci_vvv_initial_all_xHCI_tests_worked__eSATA_eject_hotinsert_HDD_attached.txt     2013-03-30 00:30:23.000000000 +0100
+++ lspci_vvv_final.txt 2013-03-30 00:43:37.000000000 +0100
@@ -309,12 +309,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -527,40 +527,3 @@
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
        Kernel driver in use: xhci_hcd
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Physical Slot: 1
-       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
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c04000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c00000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       [virtual] Expansion ROM at f0000000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
-       Kernel driver in use: sata_sil24

So no reason to think that IRQ 19 is still in use by a NULL driver? ;)



> If that is the case, which of the problems remain after applying it (on top
> of the Linus' current tree)?

Sorry, I used plain 3.8.3 so that we can compare with the patch from Sarah.
The behavior is completely different with Yijing's patch and with the one from
Sarah (aimed to fix a different issue) but even from plain 3.8.3. But if you
re-ask again I will fetch the git tree to somewhere outside and download only
my customized kernel. That's doable, sure. Just let me know.

Martin

P.S.: Below am pasting the patch from https://patchwork.kernel.org/patch/2359611/

> 
> Rafael
> 
> 
> ---
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Subject: PCI / PM: Disable runtime PM of PCIe ports
> 
> The runtime PM of PCIe ports turns out to be quite fragile, as in
> some cases things work while in some other cases they don't and we
> don't seem to have a good way to determine whether or not they are
> going to work in advance.
> 
> For this reason, avoid enabling runtime PM for PCIe ports by
> keeping their runtime PM reference counters always above 0 for the
> time being.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/pci/pcie/portdrv_pci.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> Index: linux-pm/drivers/pci/pcie/portdrv_pci.c
> ===================================================================
> --- linux-pm.orig/drivers/pci/pcie/portdrv_pci.c
> +++ linux-pm/drivers/pci/pcie/portdrv_pci.c
> @@ -225,16 +225,11 @@ static int pcie_portdrv_probe(struct pci
>  	 * it by default.
>  	 */
>  	dev->d3cold_allowed = false;
> -	if (!pci_match_id(port_runtime_pm_black_list, dev))
> -		pm_runtime_put_noidle(&dev->dev);
> -
>  	return 0;
>  }
>  
>  static void pcie_portdrv_remove(struct pci_dev *dev)
>  {
> -	if (!pci_match_id(port_runtime_pm_black_list, dev))
> -		pm_runtime_get_noresume(&dev->dev);
>  	pcie_port_device_remove(dev);
>  	pci_disable_device(dev);
>  }
> 

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30  1:17                   ` Martin Mokrejs
@ 2013-03-30  1:48                     ` Rafael J. Wysocki
  2013-03-30  1:53                       ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-03-30  1:48 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
> Rafael J. Wysocki wrote:
> > On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
> >> Hi Ying,
> >>   thank you for the patch. Here are the results.
> >>
> >> Huang Ying wrote:
> >>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> >>>> Hi Ying,
> >>>>   would you please tell me how this report relate to this patch?
> >>>>
> >>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> >>>>
> >>>>   Could you tell me why this PME was being flipped back and forth now?
> >>>> Actually, does that make finally some sense to you, pci/acpi devs?
> > 
> > Can you please test this patch:
> > 
> > https://patchwork.kernel.org/patch/2359611/
> > 
> > and report back as I asked you?
> 
> Sorry for the delay I just had to sort out what belongs under what thread
> and the patch was under the other. But I agree its testing with this
> particular eSATA/ExpressCardSlot/PM fits better here.
> 
> 
> The good news is that the eSATA card hotplug works almost perfectly with the patch.
> I cold booted as always with the card in the slot already loaded, same kernel
> .config and commandline options as described under this thread. But the kernel
> was 3.8.3! Not 3.9-rc1.

Good.  The goal was to fix the problem with eSATA hotplug.

> What is important is the fact that this patch resulted in runtime_status set to
> "active" instead of "auto" (3.8.3 with incidentally enabled laptop-mode-tools)
> or "on" (also tested on 3.8.3 once laptop-mode-tools were uninstalled). With this
> patch, devices did not get suspended during the tests (per /sys/*/power/runtime_status
> files).

You seem to be confusing power/runtime_status with power/control.  runtime_status
can never be "on", while control can never be "active".

> I haven't realized so far that the rtl8169 card at 05:00 and the TI xHCI
> controller at 0b:00 support D2 state.

Which probably doesn't matter, because that state isn't used by the kernel
anyway.

> # grep PME dmesg_final.txt 
> [    1.571475] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
> [    1.571500] pci 0000:00:16.0: PME# disabled
> [    1.571760] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
> [    1.571766] pci 0000:00:1a.0: PME# disabled
> [    1.571991] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
> [    1.571997] pci 0000:00:1b.0: PME# disabled
> [    1.572200] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
> [    1.572205] pci 0000:00:1c.0: PME# disabled
> [    1.572409] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
> [    1.572414] pci 0000:00:1c.1: PME# disabled
> [    1.572618] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
> [    1.572623] pci 0000:00:1c.3: PME# disabled
> [    1.572826] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
> [    1.572832] pci 0000:00:1c.4: PME# disabled
> [    1.573042] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
> [    1.573047] pci 0000:00:1c.7: PME# disabled
> [    1.573292] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
> [    1.573297] pci 0000:00:1d.0: PME# disabled
> [    1.573765] pci 0000:00:1f.2: PME# supported from D3hot
> [    1.573770] pci 0000:00:1f.2: PME# disabled
> [    1.574521] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
> [    1.574528] pci 0000:05:00.0: PME# disabled
> [    1.587449] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
> [    1.587500] pci 0000:09:00.0: PME# disabled
> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
> [    1.605575] pci 0000:0b:00.0: PME# disabled
> [  362.712584] sata_sil24 0000:11:00.0: PME# disabled
> [ 1069.949732] sata_sil24 0000:11:00.0: PME# disabled
> [ 1083.878783] sata_sil24 0000:11:00.0: PME# disabled
> [ 1096.679536] sata_sil24 0000:11:00.0: PME# disabled
> [ 1107.503274] sata_sil24 0000:11:00.0: PME# disabled
> #

The part above is totally irrelevant.  It's just the initial configuration.

> Seems the sata_sil24 does not report an equivalent of, for example:
> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold

Apparently, they don't support PME and pci_pme_active() should check
dev->pme_support, but it doesn't.  Still not relevant, though.

> The states before/after tests (did not change):

What tests?

And why would you expect them to change?

> /sys/bus/pci/devices/0000:00:00.0/power/control:on
> /sys/bus/pci/devices/0000:00:02.0/power/control:on
> /sys/bus/pci/devices/0000:00:16.0/power/control:on
> /sys/bus/pci/devices/0000:00:1a.0/power/control:on
> /sys/bus/pci/devices/0000:00:1b.0/power/control:on
> /sys/bus/pci/devices/0000:00:1c.0/power/control:on
> /sys/bus/pci/devices/0000:00:1c.1/power/control:on
> /sys/bus/pci/devices/0000:00:1c.3/power/control:on
> /sys/bus/pci/devices/0000:00:1c.4/power/control:on
> /sys/bus/pci/devices/0000:00:1c.7/power/control:on
> /sys/bus/pci/devices/0000:00:1d.0/power/control:on
> /sys/bus/pci/devices/0000:00:1f.0/power/control:on
> /sys/bus/pci/devices/0000:00:1f.2/power/control:on
> /sys/bus/pci/devices/0000:00:1f.3/power/control:on
> /sys/bus/pci/devices/0000:05:00.0/power/control:on
> /sys/bus/pci/devices/0000:09:00.0/power/control:on
> /sys/bus/pci/devices/0000:0b:00.0/power/control:on
> /sys/bus/pci/devices/0000:11:00.0/power/control:on

Sure, all of these devices are always on.  You need to write "auto" to their
power/control files to change that, which still doesn't mean they will be
runtime-suspended.

The patch in question doesn't have any effect on those settings.

> These 2 lines only are logged during hot eject of the eSATA card:
> 
> +[  362.712584] sata_sil24 0000:11:00.0: PME# disabled
> +[  362.715773] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?

Device removal I suppose.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30  1:48                     ` Rafael J. Wysocki
@ 2013-03-30  1:53                       ` Martin Mokrejs
  2013-03-30 17:49                         ` Martin Mokrejs
  2013-03-30 22:17                         ` Rafael J. Wysocki
  0 siblings, 2 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-30  1:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

Rafael J. Wysocki wrote:
> On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
>> Rafael J. Wysocki wrote:
>>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
>>>> Hi Ying,
>>>>   thank you for the patch. Here are the results.
>>>>
>>>> Huang Ying wrote:
>>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>>>>> Hi Ying,
>>>>>>   would you please tell me how this report relate to this patch?
>>>>>>
>>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>>>>
>>>>>>   Could you tell me why this PME was being flipped back and forth now?
>>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
>>>
>>> Can you please test this patch:
>>>
>>> https://patchwork.kernel.org/patch/2359611/
>>>
>>> and report back as I asked you?
>>
>> Sorry for the delay I just had to sort out what belongs under what thread
>> and the patch was under the other. But I agree its testing with this
>> particular eSATA/ExpressCardSlot/PM fits better here.
>>
>>
>> The good news is that the eSATA card hotplug works almost perfectly with the patch.
>> I cold booted as always with the card in the slot already loaded, same kernel
>> .config and commandline options as described under this thread. But the kernel
>> was 3.8.3! Not 3.9-rc1.
> 
> Good.  The goal was to fix the problem with eSATA hotplug.

I thought that was aimed at the XHCI dead port issue. ;-)

> 
>> What is important is the fact that this patch resulted in runtime_status set to
>> "active" instead of "auto" (3.8.3 with incidentally enabled laptop-mode-tools)
>> or "on" (also tested on 3.8.3 once laptop-mode-tools were uninstalled). With this
>> patch, devices did not get suspended during the tests (per /sys/*/power/runtime_status
>> files).
> 
> You seem to be confusing power/runtime_status with power/control.  runtime_status
> can never be "on", while control can never be "active".

Too late here, but yes, I likely swapped the two filename and value pairs. Thanks.

> 
>> I haven't realized so far that the rtl8169 card at 05:00 and the TI xHCI
>> controller at 0b:00 support D2 state.
> 
> Which probably doesn't matter, because that state isn't used by the kernel
> anyway.
> 
>> # grep PME dmesg_final.txt 
>> [    1.571475] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
>> [    1.571500] pci 0000:00:16.0: PME# disabled
>> [    1.571760] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
>> [    1.571766] pci 0000:00:1a.0: PME# disabled
>> [    1.571991] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
>> [    1.571997] pci 0000:00:1b.0: PME# disabled
>> [    1.572200] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
>> [    1.572205] pci 0000:00:1c.0: PME# disabled
>> [    1.572409] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
>> [    1.572414] pci 0000:00:1c.1: PME# disabled
>> [    1.572618] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
>> [    1.572623] pci 0000:00:1c.3: PME# disabled
>> [    1.572826] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
>> [    1.572832] pci 0000:00:1c.4: PME# disabled
>> [    1.573042] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
>> [    1.573047] pci 0000:00:1c.7: PME# disabled
>> [    1.573292] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
>> [    1.573297] pci 0000:00:1d.0: PME# disabled
>> [    1.573765] pci 0000:00:1f.2: PME# supported from D3hot
>> [    1.573770] pci 0000:00:1f.2: PME# disabled
>> [    1.574521] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
>> [    1.574528] pci 0000:05:00.0: PME# disabled
>> [    1.587449] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
>> [    1.587500] pci 0000:09:00.0: PME# disabled
>> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
>> [    1.605575] pci 0000:0b:00.0: PME# disabled
>> [  362.712584] sata_sil24 0000:11:00.0: PME# disabled
>> [ 1069.949732] sata_sil24 0000:11:00.0: PME# disabled
>> [ 1083.878783] sata_sil24 0000:11:00.0: PME# disabled
>> [ 1096.679536] sata_sil24 0000:11:00.0: PME# disabled
>> [ 1107.503274] sata_sil24 0000:11:00.0: PME# disabled
>> #
> 
> The part above is totally irrelevant.  It's just the initial configuration.
> 
>> Seems the sata_sil24 does not report an equivalent of, for example:
>> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
> 
> Apparently, they don't support PME and pci_pme_active() should check
> dev->pme_support, but it doesn't.  Still not relevant, though.
> 
>> The states before/after tests (did not change):
> 
> What tests?

Tests with express card plugged in, unloaded, but also USB devices bing plugged
into the xHCI port to test whether it detects the change or not.

> 
> And why would you expect them to change?

It is my impression the xHCI port can be suspended after a device is unplugged.
I might be wrong but doing just echo "auto" > /sys/.../control does not
cause a device suspend in a few seconds. I have to plugin a device and only
its unplug the "new setting" kicks in. Whether am right or not, I just wanted
to know whether any of them felt a sleep, etc. So "no change" was a good news
for me. ;-)

> 
>> /sys/bus/pci/devices/0000:00:00.0/power/control:on
>> /sys/bus/pci/devices/0000:00:02.0/power/control:on
>> /sys/bus/pci/devices/0000:00:16.0/power/control:on
>> /sys/bus/pci/devices/0000:00:1a.0/power/control:on
>> /sys/bus/pci/devices/0000:00:1b.0/power/control:on
>> /sys/bus/pci/devices/0000:00:1c.0/power/control:on
>> /sys/bus/pci/devices/0000:00:1c.1/power/control:on
>> /sys/bus/pci/devices/0000:00:1c.3/power/control:on
>> /sys/bus/pci/devices/0000:00:1c.4/power/control:on
>> /sys/bus/pci/devices/0000:00:1c.7/power/control:on
>> /sys/bus/pci/devices/0000:00:1d.0/power/control:on
>> /sys/bus/pci/devices/0000:00:1f.0/power/control:on
>> /sys/bus/pci/devices/0000:00:1f.2/power/control:on
>> /sys/bus/pci/devices/0000:00:1f.3/power/control:on
>> /sys/bus/pci/devices/0000:05:00.0/power/control:on
>> /sys/bus/pci/devices/0000:09:00.0/power/control:on
>> /sys/bus/pci/devices/0000:0b:00.0/power/control:on
>> /sys/bus/pci/devices/0000:11:00.0/power/control:on
> 
> Sure, all of these devices are always on.  You need to write "auto" to their
> power/control files to change that, which still doesn't mean they will be
> runtime-suspended.

That's what I learned. ;-)

> 
> The patch in question doesn't have any effect on those settings.

Oh it does! There are "active" values instead of "on" or "auto".

> 
>> These 2 lines only are logged during hot eject of the eSATA card:
>>
>> +[  362.712584] sata_sil24 0000:11:00.0: PME# disabled
>> +[  362.715773] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
> 
> Device removal I suppose.

Yes. Provided Sarah wrote today that reading 'ff' is a false alarm for the
HW died message from xhci_hcd this is probably same issue.

Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29 14:11               ` Martin Mokrejs
  2013-03-29 16:45                 ` Martin Mokrejs
  2013-03-29 21:31                 ` Rafael J. Wysocki
@ 2013-03-30 10:54                 ` Huang Ying
  2013-03-31 10:35                   ` Martin Mokrejs
  2 siblings, 1 reply; 41+ messages in thread
From: Huang Ying @ 2013-03-30 10:54 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

On Fri, 2013-03-29 at 15:11 +0100, Martin Mokrejs wrote:
> Hi Ying,
>   thank you for the patch. Here are the results.

Thanks for your help! It appears my previous patch does not help
much :(.  Can you try below patch?  I think this is mainly for hotplug
but may be helpful for xhci dead port bug too.

Please test this patch with laptop-mode-tool installed and enabled.  And
before/after test, please get PCI devices runtime status with:

grep . /sys/bus/pci/devices/*/power/runtime_status

And please give me the full dmesg for boot and incremental dmesg for
operations.  Could you give me the ACPI dump for your machine?

Best Regards,
Huang Ying

>From c0179956fb396fe68f2a237713c7592feea87d16 Mon Sep 17 00:00:00 2001
From: Huang Ying <ying.huang@intel.com>
Date: Fri, 8 Mar 2013 16:13:54 +0800
Subject: [PATCH] pcie_hp_disable_rtpm

---
 drivers/pci/hotplug/pci_hotplug_core.c |    8 ++++++++
 drivers/pci/pci-acpi.c                 |   15 +++++++++++++++
 drivers/pci/pci.c                      |    1 +
 drivers/pci/pcie/portdrv_pci.c         |   12 +++++++++---
 drivers/pci/slot.c                     |   18 ++++++++++++++++++
 include/acpi/acpi_bus.h                |    1 +
 include/linux/pci.h                    |    1 +
 7 files changed, 53 insertions(+), 3 deletions(-)

--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -39,6 +39,7 @@
 #include <linux/mutex.h>
 #include <linux/pci.h>
 #include <linux/pci_hotplug.h>
+#include <linux/pm_runtime.h>
 #include <asm/uaccess.h>
 #include "../pci.h"
 
@@ -473,6 +474,9 @@ int __pci_hp_register(struct hotplug_slo
 	dbg("Added slot %s to the list\n", name);
 out:
 	mutex_unlock(&pci_hp_mutex);
+	/* Bridge runtime PM state may be influenced by hotplug */
+	pm_runtime_resume(&bus->self->dev);
+	dev_info(&bus->self->dev, "hotplug slot added!\n");
 	return result;
 }
 
@@ -489,6 +493,7 @@ int pci_hp_deregister(struct hotplug_slo
 {
 	struct hotplug_slot *temp;
 	struct pci_slot *slot;
+	struct pci_bus *bus;
 
 	if (!hotplug)
 		return -ENODEV;
@@ -508,8 +513,11 @@ int pci_hp_deregister(struct hotplug_slo
 
 	hotplug->release(hotplug);
 	slot->hotplug = NULL;
+	bus = slot->bus;
 	pci_destroy_slot(slot);
 	mutex_unlock(&pci_hp_mutex);
+	pm_runtime_resume(&bus->self->dev);
+	dev_info(&bus->self->dev, "hotplug slot removed!\n");
 
 	return 0;
 }
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -154,9 +154,15 @@ static int pcie_port_runtime_idle(struct
 	 */
 	pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
 	/* Delay for a short while to prevent too frequent suspend/resume */
-	if (!pme_poll)
-		pm_schedule_suspend(dev, 10);
-	return -EBUSY;
+	if (pme_poll)
+		return -EBUSY;
+	if (pci_bus_has_hotplug_slots(pdev->subordinate)) {
+		dev_info(&pdev->dev, "ppri: has hotplug slots, do not suspend!\n");
+		return -EBUSY;
+	}
+	dev_info(&pdev->dev, "ppri: will go suspend, is_hotplug_bridge: %d.\n",
+		 pdev->is_hotplug_bridge);
+	return pm_schedule_suspend(dev, 10);
 }
 #else
 #define pcie_port_runtime_suspend	NULL
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -345,6 +345,24 @@ out:
 }
 EXPORT_SYMBOL_GPL(pci_renumber_slot);
 
+bool pci_bus_has_hotplug_slots(struct pci_bus *bus)
+{
+	struct pci_slot *slot;
+	bool has_hotplug_slots = false;
+
+	down_read(&pci_bus_sem);
+	list_for_each_entry(slot, &bus->slots, list) {
+		if (slot->hotplug) {
+			has_hotplug_slots = true;
+			break;
+		}
+	}
+	up_read(&pci_bus_sem);
+
+	return has_hotplug_slots;
+}
+EXPORT_SYMBOL_GPL(pci_bus_has_hotplug_slots);
+
 /**
  * pci_destroy_slot - decrement refcount for physical PCI slot
  * @slot: struct pci_slot to decrement
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -722,6 +722,7 @@ struct pci_slot *pci_create_slot(struct
 void pci_destroy_slot(struct pci_slot *slot);
 void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
 int pci_scan_slot(struct pci_bus *bus, int devfn);
+bool pci_bus_has_hotplug_slots(struct pci_bus *bus);
 struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
 void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
 unsigned int pci_scan_child_bus(struct pci_bus *bus);
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -43,10 +43,16 @@ static void pci_acpi_wake_bus(acpi_handl
 static void pci_acpi_wake_dev(acpi_handle handle, u32 event, void *context)
 {
 	struct pci_dev *pci_dev = context;
+	struct acpi_device *adev;
 
 	if (event != ACPI_NOTIFY_DEVICE_WAKE || !pci_dev)
 		return;
 
+	if (!acpi_bus_get_device(handle, &adev)) {
+		adev->wakeup.flags.run_wake_works = true;
+		dev_info(&pci_dev->dev, "run wake works!\n");
+	}
+
 	if (pci_dev->current_state == PCI_D3cold) {
 		pci_wakeup_event(pci_dev);
 		pm_runtime_resume(&pci_dev->dev);
@@ -146,6 +152,15 @@ phys_addr_t acpi_pci_root_get_mcfg_addr(
 static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
 {
 	int acpi_state, d_max;
+	acpi_handle handle = DEVICE_ACPI_HANDLE(&pdev->dev);
+	struct acpi_device *adev;
+
+	if (pci_is_bridge(pdev) && !acpi_bus_get_device(handle, &adev)) {
+		if (!adev->wakeup.flags.run_wake_works) {
+			dev_info(&pdev->dev, "choose state, run wake not verified\n");
+			return PCI_D0;
+		}
+	}
 
 	if (pdev->no_d3cold)
 		d_max = ACPI_STATE_D3_HOT;
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -245,6 +245,7 @@ struct acpi_device_perf {
 struct acpi_device_wakeup_flags {
 	u8 valid:1;		/* Can successfully enable wakeup? */
 	u8 run_wake:1;		/* Run-Wake GPE devices */
+	u8 run_wake_works:1;	/* Run-Wake works for the device */
 	u8 notifier_present:1;  /* Wake-up notify handler has been installed */
 };
 
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1832,6 +1832,7 @@ int pci_finish_runtime_suspend(struct pc
 	__pci_enable_wake(dev, target_state, true, pci_dev_run_wake(dev));
 
 	error = pci_set_power_state(dev, target_state);
+	dev_info(&dev->dev, "pfrs: target: %d, %d\n", target_state, error);
 
 	if (error) {
 		__pci_enable_wake(dev, target_state, true, false);



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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30  1:53                       ` Martin Mokrejs
@ 2013-03-30 17:49                         ` Martin Mokrejs
  2013-03-30 22:18                           ` Rafael J. Wysocki
  2013-03-30 22:17                         ` Rafael J. Wysocki
  1 sibling, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-30 17:49 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

Martin Mokrejs wrote:
> Rafael J. Wysocki wrote:
>> On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
>>> Rafael J. Wysocki wrote:
>>>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
>>>>> Hi Ying,
>>>>>   thank you for the patch. Here are the results.
>>>>>
>>>>> Huang Ying wrote:
>>>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>>>>>> Hi Ying,
>>>>>>>   would you please tell me how this report relate to this patch?
>>>>>>>
>>>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>>>>>
>>>>>>>   Could you tell me why this PME was being flipped back and forth now?
>>>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
>>>>
>>>> Can you please test this patch:
>>>>
>>>> https://patchwork.kernel.org/patch/2359611/
>>>>
>>>> and report back as I asked you?
>>>
>>> Sorry for the delay I just had to sort out what belongs under what thread
>>> and the patch was under the other. But I agree its testing with this
>>> particular eSATA/ExpressCardSlot/PM fits better here.
>>>
>>>
>>> The good news is that the eSATA card hotplug works almost perfectly with the patch.
>>> I cold booted as always with the card in the slot already loaded, same kernel
>>> .config and commandline options as described under this thread. But the kernel
>>> was 3.8.3! Not 3.9-rc1.
>>
>> Good.  The goal was to fix the problem with eSATA hotplug.
> 
> I thought that was aimed at the XHCI dead port issue. ;-)

Hi,
  first of all, a big fat note. The tests with 3.8.2 and 3.8.2 I always did with aciphp
and pcie_aspm=off. I somehow forgot about that and yesterday after testing the
patch from Huang Ying when it turned out the patch actually not only helps with the
dead xHCI port due to suspend but incidentally also fixes the eSATA card hotplug ...
I decided to move the part related to the eSATA card under this thread.
Hmm, but I forgot that this thread is about pciehp while I was using pciehp.
I will leave it as it is right now but please, bear in mind that with acpiphp
I had principially not much problems on on 3.7 and above (unlike pciehp) and so far
the eSATA card behaved weird under acpiphp unlike the other two cards.
  It could be the pciehp suffers same PCI/PCIe powersaving issue but I cannot
confirm that yet. Just in case you would be trying to find in source code a bug
related to pciehp. Intentionally, while re-testing the behavior (further below)
I left in a stacktrace showing acpiphp path. This email is a confirmation of what
I found yesterday, just waned to emphasize the use of acpiphp vs. pciehp for 3.8.2/3.8.3
testing.


I tried to mimic what laptop-mode-tools caused on my system with vanilla 3.8.3
kernel. I think I managed in the end. The eSATA card hotplug and hotremoval works
(acpiphp with pcie_aspm=off) when 11:00 (ExpressCardSlot) and 1c.7 (its upstream
root port) are set to on.

Once I do 'find  /sys/bus/pci/devices/*/power/ -name control | while read f; do echo auto > $f; done'
then the following fall asleep:

--- runtime_status.txt  2013-03-30 11:01:42.000000000 +0100
+++ runtime_status__after__all_to_auto.txt      2013-03-30 11:04:21.000000000 +0100
@@ -1,9 +1,9 @@
-/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:active
+/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
 /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
-/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:active
+/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
 /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
-/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:active
+/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
 /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
@@ -11,8 +11,8 @@
 /sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
-/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:active
+/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
 /sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
-/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:active
+/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:suspended
 /sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active


Notably, 11:00 does not fall asleep by itself neither it's upstream
port. The hotplug and removal still works but upon eject 11:00
becomes to fall asleep. Sometimes, 1.c7 falls asleep and once that
happens the express card slot is dead (11:00). After doing
echo "on" > /sys/bus/pci/devices/0000:11:00.0/power/control
does not help, one has to wakeup the upstream 1c.7 root port.


Now results of the testing itself:

eSATA card device ejected ... while 1c.7 was "on" and 11:00 in "auto" mode:

[  825.471775] sata_sil24 0000:11:00.0: PME# disabled
[  825.475184] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?

Now I set 1c.7 to "auto" as well. Hotinsert works because 1c.7 does not immediately
fall asleep after the echo command but upon eject 1c.7 will fall asleep (I mean
gets PME# enabled, can't comment about the eSATA card saying "supports D1 D2"):

[  841.847469] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[  841.847514] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
[  841.847546] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
[  841.847567] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
[  841.847608] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
[  841.847739] pci 0000:11:00.0: supports D1 D2
[  841.868167] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
[  841.868171] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
[  841.868194] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
[  841.868196] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
[  841.868218] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
[  841.868219] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
[  841.868227] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
[  841.869418] pcieport 0000:00:1c.7: restoring config space at offset 0x1c (was 0x2000d0c0, writing 0xd0c0)
[  841.869475] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
[  841.869681] sata_sil24 0000:11:00.0: enabling bus mastering
[  841.873096] scsi8 : sata_sil24
[  841.874967] scsi9 : sata_sil24
[  841.875663] ata9: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
[  841.875667] ata10: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
[  843.953357] ata9: SATA link down (SStatus 0 SControl 0)
[  846.040248] ata10: SATA link down (SStatus 0 SControl 0)
[  909.965819] sata_sil24 0000:11:00.0: PME# disabled
[  909.967937] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
[  909.975174] pcieport 0000:00:1c.7: PME# enabled

Now I will manually set 1c.7 back to "on" and subsequent hotinsert+hotremove will
work again (11:00 is still in "auto"):

[ 1032.752331] pcieport 0000:00:1c.7: PME# disabled
[ 1051.405309] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[ 1051.405355] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
[ 1051.405388] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
[ 1051.405409] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
[ 1051.405449] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
[ 1051.405568] pci 0000:11:00.0: supports D1 D2
[ 1051.425977] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
[ 1051.425982] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
[ 1051.426004] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
[ 1051.426006] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
[ 1051.426028] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
[ 1051.426030] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
[ 1051.426037] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
[ 1051.427222] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
[ 1051.427413] sata_sil24 0000:11:00.0: enabling bus mastering
[ 1051.430736] scsi10 : sata_sil24
[ 1051.432608] scsi11 : sata_sil24
[ 1051.433973] ata11: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
[ 1051.433977] ata12: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
[ 1053.521187] ata11: SATA link down (SStatus 0 SControl 0)
[ 1055.608091] ata12: SATA link down (SStatus 0 SControl 0)
[ 1070.576590] sata_sil24 0000:11:00.0: PME# disabled
[ 1070.578631] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?

Again hot-insert and eject:

[ 1072.334142] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[ 1072.334187] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
[ 1072.334220] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
[ 1072.334240] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
[ 1072.334281] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
[ 1072.334398] pci 0000:11:00.0: supports D1 D2
[ 1072.354775] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
[ 1072.354779] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
[ 1072.354802] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
[ 1072.354804] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
[ 1072.354825] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
[ 1072.354827] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
[ 1072.354834] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
[ 1072.355952] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
[ 1072.356141] sata_sil24 0000:11:00.0: enabling bus mastering
[ 1072.360476] scsi12 : sata_sil24
[ 1072.361719] scsi13 : sata_sil24
[ 1072.363037] ata13: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
[ 1072.363042] ata14: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
[ 1074.450035] ata13: SATA link down (SStatus 0 SControl 0)
[ 1076.536960] ata14: SATA link down (SStatus 0 SControl 0)
[ 1078.634799] sata_sil24 0000:11:00.0: PME# disabled
[ 1078.636829] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?

Below few more hotinserts and hotremovals, merely to show the stacktrace
when I I remove/inserted the card too quickly.

[ 1081.210918] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[ 1081.210963] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
[ 1081.210995] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
[ 1081.211016] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
[ 1081.211057] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
[ 1081.211173] pci 0000:11:00.0: supports D1 D2
[ 1081.231635] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
[ 1081.231640] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
[ 1081.231662] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
[ 1081.231664] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
[ 1081.231686] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
[ 1081.231687] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
[ 1081.231694] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
[ 1081.232773] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
[ 1081.232983] sata_sil24 0000:11:00.0: enabling bus mastering
[ 1081.236374] scsi14 : sata_sil24
[ 1081.238038] scsi15 : sata_sil24
[ 1081.239819] ata15: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
[ 1081.239823] ata16: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
[ 1083.326798] ata15: SATA link down (SStatus 0 SControl 0)
[ 1085.454431] sata_sil24 0000:11:00.0: PME# disabled
[ 1087.430723] ata16: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 1087.430761] ------------[ cut here ]------------
[ 1087.430767] WARNING: at drivers/ata/libata-core.c:6244 ata_host_detach+0x75/0xdb()
[ 1087.430768] Hardware name: Vostro 3550
[ 1087.430769] Modules linked in: i915 fbcon cfbfillrect bitblit softcursor cfbimgblt font i2c_algo_bit cfbcopyarea drm_kms_helper drm iwldvm fb iwlwifi fbdev sata_sil24
[ 1087.430783] Pid: 677, comm: kworker/0:1 Not tainted 3.8.3-default #1
[ 1087.430784] Call Trace:
[ 1087.430790]  [<ffffffff8107cbd7>] warn_slowpath_common+0x7e/0x96
[ 1087.430792]  [<ffffffff8107cc04>] warn_slowpath_null+0x15/0x17
[ 1087.430794]  [<ffffffff8136dfa8>] ata_host_detach+0x75/0xdb
[ 1087.430797]  [<ffffffff8136e03f>] ata_pci_remove_one+0x18/0x1a
[ 1087.430799]  [<ffffffff81293221>] pci_device_remove+0x38/0x8b
[ 1087.430802]  [<ffffffff8132d93d>] __device_release_driver+0x81/0xd4
[ 1087.430811]  [<ffffffff8132d9b0>] device_release_driver+0x20/0x2d
[ 1087.430813]  [<ffffffff8132d4ea>] bus_remove_device+0xef/0x103
[ 1087.430816]  [<ffffffff8132b1b5>] device_del+0x128/0x182
[ 1087.430818]  [<ffffffff8132b21d>] device_unregister+0xe/0x1a
[ 1087.430820]  [<ffffffff8128eb2d>] pci_stop_bus_device+0x65/0x87
[ 1087.430822]  [<ffffffff8128ec9b>] pci_stop_and_remove_bus_device+0xf/0x1b
[ 1087.430825]  [<ffffffff812a183d>] acpiphp_disable_slot+0x8f/0x17e
[ 1087.430827]  [<ffffffff812a08bb>] ? get_slot_status+0x38/0x9b
[ 1087.430830]  [<ffffffff812a1961>] acpiphp_check_bridge.isra.16+0x35/0xc6
[ 1087.430832]  [<ffffffff812a1e82>] _handle_hotplug_event_bridge+0x275/0x3de
[ 1087.430836]  [<ffffffff81090964>] ? process_one_work+0x15c/0x2f5
[ 1087.430839]  [<ffffffff810ba154>] ? trace_hardirqs_on_caller+0x121/0x158
[ 1087.430841]  [<ffffffff810909ce>] process_one_work+0x1c6/0x2f5
[ 1087.430843]  [<ffffffff81090964>] ? process_one_work+0x15c/0x2f5
[ 1087.430845]  [<ffffffff810916d1>] worker_thread+0x13e/0x1d5
[ 1087.430847]  [<ffffffff81091593>] ? manage_workers+0x23d/0x23d
[ 1087.430849]  [<ffffffff810951c6>] kthread+0xac/0xb4
[ 1087.430852]  [<ffffffff8109511a>] ? __init_kthread_worker+0x54/0x54
[ 1087.430855]  [<ffffffff8161222c>] ret_from_fork+0x7c/0xb0
[ 1087.430857]  [<ffffffff8109511a>] ? __init_kthread_worker+0x54/0x54
[ 1087.430858] ---[ end trace 5ef7a4c406a8ed2d ]---
[ 1087.431895] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
[ 1087.433409] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[ 1087.433454] pci 0000:11:00.0: reg 10: [mem 0x00000000-0x0000007f 64bit]
[ 1087.433486] pci 0000:11:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit]
[ 1087.433508] pci 0000:11:00.0: reg 20: [io  0x0000-0x007f]
[ 1087.433549] pci 0000:11:00.0: reg 30: [mem 0x00000000-0x0007ffff pref]
[ 1087.433664] pci 0000:11:00.0: supports D1 D2
[ 1087.452162] pci 0000:11:00.0: BAR 6: assigned [mem 0xf0000000-0xf007ffff pref]
[ 1087.452166] pci 0000:11:00.0: BAR 2: assigned [mem 0xf6c00000-0xf6c03fff 64bit]
[ 1087.452188] pci 0000:11:00.0: BAR 2: set to [mem 0xf6c00000-0xf6c03fff 64bit] (PCI address [0xf6c00000-0xf6c03fff])
[ 1087.452190] pci 0000:11:00.0: BAR 0: assigned [mem 0xf6c04000-0xf6c0407f 64bit]
[ 1087.452211] pci 0000:11:00.0: BAR 0: set to [mem 0xf6c04000-0xf6c0407f 64bit] (PCI address [0xf6c04000-0xf6c0407f])
[ 1087.452212] pci 0000:11:00.0: BAR 4: assigned [io  0xc000-0xc07f]
[ 1087.452219] pci 0000:11:00.0: BAR 4: set to [io  0xc000-0xc07f] (PCI address [0xc000-0xc07f])
[ 1087.453329] sata_sil24 0000:11:00.0: enabling device (0100 -> 0103)
[ 1087.453516] sata_sil24 0000:11:00.0: enabling bus mastering
[ 1087.465089] scsi16 : sata_sil24
[ 1087.467788] scsi17 : sata_sil24
[ 1087.468468] ata17: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19
[ 1087.468471] ata18: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19
[ 1089.547535] ata17: SATA link down (SStatus 0 SControl 0)
[ 1091.634429] ata18: SATA link down (SStatus 0 SControl 0)
[ 1098.594853] sata_sil24 0000:11:00.0: PME# disabled
[ 1098.596911] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?

So, this is principially same issue like with the xhci port dying after USB device unplug.
The 0b:00 works even in "auto" mode until its upstream 1c.4 port is set to "auto" and
becomes actually suspended. It is same story like the eSATA card woes. Just beware,
this was acpiphp and  pcie_aspm=off instead of pciehp as I said in the beginning of this email.


Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30  1:53                       ` Martin Mokrejs
  2013-03-30 17:49                         ` Martin Mokrejs
@ 2013-03-30 22:17                         ` Rafael J. Wysocki
  2013-03-30 22:39                           ` Martin Mokrejs
  1 sibling, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-03-30 22:17 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

On Saturday, March 30, 2013 02:53:00 AM Martin Mokrejs wrote:
> Rafael J. Wysocki wrote:
> > On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
> >> Rafael J. Wysocki wrote:
> >>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
> >>>> Hi Ying,
> >>>>   thank you for the patch. Here are the results.
> >>>>
> >>>> Huang Ying wrote:
> >>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> >>>>>> Hi Ying,
> >>>>>>   would you please tell me how this report relate to this patch?
> >>>>>>
> >>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> >>>>>>
> >>>>>>   Could you tell me why this PME was being flipped back and forth now?
> >>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
> >>>
> >>> Can you please test this patch:
> >>>
> >>> https://patchwork.kernel.org/patch/2359611/
> >>>
> >>> and report back as I asked you?
> >>
> >> Sorry for the delay I just had to sort out what belongs under what thread
> >> and the patch was under the other. But I agree its testing with this
> >> particular eSATA/ExpressCardSlot/PM fits better here.
> >>
> >>
> >> The good news is that the eSATA card hotplug works almost perfectly with the patch.
> >> I cold booted as always with the card in the slot already loaded, same kernel
> >> .config and commandline options as described under this thread. But the kernel
> >> was 3.8.3! Not 3.9-rc1.
> > 
> > Good.  The goal was to fix the problem with eSATA hotplug.
> 
> I thought that was aimed at the XHCI dead port issue. ;-)
> 
> > 
> >> What is important is the fact that this patch resulted in runtime_status set to
> >> "active" instead of "auto" (3.8.3 with incidentally enabled laptop-mode-tools)
> >> or "on" (also tested on 3.8.3 once laptop-mode-tools were uninstalled). With this
> >> patch, devices did not get suspended during the tests (per /sys/*/power/runtime_status
> >> files).
> > 
> > You seem to be confusing power/runtime_status with power/control.  runtime_status
> > can never be "on", while control can never be "active".
> 
> Too late here, but yes, I likely swapped the two filename and value pairs. Thanks.
> 
> > 
> >> I haven't realized so far that the rtl8169 card at 05:00 and the TI xHCI
> >> controller at 0b:00 support D2 state.
> > 
> > Which probably doesn't matter, because that state isn't used by the kernel
> > anyway.
> > 
> >> # grep PME dmesg_final.txt 
> >> [    1.571475] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
> >> [    1.571500] pci 0000:00:16.0: PME# disabled
> >> [    1.571760] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
> >> [    1.571766] pci 0000:00:1a.0: PME# disabled
> >> [    1.571991] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
> >> [    1.571997] pci 0000:00:1b.0: PME# disabled
> >> [    1.572200] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
> >> [    1.572205] pci 0000:00:1c.0: PME# disabled
> >> [    1.572409] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
> >> [    1.572414] pci 0000:00:1c.1: PME# disabled
> >> [    1.572618] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
> >> [    1.572623] pci 0000:00:1c.3: PME# disabled
> >> [    1.572826] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
> >> [    1.572832] pci 0000:00:1c.4: PME# disabled
> >> [    1.573042] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
> >> [    1.573047] pci 0000:00:1c.7: PME# disabled
> >> [    1.573292] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
> >> [    1.573297] pci 0000:00:1d.0: PME# disabled
> >> [    1.573765] pci 0000:00:1f.2: PME# supported from D3hot
> >> [    1.573770] pci 0000:00:1f.2: PME# disabled
> >> [    1.574521] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
> >> [    1.574528] pci 0000:05:00.0: PME# disabled
> >> [    1.587449] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
> >> [    1.587500] pci 0000:09:00.0: PME# disabled
> >> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
> >> [    1.605575] pci 0000:0b:00.0: PME# disabled
> >> [  362.712584] sata_sil24 0000:11:00.0: PME# disabled
> >> [ 1069.949732] sata_sil24 0000:11:00.0: PME# disabled
> >> [ 1083.878783] sata_sil24 0000:11:00.0: PME# disabled
> >> [ 1096.679536] sata_sil24 0000:11:00.0: PME# disabled
> >> [ 1107.503274] sata_sil24 0000:11:00.0: PME# disabled
> >> #
> > 
> > The part above is totally irrelevant.  It's just the initial configuration.
> > 
> >> Seems the sata_sil24 does not report an equivalent of, for example:
> >> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
> > 
> > Apparently, they don't support PME and pci_pme_active() should check
> > dev->pme_support, but it doesn't.  Still not relevant, though.
> > 
> >> The states before/after tests (did not change):
> > 
> > What tests?
> 
> Tests with express card plugged in, unloaded, but also USB devices bing plugged
> into the xHCI port to test whether it detects the change or not.
> 
> > 
> > And why would you expect them to change?
> 
> It is my impression the xHCI port can be suspended after a device is unplugged.
> I might be wrong but doing just echo "auto" > /sys/.../control does not
> cause a device suspend in a few seconds. I have to plugin a device and only
> its unplug the "new setting" kicks in. Whether am right or not, I just wanted
> to know whether any of them felt a sleep, etc. So "no change" was a good news
> for me. ;-)
> 
> > 
> >> /sys/bus/pci/devices/0000:00:00.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:02.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:16.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:1a.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:1b.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:1c.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:1c.1/power/control:on
> >> /sys/bus/pci/devices/0000:00:1c.3/power/control:on
> >> /sys/bus/pci/devices/0000:00:1c.4/power/control:on
> >> /sys/bus/pci/devices/0000:00:1c.7/power/control:on
> >> /sys/bus/pci/devices/0000:00:1d.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:1f.0/power/control:on
> >> /sys/bus/pci/devices/0000:00:1f.2/power/control:on
> >> /sys/bus/pci/devices/0000:00:1f.3/power/control:on
> >> /sys/bus/pci/devices/0000:05:00.0/power/control:on
> >> /sys/bus/pci/devices/0000:09:00.0/power/control:on
> >> /sys/bus/pci/devices/0000:0b:00.0/power/control:on
> >> /sys/bus/pci/devices/0000:11:00.0/power/control:on
> > 
> > Sure, all of these devices are always on.  You need to write "auto" to their
> > power/control files to change that, which still doesn't mean they will be
> > runtime-suspended.
> 
> That's what I learned. ;-)
> 
> > 
> > The patch in question doesn't have any effect on those settings.
> 
> Oh it does! There are "active" values instead of "on" or "auto".

This actually isn't even possible, because "on" or "auto" are values for one
sysfs attribute, while "active" is for another.

And I really know what I'm talking about in case you had any doubts.  I know
what the patch does.  I'm not sure, though, if we're talking about the same
patch.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30 17:49                         ` Martin Mokrejs
@ 2013-03-30 22:18                           ` Rafael J. Wysocki
  2013-03-30 23:12                             ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-03-30 22:18 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

On Saturday, March 30, 2013 06:49:36 PM Martin Mokrejs wrote:
> Martin Mokrejs wrote:
> > Rafael J. Wysocki wrote:
> >> On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
> >>> Rafael J. Wysocki wrote:
> >>>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
> >>>>> Hi Ying,
> >>>>>   thank you for the patch. Here are the results.
> >>>>>
> >>>>> Huang Ying wrote:
> >>>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> >>>>>>> Hi Ying,
> >>>>>>>   would you please tell me how this report relate to this patch?
> >>>>>>>
> >>>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> >>>>>>>
> >>>>>>>   Could you tell me why this PME was being flipped back and forth now?
> >>>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
> >>>>
> >>>> Can you please test this patch:
> >>>>
> >>>> https://patchwork.kernel.org/patch/2359611/
> >>>>
> >>>> and report back as I asked you?
> >>>
> >>> Sorry for the delay I just had to sort out what belongs under what thread
> >>> and the patch was under the other. But I agree its testing with this
> >>> particular eSATA/ExpressCardSlot/PM fits better here.
> >>>
> >>>
> >>> The good news is that the eSATA card hotplug works almost perfectly with the patch.
> >>> I cold booted as always with the card in the slot already loaded, same kernel
> >>> .config and commandline options as described under this thread. But the kernel
> >>> was 3.8.3! Not 3.9-rc1.
> >>
> >> Good.  The goal was to fix the problem with eSATA hotplug.
> > 
> > I thought that was aimed at the XHCI dead port issue. ;-)
> 
> Hi,
>   first of all, a big fat note. The tests with 3.8.2 and 3.8.2 I always did with aciphp
> and pcie_aspm=off. I somehow forgot about that and yesterday after testing the
> patch from Huang Ying when it turned out the patch actually not only helps with the
> dead xHCI port due to suspend but incidentally also fixes the eSATA card hotplug ...

Which patch you're talking about?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30 22:17                         ` Rafael J. Wysocki
@ 2013-03-30 22:39                           ` Martin Mokrejs
  0 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-30 22:39 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu



Rafael J. Wysocki wrote:
> On Saturday, March 30, 2013 02:53:00 AM Martin Mokrejs wrote:
>> Rafael J. Wysocki wrote:
>>> On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
>>>> Rafael J. Wysocki wrote:
>>>>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
>>>>>> Hi Ying,
>>>>>>   thank you for the patch. Here are the results.
>>>>>>
>>>>>> Huang Ying wrote:
>>>>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>>>>>>> Hi Ying,
>>>>>>>>   would you please tell me how this report relate to this patch?
>>>>>>>>
>>>>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>>>>>>
>>>>>>>>   Could you tell me why this PME was being flipped back and forth now?
>>>>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
>>>>>
>>>>> Can you please test this patch:
>>>>>
>>>>> https://patchwork.kernel.org/patch/2359611/
>>>>>
>>>>> and report back as I asked you?
>>>>
>>>> Sorry for the delay I just had to sort out what belongs under what thread
>>>> and the patch was under the other. But I agree its testing with this
>>>> particular eSATA/ExpressCardSlot/PM fits better here.
>>>>
>>>>
>>>> The good news is that the eSATA card hotplug works almost perfectly with the patch.
>>>> I cold booted as always with the card in the slot already loaded, same kernel
>>>> .config and commandline options as described under this thread. But the kernel
>>>> was 3.8.3! Not 3.9-rc1.
>>>
>>> Good.  The goal was to fix the problem with eSATA hotplug.
>>
>> I thought that was aimed at the XHCI dead port issue. ;-)
>>
>>>
>>>> What is important is the fact that this patch resulted in runtime_status set to
>>>> "active" instead of "auto" (3.8.3 with incidentally enabled laptop-mode-tools)
>>>> or "on" (also tested on 3.8.3 once laptop-mode-tools were uninstalled). With this
>>>> patch, devices did not get suspended during the tests (per /sys/*/power/runtime_status
>>>> files).
>>>
>>> You seem to be confusing power/runtime_status with power/control.  runtime_status
>>> can never be "on", while control can never be "active".
>>
>> Too late here, but yes, I likely swapped the two filename and value pairs. Thanks.
>>
>>>
>>>> I haven't realized so far that the rtl8169 card at 05:00 and the TI xHCI
>>>> controller at 0b:00 support D2 state.
>>>
>>> Which probably doesn't matter, because that state isn't used by the kernel
>>> anyway.
>>>
>>>> # grep PME dmesg_final.txt 
>>>> [    1.571475] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
>>>> [    1.571500] pci 0000:00:16.0: PME# disabled
>>>> [    1.571760] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
>>>> [    1.571766] pci 0000:00:1a.0: PME# disabled
>>>> [    1.571991] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
>>>> [    1.571997] pci 0000:00:1b.0: PME# disabled
>>>> [    1.572200] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
>>>> [    1.572205] pci 0000:00:1c.0: PME# disabled
>>>> [    1.572409] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
>>>> [    1.572414] pci 0000:00:1c.1: PME# disabled
>>>> [    1.572618] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
>>>> [    1.572623] pci 0000:00:1c.3: PME# disabled
>>>> [    1.572826] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
>>>> [    1.572832] pci 0000:00:1c.4: PME# disabled
>>>> [    1.573042] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
>>>> [    1.573047] pci 0000:00:1c.7: PME# disabled
>>>> [    1.573292] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
>>>> [    1.573297] pci 0000:00:1d.0: PME# disabled
>>>> [    1.573765] pci 0000:00:1f.2: PME# supported from D3hot
>>>> [    1.573770] pci 0000:00:1f.2: PME# disabled
>>>> [    1.574521] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
>>>> [    1.574528] pci 0000:05:00.0: PME# disabled
>>>> [    1.587449] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
>>>> [    1.587500] pci 0000:09:00.0: PME# disabled
>>>> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
>>>> [    1.605575] pci 0000:0b:00.0: PME# disabled
>>>> [  362.712584] sata_sil24 0000:11:00.0: PME# disabled
>>>> [ 1069.949732] sata_sil24 0000:11:00.0: PME# disabled
>>>> [ 1083.878783] sata_sil24 0000:11:00.0: PME# disabled
>>>> [ 1096.679536] sata_sil24 0000:11:00.0: PME# disabled
>>>> [ 1107.503274] sata_sil24 0000:11:00.0: PME# disabled
>>>> #
>>>
>>> The part above is totally irrelevant.  It's just the initial configuration.
>>>
>>>> Seems the sata_sil24 does not report an equivalent of, for example:
>>>> [    1.605568] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
>>>
>>> Apparently, they don't support PME and pci_pme_active() should check
>>> dev->pme_support, but it doesn't.  Still not relevant, though.
>>>
>>>> The states before/after tests (did not change):
>>>
>>> What tests?
>>
>> Tests with express card plugged in, unloaded, but also USB devices bing plugged
>> into the xHCI port to test whether it detects the change or not.
>>
>>>
>>> And why would you expect them to change?
>>
>> It is my impression the xHCI port can be suspended after a device is unplugged.
>> I might be wrong but doing just echo "auto" > /sys/.../control does not
>> cause a device suspend in a few seconds. I have to plugin a device and only
>> its unplug the "new setting" kicks in. Whether am right or not, I just wanted
>> to know whether any of them felt a sleep, etc. So "no change" was a good news
>> for me. ;-)
>>
>>>
>>>> /sys/bus/pci/devices/0000:00:00.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:02.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:16.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1a.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1b.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1c.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1c.1/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1c.3/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1c.4/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1c.7/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1d.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1f.0/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1f.2/power/control:on
>>>> /sys/bus/pci/devices/0000:00:1f.3/power/control:on
>>>> /sys/bus/pci/devices/0000:05:00.0/power/control:on
>>>> /sys/bus/pci/devices/0000:09:00.0/power/control:on
>>>> /sys/bus/pci/devices/0000:0b:00.0/power/control:on
>>>> /sys/bus/pci/devices/0000:11:00.0/power/control:on
>>>
>>> Sure, all of these devices are always on.  You need to write "auto" to their
>>> power/control files to change that, which still doesn't mean they will be
>>> runtime-suspended.
>>
>> That's what I learned. ;-)
>>
>>>
>>> The patch in question doesn't have any effect on those settings.
>>
>> Oh it does! There are "active" values instead of "on" or "auto".
> 
> This actually isn't even possible, because "on" or "auto" are values for one
> sysfs attribute, while "active" is for another.
> 
> And I really know what I'm talking about in case you had any doubts.  I know
> what the patch does.  I'm not sure, though, if we're talking about the same
> patch.

Yes, you are right.
Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30 22:18                           ` Rafael J. Wysocki
@ 2013-03-30 23:12                             ` Martin Mokrejs
  2013-03-31  1:51                               ` Rafael J. Wysocki
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-30 23:12 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

Rafael J. Wysocki wrote:
> On Saturday, March 30, 2013 06:49:36 PM Martin Mokrejs wrote:
>> Martin Mokrejs wrote:
>>> Rafael J. Wysocki wrote:
>>>> On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
>>>>> Rafael J. Wysocki wrote:
>>>>>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
>>>>>>> Hi Ying,
>>>>>>>   thank you for the patch. Here are the results.
>>>>>>>
>>>>>>> Huang Ying wrote:
>>>>>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>>>>>>>>> Hi Ying,
>>>>>>>>>   would you please tell me how this report relate to this patch?
>>>>>>>>>
>>>>>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>>>>>>>>
>>>>>>>>>   Could you tell me why this PME was being flipped back and forth now?
>>>>>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
>>>>>>
>>>>>> Can you please test this patch:
>>>>>>
>>>>>> https://patchwork.kernel.org/patch/2359611/
>>>>>>
>>>>>> and report back as I asked you?
>>>>>
>>>>> Sorry for the delay I just had to sort out what belongs under what thread
>>>>> and the patch was under the other. But I agree its testing with this
>>>>> particular eSATA/ExpressCardSlot/PM fits better here.
>>>>>
>>>>>
>>>>> The good news is that the eSATA card hotplug works almost perfectly with the patch.
>>>>> I cold booted as always with the card in the slot already loaded, same kernel
>>>>> .config and commandline options as described under this thread. But the kernel
>>>>> was 3.8.3! Not 3.9-rc1.
>>>>
>>>> Good.  The goal was to fix the problem with eSATA hotplug.
>>>
>>> I thought that was aimed at the XHCI dead port issue. ;-)
>>
>> Hi,
>>   first of all, a big fat note. The tests with 3.8.2 and 3.8.2 I always did with aciphp
>> and pcie_aspm=off. I somehow forgot about that and yesterday after testing the
>> patch from Huang Ying when it turned out the patch actually not only helps with the
>> dead xHCI port due to suspend but incidentally also fixes the eSATA card hotplug ...
> 
> Which patch you're talking about?

I mean this patch 

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Subject: PCI / PM: Disable runtime PM of PCIe ports

The runtime PM of PCIe ports turns out to be quite fragile, as in
some cases things work while in some other cases they don't and we
don't seem to have a good way to determine whether or not they are
going to work in advance.

For this reason, avoid enabling runtime PM for PCIe ports by
keeping their runtime PM reference counters always above 0 for the
time being.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/pci/pcie/portdrv_pci.c |    5 -----
 1 file changed, 5 deletions(-)



https://patchwork.kernel.org/patch/2359611/

which, also appearing like yours patch it is originally from Ying, right?:

<quote>
Hi, Martin,

Sorry for late.  Just found your bug report.  That seems related with
PCIe port runtime PM support.

Can you try the debug patch attached?  And send me back the dmesg?

Sorry I use gmail web client, so I can only send patch as attachment.

Best Regards,
Huang Ying
</quote>




Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30 23:12                             ` Martin Mokrejs
@ 2013-03-31  1:51                               ` Rafael J. Wysocki
  0 siblings, 0 replies; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-03-31  1:51 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu

On Sunday, March 31, 2013 12:12:47 AM Martin Mokrejs wrote:
> Rafael J. Wysocki wrote:
> > On Saturday, March 30, 2013 06:49:36 PM Martin Mokrejs wrote:
> >> Martin Mokrejs wrote:
> >>> Rafael J. Wysocki wrote:
> >>>> On Saturday, March 30, 2013 02:17:38 AM Martin Mokrejs wrote:
> >>>>> Rafael J. Wysocki wrote:
> >>>>>> On Friday, March 29, 2013 03:11:13 PM Martin Mokrejs wrote:
> >>>>>>> Hi Ying,
> >>>>>>>   thank you for the patch. Here are the results.
> >>>>>>>
> >>>>>>> Huang Ying wrote:
> >>>>>>>> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
> >>>>>>>>> Hi Ying,
> >>>>>>>>>   would you please tell me how this report relate to this patch?
> >>>>>>>>>
> >>>>>>>>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
> >>>>>>>>>
> >>>>>>>>>   Could you tell me why this PME was being flipped back and forth now?
> >>>>>>>>> Actually, does that make finally some sense to you, pci/acpi devs?
> >>>>>>
> >>>>>> Can you please test this patch:
> >>>>>>
> >>>>>> https://patchwork.kernel.org/patch/2359611/
> >>>>>>
> >>>>>> and report back as I asked you?
> >>>>>
> >>>>> Sorry for the delay I just had to sort out what belongs under what thread
> >>>>> and the patch was under the other. But I agree its testing with this
> >>>>> particular eSATA/ExpressCardSlot/PM fits better here.
> >>>>>
> >>>>>
> >>>>> The good news is that the eSATA card hotplug works almost perfectly with the patch.
> >>>>> I cold booted as always with the card in the slot already loaded, same kernel
> >>>>> .config and commandline options as described under this thread. But the kernel
> >>>>> was 3.8.3! Not 3.9-rc1.
> >>>>
> >>>> Good.  The goal was to fix the problem with eSATA hotplug.
> >>>
> >>> I thought that was aimed at the XHCI dead port issue. ;-)
> >>
> >> Hi,
> >>   first of all, a big fat note. The tests with 3.8.2 and 3.8.2 I always did with aciphp
> >> and pcie_aspm=off. I somehow forgot about that and yesterday after testing the
> >> patch from Huang Ying when it turned out the patch actually not only helps with the
> >> dead xHCI port due to suspend but incidentally also fixes the eSATA card hotplug ...
> > 
> > Which patch you're talking about?
> 
> I mean this patch 
> 
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Subject: PCI / PM: Disable runtime PM of PCIe ports
> 
> The runtime PM of PCIe ports turns out to be quite fragile, as in
> some cases things work while in some other cases they don't and we
> don't seem to have a good way to determine whether or not they are
> going to work in advance.
> 
> For this reason, avoid enabling runtime PM for PCIe ports by
> keeping their runtime PM reference counters always above 0 for the
> time being.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/pci/pcie/portdrv_pci.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> 
> 
> https://patchwork.kernel.org/patch/2359611/
> 
> which, also appearing like yours patch it is originally from Ying, right?:

No, I think that Ying was referring to a different patch he had attached.

Thanks,
Rafael


> <quote>
> Hi, Martin,
> 
> Sorry for late.  Just found your bug report.  That seems related with
> PCIe port runtime PM support.
> 
> Can you try the debug patch attached?  And send me back the dmesg?
> 
> Sorry I use gmail web client, so I can only send patch as attachment.
> 
> Best Regards,
> Huang Ying
> </quote>


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-30 10:54                 ` Huang Ying
@ 2013-03-31 10:35                   ` Martin Mokrejs
  2013-03-31 14:12                     ` Huang Ying
       [not found]                     ` <515813CB.8020001@fold.natur.cuni.cz>
  0 siblings, 2 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-31 10:35 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi Ying,
  I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
and kmemleaks.
  I removed the coldbooted card, inserted it and ejected it.


  In brief, lspci reports changes but there are no changes in /proc/interrupts
related to

  19:          0          0   IO-APIC-fasteoi   sata_sil24


and no changes at all in /proc/iomem which I expected to happen during
hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).

All the runtime_status data were same after every tested step, so again,
no diffs to show but here are the values confirming laptop-mode-tools
enabled powersaving:

/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
/sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active


  So, the only diffs I could provide are from lspci -vvv. They show
sata_sil24 was loaded that is confirmed by lsmod at the end of all
tests.

--- lspci_vvv_initial.txt       2013-03-31 12:01:05.000000000 +0200
+++ lspci_vvv_ejected.txt       2013-03-31 12:01:24.000000000 +0200
@@ -293,7 +293,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -307,13 +307,13 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -521,39 +521,7 @@
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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: 64 bytes
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
-               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
-                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
-               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
-               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
 

The after a hotinsert I see:

--- lspci_vvv_ejected.txt       2013-03-31 12:01:24.000000000 +0200
+++ lspci_vvv_ejected_and_reinserted.txt        2013-03-31 12:02:24.000000000 +0200
@@ -307,12 +307,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -521,7 +521,38 @@
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
-       !!! Unknown header type 7f
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
+       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       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-
+       Interrupt: pin A routed to IRQ 19
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
+       Capabilities: [54] 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=1 PME-
+       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
+               Address: 0000000000000000  Data: 0000
+       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
+               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
+                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
+                       ClockPM- Surprise- LLActRep- BwNot-
+               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
+                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
+       Capabilities: [100 v1] Advanced Error Reporting
+               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
+               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
+               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
+               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
+               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24
 


The last hotremoval caused:

--- lspci_vvv_ejected_and_reinserted.txt        2013-03-31 12:02:24.000000000 +0200
+++ lspci_vvv_ejected_and_reinserted_ejected.txt        2013-03-31 12:03:16.000000000 +0200
@@ -307,12 +307,12 @@
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
@@ -521,38 +521,7 @@
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
 
-11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
-       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       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-
-       Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
-       Region 4: I/O ports at c000 [disabled] [size=128]
-       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
-       Capabilities: [54] 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=1 PME-
-       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
-               Address: 0000000000000000  Data: 0000
-       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
-               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
-                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
-                       ClockPM- Surprise- LLActRep- BwNot-
-               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
-                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
-       Capabilities: [100 v1] Advanced Error Reporting
-               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
-               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
-               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
-               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
-               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24
 




Maybe I should, unlike in most previous reports, show a diff between a colplugged state
and the hotinserted states:

--- lspci_vvv_initial.txt       2013-03-31 12:01:05.000000000 +0200
+++ lspci_vvv_ejected_and_reinserted.txt        2013-03-31 12:02:24.000000000 +0200
@@ -293,7 +293,7 @@
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
@@ -313,7 +313,7 @@
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
-                       Changed: MRL- PresDet- LinkState-
+                       Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
@@ -523,14 +523,13 @@
 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
+       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: 64 bytes
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
@@ -541,7 +540,7 @@
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+                       MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-



The comparison of the two hotremovals shows no diff.

I will provide the dmesg in a follow-up email. The acpidump you should have
already received yesteday.

Thank you,
Martin

Huang Ying wrote:
> On Fri, 2013-03-29 at 15:11 +0100, Martin Mokrejs wrote:
>> Hi Ying,
>>   thank you for the patch. Here are the results.
> 
> Thanks for your help! It appears my previous patch does not help
> much :(.  Can you try below patch?  I think this is mainly for hotplug
> but may be helpful for xhci dead port bug too.
> 
> Please test this patch with laptop-mode-tool installed and enabled.  And
> before/after test, please get PCI devices runtime status with:
> 
> grep . /sys/bus/pci/devices/*/power/runtime_status
> 
> And please give me the full dmesg for boot and incremental dmesg for
> operations.  Could you give me the ACPI dump for your machine?
> 
> Best Regards,
> Huang Ying
> 
>>From c0179956fb396fe68f2a237713c7592feea87d16 Mon Sep 17 00:00:00 2001
> From: Huang Ying <ying.huang@intel.com>
> Date: Fri, 8 Mar 2013 16:13:54 +0800
> Subject: [PATCH] pcie_hp_disable_rtpm
> 
> ---
>  drivers/pci/hotplug/pci_hotplug_core.c |    8 ++++++++
>  drivers/pci/pci-acpi.c                 |   15 +++++++++++++++
>  drivers/pci/pci.c                      |    1 +
>  drivers/pci/pcie/portdrv_pci.c         |   12 +++++++++---
>  drivers/pci/slot.c                     |   18 ++++++++++++++++++
>  include/acpi/acpi_bus.h                |    1 +
>  include/linux/pci.h                    |    1 +
>  7 files changed, 53 insertions(+), 3 deletions(-)
> 
> --- a/drivers/pci/hotplug/pci_hotplug_core.c
> +++ b/drivers/pci/hotplug/pci_hotplug_core.c
> @@ -39,6 +39,7 @@
>  #include <linux/mutex.h>
>  #include <linux/pci.h>
>  #include <linux/pci_hotplug.h>
> +#include <linux/pm_runtime.h>
>  #include <asm/uaccess.h>
>  #include "../pci.h"
>  
> @@ -473,6 +474,9 @@ int __pci_hp_register(struct hotplug_slo
>  	dbg("Added slot %s to the list\n", name);
>  out:
>  	mutex_unlock(&pci_hp_mutex);
> +	/* Bridge runtime PM state may be influenced by hotplug */
> +	pm_runtime_resume(&bus->self->dev);
> +	dev_info(&bus->self->dev, "hotplug slot added!\n");
>  	return result;
>  }
>  
> @@ -489,6 +493,7 @@ int pci_hp_deregister(struct hotplug_slo
>  {
>  	struct hotplug_slot *temp;
>  	struct pci_slot *slot;
> +	struct pci_bus *bus;
>  
>  	if (!hotplug)
>  		return -ENODEV;
> @@ -508,8 +513,11 @@ int pci_hp_deregister(struct hotplug_slo
>  
>  	hotplug->release(hotplug);
>  	slot->hotplug = NULL;
> +	bus = slot->bus;
>  	pci_destroy_slot(slot);
>  	mutex_unlock(&pci_hp_mutex);
> +	pm_runtime_resume(&bus->self->dev);
> +	dev_info(&bus->self->dev, "hotplug slot removed!\n");
>  
>  	return 0;
>  }
> --- a/drivers/pci/pcie/portdrv_pci.c
> +++ b/drivers/pci/pcie/portdrv_pci.c
> @@ -154,9 +154,15 @@ static int pcie_port_runtime_idle(struct
>  	 */
>  	pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
>  	/* Delay for a short while to prevent too frequent suspend/resume */
> -	if (!pme_poll)
> -		pm_schedule_suspend(dev, 10);
> -	return -EBUSY;
> +	if (pme_poll)
> +		return -EBUSY;
> +	if (pci_bus_has_hotplug_slots(pdev->subordinate)) {
> +		dev_info(&pdev->dev, "ppri: has hotplug slots, do not suspend!\n");
> +		return -EBUSY;
> +	}
> +	dev_info(&pdev->dev, "ppri: will go suspend, is_hotplug_bridge: %d.\n",
> +		 pdev->is_hotplug_bridge);
> +	return pm_schedule_suspend(dev, 10);
>  }
>  #else
>  #define pcie_port_runtime_suspend	NULL
> --- a/drivers/pci/slot.c
> +++ b/drivers/pci/slot.c
> @@ -345,6 +345,24 @@ out:
>  }
>  EXPORT_SYMBOL_GPL(pci_renumber_slot);
>  
> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus)
> +{
> +	struct pci_slot *slot;
> +	bool has_hotplug_slots = false;
> +
> +	down_read(&pci_bus_sem);
> +	list_for_each_entry(slot, &bus->slots, list) {
> +		if (slot->hotplug) {
> +			has_hotplug_slots = true;
> +			break;
> +		}
> +	}
> +	up_read(&pci_bus_sem);
> +
> +	return has_hotplug_slots;
> +}
> +EXPORT_SYMBOL_GPL(pci_bus_has_hotplug_slots);
> +
>  /**
>   * pci_destroy_slot - decrement refcount for physical PCI slot
>   * @slot: struct pci_slot to decrement
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -722,6 +722,7 @@ struct pci_slot *pci_create_slot(struct
>  void pci_destroy_slot(struct pci_slot *slot);
>  void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
>  int pci_scan_slot(struct pci_bus *bus, int devfn);
> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus);
>  struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
>  void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
>  unsigned int pci_scan_child_bus(struct pci_bus *bus);
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -43,10 +43,16 @@ static void pci_acpi_wake_bus(acpi_handl
>  static void pci_acpi_wake_dev(acpi_handle handle, u32 event, void *context)
>  {
>  	struct pci_dev *pci_dev = context;
> +	struct acpi_device *adev;
>  
>  	if (event != ACPI_NOTIFY_DEVICE_WAKE || !pci_dev)
>  		return;
>  
> +	if (!acpi_bus_get_device(handle, &adev)) {
> +		adev->wakeup.flags.run_wake_works = true;
> +		dev_info(&pci_dev->dev, "run wake works!\n");
> +	}
> +
>  	if (pci_dev->current_state == PCI_D3cold) {
>  		pci_wakeup_event(pci_dev);
>  		pm_runtime_resume(&pci_dev->dev);
> @@ -146,6 +152,15 @@ phys_addr_t acpi_pci_root_get_mcfg_addr(
>  static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
>  {
>  	int acpi_state, d_max;
> +	acpi_handle handle = DEVICE_ACPI_HANDLE(&pdev->dev);
> +	struct acpi_device *adev;
> +
> +	if (pci_is_bridge(pdev) && !acpi_bus_get_device(handle, &adev)) {
> +		if (!adev->wakeup.flags.run_wake_works) {
> +			dev_info(&pdev->dev, "choose state, run wake not verified\n");
> +			return PCI_D0;
> +		}
> +	}
>  
>  	if (pdev->no_d3cold)
>  		d_max = ACPI_STATE_D3_HOT;
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -245,6 +245,7 @@ struct acpi_device_perf {
>  struct acpi_device_wakeup_flags {
>  	u8 valid:1;		/* Can successfully enable wakeup? */
>  	u8 run_wake:1;		/* Run-Wake GPE devices */
> +	u8 run_wake_works:1;	/* Run-Wake works for the device */
>  	u8 notifier_present:1;  /* Wake-up notify handler has been installed */
>  };
>  
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -1832,6 +1832,7 @@ int pci_finish_runtime_suspend(struct pc
>  	__pci_enable_wake(dev, target_state, true, pci_dev_run_wake(dev));
>  
>  	error = pci_set_power_state(dev, target_state);
> +	dev_info(&dev->dev, "pfrs: target: %d, %d\n", target_state, error);
>  
>  	if (error) {
>  		__pci_enable_wake(dev, target_state, true, false);
> 
> 
> --
> 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] 41+ messages in thread

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-31 10:35                   ` Martin Mokrejs
@ 2013-03-31 14:12                     ` Huang Ying
  2013-03-31 15:04                       ` Martin Mokrejs
       [not found]                     ` <515813CB.8020001@fold.natur.cuni.cz>
  1 sibling, 1 reply; 41+ messages in thread
From: Huang Ying @ 2013-03-31 14:12 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi, Martin,

Thanks for your testing!

On Sun, 2013-03-31 at 12:35 +0200, Martin Mokrejs wrote:
> Hi Ying,
>   I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
> when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
> enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
> and kmemleaks.
>   I removed the coldbooted card, inserted it and ejected it.
> 
> 
>   In brief, lspci reports changes but there are no changes in /proc/interrupts
> related to
> 
>   19:          0          0   IO-APIC-fasteoi   sata_sil24
> 
> 
> and no changes at all in /proc/iomem which I expected to happen during
> hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).
> 
> All the runtime_status data were same after every tested step, so again,
> no diffs to show but here are the values confirming laptop-mode-tools
> enabled powersaving:
> 
> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active

It appears that 1c.7 is identified successfully as an hotplug-able PCIe
port, and never put into suspended state.

And from your description below, it appears that hot-add and hot-remove
of the eSATA card works for you, doesn't it?

> /sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
> /sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
> /sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:suspended
> /sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active
> 
> 
>   So, the only diffs I could provide are from lspci -vvv. They show
> sata_sil24 was loaded that is confirmed by lsmod at the end of all
> tests.
> 
> --- lspci_vvv_initial.txt       2013-03-31 12:01:05.000000000 +0200
> +++ lspci_vvv_ejected.txt       2013-03-31 12:01:24.000000000 +0200
> @@ -293,7 +293,7 @@
>         I/O behind bridge: 0000c000-0000dfff
>         Memory behind bridge: f6c00000-f7cfffff
>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
> @@ -307,13 +307,13 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> -                       Changed: MRL- PresDet- LinkState-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> +                       Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> @@ -521,39 +521,7 @@
>                 AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       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: 64 bytes
> -       Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
> -       Region 4: I/O ports at c000 [size=128]
> -       Expansion ROM at f6c00000 [disabled] [size=512K]
> -       Capabilities: [54] 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=1 PME-
> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> -               Address: 0000000000000000  Data: 0000
> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> -                       ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
> -               DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> -                       RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
> -               DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
> -               LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> -                       ClockPM- Surprise- LLActRep- BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> -       Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
>         Kernel driver in use: sata_sil24
>  
> 
> The after a hotinsert I see:
> 
> --- lspci_vvv_ejected.txt       2013-03-31 12:01:24.000000000 +0200
> +++ lspci_vvv_ejected_and_reinserted.txt        2013-03-31 12:02:24.000000000 +0200
> @@ -307,12 +307,12 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
>                         Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
> @@ -521,7 +521,38 @@
>                 AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> -       !!! Unknown header type 7f
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> +       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> +       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-
> +       Interrupt: pin A routed to IRQ 19
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]
> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
> +       Capabilities: [54] 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=1 PME-
> +       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> +               Address: 0000000000000000  Data: 0000
> +       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> +               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> +                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> +                       ClockPM- Surprise- LLActRep- BwNot-
> +               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> +                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> +       Capabilities: [100 v1] Advanced Error Reporting
> +               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> +               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> +               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> +               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> +               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> +               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Kernel driver in use: sata_sil24
>  
> 
> 
> The last hotremoval caused:
> 
> --- lspci_vvv_ejected_and_reinserted.txt        2013-03-31 12:02:24.000000000 +0200
> +++ lspci_vvv_ejected_and_reinserted_ejected.txt        2013-03-31 12:03:16.000000000 +0200
> @@ -307,12 +307,12 @@
>                         ClockPM- Surprise- LLActRep+ BwNot-
>                 LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>                         ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
> +               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
>                 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
>                         Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
> -               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> +               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
>                         Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
> @@ -521,38 +521,7 @@
>                 AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
>         Capabilities: [150 v1] Device Serial Number 08-00-28-00-00-20-00-00
>  
> -11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
> -       Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       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-
> -       Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> -       Region 4: I/O ports at c000 [disabled] [size=128]
> -       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
> -       Capabilities: [54] 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=1 PME-
> -       Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
> -               Address: 0000000000000000  Data: 0000
> -       Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
> -               DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
> -                       ExtTag- AttnBtn- AttnInd- PwrInd- 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 x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
> -                       ClockPM- Surprise- LLActRep- BwNot-
> -               LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
> -                       ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> -               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> -       Capabilities: [100 v1] Advanced Error Reporting
> -               UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
> -               UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> -               UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> -               CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
> -               AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
> +11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
> +       !!! Unknown header type 7f
>         Kernel driver in use: sata_sil24
>  
> 
> 
> 
> 
> Maybe I should, unlike in most previous reports, show a diff between a colplugged state
> and the hotinserted states:
> 
> --- lspci_vvv_initial.txt       2013-03-31 12:01:05.000000000 +0200
> +++ lspci_vvv_ejected_and_reinserted.txt        2013-03-31 12:02:24.000000000 +0200
> @@ -293,7 +293,7 @@
>         I/O behind bridge: 0000c000-0000dfff
>         Memory behind bridge: f6c00000-f7cfffff
>         Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
> -       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
> +       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: [40] Express (v2) Root Port (Slot+), MSI 00
> @@ -313,7 +313,7 @@
>                 SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
>                         Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>                 SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
> -                       Changed: MRL- PresDet- LinkState-
> +                       Changed: MRL- PresDet- LinkState+
>                 RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
>                 RootCap: CRSVisible-
>                 RootSta: PME ReqID 0000, PMEStatus- PMEPending-
> @@ -523,14 +523,13 @@
>  
>  11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
>         Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
> -       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> +       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: 64 bytes
>         Interrupt: pin A routed to IRQ 19
> -       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
> -       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
> -       Region 4: I/O ports at c000 [size=128]
> -       Expansion ROM at f6c00000 [disabled] [size=512K]
> +       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
> +       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
> +       Region 4: I/O ports at c000 [disabled] [size=128]
> +       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
>         Capabilities: [54] 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=1 PME-
> @@ -541,7 +540,7 @@
>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
>                 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
> -                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
> +                       MaxPayload 128 bytes, MaxReadReq 512 bytes
>                 DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
>                 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
>                         ClockPM- Surprise- LLActRep- BwNot-
> 
> 
> 
> The comparison of the two hotremovals shows no diff.
> 
> I will provide the dmesg in a follow-up email.

Thanks!

> The acpidump you should have already received yesteday.

Yes.

Best Regards,
Huang Ying



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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-31 14:12                     ` Huang Ying
@ 2013-03-31 15:04                       ` Martin Mokrejs
  2013-04-01  7:33                         ` Huang Ying
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-31 15:04 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi Ying,
  
Huang Ying wrote:
> Hi, Martin,
> 
> Thanks for your testing!
> 
> On Sun, 2013-03-31 at 12:35 +0200, Martin Mokrejs wrote:
>> Hi Ying,
>>   I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
>> when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
>> enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
>> and kmemleaks.
>>   I removed the coldbooted card, inserted it and ejected it.
>>
>>
>>   In brief, lspci reports changes but there are no changes in /proc/interrupts
>> related to
>>
>>   19:          0          0   IO-APIC-fasteoi   sata_sil24
>>
>>
>> and no changes at all in /proc/iomem which I expected to happen during
>> hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).
>>
>> All the runtime_status data were same after every tested step, so again,
>> no diffs to show but here are the values confirming laptop-mode-tools
>> enabled powersaving:
>>
>> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
>> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
>> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
> 
> It appears that 1c.7 is identified successfully as an hotplug-able PCIe
> port, and never put into suspended state.

Yes. Truly said, after I now went to test your previous two patches
on the 3.9-rc1 I confirm that the syslog logging is broken with all your
three patches. I fear we are hitting here, with the pciehp problems
not a powersaving issue but an upstream /proc or /sys files being outdated.
Otherwise I can't figure out why disabling in runtime laptop-mode-tools
and doing the "find /sys .... | while ... echo "on" > $f" trickery
does not help to get pciehp working. This would have fixed the acpiphp
at least on 3.8 kernel. I see that sata_sil24 is not loaded by itself
during hotinsert. It seems lspci reports at such times 0xff for the 11:00
eSATA card, /etc/iomem reports stale memory regions used by 11:00 while
/proc/interrupts says no IRQ is assigned to sata_sil24 (well, sata_sil24
is not loaded per lsmod, lspci would should report sata_sil24 also but
provided the 11:00 entry is broken and shows the 0xff it maybe cannot
report is sata_sil24 is loaded).

I will post a little more details as a proper answer to your other patch
where I managed to get yet another stacktrace, about the eSATA thought to
be D3 state. Physically the card was ejected and just a modprobe sata_sil24
caused the sata_sil24 to use some outdated data. I will dive now into
that. 



> 
> And from your description below, it appears that hot-add and hot-remove
> of the eSATA card works for you, doesn't it?

The PresDet works fine I think, yes. Sometimes I see in the lspci -vvv diffs:

-Control: I/O+ ... BusMaster+
+Control: I/O- ... BusMaster-

and sometimes 

-        Latency: 0, Cache Line Size: 64 bytes
+        Latency: 0

or even the Latency: line being gone completely from lspci -vvv output. Why is that?
I think debug checks and prints in kernel are necessary.


How do these related to /proc/interrupts not showing an IRQ for the 11:00 device?
Does that prevent automated sata_sil24 loading once the card is inserted? Would
you please add some extra debug prints and checks into the kernel?

Take also into consideration the "3.8.2: stale pci device info for a previously inserted express card"
for a list of chimeric entries reported by lspci. That could tell you which values
are being cached and invalid. Hopefully some checks could be done between values
read by lspci and those in /proc and /sys.



Do you already know why almost nothing is logged by kernel wen either of your
three patches (v1 sent on 03/29/13 08:41, v2 sent on 03/29/13 09:20, v3 sent on
03/30/13 11:54)?


I did not test the xHCI port behavior with any of your three patches because I have
disabled USB support in this kernel altogether for 3.9-rc1 tests. And I would like to stick
with that until we fix the pciehp issue. I stepped rather late into the big testing game,
I believe the pciehp bug we are facing was not working since 3.5/3.6, I don't think
the 3.9-rc1-based tests be much different from earlier kernels.

For a broader view, on the 3.8 series we will meanwhile hopefully get to a fix of the
PME# stuff. I think I reported quite a good number of potential problems yesterday.
After that, I will check how xHCI behaves on 3.9 but I believe the PME#-related fix from
3.8 will be also applicable to fixing 3.9 so the xHCI won't have problems there anymore.


Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-29  8:20             ` Huang Ying
  2013-03-29 13:08               ` Martin Mokrejs
  2013-03-29 14:11               ` Martin Mokrejs
@ 2013-03-31 18:48               ` Martin Mokrejs
  2 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-31 18:48 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi Ying,
  I have re-tested your "second" patch from your email sent on 03/29/13 09:20.
Just to be sure. I returned back to the habit of doing 'rmmod sata_sil24' sometimes
in addition to the usual physical eject/insert of the eSATA card. It happened
to me that I got a new type of messages from the sata_sil24 ... which are interesting
and that is why I am writing this email. The last one, for the next days I wish.

I "complained" already that commonly to all your three patches, no messages
are logged by the kernel during hotinsert/hotremoval. Something just broke logging
in pci/pcieport.


At the pci level hot insert/eject looks working at least as PresDet says
in lspci. However, from dmesg(1) perspective removals and inserts seem
"unnoticed". Now, after I do rmmod sata_sil24 I got finally some messages
from the kernel:

# diff -u -w dmesg_initial.txt dmesg_ejected_inserted_ejected_rmmod_sata_sil24.txt 
--- dmesg_initial.txt   2013-03-31 15:58:08.000000000 +0200
+++ dmesg_ejected_inserted_ejected_rmmod_sata_sil24.txt 2013-03-31 16:00:57.000000000 +0200
@@ -818,3 +818,7 @@
 [   31.689134] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
 [   31.689397] microcode: CPU1 updated to revision 0x28, date = 2012-04-24
 [   31.689400] perf_event_intel: PEBS enabled due to microcode update
+[  237.198970] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  237.199120] pcieport 0000:00:1c.7: PME# enabled
+[  246.330463] pcieport 0000:00:1c.7: PME# disabled
+[  246.330587] pcieport 0000:00:1c.7: PME# enabled
#

To see the PME values add to the above lines bootup status:

# grep PME dmesg_initial.txt
[    1.569697] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    1.569722] pci 0000:00:16.0: PME# disabled
[    1.571837] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    1.571843] pci 0000:00:1a.0: PME# disabled
[    1.592505] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    1.592511] pci 0000:00:1b.0: PME# disabled
[    1.594505] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.594511] pci 0000:00:1c.0: PME# disabled
[    1.595886] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    1.595891] pci 0000:00:1c.1: PME# disabled
[    1.597321] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.597326] pci 0000:00:1c.3: PME# disabled
[    1.598827] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    1.598832] pci 0000:00:1c.4: PME# disabled
[    1.601708] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
[    1.601713] pci 0000:00:1c.7: PME# disabled
[    1.603625] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    1.603631] pci 0000:00:1d.0: PME# disabled
[    1.626526] pci 0000:00:1f.2: PME# supported from D3hot
[    1.626533] pci 0000:00:1f.2: PME# disabled
[    1.631221] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.631228] pci 0000:05:00.0: PME# disabled
[    1.634980] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
[    1.635032] pci 0000:09:00.0: PME# disabled
[    1.636915] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.636921] pci 0000:0b:00.0: PME# disabled
[   14.215072] pcieport 0000:00:1c.0: PME# enabled
[   14.233911] r8169 0000:05:00.0: PME# enabled
[   23.133946] r8169 0000:05:00.0: PME# disabled
#


Doh! I don't see 11:00 in the coldboot listing. Why nothing related to 11:00
is logged at all? The card was inserted during boot.
Comparing bootup dmesg files from an unpatched 3.9-rc1 to this patch I see
that your patch caused:

  rtc_cmos 00:04: RTC can wake from S4
+ rtc (null): alarm rollover: day
  rtc rtc0: rtc_cmos: dev (254:0)
  rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0
  rtc_cmos 00:04: alarms up to one month, y3k, 242 bytes nvram, hpet irqs

also the following reorderings happen due to your patch:

  iwlwifi 0000:09:00.0: RF_KILL bit toggled to disable radio.
  ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
  ata7: SATA link down (SStatus 0 SControl 0)
+ pcieport 0000:00:1c.0: PME# enabled
+ r8169 0000:05:00.0: PME# enabled
  [drm] Memory usable by graphics device = 2048M
  i915 0000:00:02.0: setting latency timer to 64
  i915 0000:00:02.0: irq 44 for MSI/MSI-X
@@ -791,8 +794,12 @@
  [drm] Wrong MCH_SSKPD value: 0x16040307
  [drm] This can cause pipe underruns and display issues.
  [drm] Please upgrade your BIOS to fix this.
- fbcon: inteldrmfb (fb0) is primary device
  ata8: SATA link down (SStatus 0 SControl 0)
+ fbcon: inteldrmfb (fb0) is primary device
+ r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
+ r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
+ r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
+ r8169 0000:05:00.0 eth0: rtl_phyar_cond == 1 (loop: 20, delay: 25).
  Console: switching to colour frame buffer device 170x48
  i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
  i915 0000:00:02.0: registered panic notifier
@@ -800,22 +807,14 @@
  ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
  input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input12
  [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
- r8169 0000:05:00.0: PME# enabled
- pcieport 0000:00:1c.0: PME# enabled
  [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
  EXT3-fs (sda5): using internal journal
  Adding 4998972k swap on /dev/sda6.  Priority:-1 extents:1 across:4998972k 
  r8169 0000:05:00.0: PME# disabled
  r8169 0000:05:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168e-2.fw (-2)
  r8169 0000:05:00.0 eth0: link down
- r8169 0000:05:00.0 eth0: link down
- r8169 0000:05:00.0 eth0: link up
- r8169 0000:05:00.0 eth0: link down
  microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x1b
  microcode: CPU0 updated to revision 0x28, date = 2012-04-24
  microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
  microcode: CPU1 updated to revision 0x28, date = 2012-04-24
  perf_event_intel: PEBS enabled due to microcode update
- r8169 0000:05:00.0 eth0: link up
- r8169 0000:05:00.0 eth0: link down
- r8169 0000:05:00.0 eth0: link up


I don't why is there the extra debug print on the rtl8169 device
bound to 05:00. Wasn't your patch aimed to change 1c.7 and 11:00
debug? ;-)





While still thinking of dmesg missing so far common log output it
would be nice if pci drivers reported the PME# disabled status of
the 11:00 device during cold boot. Likewise sata_sil24 could do it
in addition as well. Something is broken during cold boot already
in 3.9-rc1.

In my previous emails in many places you can find that the eSATA card
supports only D1 and D2. Somewhere at the end of this email you will
see once sata_sil24 complaining that the device was believed to be
in D3. I suspect the kernel thinks it is in D3 state after every
hot eject. Yet another bug?


lspci after the cold boot of patched 3.9-rc1 shows the following:

00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
        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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
        Kernel driver in use: pcieport


11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
        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: 64 bytes
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
        Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
        Region 4: I/O ports at c000 [size=128]
        Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
        Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 4096 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24


So, looks PME# is disabled for 11:00? Looking what runtime_status says:

# cat runtime_status_initial.txt 
/sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
/sys/bus/pci/devices/0000:00:1f.3/power/runtime_status:suspended
/sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active
#


The hotremoval of the cold booted eSATA card does not affect /proc/interrupts.
It still says that sata_sil24 is using IRQ 19. Wrong. Also /proc/iomem
is lying and reporting stale data:

# diff -u -w iomem_initial.txt iomem_ejected.txt 
# grep 11:00 iomem_ejected.txt 
    f6c00000-f6c7ffff : 0000:11:00.0
    f6c80000-f6c83fff : 0000:11:00.0
    f6c84000-f6c8407f : 0000:11:00.0
#

I believe it is nothing new but if anything is able to realize a hotremoval happened
under pciehp + your patch, then it is lspci. At least something is correct:

 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
-       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
+       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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
-               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
+               LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
-               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
+               SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
        Kernel driver in use: pcieport

[cut]
+11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
+       !!! Unknown header type 7f
        Kernel driver in use: sata_sil24


I have two ideas. The MAbort+ is preventing "kernel" to remove the PCI entry for the 11:00 device.
Second, the sata_sil24 cannot release and maybe due to that /proc/iomem and /proc/interrupts is
not updated?

A subsequent hotinsert does not clear the MAbort+ value although from the rest of lspci output
I would believe it worked fine (after the caching of /sys data fixed maybe we will realize that
also lspci does not report all value, now we just don't know what is cached and what is not,
that is not visible in chimeric lspci entries when two differnet cards were exchanged):

 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
       Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-


While the rest of the PCI detection works. I do not have an external drive available right now
to test but believe the 11:00 would have been functional despite the "Control: I/O- Mem- BusMaster-"
and "Latency: 0, Cache Line Size: 64 bytes" being gone altogether.


 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
-       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
+       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: 64 bytes
        Interrupt: pin A routed to IRQ 19
-       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
-       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
-       Region 4: I/O ports at c000 [size=128]
-       Expansion ROM at f6c00000 [disabled] [size=512K]
+       Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [disabled] [size=128]
+       Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [disabled] [size=16K]
+       Region 4: I/O ports at c000 [disabled] [size=128]
+       [virtual] Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
        Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
-                       MaxPayload 128 bytes, MaxReadReq 4096 bytes
+                       MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24

When I do rmmod sata_sil24 the stale 11:00 entry is removed. Notably, 1c.7 is
placed into PME#enabled, a D3 state (I will return to this later also):

 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
        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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
        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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
                SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
                        Changed: MRL- PresDet- LinkState+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
                Address: 00000000  Data: 0000
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
+               Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=0 PME-
        Kernel driver in use: pcieport

[cut]

 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
 

The rmmod cause finally something logged by kernel:

 [   31.688061] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x1b
 [   31.688576] microcode: CPU0 updated to revision 0x28, date = 2012-04-24
 [   31.689134] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x1b
 [   31.689397] microcode: CPU1 updated to revision 0x28, date = 2012-04-24
 [   31.689400] perf_event_intel: PEBS enabled due to microcode update
+[  237.198970] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  237.199120] pcieport 0000:00:1c.7: PME# enabled
+[  246.330463] pcieport 0000:00:1c.7: PME# disabled
+[  246.330587] pcieport 0000:00:1c.7: PME# enabled

The third PME# enabled is likely due to the laptop-mode-tools re-enabling the suspend?


It looks the sata_sil24 driver loading is wrong if upstream root port 1c.7
has disabled powersaving. Due to that, it does not bother to report what powersaving
states are suppported by the eSATA card?

 [  432.700796] pcieport 0000:00:1c.7: PME# disabled
+[  536.295010] sata_sil24 0000:11:00.0: version 1.1
+[  536.295027] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
+[  536.389064] sata_sil24 0000:11:00.0: failed to clear port RST
+[  536.489186] sata_sil24 0000:11:00.0: failed to clear port RST
+[  536.489207] sata_sil24 0000:11:00.0: enabling bus mastering
+[  536.492029] scsi8 : sata_sil24
+[  536.492701] scsi9 : sata_sil24
+[  536.493183] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
+[  536.493187] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
+[  536.599398] ata9: controller in dubious state, performing PORT_RST
+[  538.812110] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
+[  538.912214] ata10: controller in dubious state, performing PORT_RST
+[  541.124965] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)

The diff of runtime_status should show instead that 11:00 appear *newly* in the kernel,
not that it moved from supended state to active:

@@ -7,7 +7,7 @@
 /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
-/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:suspended
+/sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1d.0/power/runtime_status:suspended
 /sys/bus/pci/devices/0000:00:1f.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:00:1f.2/power/runtime_status:active
@@ -15,4 +15,4 @@
 /sys/bus/pci/devices/0000:05:00.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:09:00.0/power/runtime_status:active
 /sys/bus/pci/devices/0000:0b:00.0/power/runtime_status:suspended
-/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:suspended
+/sys/bus/pci/devices/0000:11:00.0/power/runtime_status:active

Because of that I believe around [  432.700796] was not associated change
about 11:00, but maybe that stems already since the bootup times that
no *initial* PME status was ever logged for 11:00. For sure we are hitting
here a bug due to cached /proc or /sys data.

This is bringing kernel into a more screwed state. Here, clearly, the hot removal
does not work under pciehp, lspci shows 0xff for 11:00 bogus entry sata_sil24
cannot release the device and therefore, /proc/interrupts and /proc/iomem
report stale data. Doing rmmod sata_sil24 works but it only clears one
of the three iomem ranges while it leaves those for 11:00 device.  That
is confirmed by lspci showing that just no driver is associated with the
bogus 11:00 device. It is 

/proc/iomem
@@ -44,9 +44,7 @@
   f6c00000-f7cfffff : PCI Bus 0000:11
     f6c00000-f6c7ffff : 0000:11:00.0
     f6c80000-f6c83fff : 0000:11:00.0
-      f6c80000-f6c83fff : sata_sil24
     f6c84000-f6c8407f : 0000:11:00.0
-      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0

lspci diff: 
 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev ff) (prog-if ff)
        !!! Unknown header type 7f
-       Kernel driver in use: sata_sil24
 

interrupts diff:
- 19:          0          0   IO-APIC-fasteoi   sata_sil24


The /proc/interrupts change caused by the rmmod sata_sil24 is interesting. It
shows that lspci failed to report that the bogus 11:00 entry with 0xff register
values had actually allocated IRQ 19. Or did we just get rid of cached /proc
value?


There is one more scenarion what happens if kernel believes per /proc/iomem
and /proc/interrupts that the eSATA card is inserted. Doing a modprobe sata_sil24
causes the driver to be loaded but it reveals other source of wrong input
values. Note: I already commented the [  432.700796] - [  623.588496] range above
but include it here so you can compare both unusual scenarios.


 [  432.700796] pcieport 0000:00:1c.7: PME# disabled
 [  536.295010] sata_sil24 0000:11:00.0: version 1.1
 [  536.295027] sata_sil24 0000:11:00.0: enabling device (0000 -> 0003)
 [  536.389064] sata_sil24 0000:11:00.0: failed to clear port RST
 [  536.489186] sata_sil24 0000:11:00.0: failed to clear port RST
 [  536.489207] sata_sil24 0000:11:00.0: enabling bus mastering
 [  536.492029] scsi8 : sata_sil24
 [  536.492701] scsi9 : sata_sil24
 [  536.493183] ata9: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
 [  536.493187] ata10: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
 [  536.599398] ata9: controller in dubious state, performing PORT_RST
 [  538.812110] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
 [  538.912214] ata10: controller in dubious state, performing PORT_RST
 [  541.124965] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
 [  623.588496] sata_sil24: IRQ status == 0xffffffff, PCI fault or device removal?
+[  685.684189] pcieport 0000:00:1c.0: PME# disabled
+[  689.884813] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)  <- I believe the i2c_801 issue
+[  939.557549] pcieport 0000:00:1c.0: PME# enabled
+[  939.575079] pcieport 0000:00:1c.7: PME# enabled
+[  974.021661] pcieport 0000:00:1c.0: PME# disabled
+[  974.041697] pcieport 0000:00:1c.7: PME# disabled
+[ 1048.450168] sata_sil24 0000:11:00.0: version 1.1
+[ 1048.463692] sata_sil24 0000:11:00.0: Refused to change power state, currently in D3
+[ 1048.563818] sata_sil24 0000:11:00.0: failed to clear port RST
+[ 1048.663935] sata_sil24 0000:11:00.0: failed to clear port RST
+[ 1048.666779] scsi10 : sata_sil24
+[ 1048.667394] scsi11 : sata_sil24
+[ 1048.667900] ata11: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c80000 irq 19
+[ 1048.667902] ata12: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
+[ 1048.764083] ata11: controller in dubious state, performing PORT_RST
+[ 1050.976850] ata11: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
+[ 1051.076943] ata12: controller in dubious state, performing PORT_RST
+[ 1053.289699] ata12: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)


Provided the eSATA card does not support D3 I wonder whether sata_sil24 reports
the status of the root port 1c.7 by mistake or whether it really reports bad
values deemed about 11:00 itself. What happens in pci/pcieport driver if a device
does not report supported powersaving states? Usually, the sata_sil24 reports
"pci 0000:11:00.0: supports D1 D2" and I just miss anything similar to this line
in the abobve dmesg outputs.


The driver during [ 1048.450168] - [ 1053.289699] received IRQ 19 as usually
(there was a diff in /proc/interrupts).
In contrary, because /proc/iomem claimed 11:00 device was before the modprobe already
in the system the only iomem change actually visible was that the driver associated
with the memory ranges:

013-03-31 16:18:09.000000000 +0200
@@ -1,86 +1,88 @@
 00000000-00000fff : reserved
 00001000-0009d3ff : System RAM
 0009d400-0009ffff : reserved
 000a0000-000bffff : PCI Bus 0000:00
 000c0000-000cedff : Video ROM
 000cf000-000cffff : Adapter ROM
 000d0000-000d3fff : PCI Bus 0000:00
 000d4000-000d7fff : PCI Bus 0000:00
 000d8000-000dbfff : PCI Bus 0000:00
 000dc000-000dffff : PCI Bus 0000:00
 000e0000-000fffff : reserved
   000e0000-000e3fff : PCI Bus 0000:00
   000e4000-000e7fff : PCI Bus 0000:00
   000f0000-000fffff : System ROM
 00100000-1fffffff : System RAM
   01000000-015e40c9 : Kernel code
   015e40ca-019b0d7f : Kernel data
   01aaa000-02571fff : Kernel bss
 20000000-201fffff : reserved
   20000000-201fffff : pnp 00:0c
 20200000-3fffffff : System RAM
 40000000-401fffff : reserved
   40000000-401fffff : pnp 00:0c
 40200000-da4e4fff : System RAM
 da4e5000-da527fff : ACPI Non-volatile Storage
 da528000-da792fff : System RAM
 da793000-da966fff : reserved
 da967000-daa88fff : System RAM
 daa89000-dad67fff : reserved
 dad68000-dafe7fff : ACPI Non-volatile Storage
 dafe8000-daffffff : ACPI Tables
 db000000-db7fffff : RAM buffer
 db800000-df9fffff : reserved
 dfa00000-feafffff : PCI Bus 0000:00
   dfa00000-dfa00fff : pnp 00:0a
   e0000000-efffffff : 0000:00:02.0
   f0000000-f10fffff : PCI Bus 0000:11
   f1100000-f11fffff : PCI Bus 0000:05
     f1100000-f1103fff : 0000:05:00.0
       f1100000-f1103fff : r8169
     f1104000-f1104fff : 0000:05:00.0
       f1104000-f1104fff : r8169
   f6800000-f6bfffff : 0000:00:02.0
   f6c00000-f7cfffff : PCI Bus 0000:11
     f6c00000-f6c7ffff : 0000:11:00.0
     f6c80000-f6c83fff : 0000:11:00.0
+      f6c80000-f6c83fff : sata_sil24
     f6c84000-f6c8407f : 0000:11:00.0
+      f6c84000-f6c8407f : sata_sil24
   f7d00000-f7dfffff : PCI Bus 0000:0b
     f7d00000-f7d0ffff : 0000:0b:00.0
     f7d10000-f7d11fff : 0000:0b:00.0
   f7e00000-f7efffff : PCI Bus 0000:09
     f7e00000-f7e01fff : 0000:09:00.0
       f7e00000-f7e01fff : iwlwifi
   f7f00000-f7f03fff : 0000:00:1b.0
     f7f00000-f7f03fff : ICH HD audio
   f7f05000-f7f050ff : 0000:00:1f.3
   f7f06000-f7f067ff : 0000:00:1f.2
     f7f06000-f7f067ff : ahci
   f7f07000-f7f073ff : 0000:00:1d.0
   f7f08000-f7f083ff : 0000:00:1a.0
   f7f0a000-f7f0a00f : 0000:00:16.0
   f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
     f8000000-fbffffff : reserved
       f8000000-fbffffff : pnp 00:0a
   fe800000-fe802fff : pnp 00:07
 fec00000-fec00fff : reserved
   fec00000-fec003ff : IOAPIC 0
 fed00000-fed03fff : reserved
   fed00000-fed003ff : HPET 0
 fed10000-fed17fff : pnp 00:0a
 fed18000-fed18fff : pnp 00:0a
 fed19000-fed19fff : pnp 00:0a
 fed1c000-fed1ffff : reserved
   fed1c000-fed1ffff : pnp 00:0a
     fed1f410-fed1f414 : iTCO_wdt
       fed1f410-fed1f414 : iTCO_wdt
 fed20000-fed3ffff : pnp 00:0a
 fed40000-fed44fff : PCI Bus 0000:00
 fed45000-fed8ffff : pnp 00:0a
 fed90000-fed93fff : pnp 00:0a
 fee00000-fee00fff : Local APIC
   fee00000-fee00fff : reserved
 ff000000-ffffffff : reserved
   ff000000-ffffffff : pnp 00:0a
 100000000-41fdfffff : System RAM
 41fe00000-41fffffff : RAM buffer


I don't know about you but I am quite depressed by the number of weird issues
I hit here and there. However, I believe if nothing else, you can come up with
one, aggregate debug patch which will help to study any of the so far spotted
issues. I prefer a patch for 3.9-rc1. The patch should cope with the PME# issues
to be usable for acpiphp and xHCI "dead" port tests on 3.8.x (and likely 3.9).
Take your time.

I am looking forward to your answers, anyway,
Martin


Huang Ying wrote:
> On Thu, 2013-03-28 at 19:38 +0100, Martin Mokrejs wrote:
>> Hi Ying,
>>   would you please tell me how this report relate to this patch?
>>
>> [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
>>
>>   Could you tell me why this PME was being flipped back and forth now?
>> Actually, does that make finally some sense to you, pci/acpi devs?
>>
>>
>>   Does is help to say that on the SandyBridge chip I have the following root ports
>> hooked to the following end devices?:
>>
>> 1.c1 -> rtl8169 05:00.0
>> 1.c3 -> iwlwifi 09:00.0
>> 1.c4 -> xhci_hcd 0b:00.0
>> 1.c7 -> 00:11: express card slot
>>
>>
>>   Why didn't I see interleraved lines with 1.c7 *and* 00:11? See the interleaving
>> happening with the network card on 3.7.10 kernel (not broken kernel):
>>
>> [138268.870070] r8169 0000:05:00.0 eth0: link down
>> [138270.809811] r8169 0000:05:00.0 eth0: link up
>> [138365.599744] r8169 0000:05:00.0 eth0: link down
>> [138370.594343] r8169 0000:05:00.0: PME# enabled
>> [138370.623852] pcieport 0000:00:1c.1: PME# enabled
>> [169885.247386] pcieport 0000:00:1c.1: PME# disabled
>> [169885.267374] r8169 0000:05:00.0: PME# disabled
>> [169885.330160] r8169 0000:05:00.0 eth0: link down
>> [169886.992531] r8169 0000:05:00.0 eth0: link up
>> [169904.405769] r8169 0000:05:00.0 eth0: link down
>> [169909.401237] r8169 0000:05:00.0: PME# enabled
>> [169909.430782] pcieport 0000:00:1c.1: PME# enabled
>> [170090.538980] pcieport 0000:00:1c.1: PME# disabled
>> [170090.559088] r8169 0000:05:00.0: PME# disabled
>> [170090.640494] r8169 0000:05:00.0: PME# enabled
>> [170090.678425] pcieport 0000:00:1c.1: PME# enabled
>> [170090.829959] pcieport 0000:00:1c.1: PME# disabled
>> [170090.848479] r8169 0000:05:00.0: PME# disabled
>> [170090.892011] r8169 0000:05:00.0 eth0: link down
>> [170090.892134] r8169 0000:05:00.0 eth0: link down
>> [170090.930998] r8169 0000:05:00.0 eth0: link down
>> [170092.554553] r8169 0000:05:00.0 eth0: link up
> 
> I don't know exactly.  Can you give me the follow output?
> 
> grep . /sys/bus/pci/devices/*/power/control
> grep . /sys/bus/pci/devices/*/power/runtime_status
> 
> And can you try the following patch?
> 
> Best Regards,
> Huang Ying
> 
> -------------------------->
> 
> ---
>  drivers/pci/hotplug/pci_hotplug_core.c |    6 ++++++
>  drivers/pci/pcie/portdrv_pci.c         |    8 +++++---
>  drivers/pci/slot.c                     |   18 ++++++++++++++++++
>  include/linux/pci.h                    |    1 +
>  4 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
> index 202f4a9..7d4cf1a 100644
> --- a/drivers/pci/hotplug/pci_hotplug_core.c
> +++ b/drivers/pci/hotplug/pci_hotplug_core.c
> @@ -39,6 +39,7 @@
>  #include <linux/mutex.h>
>  #include <linux/pci.h>
>  #include <linux/pci_hotplug.h>
> +#include <linux/pm_runtime.h>
>  #include <asm/uaccess.h>
>  #include "../pci.h"
>  
> @@ -473,6 +474,8 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
>  	dbg("Added slot %s to the list\n", name);
>  out:
>  	mutex_unlock(&pci_hp_mutex);
> +	/* Bridge runtime PM state may be influenced by hotplug */
> +	pm_runtime_resume(&bus->self->dev);
>  	return result;
>  }
>  
> @@ -489,6 +492,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
>  {
>  	struct hotplug_slot *temp;
>  	struct pci_slot *slot;
> +	struct pci_bus *bus;
>  
>  	if (!hotplug)
>  		return -ENODEV;
> @@ -508,8 +512,10 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)
>  
>  	hotplug->release(hotplug);
>  	slot->hotplug = NULL;
> +	bus = slot->bus;
>  	pci_destroy_slot(slot);
>  	mutex_unlock(&pci_hp_mutex);
> +	pm_runtime_resume(&bus->self->dev);
>  
>  	return 0;
>  }
> diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
> index 08c243a..beb9c90 100644
> --- a/drivers/pci/pcie/portdrv_pci.c
> +++ b/drivers/pci/pcie/portdrv_pci.c
> @@ -154,9 +154,11 @@ static int pcie_port_runtime_idle(struct device *dev)
>  	 */
>  	pci_walk_bus(pdev->subordinate, pci_dev_pme_poll, &pme_poll);
>  	/* Delay for a short while to prevent too frequent suspend/resume */
> -	if (!pme_poll)
> -		pm_schedule_suspend(dev, 10);
> -	return -EBUSY;
> +	if (pme_poll)
> +		return -EBUSY;
> +	if (pci_bus_has_hotplug_slots(pdev->subordinate))
> +		return -EBUSY;
> +	return pm_schedule_suspend(dev, 10);
>  }
>  #else
>  #define pcie_port_runtime_suspend	NULL
> diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
> index ac6412f..10b275b 100644
> --- a/drivers/pci/slot.c
> +++ b/drivers/pci/slot.c
> @@ -345,6 +345,24 @@ out:
>  }
>  EXPORT_SYMBOL_GPL(pci_renumber_slot);
>  
> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus)
> +{
> +	struct pci_slot *slot;
> +	bool has_hotplug_slots = false;
> +
> +	down_read(&pci_bus_sem);
> +	list_for_each_entry(slot, &bus->slots, list) {
> +		if (slot->hotplug) {
> +			has_hotplug_slots = true;
> +			break;
> +		}
> +	}
> +	up_read(&pci_bus_sem);
> +
> +	return has_hotplug_slots;
> +}
> +EXPORT_SYMBOL_GPL(pci_bus_has_hotplug_slots);
> +
>  /**
>   * pci_destroy_slot - decrement refcount for physical PCI slot
>   * @slot: struct pci_slot to decrement
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 2461033a..0d0cc94 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -722,6 +722,7 @@ struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
>  void pci_destroy_slot(struct pci_slot *slot);
>  void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
>  int pci_scan_slot(struct pci_bus *bus, int devfn);
> +bool pci_bus_has_hotplug_slots(struct pci_bus *bus);
>  struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
>  void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
>  unsigned int pci_scan_child_bus(struct pci_bus *bus);
> 
> 
> 

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
       [not found]                     ` <515813CB.8020001@fold.natur.cuni.cz>
@ 2013-03-31 23:17                       ` Martin Mokrejs
  2013-04-01  0:14                         ` Rafael J. Wysocki
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-03-31 23:17 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki,
	Yinghai Lu, Len Brown

[ also +Len Brown -- would you please comment what the ACPI-related bug in BIOS
 could be causing? Should be the message be logged also under 3.8.3? It does
 NOT happen! ]

Hi Ying,
  I see the linux-pci throwed away the email dmesg and lspci attached.
For the sake of archives I am including here some ACPI-related stuff.

Martin Mokrejs wrote:
> Attaching the dmesg file from after all the tests. Effectively it covers
> only bootup messages but there is one of your debug messages:
> 
> [   15.941468] pcieport 0000:00:1c.0: ppri: will go suspend, is_hotplug_bridge: 0.
> 
> I am also attaching the full lspci -vvv output captured after the cold boot.
> I should have used 'diff -u50' to sow broader regions around the changes
> to make it clearer the diffs were all about 1c.7 and 11:00 only. From the
> full file you can get offset line numbers yourself to double check if necessary.

Am I right that your patches aimed to yield
'System wakeup disabled by ACPI' for all pci devices? Somehow, that did NOT happen
for 11:00, the card in the express card slot (it was inserted before cold boot).

[    1.590952] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    1.593046] pci 0000:00:1b.0: System wakeup disabled by ACPI
[    1.594430] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    1.595855] pci 0000:00:1c.1: System wakeup disabled by ACPI
[    1.597369] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    1.598917] pci 0000:00:1c.4: System wakeup disabled by ACPI
[    1.602131] pci 0000:00:1c.7: System wakeup disabled by ACPI
[    1.624166] pci 0000:00:1d.0: System wakeup disabled by ACPI
[    1.630725] pci 0000:05:00.0: System wakeup disabled by ACPI
[    1.634536] pci 0000:09:00.0: System wakeup disabled by ACPI
[    1.636221] pci 0000:0b:00.0: System wakeup disabled by ACPI

This "issue" looks common to all your three patches.



Also, notably, there is on patched 3.9-rc1:

[    0.926322] ACPI: Added _OSI(Module Device)
[    0.926424] ACPI: Added _OSI(Processor Device)
[    0.926523] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.926625] ACPI: Added _OSI(Processor Aggregator Device)
[    0.932346] ACPI: EC: Look up EC in DSDT
[    0.942636] ACPI: Executed 1 blocks of module-level executable AML code
[    1.034418] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    1.088331] ACPI: SSDT 00000000dad51698 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.091493] ACPI: Dynamic OEM Table Load:
[    1.091496] ACPI: SSDT           (null) 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.123506] ACPI: SSDT 00000000dad52a98 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.128317] ACPI: Dynamic OEM Table Load:
[    1.128319] ACPI: SSDT           (null) 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.158678] ACPI: SSDT 00000000dad50d98 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.161258] ACPI: Dynamic OEM Table Load:
[    1.161260] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.190627] ACPI: Interpreter enabled
[    1.190722] ACPI: (supports S0 S1ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
[    1.191110]  S3 S4 S5)
[    1.191195] ACPI: Using IOAPIC for interrupt routing
[    1.191763] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.519009] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    1.526115] acpi PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x19)


while 3.8.3 used to give:

[    1.057812] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    1.125133] ACPI: SSDT 00000000dad51698 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.128452] ACPI: Dynamic OEM Table Load:
[    1.128455] ACPI: SSDT           (null) 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.165751] ACPI: SSDT 00000000dad52a98 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.170762] ACPI: Dynamic OEM Table Load:
[    1.170764] ACPI: SSDT           (null) 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.210483] ACPI: SSDT 00000000dad50d98 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.213195] ACPI: Dynamic OEM Table Load:
[    1.213198] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.251508] ACPI: Interpreter enabled
[    1.251603] ACPI: (supports S0 S1 S3 S4 S5)
[    1.252290] ACPI: Using IOAPIC for interrupt routing
[    1.530836] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.539002] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    1.539115] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    1.552100] pci_root PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x19)

According to Google looks like the 'ACPI Exception: AE_NOT_FOUND' is pointing to a buggy BIOS
(this is Dell Vostro 3550, A11 BIOS version).
Looks 3.8 series just does not have new enough ACPI to print out the message to the user
doesn't it happen there? What is affected by the BIOS bug? :(




Piece of dmesg from your third patch (containing those 'ppri' debug prints) covering the ACPI
messages.

[    0.362558] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[    0.362706] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[    0.370241] PCI: Using configuration type 1 for base access
[    0.418113] bio: create slab <bio-0> at 0
[    0.585719] raid6: sse2x1    7608 MB/s
[    0.755953] raid6: sse2x2    9349 MB/s
[    0.926188] raid6: sse2x4   10667 MB/s
[    0.926190] raid6: using algorithm sse2x4 (10667 MB/s)
[    0.926191] raid6: using ssse3x2 recovery algorithm
[    0.926322] ACPI: Added _OSI(Module Device)
[    0.926424] ACPI: Added _OSI(Processor Device)
[    0.926523] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.926625] ACPI: Added _OSI(Processor Aggregator Device)
[    0.932346] ACPI: EC: Look up EC in DSDT
[    0.942636] ACPI: Executed 1 blocks of module-level executable AML code
[    1.034418] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    1.088331] ACPI: SSDT 00000000dad51698 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.091493] ACPI: Dynamic OEM Table Load:
[    1.091496] ACPI: SSDT           (null) 0064F (v01  PmRef  Cpu0Cst 00003001 INTL 20051117)
[    1.123506] ACPI: SSDT 00000000dad52a98 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.128317] ACPI: Dynamic OEM Table Load:
[    1.128319] ACPI: SSDT           (null) 00303 (v01  PmRef    ApIst 00003000 INTL 20051117)
[    1.158678] ACPI: SSDT 00000000dad50d98 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.161258] ACPI: Dynamic OEM Table Load:
[    1.161260] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20051117)
[    1.190627] ACPI: Interpreter enabled
[    1.190722] ACPI: (supports S0 S1ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)
[    1.191110]  S3 S4 S5)
[    1.191195] ACPI: Using IOAPIC for interrupt routing
[    1.191763] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.519009] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    1.526115] acpi PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x19)
[    1.542922] PCI host bridge to bus 0000:00
[    1.543024] pci_bus 0000:00: root bus resource [bus 00-3e]
[    1.543126] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    1.543227] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    1.543329] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    1.543432] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff]
[    1.543534] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff]
[    1.543636] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff]
[    1.543738] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff]
[    1.543841] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff]
[    1.543943] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff]
[    1.544045] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff]
[    1.544148] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff]
[    1.544251] pci_bus 0000:00: scanning bus
[    1.544290] pci 0000:00:00.0: [8086:0104] type 00 class 0x060000
[    1.544298] pci 0000:00:00.0: calling quirk_mmio_always_on+0x0/0xa
[    1.546226] pci 0000:00:02.0: [8086:0126] type 00 class 0x030000
[    1.546242] pci 0000:00:02.0: reg 10: [mem 0xf6800000-0xf6bfffff 64bit]
[    1.546251] pci 0000:00:02.0: reg 18: [mem 0xe0000000-0xefffffff 64bit pref]
[    1.546257] pci 0000:00:02.0: reg 20: [io  0xf000-0xf03f]
[    1.548073] pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000
[    1.548113] pci 0000:00:16.0: reg 10: [mem 0xf7f0a000-0xf7f0a00f 64bit]
[    1.548243] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    1.548269] pci 0000:00:16.0: PME# disabled
[    1.550203] pci 0000:00:1a.0: [8086:1c2d] type 00 class 0x0c0320
[    1.550239] pci 0000:00:1a.0: reg 10: [mem 0xf7f08000-0xf7f083ff]
[    1.550395] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    1.550401] pci 0000:00:1a.0: PME# disabled
[    1.569774] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    1.570451] pci 0000:00:1b.0: [8086:1c20] type 00 class 0x040300
[    1.570481] pci 0000:00:1b.0: reg 10: [mem 0xf7f00000-0xf7f03fff 64bit]
[    1.570627] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    1.570633] pci 0000:00:1b.0: PME# disabled
[    1.571885] pci 0000:00:1b.0: System wakeup disabled by ACPI
[    1.572487] pci 0000:00:1c.0: [8086:1c10] type 01 class 0x060400
[    1.572559] pci 0000:00:1c.0: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.572645] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.572651] pci 0000:00:1c.0: PME# disabled
[    1.573280] pci 0000:00:1c.0: System wakeup disabled by ACPI
[    1.573868] pci 0000:00:1c.1: [8086:1c12] type 01 class 0x060400
[    1.573938] pci 0000:00:1c.1: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.574024] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    1.574030] pci 0000:00:1c.1: PME# disabled
[    1.574701] pci 0000:00:1c.1: System wakeup disabled by ACPI
[    1.575303] pci 0000:00:1c.3: [8086:1c16] type 01 class 0x060400
[    1.575374] pci 0000:00:1c.3: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.575460] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.575465] pci 0000:00:1c.3: PME# disabled
[    1.576220] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    1.576821] pci 0000:00:1c.4: [8086:1c18] type 01 class 0x060400
[    1.576891] pci 0000:00:1c.4: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.576975] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    1.576981] pci 0000:00:1c.4: PME# disabled
[    1.577772] pci 0000:00:1c.4: System wakeup disabled by ACPI
[    1.579703] pci 0000:00:1c.7: [8086:1c1e] type 01 class 0x060400
[    1.579773] pci 0000:00:1c.7: calling pci_fixup_transparent_bridge+0x0/0x1d
[    1.579856] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
[    1.579862] pci 0000:00:1c.7: PME# disabled
[    1.580992] pci 0000:00:1c.7: System wakeup disabled by ACPI
[    1.581590] pci 0000:00:1d.0: [8086:1c26] type 00 class 0x0c0320
[    1.581625] pci 0000:00:1d.0: reg 10: [mem 0xf7f07000-0xf7f073ff]
[    1.581782] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    1.581788] pci 0000:00:1d.0: PME# disabled
[    1.603022] pci 0000:00:1d.0: System wakeup disabled by ACPI
[    1.603663] pci 0000:00:1f.0: [8086:1c4b] type 00 class 0x060100
[    1.604394] pci 0000:00:1f.2: [8086:1c03] type 00 class 0x010601
[    1.604433] pci 0000:00:1f.2: reg 10: [io  0xf0b0-0xf0b7]
[    1.604448] pci 0000:00:1f.2: reg 14: [io  0xf0a0-0xf0a3]
[    1.604462] pci 0000:00:1f.2: reg 18: [io  0xf090-0xf097]
[    1.604476] pci 0000:00:1f.2: reg 1c: [io  0xf080-0xf083]
[    1.604491] pci 0000:00:1f.2: reg 20: [io  0xf060-0xf07f]
[    1.604507] pci 0000:00:1f.2: reg 24: [mem 0xf7f06000-0xf7f067ff]
[    1.604605] pci 0000:00:1f.2: PME# supported from D3hot
[    1.604612] pci 0000:00:1f.2: PME# disabled
[    1.606249] pci 0000:00:1f.3: [8086:1c22] type 00 class 0x0c0500
[    1.606278] pci 0000:00:1f.3: reg 10: [mem 0xf7f05000-0xf7f050ff 64bit]
[    1.606320] pci 0000:00:1f.3: reg 20: [io  0xf040-0xf05f]
[    1.607978] pci_bus 0000:00: fixups for bus
[    1.607983] pci 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 0
[    1.608424] pci_bus 0000:03: scanning bus
[    1.608427] pci_bus 0000:03: fixups for bus
[    1.608429] pci 0000:00:1c.0: PCI bridge to [bus 03-04]
[    1.608537] pci_bus 0000:03: bus scan returning with max=03
[    1.608543] pci 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 0
[    1.608980] pci_bus 0000:05: scanning bus
[    1.609031] pci 0000:05:00.0: [10ec:8168] type 00 class 0x020000
[    1.609059] pci 0000:05:00.0: reg 10: [io  0xe000-0xe0ff]
[    1.609108] pci 0000:05:00.0: reg 18: [mem 0xf1104000-0xf1104fff 64bit pref]
[    1.609138] pci 0000:05:00.0: reg 20: [mem 0xf1100000-0xf1103fff 64bit pref]
[    1.609278] pci 0000:05:00.0: supports D1 D2
[    1.609279] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.609286] pci 0000:05:00.0: PME# disabled
[    1.609558] pci 0000:05:00.0: System wakeup disabled by ACPI
[    1.610158] pci_bus 0000:05: fixups for bus
[    1.610160] pci 0000:00:1c.1: PCI bridge to [bus 05-06]
[    1.610257] pci 0000:00:1c.1:   bridge window [io  0xe000-0xefff]
[    1.610271] pci 0000:00:1c.1:   bridge window [mem 0xf1100000-0xf11fffff 64bit pref]
[    1.610272] pci_bus 0000:05: bus scan returning with max=05
[    1.610279] pci 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 0
[    1.610711] pci_bus 0000:09: scanning bus
[    1.610993] pci 0000:09:00.0: [8086:008a] type 00 class 0x028000
[    1.611296] pci 0000:09:00.0: reg 10: [mem 0xf7e00000-0xf7e01fff 64bit]
[    1.612984] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold
[    1.613035] pci 0000:09:00.0: PME# disabled
[    1.613422] pci 0000:09:00.0: System wakeup disabled by ACPI
[    1.614008] pci_bus 0000:09: fixups for bus
[    1.614010] pci 0000:00:1c.3: PCI bridge to [bus 09-0a]
[    1.614112] pci 0000:00:1c.3:   bridge window [mem 0xf7e00000-0xf7efffff]
[    1.614121] pci_bus 0000:09: bus scan returning with max=09
[    1.614127] pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 0
[    1.614556] pci_bus 0000:0b: scanning bus
[    1.614613] pci 0000:0b:00.0: [104c:8241] type 00 class 0x0c0330
[    1.614650] pci 0000:0b:00.0: reg 10: [mem 0xf7d00000-0xf7d0ffff 64bit]
[    1.614678] pci 0000:0b:00.0: reg 18: [mem 0xf7d10000-0xf7d11fff 64bit]
[    1.614842] pci 0000:0b:00.0: supports D1 D2
[    1.614844] pci 0000:0b:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.614851] pci 0000:0b:00.0: PME# disabled
[    1.615100] pci 0000:0b:00.0: System wakeup disabled by ACPI
[    1.615692] pci_bus 0000:0b: fixups for bus
[    1.615693] pci 0000:00:1c.4: PCI bridge to [bus 0b-0c]
[    1.615795] pci 0000:00:1c.4:   bridge window [mem 0xf7d00000-0xf7dfffff]
[    1.615804] pci_bus 0000:0b: bus scan returning with max=0b
[    1.615810] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 0
[    1.616238] pci_bus 0000:11: scanning bus
[    1.616292] pci 0000:11:00.0: [1095:3132] type 00 class 0x018000
[    1.616334] pci 0000:11:00.0: reg 10: [mem 0xf6c84000-0xf6c8407f 64bit]
[    1.616367] pci 0000:11:00.0: reg 18: [mem 0xf6c80000-0xf6c83fff 64bit]
[    1.616389] pci 0000:11:00.0: reg 20: [io  0xc000-0xc07f]
[    1.616431] pci 0000:11:00.0: reg 30: [mem 0xf6c00000-0xf6c7ffff pref]
[    1.616546] pci 0000:11:00.0: supports D1 D2
[    1.617192] pci_bus 0000:11: fixups for bus
[    1.617193] pci 0000:00:1c.7: PCI bridge to [bus 11-16]
[    1.617292] pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
[    1.617297] pci 0000:00:1c.7:   bridge window [mem 0xf6c00000-0xf7cfffff]
[    1.617307] pci 0000:00:1c.7:   bridge window [mem 0xf0000000-0xf10fffff 64bit pref]
[    1.617308] pci_bus 0000:11: bus scan returning with max=11
[    1.617314] pci 0000:00:1c.0: scanning [bus 03-04] behind bridge, pass 1
[    1.617324] pci 0000:00:1c.1: scanning [bus 05-06] behind bridge, pass 1
[    1.617333] pci 0000:00:1c.3: scanning [bus 09-0a] behind bridge, pass 1
[    1.617342] pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
[    1.617351] pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
[    1.617358] pci_bus 0000:00: bus scan returning with max=16
[    1.617359] ACPI _OSC control for PCIe not granted, disabling ASPM
[    1.624464] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.626424] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.628384] ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 10 11 12 14 15)
[    1.630341] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.632286] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.634296] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    1.636320] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.638286] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 *5 6 10 11 12 14 15)
[    1.641066] ACPI: Enabled 4 GPEs in block 00 to 3F
[    1.641085] acpi root: \_SB_.PCI0 notify handler is installed
[    1.641253] Found 1 acpi root devices


You see, the 11:00 does not say: 'System wakeup disabled by ACPI'?

Len, if you wat to get acpidump and full dmesg I can send it to you directly. Custom
DSDT?



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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-31 23:17                       ` Martin Mokrejs
@ 2013-04-01  0:14                         ` Rafael J. Wysocki
  2013-04-01 12:06                           ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2013-04-01  0:14 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu, Len Brown

On Monday, April 01, 2013 01:17:20 AM Martin Mokrejs wrote:
> [ also +Len Brown -- would you please comment what the ACPI-related bug in BIOS
>  could be causing? Should be the message be logged also under 3.8.3? It does
>  NOT happen! ]

What BIOS bug are you talking about?

Man, it is *so* *hard* to find useful information in your posting.  Can you
please try to be less chaotic?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-03-31 15:04                       ` Martin Mokrejs
@ 2013-04-01  7:33                         ` Huang Ying
  2013-04-01 17:23                           ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Huang Ying @ 2013-04-01  7:33 UTC (permalink / raw)
  To: Martin Mokrejs
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

On Sun, 2013-03-31 at 17:04 +0200, Martin Mokrejs wrote:
> Hi Ying,
>   
> Huang Ying wrote:
> > Hi, Martin,
> > 
> > Thanks for your testing!
> > 
> > On Sun, 2013-03-31 at 12:35 +0200, Martin Mokrejs wrote:
> >> Hi Ying,
> >>   I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
> >> when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
> >> enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
> >> and kmemleaks.
> >>   I removed the coldbooted card, inserted it and ejected it.
> >>
> >>
> >>   In brief, lspci reports changes but there are no changes in /proc/interrupts
> >> related to
> >>
> >>   19:          0          0   IO-APIC-fasteoi   sata_sil24
> >>
> >>
> >> and no changes at all in /proc/iomem which I expected to happen during
> >> hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).
> >>
> >> All the runtime_status data were same after every tested step, so again,
> >> no diffs to show but here are the values confirming laptop-mode-tools
> >> enabled powersaving:
> >>
> >> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
> >> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
> >> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
> >> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
> >> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
> >> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
> >> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
> >> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
> >> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
> >> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
> > 
> > It appears that 1c.7 is identified successfully as an hotplug-able PCIe
> > port, and never put into suspended state.
> 
> Yes. Truly said, after I now went to test your previous two patches
> on the 3.9-rc1 I confirm that the syslog logging is broken with all your
> three patches. I fear we are hitting here, with the pciehp problems
> not a powersaving issue but an upstream /proc or /sys files being outdated.
> Otherwise I can't figure out why disabling in runtime laptop-mode-tools
> and doing the "find /sys .... | while ... echo "on" > $f" trickery
> does not help to get pciehp working. This would have fixed the acpiphp
> at least on 3.8 kernel. I see that sata_sil24 is not loaded by itself
> during hotinsert. It seems lspci reports at such times 0xff for the 11:00
> eSATA card, /etc/iomem reports stale memory regions used by 11:00 while
> /proc/interrupts says no IRQ is assigned to sata_sil24 (well, sata_sil24
> is not loaded per lsmod, lspci would should report sata_sil24 also but
> provided the 11:00 entry is broken and shows the 0xff it maybe cannot
> report is sata_sil24 is loaded).
> 
> I will post a little more details as a proper answer to your other patch
> where I managed to get yet another stacktrace, about the eSATA thought to
> be D3 state. Physically the card was ejected and just a modprobe sata_sil24
> caused the sata_sil24 to use some outdated data. I will dive now into
> that. 
> 
> 
> 
> > 
> > And from your description below, it appears that hot-add and hot-remove
> > of the eSATA card works for you, doesn't it?
> 
> The PresDet works fine I think, yes. Sometimes I see in the lspci -vvv diffs:
> 
> -Control: I/O+ ... BusMaster+
> +Control: I/O- ... BusMaster-

But after hot-insert, can you use your eSATA card?  It appears that it
is detected properly.

> and sometimes 
> 
> -        Latency: 0, Cache Line Size: 64 bytes
> +        Latency: 0
> 
> or even the Latency: line being gone completely from lspci -vvv output. Why is that?
> I think debug checks and prints in kernel are necessary.
> 
> 
> How do these related to /proc/interrupts not showing an IRQ for the 11:00 device?
> Does that prevent automated sata_sil24 loading once the card is inserted? Would
> you please add some extra debug prints and checks into the kernel?
> 
> Take also into consideration the "3.8.2: stale pci device info for a previously inserted express card"
> for a list of chimeric entries reported by lspci. That could tell you which values
> are being cached and invalid. Hopefully some checks could be done between values
> read by lspci and those in /proc and /sys.
> 
> 
> 
> Do you already know why almost nothing is logged by kernel wen either of your
> three patches (v1 sent on 03/29/13 08:41, v2 sent on 03/29/13 09:20, v3 sent on
> 03/30/13 11:54)?

No.  Don't know why.  unpatched upstream kernel can produce kernel log?

Best Regards,
Huang Ying

> I did not test the xHCI port behavior with any of your three patches because I have
> disabled USB support in this kernel altogether for 3.9-rc1 tests. And I would like to stick
> with that until we fix the pciehp issue. I stepped rather late into the big testing game,
> I believe the pciehp bug we are facing was not working since 3.5/3.6, I don't think
> the 3.9-rc1-based tests be much different from earlier kernels.
> 
> For a broader view, on the 3.8 series we will meanwhile hopefully get to a fix of the
> PME# stuff. I think I reported quite a good number of potential problems yesterday.
> After that, I will check how xHCI behaves on 3.9 but I believe the PME#-related fix from
> 3.8 will be also applicable to fixing 3.9 so the xHCI won't have problems there anymore.
> 
> 
> Martin



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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-04-01  0:14                         ` Rafael J. Wysocki
@ 2013-04-01 12:06                           ` Martin Mokrejs
  0 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-04-01 12:06 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huang Ying, Yijing Wang, linux-pci, Bjorn Helgaas, Yinghai Lu, Len Brown



Rafael J. Wysocki wrote:
> On Monday, April 01, 2013 01:17:20 AM Martin Mokrejs wrote:
>> [ also +Len Brown -- would you please comment what the ACPI-related bug in BIOS
>>  could be causing? Should be the message be logged also under 3.8.3? It does
>>  NOT happen! ]
> 
> What BIOS bug are you talking about?

ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130117/hwxface-568)

> 
> Man, it is *so* *hard* to find useful information in your posting.  Can you
> please try to be less chaotic?

I am trying to do my best but testing 2 kernel versions, 3 patches, two functional issues:
1) XHCI port dead 2) express card hotplug
Don't be surprised there are multiple threads. Feel free to close the whole story
if you come up with a big debug patch covering whatever appeared like a potential
bug in my reports. Or where a bug seems to manifest. Just improve debug kernel info.
Then it will be easier I am sure. For me it is also not easy to test all of this.
Just comment my findings in the emails.

Martin

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-04-01  7:33                         ` Huang Ying
@ 2013-04-01 17:23                           ` Martin Mokrejs
  2013-04-30 21:09                             ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-04-01 17:23 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Huang Ying wrote:
> On Sun, 2013-03-31 at 17:04 +0200, Martin Mokrejs wrote:
>> Hi Ying,
>>   
>> Huang Ying wrote:
>>> Hi, Martin,
>>>
>>> Thanks for your testing!
>>>
>>> On Sun, 2013-03-31 at 12:35 +0200, Martin Mokrejs wrote:
>>>> Hi Ying,
>>>>   I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
>>>> when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
>>>> enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
>>>> and kmemleaks.
>>>>   I removed the coldbooted card, inserted it and ejected it.
>>>>
>>>>
>>>>   In brief, lspci reports changes but there are no changes in /proc/interrupts
>>>> related to
>>>>
>>>>   19:          0          0   IO-APIC-fasteoi   sata_sil24
>>>>
>>>>
>>>> and no changes at all in /proc/iomem which I expected to happen during
>>>> hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).
>>>>
>>>> All the runtime_status data were same after every tested step, so again,
>>>> no diffs to show but here are the values confirming laptop-mode-tools
>>>> enabled powersaving:
>>>>
>>>> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
>>>> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
>>>> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
>>>> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
>>>> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
>>>> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
>>>> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
>>>> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
>>>> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
>>>> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
>>>
>>> It appears that 1c.7 is identified successfully as an hotplug-able PCIe
>>> port, and never put into suspended state.
>>
>> Yes. Truly said, after I now went to test your previous two patches
>> on the 3.9-rc1 I confirm that the syslog logging is broken with all your
>> three patches. I fear we are hitting here, with the pciehp problems
>> not a powersaving issue but an upstream /proc or /sys files being outdated.
>> Otherwise I can't figure out why disabling in runtime laptop-mode-tools
>> and doing the "find /sys .... | while ... echo "on" > $f" trickery
>> does not help to get pciehp working. This would have fixed the acpiphp
>> at least on 3.8 kernel. I see that sata_sil24 is not loaded by itself
>> during hotinsert. It seems lspci reports at such times 0xff for the 11:00
>> eSATA card, /etc/iomem reports stale memory regions used by 11:00 while
>> /proc/interrupts says no IRQ is assigned to sata_sil24 (well, sata_sil24
>> is not loaded per lsmod, lspci would should report sata_sil24 also but
>> provided the 11:00 entry is broken and shows the 0xff it maybe cannot
>> report is sata_sil24 is loaded).
>>
>> I will post a little more details as a proper answer to your other patch
>> where I managed to get yet another stacktrace, about the eSATA thought to
>> be D3 state. Physically the card was ejected and just a modprobe sata_sil24
>> caused the sata_sil24 to use some outdated data. I will dive now into
>> that. 
>>
>>
>>
>>>
>>> And from your description below, it appears that hot-add and hot-remove
>>> of the eSATA card works for you, doesn't it?
>>
>> The PresDet works fine I think, yes. Sometimes I see in the lspci -vvv diffs:
>>
>> -Control: I/O+ ... BusMaster+
>> +Control: I/O- ... BusMaster-
> 
> But after hot-insert, can you use your eSATA card?  It appears that it
> is detected properly.

Can't say about the above two. But under pciehp what is broken is the hotremoval.
I think the rest is just a downstream consequence.

> 
>> and sometimes 
>>
>> -        Latency: 0, Cache Line Size: 64 bytes
>> +        Latency: 0

It seems to me that bridges in lspci output have 'Latency: 0' while end devices have
the Cache Line Size as well.

When the card is hot inserted after a previous hot removal and seems "dead" then
lspci says:
Control: I/O- Mem- BusMaster-
Interrupt: pin A routed to IRQ 19
and no 'Latency:' and no 'Cache Line Size:' are the output of the 11:00  device.

But please realize this is likely screwed because a previous eject of the card did not
fully release resources. When the slot was empty lspci reported 0xff and when it is
loaded it likely reports some crap. Unless the bug causing 'stale' data to be reported
(the 'Re: 3.8.2: stale pci device info for a previously inserted express card' thread)
I wonder what can we trust in this output.

>>
>> or even the Latency: line being gone completely from lspci -vvv output. Why is that?
>> I think debug checks and prints in kernel are necessary.
>>
>>
>> How do these related to /proc/interrupts not showing an IRQ for the 11:00 device?
>> Does that prevent automated sata_sil24 loading once the card is inserted? Would
>> you please add some extra debug prints and checks into the kernel?
>>
>> Take also into consideration the "3.8.2: stale pci device info for a previously inserted express card"
>> for a list of chimeric entries reported by lspci. That could tell you which values
>> are being cached and invalid. Hopefully some checks could be done between values
>> read by lspci and those in /proc and /sys.
>>
>>
>>
>> Do you already know why almost nothing is logged by kernel wen either of your
>> three patches (v1 sent on 03/29/13 08:41, v2 sent on 03/29/13 09:20, v3 sent on
>> 03/30/13 11:54)?
> 
> No.  Don't know why.  unpatched upstream kernel can produce kernel log?

OK, vanilla 3.9-rc1 also prints nothing to syslog relevant to hotplug (only pciehp
tested). Logging itself works, as I said, rmmod sata_sil24 is logged. So, sorry,
your patches did NOT break logging.

Martin


> 
> Best Regards,
> Huang Ying
> 
>> I did not test the xHCI port behavior with any of your three patches because I have
>> disabled USB support in this kernel altogether for 3.9-rc1 tests. And I would like to stick
>> with that until we fix the pciehp issue. I stepped rather late into the big testing game,
>> I believe the pciehp bug we are facing was not working since 3.5/3.6, I don't think
>> the 3.9-rc1-based tests be much different from earlier kernels.
>>
>> For a broader view, on the 3.8 series we will meanwhile hopefully get to a fix of the
>> PME# stuff. I think I reported quite a good number of potential problems yesterday.
>> After that, I will check how xHCI behaves on 3.9 but I believe the PME#-related fix from
>> 3.8 will be also applicable to fixing 3.9 so the xHCI won't have problems there anymore.
>>
>>
>> Martin
> 
> 
> 

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

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-04-01 17:23                           ` Martin Mokrejs
@ 2013-04-30 21:09                             ` Martin Mokrejs
  2013-05-01  0:20                               ` Martin Mokrejs
  0 siblings, 1 reply; 41+ messages in thread
From: Martin Mokrejs @ 2013-04-30 21:09 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Hi,
  I went to test final 3.9 kernel and was almost ready to report no difference
in pciehp and *no hotplug functionality of either of my 3 express cards*. But ...
I also tested change from pcie_aspm=off to pcie_aspm=native and hot events started
to work!
So, I would like to ask you to review the code affected by both values aiming
to find an explanation. You have the collected data available and email archives
so I believe this should be easy now for you.

  If you want to compare with 3.9 kernel then I uploaded collected with pciehp
under 3.9 kernel to http://195.113.57.32/~mmokrejs/tmp/20130430.tar.bz2 .
The 3.8.8 data is acpiphp testing, so ignore it for this thread.

Thank you,
Martin

Martin Mokrejs wrote:
> Huang Ying wrote:
>> On Sun, 2013-03-31 at 17:04 +0200, Martin Mokrejs wrote:
>>> Hi Ying,
>>>   
>>> Huang Ying wrote:
>>>> Hi, Martin,
>>>>
>>>> Thanks for your testing!
>>>>
>>>> On Sun, 2013-03-31 at 12:35 +0200, Martin Mokrejs wrote:
>>>>> Hi Ying,
>>>>>   I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
>>>>> when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
>>>>> enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
>>>>> and kmemleaks.
>>>>>   I removed the coldbooted card, inserted it and ejected it.
>>>>>
>>>>>
>>>>>   In brief, lspci reports changes but there are no changes in /proc/interrupts
>>>>> related to
>>>>>
>>>>>   19:          0          0   IO-APIC-fasteoi   sata_sil24
>>>>>
>>>>>
>>>>> and no changes at all in /proc/iomem which I expected to happen during
>>>>> hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).
>>>>>
>>>>> All the runtime_status data were same after every tested step, so again,
>>>>> no diffs to show but here are the values confirming laptop-mode-tools
>>>>> enabled powersaving:
>>>>>
>>>>> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
>>>>> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
>>>>> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
>>>>> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
>>>>> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
>>>>> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
>>>>> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
>>>>> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
>>>>> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
>>>>> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
>>>>
>>>> It appears that 1c.7 is identified successfully as an hotplug-able PCIe
>>>> port, and never put into suspended state.
>>>
>>> Yes. Truly said, after I now went to test your previous two patches
>>> on the 3.9-rc1 I confirm that the syslog logging is broken with all your
>>> three patches. I fear we are hitting here, with the pciehp problems
>>> not a powersaving issue but an upstream /proc or /sys files being outdated.
>>> Otherwise I can't figure out why disabling in runtime laptop-mode-tools
>>> and doing the "find /sys .... | while ... echo "on" > $f" trickery
>>> does not help to get pciehp working. This would have fixed the acpiphp
>>> at least on 3.8 kernel. I see that sata_sil24 is not loaded by itself
>>> during hotinsert. It seems lspci reports at such times 0xff for the 11:00
>>> eSATA card, /etc/iomem reports stale memory regions used by 11:00 while
>>> /proc/interrupts says no IRQ is assigned to sata_sil24 (well, sata_sil24
>>> is not loaded per lsmod, lspci would should report sata_sil24 also but
>>> provided the 11:00 entry is broken and shows the 0xff it maybe cannot
>>> report is sata_sil24 is loaded).
>>>
>>> I will post a little more details as a proper answer to your other patch
>>> where I managed to get yet another stacktrace, about the eSATA thought to
>>> be D3 state. Physically the card was ejected and just a modprobe sata_sil24
>>> caused the sata_sil24 to use some outdated data. I will dive now into
>>> that. 
>>>
>>>
>>>
>>>>
>>>> And from your description below, it appears that hot-add and hot-remove
>>>> of the eSATA card works for you, doesn't it?
>>>
>>> The PresDet works fine I think, yes. Sometimes I see in the lspci -vvv diffs:
>>>
>>> -Control: I/O+ ... BusMaster+
>>> +Control: I/O- ... BusMaster-
>>
>> But after hot-insert, can you use your eSATA card?  It appears that it
>> is detected properly.
> 
> Can't say about the above two. But under pciehp what is broken is the hotremoval.
> I think the rest is just a downstream consequence.
> 
>>
>>> and sometimes 
>>>
>>> -        Latency: 0, Cache Line Size: 64 bytes
>>> +        Latency: 0
> 
> It seems to me that bridges in lspci output have 'Latency: 0' while end devices have
> the Cache Line Size as well.
> 
> When the card is hot inserted after a previous hot removal and seems "dead" then
> lspci says:
> Control: I/O- Mem- BusMaster-
> Interrupt: pin A routed to IRQ 19
> and no 'Latency:' and no 'Cache Line Size:' are the output of the 11:00  device.
> 
> But please realize this is likely screwed because a previous eject of the card did not
> fully release resources. When the slot was empty lspci reported 0xff and when it is
> loaded it likely reports some crap. Unless the bug causing 'stale' data to be reported
> (the 'Re: 3.8.2: stale pci device info for a previously inserted express card' thread)
> I wonder what can we trust in this output.
> 
>>>
>>> or even the Latency: line being gone completely from lspci -vvv output. Why is that?
>>> I think debug checks and prints in kernel are necessary.
>>>
>>>
>>> How do these related to /proc/interrupts not showing an IRQ for the 11:00 device?
>>> Does that prevent automated sata_sil24 loading once the card is inserted? Would
>>> you please add some extra debug prints and checks into the kernel?
>>>
>>> Take also into consideration the "3.8.2: stale pci device info for a previously inserted express card"
>>> for a list of chimeric entries reported by lspci. That could tell you which values
>>> are being cached and invalid. Hopefully some checks could be done between values
>>> read by lspci and those in /proc and /sys.
>>>
>>>
>>>
>>> Do you already know why almost nothing is logged by kernel wen either of your
>>> three patches (v1 sent on 03/29/13 08:41, v2 sent on 03/29/13 09:20, v3 sent on
>>> 03/30/13 11:54)?
>>
>> No.  Don't know why.  unpatched upstream kernel can produce kernel log?
> 
> OK, vanilla 3.9-rc1 also prints nothing to syslog relevant to hotplug (only pciehp
> tested). Logging itself works, as I said, rmmod sata_sil24 is logged. So, sorry,
> your patches did NOT break logging.
> 
> Martin
> 
> 
>>
>> Best Regards,
>> Huang Ying
>>
>>> I did not test the xHCI port behavior with any of your three patches because I have
>>> disabled USB support in this kernel altogether for 3.9-rc1 tests. And I would like to stick
>>> with that until we fix the pciehp issue. I stepped rather late into the big testing game,
>>> I believe the pciehp bug we are facing was not working since 3.5/3.6, I don't think
>>> the 3.9-rc1-based tests be much different from earlier kernels.
>>>
>>> For a broader view, on the 3.8 series we will meanwhile hopefully get to a fix of the
>>> PME# stuff. I think I reported quite a good number of potential problems yesterday.
>>> After that, I will check how xHCI behaves on 3.9 but I believe the PME#-related fix from
>>> 3.8 will be also applicable to fixing 3.9 so the xHCI won't have problems there anymore.
>>>
>>>
>>> Martin
>>
>>
>>
> --
> 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] 41+ messages in thread

* Re: 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI
  2013-04-30 21:09                             ` Martin Mokrejs
@ 2013-05-01  0:20                               ` Martin Mokrejs
  0 siblings, 0 replies; 41+ messages in thread
From: Martin Mokrejs @ 2013-05-01  0:20 UTC (permalink / raw)
  To: Huang Ying
  Cc: Yijing Wang, linux-pci, Bjorn Helgaas, Rafael J. Wysocki, Yinghai Lu

Martin Mokrejs wrote:
> Hi,
>   I went to test final 3.9 kernel and was almost ready to report no difference
> in pciehp and *no hotplug functionality of either of my 3 express cards*. But ...
> I also tested change from pcie_aspm=off to pcie_aspm=native and hot events started
> to work!
> So, I would like to ask you to review the code affected by both values aiming
> to find an explanation. You have the collected data available and email archives
> so I believe this should be easy now for you.
> 
>   If you want to compare with 3.9 kernel then I uploaded collected with pciehp
> under 3.9 kernel to http://195.113.57.32/~mmokrejs/tmp/20130430.tar.bz2 .
> The 3.8.8 data is acpiphp testing, so ignore it for this thread.

For those who have no time to look into the files themselves I will spot few
diff myself.

1. The pcie_aspm did *not* affect ASPM values reported by lspci -vvv of *all*
devices, just some. That might explain why such a mess.


2. The pciehp could not work under pcie_aspm=off because this breakage?:
--- off/eSATA_SiI3132/lspci_vvv_initial.txt     2013-04-30 21:23:42.000000000 +0200
+++ native/eSATA_SiI3132/lspci_vvv_initial.txt  2013-04-30 22:00:14.000000000 +0200

 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5) (prog-if 00 [Normal decode])
-       Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
+       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: 64 bytes
        Bus: primary=00, secondary=11, subordinate=16, sec-latency=0
        I/O behind bridge: 0000c000-0000dfff
        Memory behind bridge: f6c00000-f7cfffff
        Prefetchable memory behind bridge: 00000000f0000000-00000000f10fffff
        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: [40] Express (v2) Root Port (Slot+), MSI 00
                DevCap: MaxPayload 128 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 128 bytes
-               DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
+               DevSta: CorrErr- UncorrErr+ FatalErr+ UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #8, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
                        ClockPM- Surprise- LLActRep+ BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
                SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
                        Slot #7, PowerLimit 10.000W; Interlock- NoCompl+
-               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
+               SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet+ CmdCplt- HPIrq+ LinkChg-
                        Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
                SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
                        Changed: MRL- PresDet- LinkState-
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
                RootCap: CRSVisible-
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range BC, TimeoutDis+, LTR-, OBFF Not Supported ARIFwd-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled ARIFwd-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
-       Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
-               Address: 00000000  Data: 0000
+       Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
+               Address: fee0300c  Data: 4191
        Capabilities: [90] Subsystem: Dell Device 04b3
        Capabilities: [a0] 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-
        Kernel driver in use: pcieport


 11:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+       Physical Slot: 7
        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: 64 bytes
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at f6c84000 (64-bit, non-prefetchable) [size=128]
        Region 2: Memory at f6c80000 (64-bit, non-prefetchable) [size=16K]
        Region 4: I/O ports at c000 [size=128]
        Expansion ROM at f6c00000 [disabled] [size=512K]
        Capabilities: [54] 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=1 PME-
        Capabilities: [5c] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 1024 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 4096 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 unlimited, L1 unlimited
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Kernel driver in use: sata_sil24


# cut -c 15- off/eSATA_SiI3132/dmesg_initial.txt > /tmp/dmesg_eSATA_SiI3132_pcie_aspm-off.txt
# cut -c 15- native/eSATA_SiI3132/dmesg_initial.txt > /tmp/dmesg_eSATA_SiI3132_pcie_aspm-native.txt
# diff -u -w /tmp/dmesg_eSATA_SiI3132_pcie_aspm-off.txt /tmp/dmesg_eSATA_SiI3132_pcie_aspm-native.txt
--- /tmp/dmesg_eSATA_SiI3132_pcie_aspm-off.txt  2013-05-01 02:01:02.000000000 +0200
+++ /tmp/dmesg_eSATA_SiI3132_pcie_aspm-native.txt       2013-05-01 02:01:13.000000000 +0200
@@ -1,5 +1,5 @@
  Linux version 3.9.0-default (root@vostro) (gcc version 4.5.4 (Gentoo 4.5.4 p1.1, pie-0.4.7) ) #1 SMP Tue Apr 30 17:33:54 MEST 2013
- Command line: root=/dev/sda5 pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
+ Command line: root=/dev/sda5 pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=native
  e820: BIOS-provided physical RAM map:
  BIOS-e820: [mem 0x0000000000000000-0x000000000009d3ff] usable
  BIOS-e820: [mem 0x000000000009d400-0x000000000009ffff] reserved
@@ -175,8 +175,7 @@
  pcpu-alloc: [0] 0 1 
  Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 4104936
  Policy zone: Normal
- Kernel command line: root=/dev/sda5 pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off
- PCIe ASPM is disabled
+ Kernel command line: root=/dev/sda5 pciehp.pciehp_debug=1 pciehp_debug=1 slub_debug=AFPZ pcie_aspm=native
  PID hash table entries: 4096 (order: 3, 32768 bytes)
  __ex_table already sorted, skipping sort
  xsave: enabled xstate_bv 0x7, cntxt size 0x340
[cut]
@@ -406,6 +405,7 @@
  pci 0000:11:00.0: reg 20: [io  0xc000-0xc07f]
  pci 0000:11:00.0: reg 30: [mem 0xf6c00000-0xf6c7ffff pref]
  pci 0000:11:00.0: supports D1 D2
+ pci 0000:11:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
  pci_bus 0000:11: fixups for bus
  pci 0000:00:1c.7: PCI bridge to [bus 11-16]
  pci 0000:00:1c.7:   bridge window [io  0xc000-0xdfff]
@@ -418,7 +418,8 @@
  pci 0000:00:1c.4: scanning [bus 0b-0c] behind bridge, pass 1
  pci 0000:00:1c.7: scanning [bus 11-16] behind bridge, pass 1
  pci_bus 0000:00: bus scan returning with max=16
- acpi PNP0A08:00: Unable to request _OSC control (_OSC support mask: 0x19)
+ acpi PNP0A08:00: Requesting ACPI _OSC control (0x1d)
+ acpi PNP0A08:00: ACPI _OSC control (0x19) granted
  ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
  ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 10 11 12 14 15)
  ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 10 11 12 14 15)
@@ -598,7 +599,36 @@
  io scheduler noop registered
  io scheduler deadline registered (default)
  io scheduler cfq registered
+ pcieport 0000:00:1c.7: irq 40 for MSI/MSI-X
  pci_hotplug: PCI Hot Plug PCI Core version: 0.5
+ pciehp 0000:00:1c.7:pcie04: Hotplug Controller:
+ pciehp 0000:00:1c.7:pcie04:   Seg/Bus/Dev/Func/IRQ : 0000:00:1c.7 IRQ 40
+ pciehp 0000:00:1c.7:pcie04:   Vendor ID            : 0x8086
+ pciehp 0000:00:1c.7:pcie04:   Device ID            : 0x1c1e
+ pciehp 0000:00:1c.7:pcie04:   Subsystem ID         : 0x04b3
+ pciehp 0000:00:1c.7:pcie04:   Subsystem Vendor ID  : 0x1028
+ pciehp 0000:00:1c.7:pcie04:   PCIe Cap offset      : 0x40
+ pciehp 0000:00:1c.7:pcie04:   PCI resource [13]     : [io  0xc000-0xdfff]
+ pciehp 0000:00:1c.7:pcie04:   PCI resource [14]     : [mem 0xf6c00000-0xf7cfffff]
+ pciehp 0000:00:1c.7:pcie04:   PCI resource [15]     : [mem 0xf0000000-0xf10fffff 64bit pref]
+ pciehp 0000:00:1c.7:pcie04: Slot Capabilities      : 0x003cb260
+ pciehp 0000:00:1c.7:pcie04:   Physical Slot Number : 7
+ pciehp 0000:00:1c.7:pcie04:   Attention Button     :  no
+ pciehp 0000:00:1c.7:pcie04:   Power Controller     :  no
+ pciehp 0000:00:1c.7:pcie04:   MRL Sensor           :  no
+ pciehp 0000:00:1c.7:pcie04:   Attention Indicator  :  no
+ pciehp 0000:00:1c.7:pcie04:   Power Indicator      :  no
+ pciehp 0000:00:1c.7:pcie04:   Hot-Plug Surprise    : yes
+ pciehp 0000:00:1c.7:pcie04:   EMI Present          :  no
+ pciehp 0000:00:1c.7:pcie04:   Command Completed    :  no
+ pciehp 0000:00:1c.7:pcie04: Slot Status            : 0x0040
+ pciehp 0000:00:1c.7:pcie04: Slot Control           : 0x0000
+ pciehp 0000:00:1c.7:pcie04: Link Active Reporting supported
+ pciehp 0000:00:1c.7:pcie04: HPC vendor_id 8086 device_id 1c1e ss_vid 1028 ss_did 4b3
+ pciehp 0000:00:1c.7:pcie04: Registering domain:bus:dev=0000:11:00 sun=7
+ pci_bus 0000:11: dev 00, created physical slot 7
+ pciehp 0000:00:1c.7:pcie04: pciehp_get_power_status: SLOTCTRL 58 value read 28
+ pciehp 0000:00:1c.7:pcie04: service driver pciehp loaded
  pciehp: pcie_port_service_register = 0
  pciehp: PCI Express Hot Plug Controller Driver version: 0.4
  intel_idle: MWAIT substates: 0x21120
@@ -1353,19 +1381,9 @@
  ata8: SATA max UDMA/100 host m128@0xf6c84000 port 0xf6c82000 irq 19
  Intel(R) Wireless WiFi driver for Linux, in-tree:d
  Copyright(c) 2003-2013 Intel Corporation
- iwlwifi 0000:09:00.0: irq 46 for MSI/MSI-X
+ iwlwifi 0000:09:00.0: irq 47 for MSI/MSI-X
  iwlwifi 0000:09:00.0: loaded firmware version 18.168.6.1
  [drm] Initialized drm 1.1.0 20060810
- iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUG enabled
- iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
- iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
- iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled
- iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_P2P disabled
- iwlwifi 0000:09:00.0: Detected Intel(R) Centrino(R) Wireless-N 1030 BGN, REV=0xB0
- iwlwifi 0000:09:00.0: L1 Enabled; Disabling L0S
- iwlwifi 0000:09:00.0: RF_KILL bit toggled to disable radio.
- ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
- systemd-udevd[1961]: renamed network interface wlan0 to wlp9s0
  ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 0)
  ata7.00: ATA-8: ST3000VX000-9YW166, CV12, max UDMA/133
  ata7.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
@@ -1379,10 +1397,20 @@
  sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
   sdb: sdb1
  sd 6:0:0:0: [sdb] Attached SCSI disk
+ iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUG enabled
+ iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
+ iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
+ iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled
+ iwlwifi 0000:09:00.0: CONFIG_IWLWIFI_P2P disabled
+ iwlwifi 0000:09:00.0: Detected Intel(R) Centrino(R) Wireless-N 1030 BGN, REV=0xB0
+ iwlwifi 0000:09:00.0: L1 Disabled; Enabling L0S
+ iwlwifi 0000:09:00.0: RF_KILL bit toggled to disable radio.
+ ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
+ systemd-udevd[1960]: renamed network interface wlan0 to wlp9s0
  ata8: SATA link down (SStatus 0 SControl 0)
[cut]

Hmm, but 11:00 had in both scenarios enabled ASPM (see the above lspci diff).


Looks close to these?
https://bugzilla.kernel.org/show_bug.cgi?id=55211 
https://bugzilla.kernel.org/show_bug.cgi?id=57331



Now, in brief, a survey of PME-related differences between the three express cards I used
in all my tests:

20130430 # grep PME off/*/dmesg_initial.txt |  grep "1c.7"
off/FireWire/dmesg_initial.txt:[    1.681031] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
off/FireWire/dmesg_initial.txt:[    1.681036] pci 0000:00:1c.7: PME# disabled
off/NEC_usb30/dmesg_initial.txt:[    1.680882] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
off/NEC_usb30/dmesg_initial.txt:[    1.680888] pci 0000:00:1c.7: PME# disabled
off/eSATA_SiI3132/dmesg_initial.txt:[    1.683314] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
off/eSATA_SiI3132/dmesg_initial.txt:[    1.683319] pci 0000:00:1c.7: PME# disabled
20130430 # grep PME off/*/dmesg_initial.txt |  grep "11:00"
off/FireWire/dmesg_initial.txt:[    1.723336] pci 0000:11:00.0: PME# supported from D2 D3hot D3cold
off/FireWire/dmesg_initial.txt:[    1.723344] pci 0000:11:00.0: PME# disabled
off/NEC_usb30/dmesg_initial.txt:[    1.724471] pci 0000:11:00.0: PME# supported from D0 D3hot
off/NEC_usb30/dmesg_initial.txt:[    1.724481] pci 0000:11:00.0: PME# disabled
20130430 # grep "pre-1.1" off/*/dmesg_initial.txt 
20130430 #



20130430 # grep PME native/*/dmesg_initial.txt |  grep "1c.7"
native/FireWire/dmesg_initial.txt:[    1.671345] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
native/FireWire/dmesg_initial.txt:[    1.671351] pci 0000:00:1c.7: PME# disabled
native/NEC_usb30/dmesg_initial.txt:[    1.681021] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
native/NEC_usb30/dmesg_initial.txt:[    1.681027] pci 0000:00:1c.7: PME# disabled
native/eSATA_SiI3132/dmesg_initial.txt:[    1.680976] pci 0000:00:1c.7: PME# supported from D0 D3hot D3cold
native/eSATA_SiI3132/dmesg_initial.txt:[    1.680982] pci 0000:00:1c.7: PME# disabled
20130430 # grep PME native/*/dmesg_initial.txt |  grep "11:00"
native/FireWire/dmesg_initial.txt:[    1.742989] pci 0000:11:00.0: PME# supported from D2 D3hot D3cold
native/FireWire/dmesg_initial.txt:[    1.742996] pci 0000:11:00.0: PME# disabled
native/NEC_usb30/dmesg_initial.txt:[    1.753353] pci 0000:11:00.0: PME# supported from D0 D3hot
native/NEC_usb30/dmesg_initial.txt:[    1.753363] pci 0000:11:00.0: PME# disabled
20130430 # grep "pre-1.1" native/*/dmesg_initial.txt 
native/eSATA_SiI3132/dmesg_initial.txt:[    1.753674] pci 0000:11:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
20130430 #


So, ASPM also wasn't disabled on my pre-1.1 device, right?


Martin



> 
> Thank you,
> Martin
> 
> Martin Mokrejs wrote:
>> Huang Ying wrote:
>>> On Sun, 2013-03-31 at 17:04 +0200, Martin Mokrejs wrote:
>>>> Hi Ying,
>>>>   
>>>> Huang Ying wrote:
>>>>> Hi, Martin,
>>>>>
>>>>> Thanks for your testing!
>>>>>
>>>>> On Sun, 2013-03-31 at 12:35 +0200, Martin Mokrejs wrote:
>>>>>> Hi Ying,
>>>>>>   I have tested 4x your last patch. Somehow nothing gets logged to "dmesg"
>>>>>> when I hotremove or hotinsert the coldbooted eSATA card. Logging works so
>>>>>> enabling wifi via Fn+F2 is being logged. Also, eventual stacktraces
>>>>>> and kmemleaks.
>>>>>>   I removed the coldbooted card, inserted it and ejected it.
>>>>>>
>>>>>>
>>>>>>   In brief, lspci reports changes but there are no changes in /proc/interrupts
>>>>>> related to
>>>>>>
>>>>>>   19:          0          0   IO-APIC-fasteoi   sata_sil24
>>>>>>
>>>>>>
>>>>>> and no changes at all in /proc/iomem which I expected to happen during
>>>>>> hotremoval and hotinsert (something broken in 3.9-rc1 with your patch).
>>>>>>
>>>>>> All the runtime_status data were same after every tested step, so again,
>>>>>> no diffs to show but here are the values confirming laptop-mode-tools
>>>>>> enabled powersaving:
>>>>>>
>>>>>> /sys/bus/pci/devices/0000:00:00.0/power/runtime_status:suspended
>>>>>> /sys/bus/pci/devices/0000:00:02.0/power/runtime_status:active
>>>>>> /sys/bus/pci/devices/0000:00:16.0/power/runtime_status:suspended
>>>>>> /sys/bus/pci/devices/0000:00:1a.0/power/runtime_status:suspended
>>>>>> /sys/bus/pci/devices/0000:00:1b.0/power/runtime_status:active
>>>>>> /sys/bus/pci/devices/0000:00:1c.0/power/runtime_status:suspended
>>>>>> /sys/bus/pci/devices/0000:00:1c.1/power/runtime_status:active
>>>>>> /sys/bus/pci/devices/0000:00:1c.3/power/runtime_status:active
>>>>>> /sys/bus/pci/devices/0000:00:1c.4/power/runtime_status:active
>>>>>> /sys/bus/pci/devices/0000:00:1c.7/power/runtime_status:active
>>>>>
>>>>> It appears that 1c.7 is identified successfully as an hotplug-able PCIe
>>>>> port, and never put into suspended state.
>>>>
>>>> Yes. Truly said, after I now went to test your previous two patches
>>>> on the 3.9-rc1 I confirm that the syslog logging is broken with all your
>>>> three patches. I fear we are hitting here, with the pciehp problems
>>>> not a powersaving issue but an upstream /proc or /sys files being outdated.
>>>> Otherwise I can't figure out why disabling in runtime laptop-mode-tools
>>>> and doing the "find /sys .... | while ... echo "on" > $f" trickery
>>>> does not help to get pciehp working. This would have fixed the acpiphp
>>>> at least on 3.8 kernel. I see that sata_sil24 is not loaded by itself
>>>> during hotinsert. It seems lspci reports at such times 0xff for the 11:00
>>>> eSATA card, /etc/iomem reports stale memory regions used by 11:00 while
>>>> /proc/interrupts says no IRQ is assigned to sata_sil24 (well, sata_sil24
>>>> is not loaded per lsmod, lspci would should report sata_sil24 also but
>>>> provided the 11:00 entry is broken and shows the 0xff it maybe cannot
>>>> report is sata_sil24 is loaded).
>>>>
>>>> I will post a little more details as a proper answer to your other patch
>>>> where I managed to get yet another stacktrace, about the eSATA thought to
>>>> be D3 state. Physically the card was ejected and just a modprobe sata_sil24
>>>> caused the sata_sil24 to use some outdated data. I will dive now into
>>>> that. 
>>>>
>>>>
>>>>
>>>>>
>>>>> And from your description below, it appears that hot-add and hot-remove
>>>>> of the eSATA card works for you, doesn't it?
>>>>
>>>> The PresDet works fine I think, yes. Sometimes I see in the lspci -vvv diffs:
>>>>
>>>> -Control: I/O+ ... BusMaster+
>>>> +Control: I/O- ... BusMaster-
>>>
>>> But after hot-insert, can you use your eSATA card?  It appears that it
>>> is detected properly.
>>
>> Can't say about the above two. But under pciehp what is broken is the hotremoval.
>> I think the rest is just a downstream consequence.
>>
>>>
>>>> and sometimes 
>>>>
>>>> -        Latency: 0, Cache Line Size: 64 bytes
>>>> +        Latency: 0
>>
>> It seems to me that bridges in lspci output have 'Latency: 0' while end devices have
>> the Cache Line Size as well.
>>
>> When the card is hot inserted after a previous hot removal and seems "dead" then
>> lspci says:
>> Control: I/O- Mem- BusMaster-
>> Interrupt: pin A routed to IRQ 19
>> and no 'Latency:' and no 'Cache Line Size:' are the output of the 11:00  device.
>>
>> But please realize this is likely screwed because a previous eject of the card did not
>> fully release resources. When the slot was empty lspci reported 0xff and when it is
>> loaded it likely reports some crap. Unless the bug causing 'stale' data to be reported
>> (the 'Re: 3.8.2: stale pci device info for a previously inserted express card' thread)
>> I wonder what can we trust in this output.
>>
>>>>
>>>> or even the Latency: line being gone completely from lspci -vvv output. Why is that?
>>>> I think debug checks and prints in kernel are necessary.
>>>>
>>>>
>>>> How do these related to /proc/interrupts not showing an IRQ for the 11:00 device?
>>>> Does that prevent automated sata_sil24 loading once the card is inserted? Would
>>>> you please add some extra debug prints and checks into the kernel?
>>>>
>>>> Take also into consideration the "3.8.2: stale pci device info for a previously inserted express card"
>>>> for a list of chimeric entries reported by lspci. That could tell you which values
>>>> are being cached and invalid. Hopefully some checks could be done between values
>>>> read by lspci and those in /proc and /sys.
>>>>
>>>>
>>>>
>>>> Do you already know why almost nothing is logged by kernel wen either of your
>>>> three patches (v1 sent on 03/29/13 08:41, v2 sent on 03/29/13 09:20, v3 sent on
>>>> 03/30/13 11:54)?
>>>
>>> No.  Don't know why.  unpatched upstream kernel can produce kernel log?
>>
>> OK, vanilla 3.9-rc1 also prints nothing to syslog relevant to hotplug (only pciehp
>> tested). Logging itself works, as I said, rmmod sata_sil24 is logged. So, sorry,
>> your patches did NOT break logging.
>>
>> Martin
>>
>>
>>>
>>> Best Regards,
>>> Huang Ying
>>>
>>>> I did not test the xHCI port behavior with any of your three patches because I have
>>>> disabled USB support in this kernel altogether for 3.9-rc1 tests. And I would like to stick
>>>> with that until we fix the pciehp issue. I stepped rather late into the big testing game,
>>>> I believe the pciehp bug we are facing was not working since 3.5/3.6, I don't think
>>>> the 3.9-rc1-based tests be much different from earlier kernels.
>>>>
>>>> For a broader view, on the 3.8 series we will meanwhile hopefully get to a fix of the
>>>> PME# stuff. I think I reported quite a good number of potential problems yesterday.
>>>> After that, I will check how xHCI behaves on 3.9 but I believe the PME#-related fix from
>>>> 3.8 will be also applicable to fixing 3.9 so the xHCI won't have problems there anymore.
>>>>
>>>>
>>>> Martin
>>>
>>>
>>>
>> --
>> 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
>>
>>
> --
> 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] 41+ messages in thread

end of thread, other threads:[~2013-05-01  0:20 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12  1:00 3.9-rc1: pciehp and eSATA card SiI 3132, no XHCI Martin Mokrejs
2013-03-12  2:51 ` Yijing Wang
2013-03-12  9:57   ` Martin Mokrejs
2013-03-13  2:42 ` Yijing Wang
2013-03-14  0:05   ` Martin Mokrejs
2013-03-14  0:16     ` Martin Mokrejs
2013-03-14  8:38     ` Yijing Wang
     [not found]     ` <51417C28.40402@huawei.com>
2013-03-14 13:00       ` Martin Mokrejs
2013-03-15  2:41         ` Yijing Wang
2013-03-28 18:38           ` Martin Mokrejs
2013-03-29  8:20             ` Huang Ying
2013-03-29 13:08               ` Martin Mokrejs
2013-03-29 14:38                 ` Huang Ying
2013-03-29 15:12                   ` Martin Mokrejs
2013-03-29 14:11               ` Martin Mokrejs
2013-03-29 16:45                 ` Martin Mokrejs
2013-03-29 21:31                 ` Rafael J. Wysocki
2013-03-30  1:17                   ` Martin Mokrejs
2013-03-30  1:48                     ` Rafael J. Wysocki
2013-03-30  1:53                       ` Martin Mokrejs
2013-03-30 17:49                         ` Martin Mokrejs
2013-03-30 22:18                           ` Rafael J. Wysocki
2013-03-30 23:12                             ` Martin Mokrejs
2013-03-31  1:51                               ` Rafael J. Wysocki
2013-03-30 22:17                         ` Rafael J. Wysocki
2013-03-30 22:39                           ` Martin Mokrejs
2013-03-30 10:54                 ` Huang Ying
2013-03-31 10:35                   ` Martin Mokrejs
2013-03-31 14:12                     ` Huang Ying
2013-03-31 15:04                       ` Martin Mokrejs
2013-04-01  7:33                         ` Huang Ying
2013-04-01 17:23                           ` Martin Mokrejs
2013-04-30 21:09                             ` Martin Mokrejs
2013-05-01  0:20                               ` Martin Mokrejs
     [not found]                     ` <515813CB.8020001@fold.natur.cuni.cz>
2013-03-31 23:17                       ` Martin Mokrejs
2013-04-01  0:14                         ` Rafael J. Wysocki
2013-04-01 12:06                           ` Martin Mokrejs
2013-03-31 18:48               ` Martin Mokrejs
2013-03-14 15:18       ` Martin Mokrejs
2013-03-14 15:20       ` Martin Mokrejs
2013-03-14 17:54       ` Martin Mokrejs

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.