On Mon, 05 Mar 2012 15:37:41 +0400
Sergei Shtylyov <[email protected]> wrote:

> Hello.
> 
> On 05-03-2012 15:11, Lukasz Majewski wrote:
> 
> > For SETUP stage of USB control transmission, the NAK shall NOT be
> > CLEAR.
> 
> > The SNAK/CNAK control is crucial for this type of driver,
> > since data arrives to earlier defined requests.
> 
> > Tested with:
> > - DFU gadget (various size of the sent data - also packet = MPS)
> > - Ethernet gadget (CDC and RNDIS)
> > - Multi Function Gadget (g_multi)
> 
> > HW:
> > - Samsung's C210 Universal rev.0
> 
> > Signed-off-by: Lukasz Majewski<[email protected]>
> > Signed-off-by: Kyungmin Park<[email protected]>
> > ---
> >   drivers/usb/gadget/s3c-hsotg.c |   21 +++++++++++++++++++--
> >   1 files changed, 19 insertions(+), 2 deletions(-)
> 
> > diff --git a/drivers/usb/gadget/s3c-hsotg.c
> > b/drivers/usb/gadget/s3c-hsotg.c index b35c657..0492c20 100644
> > --- a/drivers/usb/gadget/s3c-hsotg.c
> > +++ b/drivers/usb/gadget/s3c-hsotg.c
> [...]
> > @@ -1530,6 +1541,12 @@ static void s3c_hsotg_handle_outdone(struct
> > s3c_hsotg *hsotg, if (req->actual<  req->length&&  size_left == 0) {
> >             s3c_hsotg_start_req(hsotg, hs_ep, hs_req, true);
> >             return;
> > +   } else {
> > +           if (epnum == 0) {
> 
>      Collapse this to *else if* please and save on {}.

Frankly speaking, I know, that those {} can be collapsed.

But for readability I'd prefer to keep those parenthesis, especially
for the included comment and the fact that those are embedded at other
if/else statement.

Can be fixed anyway, above just my thoughts and motivation for the {}

> 
> > +                   /* After was_setup = 1 =>
> > +                    * set CNAK for non Setup requests */
> > +                   hsotg->setup = was_setup ? 0 : 1;
> > +           }
> >     }
> >
> >     if (req->actual<  req->length&&  req->short_not_ok) {
> 
> WBR, Sergei
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb"
> in the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks for input

-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to