|
Thomas Bogendoerfer |
b99a27 |
From: Dave Ertman <david.m.ertman@intel.com>
|
|
Thomas Bogendoerfer |
b99a27 |
Date: Fri, 26 Feb 2021 13:19:28 -0800
|
|
Thomas Bogendoerfer |
b99a27 |
Subject: ice: remove DCBNL_DEVRESET bit from PF state
|
|
Thomas Bogendoerfer |
b99a27 |
Patch-mainline: v5.12-rc7
|
|
Thomas Bogendoerfer |
b99a27 |
Git-commit: 741b7b743bbcb5a3848e4e55982064214f900d2f
|
|
Thomas Bogendoerfer |
b99a27 |
References: jsc#SLE-7926
|
|
Thomas Bogendoerfer |
b99a27 |
|
|
Thomas Bogendoerfer |
b99a27 |
The original purpose of the ICE_DCBNL_DEVRESET was to protect
|
|
Thomas Bogendoerfer |
b99a27 |
the driver during DCBNL device resets. But, the flow for
|
|
Thomas Bogendoerfer |
b99a27 |
DCBNL device resets now consists of only calls up the stack
|
|
Thomas Bogendoerfer |
b99a27 |
such as dev_close() and dev_open() that will result in NDO calls
|
|
Thomas Bogendoerfer |
b99a27 |
to the driver. These will be handled with state changes from the
|
|
Thomas Bogendoerfer |
b99a27 |
stack. Also, there is a problem of the dev_close and dev_open
|
|
Thomas Bogendoerfer |
b99a27 |
being blocked by checks for reset in progress also using the
|
|
Thomas Bogendoerfer |
b99a27 |
ICE_DCBNL_DEVRESET bit.
|
|
Thomas Bogendoerfer |
b99a27 |
|
|
Thomas Bogendoerfer |
b99a27 |
Since the ICE_DCBNL_DEVRESET bit is not necessary for protecting
|
|
Thomas Bogendoerfer |
b99a27 |
the driver from DCBNL device resets and it is actually blocking
|
|
Thomas Bogendoerfer |
b99a27 |
changes coming from the DCBNL interface, remove the bit from the
|
|
Thomas Bogendoerfer |
b99a27 |
PF state and don't block driver function based on DCBNL reset in
|
|
Thomas Bogendoerfer |
b99a27 |
progress.
|
|
Thomas Bogendoerfer |
b99a27 |
|
|
Thomas Bogendoerfer |
b99a27 |
Fixes: b94b013eb626 ("ice: Implement DCBNL support")
|
|
Thomas Bogendoerfer |
b99a27 |
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
|
|
Thomas Bogendoerfer |
b99a27 |
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
|
|
Thomas Bogendoerfer |
b99a27 |
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
|
|
Thomas Bogendoerfer |
b99a27 |
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
|
|
Thomas Bogendoerfer |
b99a27 |
---
|
|
Thomas Bogendoerfer |
b99a27 |
drivers/net/ethernet/intel/ice/ice.h | 1 -
|
|
Thomas Bogendoerfer |
b99a27 |
drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 2 --
|
|
Thomas Bogendoerfer |
b99a27 |
drivers/net/ethernet/intel/ice/ice_lib.c | 1 -
|
|
Thomas Bogendoerfer |
b99a27 |
3 files changed, 4 deletions(-)
|
|
Thomas Bogendoerfer |
b99a27 |
|
|
Thomas Bogendoerfer |
b99a27 |
--- a/drivers/net/ethernet/intel/ice/ice.h
|
|
Thomas Bogendoerfer |
b99a27 |
+++ b/drivers/net/ethernet/intel/ice/ice.h
|
|
Thomas Bogendoerfer |
b99a27 |
@@ -186,7 +186,6 @@ enum ice_state {
|
|
Thomas Bogendoerfer |
b99a27 |
__ICE_NEEDS_RESTART,
|
|
Thomas Bogendoerfer |
b99a27 |
__ICE_PREPARED_FOR_RESET, /* set by driver when prepared */
|
|
Thomas Bogendoerfer |
b99a27 |
__ICE_RESET_OICR_RECV, /* set by driver after rcv reset OICR */
|
|
Thomas Bogendoerfer |
b99a27 |
- __ICE_DCBNL_DEVRESET, /* set by dcbnl devreset */
|
|
Thomas Bogendoerfer |
b99a27 |
__ICE_PFR_REQ, /* set by driver and peers */
|
|
Thomas Bogendoerfer |
b99a27 |
__ICE_CORER_REQ, /* set by driver and peers */
|
|
Thomas Bogendoerfer |
b99a27 |
__ICE_GLOBR_REQ, /* set by driver and peers */
|
|
Thomas Bogendoerfer |
b99a27 |
--- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
|
|
Thomas Bogendoerfer |
b99a27 |
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
|
|
Thomas Bogendoerfer |
b99a27 |
@@ -20,12 +20,10 @@ static void ice_dcbnl_devreset(struct ne
|
|
Thomas Bogendoerfer |
b99a27 |
while (ice_is_reset_in_progress(pf->state))
|
|
Thomas Bogendoerfer |
b99a27 |
usleep_range(1000, 2000);
|
|
Thomas Bogendoerfer |
b99a27 |
|
|
Thomas Bogendoerfer |
b99a27 |
- set_bit(__ICE_DCBNL_DEVRESET, pf->state);
|
|
Thomas Bogendoerfer |
b99a27 |
dev_close(netdev);
|
|
Thomas Bogendoerfer |
b99a27 |
netdev_state_change(netdev);
|
|
Thomas Bogendoerfer |
b99a27 |
dev_open(netdev, NULL);
|
|
Thomas Bogendoerfer |
b99a27 |
netdev_state_change(netdev);
|
|
Thomas Bogendoerfer |
b99a27 |
- clear_bit(__ICE_DCBNL_DEVRESET, pf->state);
|
|
Thomas Bogendoerfer |
b99a27 |
}
|
|
Thomas Bogendoerfer |
b99a27 |
|
|
Thomas Bogendoerfer |
b99a27 |
/**
|
|
Thomas Bogendoerfer |
b99a27 |
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
|
|
Thomas Bogendoerfer |
b99a27 |
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
|
|
Thomas Bogendoerfer |
b99a27 |
@@ -2810,7 +2810,6 @@ err_vsi:
|
|
Thomas Bogendoerfer |
b99a27 |
bool ice_is_reset_in_progress(unsigned long *state)
|
|
Thomas Bogendoerfer |
b99a27 |
{
|
|
Thomas Bogendoerfer |
b99a27 |
return test_bit(__ICE_RESET_OICR_RECV, state) ||
|
|
Thomas Bogendoerfer |
b99a27 |
- test_bit(__ICE_DCBNL_DEVRESET, state) ||
|
|
Thomas Bogendoerfer |
b99a27 |
test_bit(__ICE_PFR_REQ, state) ||
|
|
Thomas Bogendoerfer |
b99a27 |
test_bit(__ICE_CORER_REQ, state) ||
|
|
Thomas Bogendoerfer |
b99a27 |
test_bit(__ICE_GLOBR_REQ, state);
|