mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Claudiu Beznea <claudiu.beznea+renesas@tuxon.dev>
To: Manivannan Sadhasivam <mani@kernel.org>,
	John Madieu <john.madieu.xa@bp.renesas.com>
Cc: claudiu.beznea.uj@bp.renesas.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org, bhelgaas@google.com, robh@kernel.org,
	linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, john.madieu@gmail.com,
	biju.das.jz@bp.renesas.com,
	prabhakar.mahadev-lad.rj@bp.renesas.com
Subject: Re: [PATCH v2] PCI: rzg3s-host: Re-enumerate the bus on PCIe link-state changes
Date: Thu, 16 Jul 2026 15:04:56 +0300	[thread overview]
Message-ID: <80e9582c-9441-4d5a-9931-b77b3c359eea@tuxon.dev> (raw)
In-Reply-To: <aifual6ttxnrbi3o3lrnprwinmhvkysmebzrscoxhyhxbaqkz5@l66w7bdechqz>

Hi, Mani,

On 7/14/26 19:58, Manivannan Sadhasivam wrote:
> On Tue, Jun 30, 2026 at 02:17:20PM +0000, John Madieu wrote:
>> The RZ/G3E PCIe controller does not expose the standard PCIe Slot
>> Capability registers, so the generic pciehp driver cannot be used. The
>> only link-state signal the hardware provides is the DL_UpDown bit in the
>> PEIS0 event status register, which is raised on every Data Link layer
>> up/down transition.
>>
>> Enable DL_UpDown in PEIE0 and hook up an interrupt handler so the driver
>> can react to link-state changes: a device that trains after boot gets
>> enumerated, and a device that disappears on link loss is removed. This
>> provides hotplug-like behaviour without the PCI hotplug core, which is
>> unavailable for the reason above.
>>
>> On a DL_UpDown event the handler acks the W1C status bit and schedules a
>> worker that inspects PCSTAT1.DL_DOWN_STS:
>>
>>    - link up: re-run max link speed negotiation, wait for the link to
>>      settle and pci_rescan_bus() the root bus;
>>    - link down: walk the bus in reverse and
>>      pci_stop_and_remove_bus_device() each child.
>>
>> Both paths take pci_lock_rescan_remove() to serialise against the PCI
>> core.
>>
>> Link events are only acted upon once the controller is fully
>> initialised. A DL_UpDown latched while the registers are not configured,
>> for example when the event IRQ is used as a system wakeup source during
>> resume, is acknowledged but does not schedule a rescan.
> This is not correct. I don't see the patch configuring 'event IRQ' as a wakeup
> source.
> 
> Rest of the patch LGTM. If you confirm above, I can reword while applying.

John is not with Renesas anymore so I confirm on his behalf it is OK for you to 
amend it while applying.

However, I checked if this patch applies on top of next-20260715 or v7.2-rc1 and 
it doesn't on neither of these two HEADs.

I can re-base and re-send. Please let me know otherwise.

Thank you,
Claudiu

  reply	other threads:[~2026-07-16 12:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 14:17 John Madieu
2026-07-14 16:58 ` Manivannan Sadhasivam
2026-07-16 12:04   ` Claudiu Beznea [this message]
2026-07-16 13:27     ` Manivannan Sadhasivam

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=80e9582c-9441-4d5a-9931-b77b3c359eea@tuxon.dev \
    --to=claudiu.beznea+renesas@tuxon.dev \
    --cc=bhelgaas@google.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=john.madieu@gmail.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®