All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	John Youn <John.Youn@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dwc2: gadget: Fix in control write transfers
Date: Mon, 03 Apr 2017 10:05:59 +0300	[thread overview]
Message-ID: <87pogu7yy0.fsf@linux.intel.com> (raw)
In-Reply-To: <410670D7E743164D87FA6160E7907A56FD9F6775@am04wembxb.internal.synopsys.com>


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

      reply	other threads:[~2017-04-03  7:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 18:04 [PATCH] dwc2: gadget: Fix in control write transfers Minas Harutyunyan
2017-03-30 10:42 ` Felipe Balbi
2017-04-03  5:32   ` Minas Harutyunyan
2017-04-03  7:05     ` Felipe Balbi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pogu7yy0.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.