The following code appears starting on line 291 of C:\ti\pdk_C6748_2_0_0_0\biospsp_03_00_01_00\drivers\mcbsp\src\Mcbsp_edma.c
/* Handle the IOP packets appropriately in case of an breakpoint *
* in case of an breakpoint.either of the packets (2 link param Pkts) *
* could have caused a callback as both of them as linkedto each other*
* Hence we will handle that condition here */
if (chanHandle->mode == IOM_INPUT)
{
/* Check if destination address falls into the range of 1st req *
* in the floating queue. */
if (((pramTbl.destAddr >= (Uint32)chanHandle->tempPacket->addr)
&& (pramTbl.destAddr < (Uint32)chanHandle->tempPacket->addr
+ chanHandle->tempPacket->size)) &&
(FALSE == Queue_empty(Queue_handle(&(chanHandle->queueFloatingList)))))
{
/* Since we have already dequeue the 1st request, dequeue *
* 2nd io request from floating queue */
ioPacket = (IOM_Packet *)Queue_get(
Queue_handle(&chanHandle->queueFloatingList));
/* Queue the tempPacket (i.e. 1st io request) as this pkt *
* should be first in a queue */
Queue_put(
Queue_handle(&chanHandle->queueFloatingList),
(Ptr)chanHandle->tempPacket);
/* Queue the ioPacket i.e. 2nd request in floating queue */
Queue_put(Queue_handle(&chanHandle->queueFloatingList),(Ptr)ioPacket);
}
}
else
{
/* Check if destination address falls into the range of1st request*
* in the floating queue. */
if (((pramTbl.srcAddr >= (Uint32)chanHandle->tempPacket->addr)&&
(pramTbl.srcAddr < (Uint32)chanHandle->tempPacket->addr + chanHandle->tempPacket->size)) &&
(FALSE == Queue_empty(Queue_handle(&(chanHandle->queueFloatingList)))))
{
/* Since we have already dequeue the 1st request, dequeue *
* io request from floating queue */
ioPacket = (IOM_Packet *)Queue_get(
Queue_handle(&chanHandle->queueFloatingList));
/* Queue the tempPacket (i.e. 1st io request) as this *
* packet should be first in a queue */
Queue_put(
Queue_handle(&chanHandle->queueFloatingList),
(Ptr)chanHandle->tempPacket);
/* Queue the ioPacket i.e. 2nd request in floating queue */
Queue_put(Queue_handle(&chanHandle->queueFloatingList),(Ptr)ioPacket);
status = IOM_ENOPACKETS;
}
}
This does some bogus work on the queues (documentation says GIO drivers maintain buffer order, potential for the same item to be queued twice) and leaves submitCount out of sync with queue contents. I can't really understand what the comments are saying this code is for though I get the general gist that it is to make debugging easier.
I've removed the code and this has fixed a couple bugs I had been experiencing.