Re: [PATCH 2/5] ice: retain the adapter throughout hardware initialization and teardown

From: Jacob Keller

Date: Thu Oct 22 2026 - 14:07:41 EST


On 10/20/2026 2:24 AM, Przemek Kitszel wrote:
> On 10/19/26 12:51, Aaron Ma wrote:
>> Adapter-scoped synchronization must be available to Admin Queue users
>> from initial queue creation through the last teardown command. Probe
>> currently obtains its adapter reference only after hardware and package
>> initialization, and error cleanup and removal drop it before hardware
>> teardown.
>>
>> Acquire the reference before either normal hardware initialization or
>> firmware recovery-mode initialization. Release it after hardware and
>> device cleanup, balancing recovery-mode probe failures and removal too.
>>
>> This establishes the lifetime prerequisite for moving package ownership
>> exclusion from a module-global mutex to the shared adapter.
>>
>> Signed-off-by: Aaron Ma <aaron.ma@xxxxxxxxxxxxx>
>
> it was me to move hw init before adapter init, to make hw details
> readily accessible to the adapter
>
> but I agree that SW lock protection covering HW reinit will be great,
> and my needs could be achieved by other means, even if less elegant
>
> so, I'm happy with your patch
> OTOH I have a big series that git-conflicts, would be easiest if your
> series will be merged first (so I will adjust), but I don't want to be
> delayed (will be CCing you on it going forward)
>
> the real thing is of course the 3rd patch not this one
>

I got a Sashiko report about adapter not being present during hw deinit,
which was problematic for PTP. I think the lifetime rules make more
sense if the adapter outlives the PFs.

Sounds good.

Thanks,
Jake