RE: [PATCH] usb/g_zero: don't access private data in complete callback on error

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

 



On Tue, Jan 24, 2012, Sebastian Andrzej Siewior wrote:
> On 01/24/2012 08:55 AM, Felipe Balbi wrote:
>> On Tue, Jan 24, 2012 at 08:52:48AM +0100, Sebastian Andrzej Siewior wrote:
>>> On 01/24/2012 04:03 AM, Alan Stern wrote:
>>>> On Mon, 23 Jan 2012, Paul Zimmerman wrote:
>>>>> You don't need to wait for the hardware to complete the transfer. You
>>>>> just need to be sure the completion callbacks are called with an
>>>>> appropriate error code before usb_ep_disable() returns. You can arrange
>>>>> for the DWC3 driver to handle the hardware completions later when/if
>>>>> they happen.
>>>>
>>>> But you do need to wait until the hardware has finished accessing the
>>>> data buffers.
>>>
>>> Exactly. We have to wait until the hardware released the data buffer
>>> it has been assigned.
>>
>> After you issue ENDTRANSFER command, the fact that CMDACT gets cleared
>> means that HW has completed the command, no ?
>
> Actually, no it does not. The spec says that you have to wait for the
> event to occur for synchronization reasons.

Hi Sebastian,

I'm sorry to say I never noticed that requirement in the databook. I just
checked with the RTL engineers, and yes, it is necessary to wait for the
event to be sure the DMA has stopped. The Synopsys driver has never done
that, and we have never seen any bad effects, but to be 100% correct it
should be done.

-- 
Paul

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