From patchwork Sat May 7 17:41:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 764562 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p47Hgw3S017713 for ; Sat, 7 May 2011 17:43:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754849Ab1EGRnx (ORCPT ); Sat, 7 May 2011 13:43:53 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:46419 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752832Ab1EGRnw (ORCPT ); Sat, 7 May 2011 13:43:52 -0400 Received: (qmail 3535 invoked from network); 7 May 2011 17:43:52 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 7 May 2011 17:43:52 -0000 To: linux-rdma@vger.kernel.org Subject: [PATCH 2/2] qib: use pci_dev->revision Content-Disposition: inline Cc: roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-kernel@vger.kernel.org From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Sat, 7 May 2011 21:41:56 +0400 MIME-Version: 1.0 Message-Id: <201105072141.56328.sshtylyov@ru.mvista.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 07 May 2011 17:43:54 +0000 (UTC) The driver reads PCI revision ID from the PCI configuration register while it's already stored by PCI subsystem in the 'revision' field of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov --- The patch is against the recent Linus' tree. drivers/infiniband/hw/qib/qib_pcie.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/infiniband/hw/qib/qib_pcie.c =================================================================== --- linux-2.6.orig/drivers/infiniband/hw/qib/qib_pcie.c +++ linux-2.6/drivers/infiniband/hw/qib/qib_pcie.c @@ -526,11 +526,8 @@ static int qib_tune_pcie_coalesce(struct */ devid = parent->device; if (devid >= 0x25e2 && devid <= 0x25fa) { - u8 rev; - /* 5000 P/V/X/Z */ - pci_read_config_byte(parent, PCI_REVISION_ID, &rev); - if (rev <= 0xb2) + if (parent->revision <= 0xb2) bits = 1U << 10; else bits = 7U << 10;