net: ethernet: ti: cpdma: fix desc re-queuing
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 6 Jan 2017 20:07:30 +0000 (14:07 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Jan 2017 01:48:14 +0000 (20:48 -0500)
commit12a303e3b8136a89f0864a577a69f6a40b65fbe5
tree3bf2e81fb6cf00a263baee2dbbc007e6c841e57f
parenta6c83ccf3c534214e0aeb167a70391864da9b1fc
net: ethernet: ti: cpdma: fix desc re-queuing

The currently processing cpdma descriptor with EOQ flag set may
contain two values in Next Descriptor Pointer field:
- valid pointer: means CPDMA missed addition of new desc in queue;
- null: no more descriptors in queue.
In the later case, it's not required to write to HDP register, but now
CPDMA does it.

Hence, add additional check for Next Descriptor Pointer != null in
cpdma_chan_process() function before writing in HDP register.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_cpdma.c