Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614916

Re: [PATCH] dwc2: gadget: Fix in control write transfers

From Felipe Balbi <balbi@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] dwc2: gadget: Fix in control write transfers
Date 2017-04-03 09:10 +0200
Message-ID <ts4hI-3FM-13@gated-at.bofh.it> (permalink)
References <tq08z-pa-49@gated-at.bofh.it> <tqFOq-55A-27@gated-at.bofh.it> <ts2SB-2F6-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> writes:
>> Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> writes:
>>> After data out stage gadget driver should not initate ZLP on control EP,
>>> because it is up to function driver.
>>
>> not true always, depends on return value from ->setup(). Which problem
>> did you have? Which gadget driver? How did you reproduce? Which other
>> tests did you run on this patch?
>>
>
> This required for delayed status support. Tested with Synopsys test 
> gadget. As host used USB tracer traffic generator (different control 
> transfers scenarios). Also performed smoke tests with mass storage 
> function to detect any side effects.

so you didn't test any gadget driver that doesn't rely on
delayed_status, right? Care to test one of those?

The situation here is a little too complex (and we're trying to change
it). Here's how it goes:

if (ctrl->wLength == 0) /* 2-stage ctrl */ {
	gadget_driver always queues STATUS;
} else {
	gadget_driver queues DATA;
        if (result == DELAYED_STATUS)
        	gadgdet_driver queues STATUS
	else
        	UDC handles STATUS
}

It seems to me, you're not handling this properly as of yet. Please make
sure several gadget drivers work for you. Try g_mass_storage and g_zero
at least. :-)

-- 
balbi

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] dwc2: gadget: Fix in control write transfers Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> - 2017-03-28 16:20 +0200
  Re: [PATCH] dwc2: gadget: Fix in control write transfers Felipe Balbi <balbi@kernel.org> - 2017-03-30 12:50 +0200
    Re: [PATCH] dwc2: gadget: Fix in control write transfers Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> - 2017-04-03 07:40 +0200
      Re: [PATCH] dwc2: gadget: Fix in control write transfers Felipe Balbi <balbi@kernel.org> - 2017-04-03 09:10 +0200

csiph-web