• Anirudh Venkataramanan's avatar
    ice: Prevent control queue operations during reset · 9ca72984
    Anirudh Venkataramanan authored
    [ Upstream commit fd2a9817 ]
    
    Once reset is issued, the driver loses all control queue interfaces.
    Exercising control queue operations during reset is incorrect and
    may result in long timeouts.
    
    This patch introduces a new field 'reset_ongoing' in the hw structure.
    This is set to 1 by the core driver when it receives a reset interrupt.
    ice_sq_send_cmd checks reset_ongoing before actually issuing the control
    queue operation. If a reset is in progress, it returns a soft error code
    (ICE_ERR_RESET_PENDING) to the caller. The caller may or may not have to
    take any action based on this return. Once the driver knows that the
    reset is done, it has to set reset_ongoing back to 0. This will allow
    control queue operations to be posted to the hardware again.
    
    This "bail out" logic was specifically added to ice_sq_send_cmd (which
    is pretty low level function) so that we have one solution in one place
    that applies to all types of control queues.
    Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
    Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    9ca72984
ice_status.h 844 Bytes