Re: [PATCH net-next v14 1/6] net: wwan: t9xx: Add PCIe core
From: Wu. JackBB (GSM)
Date: Fri Dec 04 2026 - 01:15:50 EST
Thanks for the review.
> Is 1 s enough after a successful MRST._RST? In that case polls is
> MTK_PLDR_READY_POLLS, which gives 50 x 20 ms. On timeout the code only
> warns and still calls pci_restore_state().
>
> drivers/pci/pci.c notes that devices may extend the post-reset period:
>
> /*
> * Devices may extend the 1 sec period through Request Retry Status
> * completions (PCIe r6.0 sec 2.3.1). The spec does not provide an upper
> * limit, but 60 sec ought to be enough for any device to become
> * responsive.
> */
> #define PCIE_RESET_READY_POLL_MS 60000 /* msec */
>
> The polling also starts as soon as the ACPI method returns. The core waits
> 100 ms after a reset before it accesses the device; this code does not.
>
> The comment above the loop says a config write the device does not take
> is lost. So if the modem holds off readiness past 1 s with RRS, the
> restore writes are lost. The BARs and the Command register then stay at
> their reset values, while the PCI core believes they were restored. A
> later bind on the same pci_dev cannot reach the device's MMIO.
>
> Could the wait follow the core's timing? Alternatively, could the restore
> be skipped when the device never became ready?
True.
Will fix in v15: when the reset is not seen within the current 1
s, remove() keeps polling, up to the 60 s the PCI core allows, for as
long as PCI_COMMAND still reads as an error and the upstream port
reports the link active, which is when the device can still be holding
off with RRS. If the reset is still not seen, remove() warns and skips
pci_restore_state() instead of writing to a device that has not
answered. No fixed 100 ms delay is added: before the reset is seen this
code only reads config space, and the PCI core itself restores right
after an ACPI _RST returns.
Thanks,
Jack
pw-bot: cr