提交 6b50ea15 编写于 作者: A Amit Kumar Salecha 提交者: David S. Miller

netxen: fix corner cases of firmware recovery

Signed-off-by: NAmit Kumar Salecha <amit.salecha@qlogic.com>

o DEV_NEED_RESET state was not handled during fw intialization phase.
o nx_decr_dev_ref_cnt() can return error, if fail to grab pcie seamphore.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ff90cd4a
......@@ -2294,6 +2294,7 @@ netxen_fwinit_work(struct work_struct *work)
}
break;
case NX_DEV_NEED_RESET:
case NX_DEV_INITALIZING:
if (++adapter->fw_wait_cnt < FW_POLL_THRESH) {
netxen_schedule_work(adapter,
......@@ -2337,6 +2338,9 @@ netxen_detach_work(struct work_struct *work)
ref_cnt = nx_decr_dev_ref_cnt(adapter);
if (ref_cnt == -EIO)
goto err_ret;
delay = (ref_cnt == 0) ? 0 : (2 * FW_POLL_DELAY);
adapter->fw_wait_cnt = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册