stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb: dwc3: gadget: Don't clear flags before transfer ended
@ 2020-04-18 10:25 Delio Brignoli
  2020-04-18 10:53 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Delio Brignoli @ 2020-04-18 10:25 UTC (permalink / raw)
  To: stable

Please apply the following commit:

Commit subject: usb: dwc3: gadget: Don't clear flags before transfer ended
Commit ID: a114c4ca64bd522aec1790c7e5c60c882f699d8f
Apply to: at least 4.19 stable, and 5.4 stable if possible. Note that all kernels from v4.18-rc1 up to 5.7-rc1 are affected.

Why apply it:
<https://github.com/torvalds/linux/commit/a114c4ca64bd522aec1790c7e5c60c882f699d8f> fixes <https://github.com/torvalds/linux/commit/6d8a019614f3a7630e0a2c1be4bf1cfc23acf56e>. Without this fix the built-in USB function source/sink test module fails to work with isochronous endpoints [1]. A side-effect of setting dep->flags = DWC3_EP_ENABLED; in dwc3_gadget_ep_cleanup_completed_requests() as part of disabling an ep is that a subsequent attempt to enable the endpoint will skip __dwc3_gadget_ep_enable() effectively leaving the ep disabled.

[1] Our gadget driver on TI AM5729 fails to work exactly like the built-in USB function source/sink test module when switching to alternate interface 1 because of the issue described above.

TI is currently using 4.19 and 5.4 stable kernels as the basis for their processor SDK kernels for their AM57x SoC and may switch to 5.4 stable at a later time. Thank you.

Kind Regards
—
Delio Brignoli
AudioScience, Inc.
USA Sales Toll Free 1-855-AUDIOSC
<www.audioscience.com> - <http://www.facebook.com/AudioScienceInc>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb: dwc3: gadget: Don't clear flags before transfer ended
  2020-04-18 10:25 usb: dwc3: gadget: Don't clear flags before transfer ended Delio Brignoli
@ 2020-04-18 10:53 ` Greg KH
  2020-04-18 16:36   ` Sasha Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2020-04-18 10:53 UTC (permalink / raw)
  To: Delio Brignoli; +Cc: stable

On Sat, Apr 18, 2020 at 12:25:16PM +0200, Delio Brignoli wrote:
> Please apply the following commit:
> 
> Commit subject: usb: dwc3: gadget: Don't clear flags before transfer ended
> Commit ID: a114c4ca64bd522aec1790c7e5c60c882f699d8f
> Apply to: at least 4.19 stable, and 5.4 stable if possible. Note that all kernels from v4.18-rc1 up to 5.7-rc1 are affected.
> 
> Why apply it:
> <https://github.com/torvalds/linux/commit/a114c4ca64bd522aec1790c7e5c60c882f699d8f> fixes <https://github.com/torvalds/linux/commit/6d8a019614f3a7630e0a2c1be4bf1cfc23acf56e>. Without this fix the built-in USB function source/sink test module fails to work with isochronous endpoints [1]. A side-effect of setting dep->flags = DWC3_EP_ENABLED; in dwc3_gadget_ep_cleanup_completed_requests() as part of disabling an ep is that a subsequent attempt to enable the endpoint will skip __dwc3_gadget_ep_enable() effectively leaving the ep disabled.
> 
> [1] Our gadget driver on TI AM5729 fails to work exactly like the built-in USB function source/sink test module when switching to alternate interface 1 because of the issue described above.
> 
> TI is currently using 4.19 and 5.4 stable kernels as the basis for their processor SDK kernels for their AM57x SoC and may switch to 5.4 stable at a later time. Thank you.

It does not apply to the 4.19.y kernel tree, can you provide a working
backport of it please so that I can apply it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb: dwc3: gadget: Don't clear flags before transfer ended
  2020-04-18 10:53 ` Greg KH
@ 2020-04-18 16:36   ` Sasha Levin
  2020-04-19  7:18     ` Greg KH
  2020-04-19  8:29     ` Delio Brignoli
  0 siblings, 2 replies; 5+ messages in thread
From: Sasha Levin @ 2020-04-18 16:36 UTC (permalink / raw)
  To: Greg KH; +Cc: Delio Brignoli, stable

On Sat, Apr 18, 2020 at 12:53:25PM +0200, Greg KH wrote:
>On Sat, Apr 18, 2020 at 12:25:16PM +0200, Delio Brignoli wrote:
>> Please apply the following commit:
>>
>> Commit subject: usb: dwc3: gadget: Don't clear flags before transfer ended
>> Commit ID: a114c4ca64bd522aec1790c7e5c60c882f699d8f
>> Apply to: at least 4.19 stable, and 5.4 stable if possible. Note that all kernels from v4.18-rc1 up to 5.7-rc1 are affected.
>>
>> Why apply it:
>> <https://github.com/torvalds/linux/commit/a114c4ca64bd522aec1790c7e5c60c882f699d8f> fixes <https://github.com/torvalds/linux/commit/6d8a019614f3a7630e0a2c1be4bf1cfc23acf56e>. Without this fix the built-in USB function source/sink test module fails to work with isochronous endpoints [1]. A side-effect of setting dep->flags = DWC3_EP_ENABLED; in dwc3_gadget_ep_cleanup_completed_requests() as part of disabling an ep is that a subsequent attempt to enable the endpoint will skip __dwc3_gadget_ep_enable() effectively leaving the ep disabled.
>>
>> [1] Our gadget driver on TI AM5729 fails to work exactly like the built-in USB function source/sink test module when switching to alternate interface 1 because of the issue described above.
>>
>> TI is currently using 4.19 and 5.4 stable kernels as the basis for their processor SDK kernels for their AM57x SoC and may switch to 5.4 stable at a later time. Thank you.
>
>It does not apply to the 4.19.y kernel tree, can you provide a working
>backport of it please so that I can apply it?

I took this as a dependency:

	c5353b225df9 ("usb: dwc3: gadget: don't enable interrupt when disabling endpoint")

And worked around context conflicts caused by:

	25abad6a0584 ("usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()")
	d92021f66063 ("usb: dwc3: Add workaround for isoc start transfer failure")

And queued a114c4ca64bd for 4.19.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb: dwc3: gadget: Don't clear flags before transfer ended
  2020-04-18 16:36   ` Sasha Levin
@ 2020-04-19  7:18     ` Greg KH
  2020-04-19  8:29     ` Delio Brignoli
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2020-04-19  7:18 UTC (permalink / raw)
  To: Sasha Levin; +Cc: Delio Brignoli, stable

On Sat, Apr 18, 2020 at 12:36:43PM -0400, Sasha Levin wrote:
> On Sat, Apr 18, 2020 at 12:53:25PM +0200, Greg KH wrote:
> > On Sat, Apr 18, 2020 at 12:25:16PM +0200, Delio Brignoli wrote:
> > > Please apply the following commit:
> > > 
> > > Commit subject: usb: dwc3: gadget: Don't clear flags before transfer ended
> > > Commit ID: a114c4ca64bd522aec1790c7e5c60c882f699d8f
> > > Apply to: at least 4.19 stable, and 5.4 stable if possible. Note that all kernels from v4.18-rc1 up to 5.7-rc1 are affected.
> > > 
> > > Why apply it:
> > > <https://github.com/torvalds/linux/commit/a114c4ca64bd522aec1790c7e5c60c882f699d8f> fixes <https://github.com/torvalds/linux/commit/6d8a019614f3a7630e0a2c1be4bf1cfc23acf56e>. Without this fix the built-in USB function source/sink test module fails to work with isochronous endpoints [1]. A side-effect of setting dep->flags = DWC3_EP_ENABLED; in dwc3_gadget_ep_cleanup_completed_requests() as part of disabling an ep is that a subsequent attempt to enable the endpoint will skip __dwc3_gadget_ep_enable() effectively leaving the ep disabled.
> > > 
> > > [1] Our gadget driver on TI AM5729 fails to work exactly like the built-in USB function source/sink test module when switching to alternate interface 1 because of the issue described above.
> > > 
> > > TI is currently using 4.19 and 5.4 stable kernels as the basis for their processor SDK kernels for their AM57x SoC and may switch to 5.4 stable at a later time. Thank you.
> > 
> > It does not apply to the 4.19.y kernel tree, can you provide a working
> > backport of it please so that I can apply it?
> 
> I took this as a dependency:
> 
> 	c5353b225df9 ("usb: dwc3: gadget: don't enable interrupt when disabling endpoint")
> 
> And worked around context conflicts caused by:
> 
> 	25abad6a0584 ("usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()")
> 	d92021f66063 ("usb: dwc3: Add workaround for isoc start transfer failure")
> 
> And queued a114c4ca64bd for 4.19.

Thanks for doing this!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: usb: dwc3: gadget: Don't clear flags before transfer ended
  2020-04-18 16:36   ` Sasha Levin
  2020-04-19  7:18     ` Greg KH
@ 2020-04-19  8:29     ` Delio Brignoli
  1 sibling, 0 replies; 5+ messages in thread
From: Delio Brignoli @ 2020-04-19  8:29 UTC (permalink / raw)
  To: Sasha Levin; +Cc: Greg KH, stable

Thanks to both of you for the help and quick response time!

Kind Regards
—
Delio Brignoli
AudioScience, Inc.
USA Sales Toll Free 1-855-AUDIOSC
<www.audioscience.com> - <http://www.facebook.com/AudioScienceInc>

> On 18 Apr 2020, at 18:36, Sasha Levin <sashal@kernel.org> wrote:
> 
> On Sat, Apr 18, 2020 at 12:53:25PM +0200, Greg KH wrote:
>> On Sat, Apr 18, 2020 at 12:25:16PM +0200, Delio Brignoli wrote:
>>> Please apply the following commit:
>>> 
>>> Commit subject: usb: dwc3: gadget: Don't clear flags before transfer ended
>>> Commit ID: a114c4ca64bd522aec1790c7e5c60c882f699d8f
>>> Apply to: at least 4.19 stable, and 5.4 stable if possible. Note that all kernels from v4.18-rc1 up to 5.7-rc1 are affected.
>>> 
>>> Why apply it:
>>> <https://github.com/torvalds/linux/commit/a114c4ca64bd522aec1790c7e5c60c882f699d8f> fixes <https://github.com/torvalds/linux/commit/6d8a019614f3a7630e0a2c1be4bf1cfc23acf56e>. Without this fix the built-in USB function source/sink test module fails to work with isochronous endpoints [1]. A side-effect of setting dep->flags = DWC3_EP_ENABLED; in dwc3_gadget_ep_cleanup_completed_requests() as part of disabling an ep is that a subsequent attempt to enable the endpoint will skip __dwc3_gadget_ep_enable() effectively leaving the ep disabled.
>>> 
>>> [1] Our gadget driver on TI AM5729 fails to work exactly like the built-in USB function source/sink test module when switching to alternate interface 1 because of the issue described above.
>>> 
>>> TI is currently using 4.19 and 5.4 stable kernels as the basis for their processor SDK kernels for their AM57x SoC and may switch to 5.4 stable at a later time. Thank you.
>> 
>> It does not apply to the 4.19.y kernel tree, can you provide a working
>> backport of it please so that I can apply it?
> 
> I took this as a dependency:
> 
> 	c5353b225df9 ("usb: dwc3: gadget: don't enable interrupt when disabling endpoint")
> 
> And worked around context conflicts caused by:
> 
> 	25abad6a0584 ("usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()")
> 	d92021f66063 ("usb: dwc3: Add workaround for isoc start transfer failure")
> 
> And queued a114c4ca64bd for 4.19.
> 
> -- 
> Thanks,
> Sasha




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-19  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-18 10:25 usb: dwc3: gadget: Don't clear flags before transfer ended Delio Brignoli
2020-04-18 10:53 ` Greg KH
2020-04-18 16:36   ` Sasha Levin
2020-04-19  7:18     ` Greg KH
2020-04-19  8:29     ` Delio Brignoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).