From patchwork Thu Feb 14 18:35:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 2142511 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 1D498DF283 for ; Thu, 14 Feb 2013 18:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758482Ab3BNSfs (ORCPT ); Thu, 14 Feb 2013 13:35:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46658 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758460Ab3BNSfr (ORCPT ); Thu, 14 Feb 2013 13:35:47 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1EIZiuS004823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Feb 2013 13:35:44 -0500 Received: from bling.home (ovpn-113-116.phx2.redhat.com [10.3.113.116]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1EIZgfR015501; Thu, 14 Feb 2013 13:35:42 -0500 Subject: [PATCH] pci: Fix pcie access for PCI_EXP_FLAGS To: bhelgaas@google.com, linux-pci@vger.kernel.org From: Alex Williamson Cc: linux-kernel@vger.kernel.org, jiang.liu@huawei.com Date: Thu, 14 Feb 2013 11:35:42 -0700 Message-ID: <20130214183438.16138.15416.stgit@bling.home> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org PCI_EXP_FLAGS_TYPE is a mask, not an offset. Fix it. Signed-off-by: Alex Williamson --- drivers/pci/access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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 diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 3af0478..32046c5 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c @@ -515,7 +515,7 @@ static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos) return false; switch (pos) { - case PCI_EXP_FLAGS_TYPE: + case PCI_EXP_FLAGS: return true; case PCI_EXP_DEVCAP: case PCI_EXP_DEVCTL: