提交 867d1212 编写于 作者: A Andy Gospodarek 提交者: David S. Miller

bnxt: do not busy-poll when link is down

When busy polling while a link is down (during a link-flap test), TX
timeouts were observed as well as the following messages in the ring
buffer:

bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free tx failed. rc:-1
bnxt_en 0008:01:00.2 enP8p1s0f2d2: Resp cmpl intr err msg: 0x51
bnxt_en 0008:01:00.2 enP8p1s0f2d2: hwrm_ring_free rx failed. rc:-1

These were resolved by checking for link status and returning if link
was not up.
Signed-off-by: NAndy Gospodarek <gospo@broadcom.com>
Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
Tested-by: NRob Miller <rob.miller@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 30c7be26
...@@ -1811,6 +1811,9 @@ static int bnxt_busy_poll(struct napi_struct *napi) ...@@ -1811,6 +1811,9 @@ static int bnxt_busy_poll(struct napi_struct *napi)
if (atomic_read(&bp->intr_sem) != 0) if (atomic_read(&bp->intr_sem) != 0)
return LL_FLUSH_FAILED; return LL_FLUSH_FAILED;
if (!bp->link_info.link_up)
return LL_FLUSH_FAILED;
if (!bnxt_lock_poll(bnapi)) if (!bnxt_lock_poll(bnapi))
return LL_FLUSH_BUSY; return LL_FLUSH_BUSY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册