Re: [PATCH v2 1/2] ice: restore DDP state during PFR recovery

From: Simon Horman

Date: Tue Sep 08 2026 - 14:48:46 EST


On Mon, Sep 07, 2026 at 07:52:20PM +0800, Aaron Ma wrote:
> The firmware package and switch recipes are shared by all PFs of an
> adapter. However, each PF rebuilds independently after system resume. The
> resulting package downloads and recipe updates can interleave, causing
> firmware timeouts and leaving interfaces unusable.
>
> PFR also clears package-derived firmware state on affected devices. The
> existing PFR path only rebuilds the driver's block tables, so VLAN recipe
> programming can fail after the reset.
>
> The failure is reported as:
>
> ice 0000:04:00.0: Update pkg failed: err -5
> ice 0000:04:00.0: package load failed, -12
> ice 0000:04:00.0: Rebuild failed, unload and reload driver
>
> This was observed on an Intel E810-XXV-2 adapter (PCI ID 8086:159b,
> revision 02) with NVM package 1.0.0.18 and ICE OS Default DDP package
> 1.3.43.0.
>
> Serialize rebuilds across PFs of the same adapter, while allowing each PFR
> to complete independently. Reload the DDP package from its cached copy and
> restore the default DVM recipes before rebuilding the remaining PF state.
> Abort recovery if either operation fails.
>
> In addition, stop the service task before tearing down resources in
> ice_remove() so that an in-flight rebuild completes and cannot dereference
> pf->adapter after ice_adapter_put().
>
> Fixes: 462acf6aca85 ("ice: Enable DDP package download")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>
> Signed-off-by: Aaron Ma <aaron.ma@xxxxxxxxxxxxx>
> ---
> v1 -> v2:
> - Stop service task early in ice_remove() to prevent use-after-free on
> pf->adapter if rebuild is in flight.

Thanks for the update.

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>