Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guangshuo Li" <liguangshuo@mail.sdu.edu.cn>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: dra7xx: Remove the IRQ domain with the root port
Date: Sat, 28 Nov 2026 10:05:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-238619@kernel.org> (raw)
In-Reply-To: <20261128-f81b700d6c-u40-0@mail.sdu.edu.cn>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] PCI: dra7xx: missing link stop and EPC deinit in
  dra7xx_pcie_deinit()
--

commit d00611bbb3d39d9987ab2f13aa6f0204c6621bbb
Author: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>

PCI: dra7xx: Remove the IRQ domain with the root port

This commit moves the INTx IRQ domain and chained handler setup into the
root port host init callback and removes them in a matching host deinit
callback, while also adding a platform driver remove callback.

> diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
> index 0d56fd5a19ea0..0264cd4fbe8d4 100644
> --- a/drivers/pci/controller/dwc/pci-dra7xx.c
> +++ b/drivers/pci/controller/dwc/pci-dra7xx.c

[ ... ]

> @@ -671,6 +670,14 @@ static int dra7xx_pcie_configure_two_lane(struct device *dev,
>  	return 0;
>  }
>  
> +static void dra7xx_pcie_deinit(struct dra7xx_pcie *dra7xx)
> +{
> +	if (dra7xx->pci->mode == DW_PCIE_RC_TYPE)
> +		dw_pcie_host_deinit(&dra7xx->pci->pp);
> +	else
> +		dw_pcie_ep_deinit(&dra7xx->pci->ep);
> +}

[Severity: Medium]
In the endpoint branch, should dra7xx_pcie_deinit() also call
dw_pcie_stop_link() and pci_epc_deinit_notify() before
dw_pcie_ep_deinit()?

Unlike dw_pcie_host_deinit(), dw_pcie_ep_deinit() does not stop the link
or notify bound endpoint functions of deinitialization (to pair with
pci_epc_init_notify() in dra7xx_add_pcie_ep()).  When
dra7xx_pcie_remove() then disables runtime PM and the PHYs, LTSSM_EN can
remain active and epc->init_complete stays true, causing a later EPF
unbind to access unclocked DBI registers.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261128-f81b700d6c-u40-0@mail.sdu.edu.cn?part=1

      reply	other threads:[~2026-11-28 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28  9:42 [PATCH] PCI: dra7xx: Remove the IRQ domain with the root port Guangshuo Li
2026-11-28 10:05 ` sashiko-bot [this message]

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=sashiko-outbox-238619@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=liguangshuo@mail.sdu.edu.cn \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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