From patchwork Wed Jan 9 23:10:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Mokrejs X-Patchwork-Id: 1957681 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C117BDF2EB for ; Wed, 9 Jan 2013 23:11:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758161Ab3AIXLG (ORCPT ); Wed, 9 Jan 2013 18:11:06 -0500 Received: from fold.natur.cuni.cz ([195.113.57.32]:54761 "HELO fold.natur.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758170Ab3AIXLC (ORCPT ); Wed, 9 Jan 2013 18:11:02 -0500 Received: (qmail 13143 invoked from network); 9 Jan 2013 23:10:56 -0000 Received: from unknown (HELO ?192.168.251.6?) (192.168.251.6) by 192.168.251.1 with SMTP; 9 Jan 2013 23:10:56 -0000 Message-ID: <50EDF8FE.6040607@fold.natur.cuni.cz> Date: Thu, 10 Jan 2013 00:10:54 +0100 From: Martin Mokrejs User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0 SeaMonkey/2.14.1 MIME-Version: 1.0 To: linux-pci@vger.kernel.org CC: Yinghai Lu Subject: Dell Vostro 3550: pci_hotplug+acpiphp require 'pcie_aspm=force' on kernel command-line for hotplug to work X-Enigmail-Version: 1.4.6 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi, I am following up on a former thread Re: 3.2.11: PCI Express card cannot be re-detected withing cca 60sec timeframe about the same issue. I think I found some new info while playing with 3.7.1 kernel. It happened to me that my hotplug of express cards stopped working so it made me to to dive in a figure out what driver did I do to my .config, and what combinations of drivers and kernel command-line parameters work and which not. This email will cover just one case. On this Dell Vostro 3550 express card slot works if kernel is without pciehp altogether and pci_hotplug+acpiphp are loaded as modules later on. The problem is that I must use pcie_aspm=off. Below is hopefully an answer why. I can provide dmesg/interrupts/config.gz/lsusb/lspci for each combination I tried. Here I have pasted just bits which I found only directly related. Please bear in mind previously it seemed that the hardware has broken PresDet hadling and therefore I faced 'Surprise removal' meesages from pciehp. This email is however about acpiphp and you can see that actually PresDet flag contains correct values. But I want to avoid here showing that pciehp has a bug. That will come in another thread. ;-) The kernel binary has no pciehp at all but pci_hotplug and acpiphp are available as modules. I load them manually after saving dmesg/lspci/lsusb/interrupts/.config into a separate directory. I then poke through the collected data and run diff. I did everything under two different BIOS configs. I suspected the media card reader somehow interferes with the express slot card detection because it was sometime detected on the ehci but when I (un)plugged the express card into its slot. Am not sure yet, but FYI what is avalable for you off-the-list ;-) # du -sh MediaCard_reader_* 12M MediaCard_reader_disabled_in_BIOS 7.5M MediaCard_reader_enabled_in_BIOS # And now the results: Thanks 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 --- MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted/dmesg.notiming 2013-01-09 15:15:28.000000000 +0100 +++ MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted__pcie_aspm-off/dmesg.notiming 2013-01-09 15:42:02.000000000 +0100 @@ -1,5 +1,5 @@ Linux version 3.7.1-default (root@vostro) (gcc version 4.6.3 (Gentoo 4.6.3 p1.8, pie-0.5.2) ) #30 SMP Wed Jan 9 14:45:10 MET 2013 -Command line: root=/dev/sda5 pciehp.pciehp_debug=1 slub_debug=AFPZ +Command line: root=/dev/sda5 pciehp.pciehp_debug=1 slub_debug=AFPZ pcie_aspm=off @@ -374,7 +375,6 @@ 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] @@ -393,8 +393,7 @@ ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP04._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP05._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP08._PRT] - pci0000:00: Requesting ACPI _OSC control (0x1d) - pci0000:00: ACPI _OSC control (0x19) granted + pci0000:00: Unable to request _OSC control (_OSC support mask: 0x19) 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) @@ -654,7 +653,6 @@ io scheduler noop registered io scheduler deadline registered (default) io scheduler cfq registered -pcieport 0000:00:1c.7: irq 40 for MSI/MSI-X intel_idle: MWAIT substates: 0x21120 intel_idle: v0.4 model 0x2A intel_idle: lapic_timer_reliable_states 0xffffffff @@ -688,7 +686,7 @@ ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver lpc_ich: Resource conflict(s) found affecting gpio_ich ahci 0000:00:1f.2: version 3.0 -ahci 0000:00:1f.2: irq 41 for MSI/MSI-X +ahci 0000:00:1f.2: irq 40 for MSI/MSI-X ahci: SSS flag set, parallel bus scan disabled ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x31 impl SATA mode ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pio slum part ems sxs apst @@ -699,18 +697,18 @@ scsi3 : ahci scsi4 : ahci scsi5 : ahci -ata1: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06100 irq 41 +ata1: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06100 irq 40 ata2: DUMMY ata3: DUMMY ata4: DUMMY -ata5: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06300 irq 41 -ata6: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06380 irq 41 +ata5: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06300 irq 40 +ata6: SATA max UDMA/133 abar m2048@0xf7f06000 port 0xf7f06380 irq 40 tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded r8169 0000:05:00.0: enabling Mem-Wr-Inval -r8169 0000:05:00.0: irq 42 for MSI/MSI-X -r8169 0000:05:00.0 eth0: RTL8168e/8111e at 0xffffc9000184a000, 18:03:73:a0:6f:6a, XID 0c200000 IRQ 42 +r8169 0000:05:00.0: irq 41 for MSI/MSI-X +r8169 0000:05:00.0 eth0: RTL8168e/8111e at 0xffffc9000184a000, 18:03:73:a0:6f:6a, XID 0c200000 IRQ 41 r8169 0000:05:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] VMware vmxnet3 virtual NIC driver - version 1.1.29.0-k-NAPI ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver @@ -791,9 +789,9 @@ xhci_hcd 0000:0b:00.0: enabling Mem-Wr-Inval xhci_hcd 0000:0b:00.0: supports USB remote wakeup xhci_hcd 0000:0b:00.0: irq 16, io mem 0xf7d00000 +xhci_hcd 0000:0b:00.0: irq 42 for MSI/MSI-X xhci_hcd 0000:0b:00.0: irq 43 for MSI/MSI-X xhci_hcd 0000:0b:00.0: irq 44 for MSI/MSI-X -xhci_hcd 0000:0b:00.0: irq 45 for MSI/MSI-X usb usb3: default language 0x0409 usb usb3: udev 1, busnum 3, minor = 256 usb usb3: New USB device found, idVendor=1d6b, idProduct=0002 [cut] I am not much knowing what is this kernel stuff all about but why other devices retain MSI and only 0000:00:1c.7 lost it? Due to IRQ40 being not picked up by pcieport it was assigned to other devices in the row and therefore the diff just shows changed IRQ numbers for following devices. I will show below just a snippet of interrupt changes with a question "Why was the IRQ40 not reported when claimed by pcieport? The is no line starting as '-40'! Was it never reported through /proc/interrupts until 'pcie_aspm=off'? But dmesg showed that it was used, or thought to be assigned by the driver itself? --- MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted/interrupts 2013-01-09 15:14:33.000000000 +0100 +++ MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted__pcie_aspm-off/interrupts 2013-01-09 15:42:01.000000000 +0100 @@ -1,29 +1,29 @@ CPU0 CPU1 0: 36 0 IO-APIC-edge timer 1: 13 0 IO-APIC-edge i8042 - 8: 16 0 IO-APIC-edge rtc0 + 8: 60 0 IO-APIC-edge rtc0 9: 0 0 IO-APIC-fasteoi acpi 12: 241 0 IO-APIC-edge i8042 - 16: 53 0 IO-APIC-fasteoi ehci_hcd:usb1 - 19: 355 0 IO-APIC-fasteoi sata_sil24 - 23: 440 0 IO-APIC-fasteoi ehci_hcd:usb2 - 41: 5342 0 PCI-MSI-edge ahci - 42: 264 0 PCI-MSI-edge eth0 - 43: 1116 0 PCI-MSI-edge xhci_hcd + 16: 50 0 IO-APIC-fasteoi ehci_hcd:usb1 + 19: 356 0 IO-APIC-fasteoi sata_sil24 + 23: 345 0 IO-APIC-fasteoi ehci_hcd:usb2 + 40: 5368 0 PCI-MSI-edge ahci + 41: 205 0 PCI-MSI-edge eth0 + 42: 308 0 PCI-MSI-edge xhci_hcd + 43: 0 0 PCI-MSI-edge xhci_hcd [cut] --- MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted/lspci_vvxx 2013-01-09 15:14:26.000000000 +0100 +++ MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted__pcie_aspm-off/lspci_vvxx 2013-01-09 15:42:01.000000000 +0100 [cut] @@ -284,7 +284,7 @@ DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend- LnkCap: Port #5, 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+ + 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- @@ -316,7 +316,7 @@ 30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 01 10 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+ + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- 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 <1us, L1 <16us + LnkCap: Port #8, 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- + LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+ ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- - LnkSta: Speed 2.5GT/s, Width x0, 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: 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 00: 86 80 1e 1c 07 04 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 30: 00 00 00 00 40 00 00 00 00 00 00 00 0a 04 10 00 @@ -587,3 +587,43 @@ 20: 00 00 00 00 00 00 00 00 00 00 00 00 28 10 b3 04 30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 01 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- SERR- 0103) +sata_sil24 0000:11:00.0: enabling bus mastering +scsi7 : sata_sil24 +scsi8 : sata_sil24 +ata7: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c00000 irq 19 +ata8: SATA max UDMA/100 host m128@0xf6c04000 port 0xf6c02000 irq 19 +ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 0) +ata7.00: ATA-8: WDC WD10TPVT-00HT5T0, 01.01A01, max UDMA/133 +ata7.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32) +ata7.00: failed to get Identify Device Data, Emask 0x1 +ata7.00: failed to get Identify Device Data, Emask 0x1 +ata7.00: configured for UDMA/100 +scsi 7:0:0:0: Direct-Access ATA WDC WD10TPVT-00H 01.0 PQ: 0 ANSI: 5 +sd 7:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB) +sd 7:0:0:0: [sdc] Write Protect is off +sd 7:0:0:0: [sdc] Mode Sense: 00 3a 00 00 +sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA +sd 7:0:0:0: Attached scsi generic sg3 type 0 + sdc: sdc1 +sd 7:0:0:0: [sdc] Attached SCSI disk +ata8: SATA link up 3.0 Gbps (SStatus 123 SControl 0) +ata8.00: ATA-8: ST3000VX000-9YW166, CV12, max UDMA/133 +ata8.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32) +ata8.00: failed to get Identify Device Data, Emask 0x1 +ata8.00: failed to get Identify Device Data, Emask 0x1 +ata8.00: configured for UDMA/100 +scsi 8:0:0:0: Direct-Access ATA ST3000VX000-9YW1 CV12 PQ: 0 ANSI: 5 +sd 8:0:0:0: Attached scsi generic sg4 type 0 +sd 8:0:0:0: [sdd] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB) +sd 8:0:0:0: [sdd] 4096-byte physical blocks +sd 8:0:0:0: [sdd] Write Protect is off +sd 8:0:0:0: [sdd] Mode Sense: 00 3a 00 00 +sd 8:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA + sdd: sdd1 +sd 8:0:0:0: [sdd] Attached SCSI disk --- MediaCard_reader_enabled_in_BIOS/cold-boot-with-express_card_inserted__pcie_aspm-off/lspci_vvxx 2013-01-09 15:42:01.000000000 +0100 +++ MediaCard_reader_enabled_in_BIOS/cold-boot-without-express_card_inserted__pcie_aspm-off__loaded_acpiphp__pci_hotplug__card_hotplugged/lspci_vvxx 2013-01-09 15:58:36.000000000 +0100 @@ -343,7 +343,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- @@ -589,14 +589,15 @@ 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- + 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- SERR-