Re: [PATCH v2] USB: musb: Prevent Transmit Buffer Descriptor corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Dec 07, 2010 at 01:43:05PM -0800, Paul Stuart 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.

--
balbi
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux