Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1635862ybi; Wed, 17 Jul 2019 19:11:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw65L/8PdXpUXa9hLQDX8k9c7VtV3le2eyBUYFThL+daSdNw9DzgGtQ2zbfFrm6TZ8BjLim X-Received: by 2002:a63:5045:: with SMTP id q5mr36591694pgl.380.1563415885351; Wed, 17 Jul 2019 19:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563415885; cv=none; d=google.com; s=arc-20160816; b=DUe5UwSXSjQs1TsQclaHzEHmBixCAu+Vupzer8Yw72FrJcArVi6tWo2wTDfPLEIkNL Akf7Mnb2tmev0vC7/iVP83z/DP5fHX2DDdqfvqi1fgd2MZB1RtRs2n9Y3KvyZqXVTmsV OKTKQeROfbeN4D2BT8ooy02YZWzuApt263un4tYef67NgbQaNNYiclPwiAvG8UKICtvQ NcBDcqiwm8nE9frgu+ER7SVRk6kBeZjPUFfdHO0JhqwhKFGO0veYBTvo0MOZZRF/llBL wywDGTLJLehKN3GHNLXgCefPfnBeNZvba8jQUNUAScZuM9OST/M0w30+s6px4/pmOg5L Oy9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=OcGPHgnMxbI2wU1xT/V0QozYnY7nlRi/cdJFTvYjEvI=; b=GUcts4gG732LVgdDAh+bHmw52OK59Zi9A0ehtHwOZGKOrsddRL/1cyQ8YnyImrXz6x kV1SmRaRZSEeF9c3+/GTff2Gg4qXwrFZOxbP3xhKwbfxOA9zgoNcLBo7VyqEZihYtOM/ Lzl0MZKnFSzcN4ca3bFBpJkNwt/Q6de7q7GGAIM09q3rBsNQxHchEXMp9C6gqhooW4Vr NKclpeLqVSwSsbXrLobQoixaS49KA2RraK3qWJngncZigsBQtKqlGkrsd0Pg2x12FycC QFdAOS9nDRNBjqpfr7edY+KJlnktCJPKflJHmO9GadvI3H/OwkVfkOtv738+O7PZSh5p FvGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fredlawl-com.20150623.gappssmtp.com header.s=20150623 header.b=yDAMvNM9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y19si1218712pgi.587.2019.07.17.19.11.08; Wed, 17 Jul 2019 19:11:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fredlawl-com.20150623.gappssmtp.com header.s=20150623 header.b=yDAMvNM9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388876AbfGRCJK (ORCPT + 99 others); Wed, 17 Jul 2019 22:09:10 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:37114 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388266AbfGRCJJ (ORCPT ); Wed, 17 Jul 2019 22:09:09 -0400 Received: by mail-ot1-f65.google.com with SMTP id s20so27293825otp.4 for ; Wed, 17 Jul 2019 19:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fredlawl-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OcGPHgnMxbI2wU1xT/V0QozYnY7nlRi/cdJFTvYjEvI=; b=yDAMvNM9G2xW3IW0xmzcT8InMI5MERjBNmrSwp51Hoa420m8Mm9XuRTbqtYfvP7vK0 nlkEPsiLCpiErLfpG+gJtl3Guy6jngjiT3ZTKfMf16ZJC/otStBMZNEKqb8CyzPiVwqG eGTG+Dh9AkuARboDvIy7rL4h8mc3x1Gm+V8s9t5PVRI2SiFgaAeBb3q6jTV3YAE8q38B MhCZoirfl2ymkkF6+xbDMfjTeWcLQX4bFHMOuBkIW4V1LDEMZCrn9jhBWezqGK5jUD5Q LOlUrLPSUSoBQcbHzEHqC+SIWA05MhZj0YvzSwtA/XKCMrdMXMSMNsdKLHR5PALS2nCg q5EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OcGPHgnMxbI2wU1xT/V0QozYnY7nlRi/cdJFTvYjEvI=; b=oOWJxHedY6wgtxOb6ZG7qrEB/+6TmlKqcWKP/pO4AXk/UEFUAD3f6sJz0jI/NELwym 6+jCptHyueSaiktXRQLK9sKvp4ECqnrTcbkFFYnITjQ2O199lIips8YCho1A39Pef//j CKqPg2qI4NvTFTc5muY4pg81pcsX+LuVjUo/B2eVpHTN9DAeCi14hgtJ+PC1EfTCSeA1 D5Se0sNejKm9vNCX9BgaRhk9MFONytEA8JiA4VNdyCjl4wgTmgv4xsuBniZmNRMSV+bE VKZX9Wg4KxuKV1mrbJ33lqb6n0dV+VoDWNwocotWAOyuUC94+SBUOJwMh8jqRSHtXu1H ljAA== X-Gm-Message-State: APjAAAWLypLWW838rVo0qvTnuHwY918Zyn0uYNT3l9AKg/DJcqfoB9Js toXh0ByUWTaJwBwRBQMNEl8= X-Received: by 2002:a9d:70da:: with SMTP id w26mr30907101otj.270.1563415748819; Wed, 17 Jul 2019 19:09:08 -0700 (PDT) Received: from linux.fredlawl.com ([2600:1700:18a0:11d0:18af:e893:6cb0:139a]) by smtp.gmail.com with ESMTPSA id i11sm8985651oia.9.2019.07.17.19.09.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 19:09:08 -0700 (PDT) From: Frederick Lawler To: aelior@marvell.com, GR-everest-linux-l2@marvell.com Cc: Frederick Lawler , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com Subject: [PATCH] qed: Prefer pcie_capability_read_word() Date: Wed, 17 Jul 2019 21:07:42 -0500 Message-Id: <20190718020745.8867-7-fred@fredlawl.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190718020745.8867-1-fred@fredlawl.com> References: <20190718020745.8867-1-fred@fredlawl.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability") added accessors for the PCI Express Capability so that drivers didn't need to be aware of differences between v1 and v2 of the PCI Express Capability. Replace pci_read_config_word() and pci_write_config_word() calls with pcie_capability_read_word() and pcie_capability_write_word(). Signed-off-by: Frederick Lawler --- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c index 7873d6dfd91f..8d8a920c3195 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c @@ -530,9 +530,8 @@ static void qed_rdma_init_devinfo(struct qed_hwfn *p_hwfn, SET_FIELD(dev->dev_caps, QED_RDMA_DEV_CAP_LOCAL_INV_FENCE, 1); /* Check atomic operations support in PCI configuration space. */ - pci_read_config_dword(cdev->pdev, - cdev->pdev->pcie_cap + PCI_EXP_DEVCTL2, - &pci_status_control); + pcie_capability_read_dword(cdev->pdev, PCI_EXP_DEVCTL2, + &pci_status_control); if (pci_status_control & PCI_EXP_DEVCTL2_LTR_EN) SET_FIELD(dev->dev_caps, QED_RDMA_DEV_CAP_ATOMIC_OP, 1); -- 2.17.1