Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751662AbdDCHGL (ORCPT ); Mon, 3 Apr 2017 03:06:11 -0400 Received: from mga07.intel.com ([134.134.136.100]:43911 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751220AbdDCHGK (ORCPT ); Mon, 3 Apr 2017 03:06:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,269,1486454400"; d="scan'208";a="72967150" From: Felipe Balbi To: Minas Harutyunyan , Minas Harutyunyan , John Youn , Greg Kroah-Hartman , "linux-usb\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH] dwc2: gadget: Fix in control write transfers In-Reply-To: <410670D7E743164D87FA6160E7907A56FD9F6775@am04wembxb.internal.synopsys.com> References: <07102b18cb19dd576017b0259a2fb54a663af39f.1490723930.git.hminas@synopsys.com> <87a883jbag.fsf@linux.intel.com> <410670D7E743164D87FA6160E7907A56FD9F6775@am04wembxb.internal.synopsys.com> Date: Mon, 03 Apr 2017 10:05:59 +0300 Message-ID: <87pogu7yy0.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1297 Lines: 40 Hi, Minas Harutyunyan writes: >> Minas Harutyunyan 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