OSDN Git Service

ice: Fix bugs in control queue processing
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Thu, 9 Aug 2018 13:28:56 +0000 (06:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:24 +0000 (16:59 -0700)
commit1dd0b6ce76ee1c60f2a7f3cd222872bf42ef10ca
treed9761dd992e6c5184c415502c2f8ee6c9df551de
parent9289b179fc4e20d663ffb6ce24721b6973d139c7
ice: Fix bugs in control queue processing

[ Upstream commit 3d6b640efcc1b07709b42dd2e9609401c6f88633 ]

This patch is a consolidation of multiple bug fixes for control queue
processing.

1)  In ice_clean_adminq_subtask() remove unnecessary reads/writes to
    registers. The bits PFINT_FW_CTL, PFINT_MBX_CTL and PFINT_SB_CTL
    are not set when an interrupt arrives, which means that clearing them
    again can be omitted.

2)  Get an accurate value in "pending" by re-reading the control queue
    head register from the hardware.

3)  Fix a corner case involving lost control queue messages by checking
    for new control messages (using ice_ctrlq_pending) before exiting the
    cleanup routine.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ice/ice_controlq.c
drivers/net/ethernet/intel/ice/ice_main.c