From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boszormenyi Zoltan Subject: Re: [PATCH 1/3] pci_regs: define LNKSTA2 pcie cap + bits. Date: Fri, 29 Jun 2012 08:50:11 +0200 Message-ID: <4FED5023.5090805@pr.hu> References: <1340782554-9865-1-git-send-email-airlied@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail.pr.hu (mail.pr.hu [87.242.0.5]) by gabe.freedesktop.org (Postfix) with ESMTP id DA2509E81F for ; Fri, 29 Jun 2012 00:08:35 -0700 (PDT) In-Reply-To: <1340782554-9865-1-git-send-email-airlied@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi, 2012-06-27 09:35 keltez=E9ssel, Dave Airlie =EDrta: > From: Dave Airlie > > We need these for detecting the max link speed for drm drivers. > > Signed-off-by: Dave Airlie I have reported this in March: http://lists.freedesktop.org/archives/dri-devel/2012-March/019731.html Since then, this motherboard received 3 BIOS upgrades (latest is version 1208) and the system was upgraded to Fedora 17. With kernel 3.5-rc4+ (commit 47b514cd476db2eca066a2ad31501b079d6c9cce) plus this series of patches, the reported problem doesn't appear anymore. lspci reports PCIe gen2 speed for my Radeon HD6570 and gen1 speed for my 3ware 9650SE: [zozo@localhost ~]$ sudo lspci -vvv -s 01:00.0 01:00.0 VGA compatible controller: ATI Technologies Inc NI Turks [AMD Radeo= n HD 6500] = (prog-if 00 [VGA controller]) Subsystem: PC Partner Limited Device e193 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- St= epping- SERR- = FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast >TAbort- SERR- Capabilities: [150 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: radeon [zozo@localhost ~]$ sudo lspci -vvv -s 08:00.0 08:00.0 RAID bus controller: 3ware Inc 9650SE SATA-II RAID PCIe (rev 01) Subsystem: 3ware Inc 9650SE SATA-II RAID PCIe Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- St= epping- SERR- = FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast >TAbort- SERR- > --- > include/linux/pci_regs.h | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h > index 4b608f5..7f04132 100644 > --- a/include/linux/pci_regs.h > +++ b/include/linux/pci_regs.h > @@ -521,6 +521,11 @@ > #define PCI_EXP_OBFF_MSGA_EN 0x2000 /* OBFF enable with Message type A= */ > #define PCI_EXP_OBFF_MSGB_EN 0x4000 /* OBFF enable with Message type B= */ > #define PCI_EXP_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ > +#define PCI_EXP_LNKCAP2 44 /* Link Capability 2 */ > +#define PCI_EXP_LNKCAP2_SLS_2_5GB 0x01 /* Current Link Speed 2.5GT/s */ > +#define PCI_EXP_LNKCAP2_SLS_5_0GB 0x02 /* Current Link Speed 5.0GT/s */ > +#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x04 /* Current Link Speed 8.0GT/s */ > +#define PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */ > #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ > #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ > =