On Wed, Jul 15, 2026 at 12:44 AM Myeonghun Pak <[email protected]> wrote: > > idpf_probe() enables PCIe Precision Time Measurement with > pci_enable_ptm(pdev, NULL), which programs the PTM control bits and sets > pdev->ptm_enabled when the bus/controller supports it. > > If a later probe step fails, the error path releases the allocated > workqueues and adapter memory without disabling PTM. The remove path has > the same imbalance when a successfully probed device is detached. In > both cases, the PCI core's software PTM state and the device's PTM control > bits remain set with no bound driver. > > Add pci_disable_ptm() to the common probe unwind after the PTM enable and > to idpf_remove(). pci_disable_ptm() is a no-op when PTM was not enabled, > so the non-fatal pci_enable_ptm() failure remains safe. > pcim_enable_device() only arranges for pci_disable_device() and does not > undo the PTM enable. > > Fixes: 8d5e12c5921c ("idpf: add initial PTP support") > Co-developed-by: Ijae Kim <[email protected]> > Signed-off-by: Ijae Kim <[email protected]> > Signed-off-by: Myeonghun Pak <[email protected]>
Reviewed-by: Mina Almasry <[email protected]> -- Thanks, Mina
