From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f181.google.com ([209.85.216.181]:47799 "EHLO mail-qc0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755652AbaGDAkM (ORCPT ); Thu, 3 Jul 2014 20:40:12 -0400 Received: by mail-qc0-f181.google.com with SMTP id x13so931076qcv.40 for ; Thu, 03 Jul 2014 17:40:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53B4F0F7.9020403@huawei.com> References: <53B4F0F7.9020403@huawei.com> Date: Thu, 3 Jul 2014 20:40:11 -0400 Message-ID: Subject: Re: How to check for proper MSI support? From: Brian Becker To: Yijing Wang Cc: Ilia Mirkin , linux-pci@vger.kernel.org, "nouveau@lists.freedesktop.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-pci-owner@vger.kernel.org List-ID: My previous message was badly formatted, and didn't make it to linux-pci@vger.kernel.org. Hopefully this information is of some use. root@p5-133:~# uname -a Linux p5-133 3.15.2-p5-133 #1 Thu Jun 26 22:56:27 EDT 2014 i586 GNU/Linux root@p5-133:~# lspci -vvvxxx 00:00.0 Host bridge: Intel Corporation 430FX - 82437FX TSC [Triton I] (rev 01) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B- PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0+,D1+,D2-,D3hot+,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+ Address: 0000000000000000 Data: 0000 Capabilities: [60] Express (v1) PCI/PCI-X to PCI-Express Bridge, 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- BrConfRtry- MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend- LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us ClockPM- Surprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- 00: b5 10 12 81 17 01 30 02 aa 00 04 06 08 80 01 00 10: 00 00 00 00 00 00 00 00 00 01 01 00 f0 f0 00 00 20: e0 f5 f0 fb d0 d5 d0 f5 00 00 00 00 00 00 00 00 30: 00 00 00 00 40 00 00 00 00 00 00 00 00 01 0b 00 40: 01 50 02 5a 00 00 00 00 10 28 0e 00 00 00 00 00 50: 05 60 80 00 00 00 00 00 00 00 00 00 00 00 00 00 60: 10 00 81 00 00 00 00 00 00 20 00 00 11 4c 02 00 70: 00 00 11 00 80 0c 00 00 00 00 40 00 00 00 00 00 80: 00 00 00 00 00 00 00 00 33 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:0f.0 USB controller: ULi Electronics Inc. USB 1.1 Controller (rev 03) (prog-if 10 [OHCI]) Subsystem: ULi Electronics Inc. ASRock 939Dual-SATA2 Motherboard Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Kernel driver in use: nouveau 00: de 10 41 06 07 01 10 00 a1 00 00 03 08 00 00 00 10: 00 00 00 fb 0c 00 00 e0 00 00 00 00 04 00 00 f8 20: 00 00 00 00 81 fc 00 00 00 00 00 00 13 1b 41 06 30: 00 00 00 00 60 00 00 00 00 00 00 00 0b 01 00 00 40: 13 1b 41 06 00 00 00 00 00 00 00 00 00 00 00 00 50: 01 00 00 00 01 00 00 00 ce d6 23 00 00 00 00 00 60: 01 68 03 00 00 00 00 00 05 78 80 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 10 b4 01 00 e0 84 64 00 80: 10 28 01 00 01 3d 00 00 08 00 11 10 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 09 00 14 01 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 root@p5-133:~# On Thu, Jul 3, 2014 at 1:58 AM, Yijing Wang wrote: > On 2014/7/3 11:20, Ilia Mirkin wrote: >> Hello, >> >> A user (cc'd) reported that nouveau's enabling of MSI causes the card >> to not work on his setup [1]. I think the situation is that MSI is >> just not supported by the underlying motherboard, even though the >> card, and probably bridge, support it just fine. It's a very old >> board. The nouveau code does: > > > What is the kernel version running in your board ? > >> >> pmc->use_msi = pci_enable_msi(device->pdev) == 0; > > Driver call pci_enable_msi() and always return 0 ? > >> >> Does it need to do more checking than that before trying to enable MSI >> on the device? Could it be that the linux pci subsystem is missing on >> inheriting MSI capabilities somewhere? > > pci_enable_msi() will checking your device whether it supports MSI. > Can you provide the detailed lspci information ? eg. lspci -vvvxxx ? > > >> >> -ilia >> >> [1] >> >> 00:00.0 Host bridge [0600]: Intel Corporation 430FX - 82437FX TSC >> [Triton I] [8086:122d] (rev 01) >> Flags: bus master, medium devsel, latency 64 >> >> 00:0e.0 PCI bridge [0604]: PLX Technology, Inc. PEX8112 x1 Lane PCI >> Express-to-PCI Bridge [10b5:8112] (rev aa) (prog-if 00 [Normal >> decode]) >> Flags: bus master, 66MHz, medium devsel, latency 66 >> Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 >> I/O behind bridge: 0000f000-0000ffff >> Memory behind bridge: f5e00000-fbffffff >> Prefetchable memory behind bridge: d5d00000-f5dfffff >> Capabilities: [40] Power Management version 2 >> Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+ >> Capabilities: [60] Express PCI/PCI-X to PCI-Express Bridge, MSI 00 >> >> 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G96 >> [GeForce 9400 GT] [10de:0641] (rev a1) (prog-if 00 [VGA controller]) >> Subsystem: Jaton Corp Device [1b13:0641] >> Flags: bus master, fast devsel, latency 0, IRQ 11 >> Memory at fb000000 (32-bit, non-prefetchable) [size=16M] >> Memory at e0000000 (64-bit, prefetchable) [size=256M] >> Memory at f8000000 (64-bit, non-prefetchable) [size=32M] >> I/O ports at fc80 [size=128] >> [virtual] Expansion ROM at d5d00000 [disabled] [size=512K] >> Capabilities: [60] Power Management version 3 >> Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ >> Capabilities: [78] Express Endpoint, MSI 00 >> Capabilities: [b4] Vendor Specific Information: Len=14 >> Kernel driver in use: nouveau >> -- >> 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 >