• Petr Machata's avatar
    mlxsw: pci: Permit enabling CFF mode · 9aad19a3
    Petr Machata authored
    There are FW versions out there that do not support CFF flood mode, and on
    Spectrum-1 in particular, there is no plan to support it at all. mlxsw will
    therefore have to support both controlled flood mode as well as CFF. There
    are also FW versions out there that claim to support CFF flood mode, but
    then reject or ignore configurations enabling the same. The driver thus has
    to have a say in whether an attempt to configure CFF flood mode should even
    be made, and what to use as a fallback.
    
    Hence express the feature in terms of "does the driver prefer CFF flood
    mode?", and "what flood mode the PCI module managed to configure the FW
    with". This gives to the driver a chance to determine whether CFF flood
    mode configuration should be attempted.
    
    The latter bit was added in previous patches. In this patch, add the bit
    that allows the driver to determine whether CFF enablement should be
    attempted, and the enablement code itself.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Link: https://lore.kernel.org/r/41640a0ee58e0a9538f820f7b601a0e35f6449e4.1700503644.git.petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    9aad19a3
core.h 21.6 KB