From: Vladimir Kondratiev Date: Mon, 1 Dec 2014 13:36:03 +0000 (+0200) Subject: wil6210: Rate limit "ring full" error message X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=70801e1b1eaebcc4367114881f4beb8532bdba2f;p=linux-beck.git wil6210: Rate limit "ring full" error message In the wil_tx_ring, error message printed when tx attempted while vring has no space to accommodate all fragments of frame. Normally, such situation handled by stopping tx queue. But, if tx queue is by-passed (like pktgen does), this error will be triggered at high rate and dmesg will be flooded with this message. Whole system may become unstable and hang with no possible recover except power cycle. Rate-limit it to prevent dmesg flooding. Signed-off-by: Vladimir Kondratiev Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index c3a548967c79..405ede655be5 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -928,8 +928,9 @@ static int wil_tx_vring(struct wil6210_priv *wil, struct vring *vring, wil_dbg_txrx(wil, "%s()\n", __func__); if (avail < 1 + nr_frags) { - wil_err(wil, "Tx ring full. No space for %d fragments\n", - 1 + nr_frags); + wil_err_ratelimited(wil, + "Tx ring full. No space for %d fragments\n", + 1 + nr_frags); return -ENOMEM; } _d = &vring->va[i].tx;