]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dma: cppi41: handle 0-length packets
authorDaniel Mack <zonque@gmail.com>
Mon, 26 May 2014 12:52:34 +0000 (14:52 +0200)
committerVinod Koul <vinod.koul@intel.com>
Tue, 1 Jul 2014 06:45:48 +0000 (12:15 +0530)
commit13bbfb5c4eb4fc85bf977245f9b3624df0187184
tree87d101762d6454fcb9091dd7b76c8bbc59f7f625
parent4c834452aad01531db949414f94f817a86348d59
dma: cppi41: handle 0-length packets

When a 0-length packet is received on the bus, desc->pd0 yields 1,
which confuses the driver's users. This information is clearly wrong
and not in accordance to the datasheet, but it's been observed on an
AM335x board, very reproducible.

Fix this by looking at bit 19 in PD2 of the completed packet. This bit
will tell us if a zero-length packet was received on a queue. If it's
set, ignore the value in PD0 and report a total length of 0 instead.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/cppi41.c