[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024122013-scary-paver-fcff@gregkh>
Date: Fri, 20 Dec 2024 13:24:12 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Selvarasu Ganesan <selvarasu.g@...sung.com>
Cc: quic_jjohnson@...cinc.com, kees@...nel.org, abdul.rahim@...ahoo.com,
m.grzeschik@...gutronix.de, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, jh0801.jung@...sung.com,
dh10.jung@...sung.com, naushad@...sung.com, akash.m5@...sung.com,
rc93.raju@...sung.com, taehyun.cho@...sung.com,
hongpooh.kim@...sung.com, eomji.oh@...sung.com,
shijie.cai@...sung.com, alim.akhtar@...sung.com,
stable@...r.kernel.org
Subject: Re: [PATCH] usb: gadget: f_midi: Fixing wMaxPacketSize exceeded
issue during MIDI bind retries
On Wed, Dec 18, 2024 at 03:51:50PM +0530, Selvarasu Ganesan wrote:
>
> On 12/18/2024 11:01 AM, Greg KH wrote:
> > On Sun, Dec 08, 2024 at 08:53:20PM +0530, Selvarasu Ganesan wrote:
> >> The current implementation sets the wMaxPacketSize of bulk in/out
> >> endpoints to 1024 bytes at the end of the f_midi_bind function. However,
> >> in cases where there is a failure in the first midi bind attempt,
> >> consider rebinding.
> > What considers rebinding? Your change does not modify that.
>
> Hi Greg,
> Thanks for your review comments.
>
>
> Here the term "rebind" in this context refers to attempting to bind the
> MIDI function a second time in certain scenarios.
> The situations where rebinding is considered include:
>
> * When there is a failure in the first UDC write attempt, which may be
> caused by other functions bind along with MIDI
> * Runtime composition change : Example : MIDI,ADB to MIDI. Or MIDI to
> MIDI,ADB
>
> The issue arises during the second time the "f_midi_bind" function is
> called. The problem lies in the fact that the size of
> "bulk_in_desc.wMaxPacketSize" is set to 1024 during the first call,
> which exceeds the hardware capability of the dwc3 TX/RX FIFO
> (ep->maxpacket_limit = 512).
Ok, but then why not properly reset ALL of the options/values when a
failure happens, not just this one when the initialization happens
again? Odds are you might be missing the change of something else here
as well, right?
Also, cleaning up from an error is a better thing to do than forcing
something to be set all the time when you don't have anything gone
wrong.
thanks,
greg k-h
Powered by blists - more mailing lists