Re: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
From: Alan Stern
Date: Mon Jul 07 2025 - 09:48:34 EST
On Mon, Jul 07, 2025 at 10:49:26AM +0000, Chary Chennoju, Srikanth wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> Hi Stern,
>
> Thanks for your comments. If you are mentioning to have a check for the value which user is providing, then there is a check which is carried out(#34 to #37 in the patch). It limits to max burst value if user exceeds the supported value.
> > > + /*
> > > + * Fill in the SS bulk descriptors from the module parameters.
> > > + * We assume that the user knows what they are doing and won't
> > > + * give parameters that their UDC doesn't support.
> > > + */
In that case this comment is wrong, isn't it? You don't assume that the
user knows what they are doing; you do check and limit the value to
maxburst if the user's value is too big.
Alan Stern