RE: [PATCH v2 1/2] ice: restore DDP state during PFR recovery
From: Singh, Ayush1X
Date: Wed Oct 14 2026 - 05:37:18 EST
> -----Original Message-----
> From: Aaron Ma <aaron.ma@xxxxxxxxxxxxx>
> Sent: 07 September 2026 17:22
> To: Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; Andrew Lunn <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Cc: Henry Tieman <henry.w.tieman@xxxxxxxxx>; moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@xxxxxxxxxxxxxxxx>
> Subject: [PATCH v2 1/2] ice: restore DDP state during PFR recovery
>
> 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.
>
> drivers/net/ethernet/intel/ice/ice_adapter.c | 2 ++ drivers/net/ethernet/intel/ice/ice_adapter.h | 3 ++
> drivers/net/ethernet/intel/ice/ice_main.c | 35 ++++++++++++++-----
> .../net/ethernet/intel/ice/ice_vlan_mode.c | 2 +-
> .../net/ethernet/intel/ice/ice_vlan_mode.h | 1 +
> 5 files changed, 34 insertions(+), 9 deletions(-)
>
Tested-by: Ayush Singh < ayush1x.singh@xxxxxxxxx > (A Contingent worker at Intel)