Re: [PATCH v2 1/2] PCI: Don't show errors on inaccessible PCI devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 16, 2025 at 02:26:56PM -0500, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@xxxxxxx>
> 
> When a USB4 dock is unplugged the PCIe bridge it's connected to will
> remove issue a "Link Down" and "Card not detected event". The PCI core
> will treat this as a surprise hotplug event and unconfigure all downstream
> devices. This involves setting the device error state to
> `pci_channel_io_perm_failure` which pci_dev_is_disconnected() will check.
> 
> As the device is already gone and the PCI core is cleaning up there isn't
> really any reason to show error messages to the user about failing to
> change power states. Detect the device is marked disconnected and skip the
> messaging.

Code change looks reasonable to me, but should be cc'ed to Rafael.

I find the commit message a bit confusing.  I guess your point is
that it doesn't make sense to runtime resume disconnected devices
to D0 and report the (expected) failure to do so.  That's one sentence.
And the subject could be something like:

    PCI/PM: Skip resuming to D0 if disconnected

Thanks,

Lukas




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux