]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: support stopping/waking tx queue
authorhayeswang <hayeswang@realtek.com>
Wed, 20 Nov 2013 09:30:56 +0000 (17:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Nov 2013 20:09:42 +0000 (15:09 -0500)
commitebca13562a5f5b920ad52c31ebd6df990e165c97
tree005ce53b5939c72b15ee60a676b9298fa798dd37
parent39337584698c238ff55f9029ec7d1423b3f4264e
r8152: support stopping/waking tx queue

The maximum packet number which a tx aggregation buffer could contain
is the tx_qlen.

tx_qlen = buffer size / (packet size + descriptor size).

If the tx buffer is empty and the queued packets are more than the
maximum value which is defined above, stop the tx queue. Wake the
tx queue if tx queue is stopped and the queued packets are less than
tx_qlen.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c