• Kaike Wan's avatar
    IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state · c1a797c0
    Kaike Wan authored
    When it is requested to change its physical state back to Offline while in
    the process to go up, DC8051 will set the ERROR field in the
    DC8051_DBG_ERR_INFO_SET_BY_8051 register. This ERROR field will remain
    until the next time when DC8051 transitions from Offline to Polling.
    Subsequently, when the host requests DC8051 to change its physical state
    to Polling again, it may receive a DC8051 interrupt with the stale ERROR
    field still in DC8051_DBG_ERR_INFO_SET_BY_8051. If the host link state has
    been changed to Polling, this stale ERROR will force the host to
    transition to Offline state, resulting in a vicious cycle of Polling
    ->Offline->Polling->Offline. On the other hand, if the host link state is
    still Offline when the stale ERROR is received, the stale ERROR will be
    ignored, and the link will come up correctly.  This patch implements the
    correct behavior by changing host link state to Polling only after DC8051
    changes its physical state to Polling.
    Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: default avatarKrzysztof Goreczny <krzysztof.goreczny@intel.com>
    Signed-off-by: default avatarKaike Wan <kaike.wan@intel.com>
    Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    c1a797c0
chip.c 446 KB