Skip to content

Commit 19b73d8

Browse files
mawilli1Jeff Kirsher
authored andcommitted
i40evf: Add additional check for reset
If the driver happens to read a register during the time in which the device is undergoing reset, it will receive a value of 0xdeadbeef instead of a valid value. Unfortunately, the driver may misinterpret this as a valid value, especially if it's just looking for individual bits. Add an explicit check for this value when we are looking for admin queue errors, and trigger reset recovery if we find it. Signed-off-by: Mitch Williams <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 56e5ca6 commit 19b73d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/intel/i40evf/i40evf_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,8 @@ static void i40evf_adminq_task(struct work_struct *work)
19941994

19951995
/* check for error indications */
19961996
val = rd32(hw, hw->aq.arq.len);
1997+
if (val == 0xdeadbeef) /* indicates device in reset */
1998+
goto freedom;
19971999
oldval = val;
19982000
if (val & I40E_VF_ARQLEN1_ARQVFE_MASK) {
19992001
dev_info(&adapter->pdev->dev, "ARQ VF Error detected\n");

0 commit comments

Comments
 (0)