Skip to content
  • John Fastabend's avatar
    ixgbe: DCB, implement capabilities flags · 3032309b
    John Fastabend authored
    
    
    This implements dcbnl get and set capabilities ops. The
    devices supported by ixgbe can be configured to run in
    IEEE or CEE modes but not both.
    
    With the DCBX set capabilities bit we add an explicit
    signal that must be used to toggle between these modes.
    This patch adds logic to fail the CEE command set_hw_all()
    which programs the device with a CEE configuration if
    the CEE caps bit is not set. Similarly, IEEE set
    commands will fail if the IEEE caps bit is not set. We
    allow most CEE config set commands to occur because they
    do not touch the hardware until set_hw_all() is called.
    
    The one exception to the above is the {set|get}app routines.
    These must always be protected by caps bits to ensure
    side effects do not corrupt the current configured mode.
    
    By requiring the caps bit to be set correctly we can
    maintain a consistent configuration in the hardware
    for CEE or IEEE modes and prevent partial hardware
    configurations that may occur if user space does
    not send a complete IEEE or CEE configurations.
    
    It is expected that user space will signal a DCBX mode
    before programming device.
    
    Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
    Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    3032309b