From: Jack Pham Subject: Re: [RFC/PATCH 2/2] usb: ehci: Add support for SINGLE_STEP_SET_FEATURE test of EHSET Date: Wed, 14 Aug 2013 10:05:50 -0700 Message-ID: <20130814170550.GE28634@usblab-sd-06.qualcomm.com> References: <20130813230554.GD28634@usblab-sd-06.qualcomm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.codeaurora.org ([198.145.11.231]:52689 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758765Ab3HNRFx (ORCPT ); Wed, 14 Aug 2013 13:05:53 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Alan Stern Cc: Felipe Balbi , Greg KH , linux-usb@vger.kernel.org, Tim Sander , Manu Gautam , linux-arm-msm@vger.kernel.org On Wed, Aug 14, 2013 at 10:10:23AM -0400, Alan Stern wrote: > On Tue, 13 Aug 2013, Jack Pham wrote: > > > > > In addition, we may want some of the work (though at this point I'm > > > > not still clear on exactly what parts) to be moved into usbcore. > > > > +1. I am open to suggestions on how best to achieve this. I have a > > another patch in the for doing the same 15-second delay in xHCI but am > > hesitant to submit it just yet, pending ideas on a better way to do it > > in the common HCD core. > > Well, here's one possibility, not fully thought out. Suppose there was > a way to tell the HCD to carry out _just_ the Setup stage of a control > transfer. Or to omit the Setup stage and go directly to the Data > stage. Then the SINGLE_STEP_GET_DEVICE_DESCRIPTOR test could be > implemented very simply by submitting two URBs with a delay between. Ok, but that would be in the form of a hook from usbcore to the HCD driver or an URB flag right? In both ehci-hcd and xhci-hcd, setup transfers are handled in their entirety and my work was simply duplicating those functions to be able to split them up. To do this in a generic fashion would still need HCD-specific implementation. But it would at least still allow moving the "submit setup urb", "wait", and "submit data/status urb" steps into usbcore instead, which is much cleaner. Jack -- Employee of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation