aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Ertman <david.m.ertman@intel.com>2018-10-26 13:40:57 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-11-06 15:46:47 -0500
commit25525b69bb44a628841492f44a5a8e74f34724f4 (patch)
tree16a637f6ad2598d3a381577a68a7bdf26a777689
parent31082519c11b01fe1fb6dd512055f252812c1508 (diff)
ice: Fix napi delete calls for remove
In the remove path, the vsi->netdev is being set to NULL before the call to free vectors. This is causing the netif_napi_del call to never be made. Add a call to ice_napi_del to the same location as the calls to unregister_netdev and just prior to them. This will use the reverse flow as the register and netif_napi_add calls. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h1
-rw-r--r--drivers/net/ethernet/intel/ice/ice_lib.c1
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 1639e955f158..b8548370f1c7 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -370,5 +370,6 @@ int ice_set_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size);
370int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size); 370int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size);
371void ice_fill_rss_lut(u8 *lut, u16 rss_table_size, u16 rss_size); 371void ice_fill_rss_lut(u8 *lut, u16 rss_table_size, u16 rss_size);
372void ice_print_link_msg(struct ice_vsi *vsi, bool isup); 372void ice_print_link_msg(struct ice_vsi *vsi, bool isup);
373void ice_napi_del(struct ice_vsi *vsi);
373 374
374#endif /* _ICE_H_ */ 375#endif /* _ICE_H_ */
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index c604a44c8cfb..1041fa2a7767 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2458,6 +2458,7 @@ int ice_vsi_release(struct ice_vsi *vsi)
2458 * on this wq 2458 * on this wq
2459 */ 2459 */
2460 if (vsi->netdev && !ice_is_reset_in_progress(pf->state)) { 2460 if (vsi->netdev && !ice_is_reset_in_progress(pf->state)) {
2461 ice_napi_del(vsi);
2461 unregister_netdev(vsi->netdev); 2462 unregister_netdev(vsi->netdev);
2462 free_netdev(vsi->netdev); 2463 free_netdev(vsi->netdev);
2463 vsi->netdev = NULL; 2464 vsi->netdev = NULL;
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 338abb1b9233..82f49dbd762c 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -1465,7 +1465,7 @@ skip_req_irq:
1465 * ice_napi_del - Remove NAPI handler for the VSI 1465 * ice_napi_del - Remove NAPI handler for the VSI
1466 * @vsi: VSI for which NAPI handler is to be removed 1466 * @vsi: VSI for which NAPI handler is to be removed
1467 */ 1467 */
1468static void ice_napi_del(struct ice_vsi *vsi) 1468void ice_napi_del(struct ice_vsi *vsi)
1469{ 1469{
1470 int v_idx; 1470 int v_idx;
1471 1471