Re: [PATCHv2 net-next] cxgb4: Enhance driver to update FW, when FW is too old

2015-10-09 Thread Neil Horman
> ret = t4_get_fw_version(adap, &adap->params.fw_vers); >+ /* Try multiple times before returning error */ >+ for (i = 0; (ret == -EBUSY || ret == -EAGAIN) && i < 3; i++) >+ ret = t4_get_fw_version(adap, &adap->params.fw_vers); >+ > if (ret) > retur

[PATCHv2 net-next] cxgb4: Enhance driver to update FW, when FW is too old

2015-10-07 Thread Hariprasad Shenai
t4_check_fw_version() can return several error codes (-EINVAL, -EBUSY, -EAGAIN). The present code sets the adapter state to UNINIT only if its an EFAULT. In all the error cases set the adapter to uninitialized state. In t4_check_fw_version() if call to t4_get_fw_version() fails, repeat the operati