Return-Path: Received: from canardo.mork.no ([148.122.252.1]:58433 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756664Ab3KMNsa (ORCPT ); Wed, 13 Nov 2013 08:48:30 -0500 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: "Grumbach\, Emmanuel" Cc: Bjorn Helgaas , Emmanuel Grumbach , wzyboy , "ilw\@linux.intel.com" , "linux-wireless\@vger.kernel.org" , "linux-pci\@vger.kernel.org" Subject: Re: [Ilw] Intel Wireless 7260 hardware timed out randomly References: <0BA3FCBA62E2DC44AF3030971E174FB301DEA052@HASMSX103.ger.corp.intel.com> <0BA3FCBA62E2DC44AF3030971E174FB301DEA097@HASMSX103.ger.corp.intel.com> <527A8166.6000701@gmail.com> <20131111224439.GA30638@google.com> <0BA3FCBA62E2DC44AF3030971E174FB301DF044C@HASMSX103.ger.corp.intel.com> <0BA3FCBA62E2DC44AF3030971E174FB301DF0865@HASMSX103.ger.corp.intel.com> <52828364.6080103@gmail.com> <0BA3FCBA62E2DC44AF3030971E174FB301E00262@HASMSX103.ger.corp.intel.com> Date: Wed, 13 Nov 2013 14:48:12 +0100 In-Reply-To: <0BA3FCBA62E2DC44AF3030971E174FB301E00262@HASMSX103.ger.corp.intel.com> (Emmanuel Grumbach's message of "Wed, 13 Nov 2013 12:13:31 +0000") Message-ID: <87k3gco1k3.fsf@nemi.mork.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: linux-pci-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Grumbach, Emmanuel" writes: > Ok - so I have now the complete picture. > This device was designed before PCI-SIG gave an ID to L1 PM Substates, > so Intel had to use the L1 PM Substate as a Vendor Define whose ID is > 0xCAFE. Layout is the same as defined now in PCI-SIG (page 21 in > http://www.pcisig.com/specifications/pciexpress/specifications/ECN_L1_PM_= Substates_with_CLKREQ_31_May_2013_Rev10a.pdf). > > So: > 150: 03 10 03 10 0b 00 01 00 fe ca 41 01 1f 1e f0 00 > 160: 0f 00 a0 40 f0 00 00 00 00 00 00 00 00 00 00 00 > > We can see that L1 PM Substate *is* enabled: > 004h =3D 41 01 1f 1e > 008h =3D 0f 00 f0 00 > 00Ch =3D a0 40 f0 00 Wow! That's extremely useful. But I do have some problems placing the individiual bits right in these LE registers. And so have you, I believe... You are 2 bytes off. "41 01" is part of the vendor specific header (12 bits length =3D=3D 0x014 and 4 bits version =3D=3D 0x1. So I made a simple patch for lspci based on your info. Seems to work for me: 03:00.0 Network controller [0280]: Intel Corporation Wireless 7260 [8086:08= b1] (rev 63) Subsystem: Intel Corporation Dual Band Wireless-AC 7260 [8086:4070] Physical Slot: 1 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Steppi= ng- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast >TAbort- SERR- I may have messed up things here... > > According to System / HW, it is unsafe to disable L1 PM Substate using se= tpci, even if we disable it from both sides (device and bridge). This kind = of settings should be done by BIOS only. > So we have 2 options here (assuming that we can't disable that in BIOS): > * either we try to disable L1 PM Substate even my colleagues think it is = not safe > * either we just disable L1 altogether How about forcing ASPM even if the BIOS says it's unsupported? Has that been tested? Bj=C3=B8rn --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-lspci-decode-Intel-vendor-specific-L1-PM-Substates.patch Content-Transfer-Encoding: quoted-printable >From de4befe40cb12a57a6edc4dd22271fa8a000d8f1 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Bj=3DC3=3DB8rn=3D20Mork?=3D Date: Wed, 13 Nov 2013 14:24:06 +0100 Subject: [PATCH] lspci: decode Intel vendor specific L1 PM Substates MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bj=C3=B8rn Mork --- ls-ecaps.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ls-ecaps.c b/ls-ecaps.c index c6f217e..144bf77 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -429,10 +429,13 @@ cap_rclink(struct device *d, int where) } } =20 +static void cap_l1pm(struct device *d, int where); + static void cap_evendor(struct device *d, int where) { u32 hdr; + u16 id; =20 printf("Vendor Specific Information: "); if (!config_fetch(d, where + PCI_EVNDR_HEADER, 4)) @@ -442,10 +445,17 @@ cap_evendor(struct device *d, int where) } =20 hdr =3D get_conf_long(d, where + PCI_EVNDR_HEADER); - printf("ID=3D%04x Rev=3D%d Len=3D%03x \n", - BITS(hdr, 0, 16), + id =3D BITS(hdr, 0, 16); + printf("ID=3D%04x Rev=3D%d Len=3D%03x ", + id, BITS(hdr, 16, 4), BITS(hdr, 20, 12)); + + /* Intel used this vendor specific ID prior to PCI-SIG allocating 0x001e= */ + if (d->dev->vendor_id =3D=3D cpu_to_le16(0x8086) && id =3D=3D cpu_to_le1= 6(0xcafe)) + cap_l1pm(d, where + PCI_EVNDR_HEADER); + else + printf("\n"); } =20 static void --=20 1.7.10.4 --=-=-=--