Re: [PATCH net] amd-xgbe: synchronize KR training with device operations

From: Paolo Abeni

Date: Tue Mar 17 2026 - 08:15:19 EST


On 3/13/26 2:42 PM, Raju Rangoju wrote:
> @@ -2115,7 +2160,9 @@ static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata,
> XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, cmd);
> XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, sub_cmd);
>
> - /* Issue the command */
> + /* Acquire mailbox lock for firmware command */
> + guard(mutex)(&pdata->mailbox_lock);

Also note that Documentation/process/maintainer-netdev.rst states:


Use of ``guard()`` is discouraged within any function longer than 20 lines,
``scoped_guard()`` is considered more readable. Using normal lock/unlock is
still (weakly) preferred.

/P