Re: dwc2 gadget rejecting new AIO transfer when bus is suspended

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

 



Hi Vincent,

On 12/27/2020 05:49, Vincent Pelletier wrote:
> Hello Alan,
> 
> On Sat, 26 Dec 2020 11:52:30 -0500, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>> The kernel shouldn't have to sit on anything.  The requests should be
>> accepted immediately.
> 
> I must have used this sentence incorrectly: I meant what you described,
> the kernel accepting the transfer and the module submitting it to
> hardware whenever able.
> 
> Also, strictly speaking (and to avoid confusion if I failed further at
> English expression in my previous emails) aio_submit itself does
> succeed, so in a sense the kernel already accepts the transfer. The
> issue is that the transfer completion happens immediately after, with
> this EAGAIN status.

Refactoring the driver to always accept any EP request independent of 
the state (suspend), requires lot of investigation. We will decide and 
implement later.

For your case we suggest the following workaround in 
"dwc2_hsotg_ep_queue()" function to additionally check "hsotg->power_down":

/* Prevent new request submission when controller is suspended */
if (hs->lx_state != DWC2_L0 && hsotg->power_down) {
	dev_dbg(hs->dev, "%s: submit request only in active state\n",
		__func__);
	return -EAGAIN;
}

Please test and let us know the results.

> 
> Regards,
> 




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

  Powered by Linux