Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Mario Limonciello <mario.limonciello@amd.com>,
	Lukas Wunner <lukas@wunner.de>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: pciehp: Disable link and turn off slot power while removing
Date: Wed, 3 Jun 2026 14:04:33 -0500	[thread overview]
Message-ID: <43545019-221c-45af-b646-3b3d4ea86718@kernel.org> (raw)
In-Reply-To: <8a7cf3f6-07e4-4d12-a2ac-72de02a03eb9@amd.com>

On 5/7/26 00:03, Mario Limonciello wrote:
> 
> 
> On 5/6/26 23:26, Lukas Wunner wrote:
>> On Wed, May 06, 2026 at 02:16:10PM -0500, Mario Limonciello wrote:
>>> On 5/6/26 12:55, Lukas Wunner wrote:
>>>> Moreover there are products where Presence Detect is hardwired to zero,
>>>> see commit 80696f991424 ("PCI: pciehp: Tolerate Presence Detect 
>>>> hardwired
>>>> to zero").  So we have to rely on a link change to detect that a new 
>>>> device
>>>> has been plugged in after slot poweroff.  That won't work if the 
>>>> link is
>>>> disabled.
>>>
>>> How would you feel about turning off link detect somewhere specific 
>>> to the
>>> shutdown path?
>>
>> I *think* shutdown is performed bottom-up in the hierarchy and so
>> this might work.  But it's not great to introduce such a change
>> for everyone just because a single product needs it. 
> 
> Generally speaking I'm not a fan of Linux changing hardware state and 
> not cleaning up after itself at shutdown.  This can lead to weird 
> behaviors for power consumption, wakeups, or inconsistent init across a 
> kexec vs warm reboot vs cold reboot (that BIOS had a chance to swing 
> it's hammer).
> 
>> It would
>> be better to root-cause the issue. 
> 
> I'll see if we can figure out what's happening with traces on a USB 
> analyzer.  But FWIW it's a Linux only issue :/
> 
>> Maybe the vendor is able to
>> provide a BIOS update which resolves it?
>>
> 
> Given it's Linux only issue; unlikely.

I'm happy to share that we figured out why it was only happening on 
Linux by comparing the traces.  The USB4 CM on Windows issues issues a 
downstream port reset during the tear down process.  This is missing 
from Linux.

This patch helps it.

https://lore.kernel.org/linux-usb/20260603180146.3949001-1-Basavaraj.Natikar@amd.com/

  reply	other threads:[~2026-06-03 19:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 16:43 [PATCH] PCI: pciehp: Disable link and turn off slot power while removing Mario Limonciello
2026-05-06 17:55 ` Lukas Wunner
2026-05-06 19:16   ` Mario Limonciello
2026-05-07  4:26     ` Lukas Wunner
2026-05-07  5:03       ` Mario Limonciello
2026-06-03 19:04         ` Mario Limonciello [this message]
2026-06-04  7:46           ` Lukas Wunner
2026-05-06 20:58 ` 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=43545019-221c-45af-b646-3b3d4ea86718@kernel.org \
    --to=superm1@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mario.limonciello@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox