Message ID | 20230919125648.1920-1-ilpo.jarvinen@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3770723vqi; Tue, 19 Sep 2023 17:18:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IER5WcemwcOM7uRwMo2DoxEXcCkamfuF3ibJK7EDJMhf66OiIGb4dMPaZaw4naBy9RtTU0g X-Received: by 2002:a05:6808:195:b0:3a7:2390:3583 with SMTP id w21-20020a056808019500b003a723903583mr813660oic.38.1695169105879; Tue, 19 Sep 2023 17:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695169105; cv=none; d=google.com; s=arc-20160816; b=MvVXBlOFtZX8oiM5DQ5P49C+LekYcjuLEE2UqZeRnc/gY1Kn39WcQuaxfnp4NTN7AT yNwD9MnrjRrrhok/kFevAAwkyBajTfVCw1gstClcQ0LewAia+WxEmLK5S2wJZWfTJPmg 5z//zAT3y7t6PocEFclMGMGWYhfLXGGh9al5Pi/SKfLswO5DtDj6k10alJR9Gpu+dfv4 VT5y2wt8scHLa8RXL6I2+UEu6BcySGyb8Rwnq/AoRu2T7y665eSZhp+fTbpe/Ne4Oqh1 63/BwSXU7THr8wi32z9HqFPLvQmF36HJrfoUeWxNKDkxEiqV+Pp6y2qgi0zwooM1X9sd EUWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XeOvgNccSpb2+mFRnPVuL/mxyFbHyr4AbGDW5ehsnGQ=; fh=WOqmXV52p94XC4OQX/BWwTRUBCMD5J2ILz3sZDDtyuw=; b=Q4iCLPPo15FUyKLUd0d3UG+zK5ZJbWv4D7xdVDGN+NxDJaASKFs2ph++lm9nIAhcDX sz7BL39y2Z1xZtWQjsJuKPXqsIOuM30cWyEA37BsyoELZwAQw8p77lEqsikJBDmHUHSd kGUcjdil1Wqw/gs0kaR1Rmy3B4dT1v6pIkzrpq5DBZzDtkcfoDiSnPqfcXufJVdxhwZ4 fcYQpbybqhaP3Tx7+zcUCTl7J0DORf32yMDgcFP7hKnXvUucGtvzkveRGK9jzreV5LV9 Kf/MWHEEV3LJz5HeZCbiHX867uaKDCbXsP27KuF1nBJFvK9DJ2+/XQReLERzrVEUXiy9 q6sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KloNKfNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y9-20020a056a001c8900b0068e256c6366si10307048pfw.352.2023.09.19.17.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 17:18:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KloNKfNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 96D4F8054ECB; Tue, 19 Sep 2023 05:57:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232202AbjISM5K (ORCPT <rfc822;toshivichauhan@gmail.com> + 26 others); Tue, 19 Sep 2023 08:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231489AbjISM5I (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 19 Sep 2023 08:57:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 982F8F9; Tue, 19 Sep 2023 05:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695128220; x=1726664220; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZyCbh6VtZ67nU62IXv6rMJQvPb0CAx1pQpLxDA4Wy9k=; b=KloNKfNd2+7IY/TlMzBZy5JZKU5HWMvtteGQmdzXkAOBQZP8g2YcWXIR sqs0WB84jg87qhABEwF/RjFsI/2J1EfWF9u0ObygpbaliC6JjzdFUHFAh rfIwWoefgZuqbz3VvdlEqAJoltHtZPiB0wZhCQK3QSqFceVhPL9zkm6ZL y+K76yANSEVgkGCDeoY63VlCpXajTTK/ODSO8pe62MtfNLWB0YQQoqhtv yPZIzAAEUknUkVRcLhi0zLu0zfNVebR3yzwYamiaLMc6c7MrlD23SgEeu csJGRybTCIWoR+7++tHo4aFr5VUNyziv9GUTd1u+dhAin4SVKESrC/m8n Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="359324589" X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="359324589" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 05:57:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="746228669" X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="746228669" Received: from vdesserx-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.249.32.31]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 05:56:57 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org, Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH v3 0/8] PCI/treewide: PCIe capability access cleanups Date: Tue, 19 Sep 2023 15:56:40 +0300 Message-Id: <20230919125648.1920-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 19 Sep 2023 05:57:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777513639971542350 X-GMAIL-MSGID: 1777513639971542350 |
Series |
PCI/treewide: PCIe capability access cleanups
|
|
Message
Ilpo Järvinen
Sept. 19, 2023, 12:56 p.m. UTC
Instead of custom code to extract the PCIe capabilities, make the code more obvious using FIELD_GET/PREP(). Also cleanup some duplicated defines in e1000e. This is just a step into the right direction, there's plenty of places still to cleanup which will have to wait for another patch series. v3: - Remove applied patches (scsi) - Use pci_pcie_cap() and tweak local variable (e1000e) - Use the correct prefix for RDMA/hfi1 v2: - Remove extract_width() and use FIELD_GET() directly (IB/hfi1) - Convert other fields beside Link Width ones - Remove useless u8 casts (scsi: esas2r) - e1000e: - Remove defines that duplicate pci_regs.h ones - Convert to pcie_capability_read_word() Ilpo Järvinen (8): RDMA/hfi1: Use FIELD_GET() to extract Link Width media: cobalt: Use FIELD_GET() to extract Link Width igb: Use FIELD_GET() to extract Link Width PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields PCI: mvebu: Use FIELD_PREP() with Link Width PCI: Use FIELD_GET() to extract Link Width e1000e: Use PCI_EXP_LNKSTA_NLW & FIELD_GET() instead of custom defines/code e1000e: Use pcie_capability_read_word() for reading LNKSTA drivers/infiniband/hw/hfi1/pcie.c | 9 ++------- drivers/media/pci/cobalt/cobalt-driver.c | 11 ++++++----- drivers/net/ethernet/intel/e1000e/defines.h | 3 --- drivers/net/ethernet/intel/e1000e/mac.c | 18 ++++++++---------- drivers/net/ethernet/intel/igb/e1000_mac.c | 6 +++--- drivers/pci/controller/dwc/pcie-tegra194.c | 9 ++++----- drivers/pci/controller/pci-mvebu.c | 2 +- drivers/pci/pci-sysfs.c | 5 ++--- drivers/pci/pci.c | 6 +++--- 9 files changed, 29 insertions(+), 40 deletions(-)
Comments
On Tue, 19 Sep 2023 15:56:40 +0300, Ilpo Järvinen wrote: > Instead of custom code to extract the PCIe capabilities, make the code > more obvious using FIELD_GET/PREP(). > > Also cleanup some duplicated defines in e1000e. > > This is just a step into the right direction, there's plenty of places > still to cleanup which will have to wait for another patch series. > > [...] Applied, thanks! [1/8] RDMA/hfi1: Use FIELD_GET() to extract Link Width https://git.kernel.org/rdma/rdma/c/8bf7187d978610 Best regards,
On Tue, Sep 19, 2023 at 03:56:40PM +0300, Ilpo Järvinen wrote: > Instead of custom code to extract the PCIe capabilities, make the code > more obvious using FIELD_GET/PREP(). > > Also cleanup some duplicated defines in e1000e. > > This is just a step into the right direction, there's plenty of places > still to cleanup which will have to wait for another patch series. > > v3: > - Remove applied patches (scsi) > - Use pci_pcie_cap() and tweak local variable (e1000e) > - Use the correct prefix for RDMA/hfi1 > > v2: > - Remove extract_width() and use FIELD_GET() directly (IB/hfi1) > - Convert other fields beside Link Width ones > - Remove useless u8 casts (scsi: esas2r) > - e1000e: > - Remove defines that duplicate pci_regs.h ones > - Convert to pcie_capability_read_word() > > > Ilpo Järvinen (8): > RDMA/hfi1: Use FIELD_GET() to extract Link Width Applied this patch to RDMA tree. Thanks
On Tue, Sep 19, 2023 at 03:56:40PM +0300, Ilpo Järvinen wrote: > Instead of custom code to extract the PCIe capabilities, make the code > more obvious using FIELD_GET/PREP(). > > Also cleanup some duplicated defines in e1000e. > > This is just a step into the right direction, there's plenty of places > still to cleanup which will have to wait for another patch series. > > v3: > - Remove applied patches (scsi) > - Use pci_pcie_cap() and tweak local variable (e1000e) > - Use the correct prefix for RDMA/hfi1 > > v2: > - Remove extract_width() and use FIELD_GET() directly (IB/hfi1) > - Convert other fields beside Link Width ones > - Remove useless u8 casts (scsi: esas2r) > - e1000e: > - Remove defines that duplicate pci_regs.h ones > - Convert to pcie_capability_read_word() > > > Ilpo Järvinen (8): > RDMA/hfi1: Use FIELD_GET() to extract Link Width > media: cobalt: Use FIELD_GET() to extract Link Width > igb: Use FIELD_GET() to extract Link Width > PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields > PCI: mvebu: Use FIELD_PREP() with Link Width > PCI: Use FIELD_GET() to extract Link Width Applied these three drivers/pci patches to pci/field-get for v6.7, thanks! > e1000e: Use PCI_EXP_LNKSTA_NLW & FIELD_GET() instead of custom > defines/code > e1000e: Use pcie_capability_read_word() for reading LNKSTA > > drivers/infiniband/hw/hfi1/pcie.c | 9 ++------- > drivers/media/pci/cobalt/cobalt-driver.c | 11 ++++++----- > drivers/net/ethernet/intel/e1000e/defines.h | 3 --- > drivers/net/ethernet/intel/e1000e/mac.c | 18 ++++++++---------- > drivers/net/ethernet/intel/igb/e1000_mac.c | 6 +++--- > drivers/pci/controller/dwc/pcie-tegra194.c | 9 ++++----- > drivers/pci/controller/pci-mvebu.c | 2 +- > drivers/pci/pci-sysfs.c | 5 ++--- > drivers/pci/pci.c | 6 +++--- > 9 files changed, 29 insertions(+), 40 deletions(-) > > -- > 2.30.2 >