public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	<linux-pci@vger.kernel.org>
Cc: intel-wired-lan@lists.osuosl.org,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lukas Wunner" <lukas@wunner.de>,
	"Tony Nguyen" <anthony.l.nguyen@intel.com>,
	"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Saeed Mahameed" <saeedm@nvidia.com>,
	"Leon Romanovsky" <leon@kernel.org>,
	"Tariq Toukan" <tariqt@nvidia.com>,
	"Mark Bloch" <mbloch@nvidia.com>,
	"Richard Cochran" <richardcochran@gmail.com>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"Vitaly Lifshits" <vitaly.lifshits@intel.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Vinicius Costa Gomes" <vinicius.gomes@intel.com>,
	"Dima Ruinskiy" <dima.ruinskiy@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH 4/5] PCI/PTM: Drop granularity parameter from pci_enable_ptm()
Date: Tue, 24 Feb 2026 14:26:42 -0800	[thread overview]
Message-ID: <d3709fce-b94f-49fd-ac12-a75d20180d86@intel.com> (raw)
In-Reply-To: <20260224111044.3487873-5-mika.westerberg@linux.intel.com>



On 2/24/2026 3:10 AM, Mika Westerberg wrote:
> diff --git a/drivers/pci/pcie/ptm.c b/drivers/pci/pcie/ptm.c
> index 91a598ed534c..2c848ae4f15f 100644
> --- a/drivers/pci/pcie/ptm.c
> +++ b/drivers/pci/pcie/ptm.c
> @@ -88,7 +88,7 @@ void pci_ptm_init(struct pci_dev *dev)
>   
>   	if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
>   	    pci_pcie_type(dev) == PCI_EXP_TYPE_UPSTREAM)
> -		pci_enable_ptm(dev, NULL);
> +		pci_enable_ptm(dev);
>   }
>   
>   void pci_save_ptm_state(struct pci_dev *dev)
> @@ -182,15 +182,13 @@ static int __pci_enable_ptm(struct pci_dev *dev)
>   /**
>    * pci_enable_ptm() - Enable Precision Time Measurement
>    * @dev: PCI device
> - * @granularity: pointer to return granularity
>    *
> - * Enable Precision Time Measurement for @dev.  If successful and
> - * @granularity is non-NULL, return the Effective Granularity.
> + * Enable Precision Time Measurement for @dev.
>    *
>    * Return: zero if successful, or -EINVAL if @dev lacks a PTM Capability or
>    * is not a PTM Root and lacks an upstream path of PTM-enabled devices.
>    */
> -int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
> +int pci_enable_ptm(struct pci_dev *dev)
>   {
>   	int rc;
>   	char clock_desc[8];
> @@ -201,9 +199,6 @@ int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
>   
>   	dev->ptm_enabled = 1;
>   
> -	if (granularity)
> -		*granularity = dev->ptm_granularity;
> -


Presumably, if a driver ever actually needs this ptm_granularity in the 
future, they can just read it from the device, or we can add a helper to 
access if needed. Makes sense.

Thanks,
Jake

  reply	other threads:[~2026-02-24 22:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 11:10 [PATCH 0/5] PCI / igc: Improvements related to PTM enabling Mika Westerberg
2026-02-24 11:10 ` [PATCH 1/5] igc: Call netif_queue_set_napi() with rntl locked Mika Westerberg
2026-02-24 21:07   ` Vinicius Costa Gomes
2026-03-09 10:32   ` [Intel-wired-lan] " Dahan, AvigailX
2026-02-24 11:10 ` [PATCH 2/5] igc: Let the PCI core deal with the PM resume flow Mika Westerberg
2026-02-24 16:58   ` Bjorn Helgaas
2026-02-25 12:26     ` Mika Westerberg
2026-02-25 12:28       ` Mika Westerberg
2026-02-25 23:56       ` Vinicius Costa Gomes
2026-02-26 11:12         ` Mika Westerberg
2026-02-24 21:08   ` Vinicius Costa Gomes
2026-03-09 10:37   ` [Intel-wired-lan] " Dahan, AvigailX
2026-02-24 11:10 ` [PATCH 3/5] igc: Don't reset the hardware on suspend path Mika Westerberg
2026-02-24 21:08   ` Vinicius Costa Gomes
2026-03-09 10:39   ` [Intel-wired-lan] " Dahan, AvigailX
2026-02-24 11:10 ` [PATCH 4/5] PCI/PTM: Drop granularity parameter from pci_enable_ptm() Mika Westerberg
2026-02-24 22:26   ` Jacob Keller [this message]
2026-03-09 10:50   ` [Intel-wired-lan] " Dahan, AvigailX
2026-02-24 11:10 ` [PATCH 5/5] PCI/PTM: Do not enable PTM automatically for Root and Switch Upstream Ports Mika Westerberg
2026-03-09 10:54   ` [Intel-wired-lan] " Dahan, AvigailX
2026-02-24 17:13 ` [PATCH 0/5] PCI / igc: Improvements related to PTM enabling Bjorn Helgaas
2026-02-25 12:27   ` Mika Westerberg
2026-02-24 22:28 ` [Intel-wired-lan] " Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3709fce-b94f-49fd-ac12-a75d20180d86@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andriy.shevchenko@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=dima.ruinskiy@intel.com \
    --cc=edumazet@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=leon@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mbloch@nvidia.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vitaly.lifshits@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox