net/e1000/base: check VF reset mailbox write
PATCH 1/1 net/e1000/base: check VF reset mailbox write
e1000_reset_hw_vf() sends E1000_VF_RESET through the VF mailbox and then waits for the PF response. The posted write can fail before the reset message is written to VMBMEM or before REQ is set, for example when the VF cannot obtain the mailbox lock.
Return the write error directly so the reset path does not treat a failed current request as a later read failure or as unrelated mailbox state.
Fixes af75078fece3 ("first public release")
Signed-off-by Artem Novikov <[email protected]>
--- drivers/net/intel/e1000/base/e1000_vf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/intel/e1000/base/e1000_vf.c +3 -1
@@ -253,7 +253,9 @@ STATIC s32 e1000_reset_hw_vf(struct e1000_hw *hw) mbx->timeout =E1000_VF_MBX_INIT_TIMEOUT ; msgbuf[0 ] =E1000_VF_RESET ; - mbx->ops.write_posted (hw, msgbuf,1 ,0 ); + ret_val = mbx->ops.write_posted (hw, msgbuf,1 ,0 ); +if (ret_val) +return ret_val;msec_delay (10 );
Signature · 1 line
2.43.0