All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yazen Ghannam" <yazen.ghannam@amd.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 3/5] PCI/FLIT: Negotiate _OSC control for Flit Error Logging
Date: Tue, 14 Jul 2026 19:36:04 +0000	[thread overview]
Message-ID: <20260714193604.E6C0C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714183950.1620016-4-yazen.ghannam@amd.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `pcie_ports=native` command line override is ignored for FLIT error logging.
- [Medium] Missing PCI error recovery callback (`slot_reset`) in `flitdriver`.
--

--- Patch [3]: [PATCH 3/5] PCI/FLIT: Negotiate _OSC control for Flit Error Logging ---
commit 45b0bbc04c567497a5e02247081509663ead4f63
Author: Yazen Ghannam <yazen.ghannam@amd.com>

PCI/FLIT: Negotiate _OSC control for Flit Error Logging

The Flit Logging Extended Capability may be managed by the platform firmware.
This patch negotiates ownership through _OSC before the OS enables the Flit
Error Counter and registers the port service only when the OS is granted
native control.

[ ... ]

> diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c
> index 1a649d6f4ab8a..ef224e7243f38 100644
> --- a/drivers/pci/pcie/portdrv.c
> +++ b/drivers/pci/pcie/portdrv.c
> @@ -286,7 +286,7 @@ static int get_port_device_capability(struct pci_dev *dev)
>  	}
>  
>  #ifdef CONFIG_PCIE_FLIT
> -	if (dev->flit_cap)
> +	if (dev->flit_cap && host->native_flit)

[Severity: Medium]
Does this check need to include the pcie_ports_native override condition?

Other port services like AER and PME check for pcie_ports_native or their
respective native control flag. Without this, the pcie_ports=native command
line parameter will be ignored for FLIT error logging if the platform
firmware did not grant native control.

>  		services |= PCIE_PORT_SERVICE_FLIT;
>  #endif
>  

[ ... ]

Additionally, looking at the port service driver definition:

drivers/pci/pcie/flit.c:flitdriver
    static struct pcie_port_service_driver flitdriver = {
    	.name		= "flit",
    	.port_type	= PCIE_ANY_PORT,
    	.service	= PCIE_PORT_SERVICE_FLIT,
    	.probe		= flit_probe,
    	.suspend	= flit_cntr_suspend,
    	.resume		= flit_cntr_resume,
    	.remove		= flit_cntr_remove,
    };

[Severity: Medium]
Is a .slot_reset callback needed here to re-enable FLIT logging following
a slot reset?

After a PCI error recovery (e.g., AER or DPC) triggers a slot reset, the FLIT
error counter configuration is cleared by the hardware. Because the FLIT
capability is not saved and restored by the generic PCI core during reset,
error logging could remain permanently disabled for that port.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260714183950.1620016-1-yazen.ghannam@amd.com?part=3

  reply	other threads:[~2026-07-14 19:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 18:39 [PATCH 0/5] PCIe Flit Logging Ext Capability Support Yazen Ghannam
2026-07-14 18:39 ` [PATCH 1/5] PCI/portdrv: Group PCI Exp Cap services into a single mask Yazen Ghannam
2026-07-14 19:11   ` sashiko-bot
2026-07-14 18:39 ` [PATCH 2/5] PCI/FLIT: Add support for Flit Logging Extended Capability Yazen Ghannam
2026-07-14 19:17   ` sashiko-bot
2026-07-14 18:39 ` [PATCH 3/5] PCI/FLIT: Negotiate _OSC control for Flit Error Logging Yazen Ghannam
2026-07-14 19:36   ` sashiko-bot [this message]
2026-07-14 18:39 ` [PATCH 4/5] PCI/FLIT: Add trace event for flit errors Yazen Ghannam
2026-07-14 19:16   ` sashiko-bot
2026-07-14 18:39 ` [PATCH 5/5] PCI/FLIT: Ratelimit flit error logging Yazen Ghannam
2026-07-14 19:18   ` sashiko-bot

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=20260714193604.E6C0C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yazen.ghannam@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.