• Jay Hernandez's avatar
    cxgb4: Force uninitialized state if FW_ON_ADAPTER is < FW_VERSION and we're the MASTER_PF · e69972f5
    Jay Hernandez authored
    Forcing uninitialized state allows us to upgrade and reinitialize the adapter.
    
    FW_VERSION_T4 = 1.4.0.0
    FW_VERSION_T5 = 0.0.0.0
    At this point driver supports above and greater than above version of firmware.
    If it doesn't find the required firmware version than it forces the adapter to
    be reinitialized as shown below.
    
    1) If FW_ON_ADAPTER < FW_VERSION and we're the MASTER_PF force uninitialized
       state and a FW upgrade if available.
    
           - If FW_ON_ADAPTER < /lib/firmware/cxgb4/t*fw.bin we will update the
             adapters FW.
           - If FW_ON_ADAPTER >= /lib/firmware/cxgb4/t*fw.bin don't upgrade FW.
           - If upgrade_fw() fails force reinitialization of the adapter anyways,
             it might still work.
    
       Either way forcing the uninitialized state allows cxgb4 reinitialize FW.
    
    2) If FW_ON_ADAPTER >= FW_VERSION driver follows normal path.
    Signed-off-by: default avatarJay Hernandez <jay@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e69972f5
t4_hw.c 117 KB