• Nathan Fontenot's avatar
    ibmvnic: Handle all login error conditions · 64d92aa2
    Nathan Fontenot authored
    There is a bug in handling the possible return codes from sending the
    login CRQ. The current code treats any non-success return value,
    minus failure to send the crq and a timeout waiting for a login response,
    as a need to re-send the login CRQ. This can put the drive in an
    infinite loop of trying to login when getting return values other
    that a partial success such as a return code of aborted. For these
    scenarios the login will not ever succeed at this point and the
    driver would need to be reset again.
    
    To resolve this loop trying to login is updated to only retry the
    login if the driver gets a return code of a partial success. Other
    return codes are treated as an error and the driver returns an error
    from ibmvnic_login().
    
    To avoid infinite looping in the partial success return cases, the
    number of retries is capped at the maximum number of supported
    queues. This value was chosen because the driver does a renegotiation
    of capabilities which sets the number of queues possible and allows
    the driver to attempt a login for possible value for the number
    of queues supported.
    Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    64d92aa2
ibmvnic.h 25.5 KB