OSDN Git Service

ice: Delay netdev registration
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tue, 2 Mar 2021 18:12:03 +0000 (10:12 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 31 Mar 2021 21:21:27 +0000 (14:21 -0700)
commit1e23f076b25424508d4576fba176888944b9b2b0
tree107a61b56ebdfec01c50bbb9a213a8d0da2033a2
parent634da4c118434cf8a0c5eabce9eb58502ef1521c
ice: Delay netdev registration

Once a netdev is registered, the corresponding network interface can
be immediately used by userspace utilities (like say NetworkManager).
This can be problematic if the driver technically isn't fully up yet.

Move netdev registration to the end of probe, as by this time the
driver data structures and device will be initialized as expected.

However, delaying netdev registration causes a failure in the aRFS flow
where netdev->reg_state == NETREG_REGISTERED condition is checked. It's
not clear why this check was added to begin with, so remove it.
Local testing didn't indicate any issues with this change.

The state bit check in ice_open was put in as a stop-gap measure to
prevent a premature interface up operation. This is no longer needed,
so remove it.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_arfs.c
drivers/net/ethernet/intel/ice/ice_main.c