iavf: Remove queue tracking fields from iavf_adminq_ring
authorIvan Vecera <ivecera@redhat.com>
Thu, 26 Oct 2023 08:39:32 +0000 (10:39 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 27 Nov 2023 17:34:04 +0000 (09:34 -0800)
commit3d66f21552df25cf56f7f800a8d7687c88771761
tree41f87c28d985353287108552e16d691c62655e4a
parent4a95ce2407dadc4343759f96411442fdaa5467e4
iavf: Remove queue tracking fields from iavf_adminq_ring

Fields 'head', 'tail', 'len', 'bah' and 'bal' in iavf_adminq_ring
are used to store register offsets. These offsets are initialized
and remains constant so there is no need to store them in the
iavf_adminq_ring structure.

Remove these fields from iavf_adminq_ring and use register offset
constants instead. Remove iavf_adminq_init_regs() that originally
stores these constants into these fields.

Finally improve iavf_check_asq_alive() that assumes that
non-zero value of hw->aq.asq.len indicates fully initialized
AdminQ send queue. Replace it by check for non-zero value
of field hw->aq.asq.count that is non-zero when the sending
queue is initialized and is zeroed during shutdown of
the queue.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_adminq.c
drivers/net/ethernet/intel/iavf/iavf_adminq.h
drivers/net/ethernet/intel/iavf/iavf_common.c
drivers/net/ethernet/intel/iavf/iavf_main.c