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

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

 



On Thu, Dec 09, 2010 at 04:07:59PM +0300, Sergei Shtylyov wrote:
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.

Ok, I'll wait someone working more closely with DaVinci to give me at
least a Tested-by before I apply this one :-)

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