• Jacob Keller's avatar
    fm10k: implement request_lport_map pointer · 0afd20e5
    Jacob Keller authored
    If the fm10k interface is brought up, but the switch manager software is
    not running, the driver will continuously request the lport map every
    few seconds in the base driver watchdog routine. Eventually after
    several minutes the switch mailbox Tx fifo will fill up and the mailbox
    will timeout, resulting in a reset. This reset will appear as if for no
    reason, and occurs regularly every few minutes until the switch manager
    software is loaded.
    
    Prevent this from happening by only requesting the lport map after we've
    verified the switch mailbox is tx_ready. In order to simplify code logic
    and reduce code duplication, implement this as a new function pointer
    "mac.ops.request_lport_map" which the VF will not implement. Otherwise,
    we have to duplicate the tx_ready check outside of
    fm10k_get_host_state_generic, or re-implement most of
    fm10k_get_host_state_generic in the pf version.
    
    The resulting code is simpler and easier to understand, and prevents the
    PF from continuously requesting lport map and filling the Tx fifo of
    a switch mailbox that isn't ready.
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    0afd20e5
fm10k_common.c 14.6 KB