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

From
Paolo Abeni <pabeni@redhat.com>
Date
2026-03-17 12:09:47
Also in
lkml
Reply to
Raju Rangoju, 2026-03-13
On 3/13/26 2:42 PM, Raju Rangoju wrote:
quoted hunk ↗ jump to hunk
@@ -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
Thread (3 messages) 3 messages, 2 authors, last reply 2026-03-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help