Hello. On 09-12-2010 14:20, Felipe Balbi wrote:
cppi_next_tx_segment is not checking for Transmit Buffer Descriptor ownership before modifying parameters.
Transmit Buffer Descriptor ram is shared between the host processor and the DMA. The "Ownership" bit is set by the host processor to give the DMA ownership of the Transmit Buffer Descriptor, and the bit is cleared by the DMA to return ownership to the host processor.
On USB Tx, when the system is heavily loaded, cppi_next_tx_segment can overwrite a Transmit Buffer Descriptor that is still owned by the DMA, causing DMA truncation error to fire, resulting in a channel abort. This proposed fix adds a check for host processor ownership of the bd and does not proceed to program it until the DMA has ended ownership.
Condition rarely occurs, so USB write speed is not negatively impacted.
Tested on DM365
Sergei, do you have anything against this patch ? I'm asking because you have been more closely working on DaVinci.
Nothing, though I don't work with DaVinci much, mostly with DA830. You should probably ask Swaminathan Subbramanian.
WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html