linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@ti.com>, Greg KH <greg@kroah.com>,
	Jack Pham <jackp@codeaurora.org>,
	linux-usb@vger.kernel.org, Tim Sander <tim@krieglstein.org>,
	Manu Gautam <mgautam@codeaurora.org>,
	linux-arm-msm@vger.kernel.org
Subject: Re: [RFC/PATCH 2/2] usb: ehci: Add support for SINGLE_STEP_SET_FEATURE test of EHSET
Date: Tue, 13 Aug 2013 10:32:57 -0500	[thread overview]
Message-ID: <20130813153257.GH27954@radagast> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1308121443040.1489-100000@iolanthe.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 2725 bytes --]

On Mon, Aug 12, 2013 at 02:52:33PM -0400, Alan Stern wrote:
> On Mon, 12 Aug 2013, Felipe Balbi wrote:
> 
> > > > maybe a single callback for supporting 'testmodes' ? which receives the
> > > > test mode as argument ?
> > > 
> > > I don't have a clear picture of how you would apply such an approach to 
> > > this case.  There would have to be a way to tell the HCD to insert a
> > > 15-second delay between the Setup and Data stages of a particular
> > > control URB.  How would you do that?  Whatever method you choose,
> > 
> > each test is started after enumerating a known Vid/Pid pair. Based on
> > that, you *know* which test to run.
> 
> That's not what I meant.  Yes, the test-device driver knows what test
> it wants to run, based on the VID/PID.  I was asking how it would
> communicate this knowledge to the HCD.
> 
> For example, it doesn't make sense to have a callback that means 
> "Insert a 15-second delay into the next URB that I submit", because the 
> HCD doesn't know where URBs come from.

static int ehci_test_mode(struct usb_hcd *hcd, unsigned int test)
{
	struct ehci_hcd *ehci = to_ehci(hcd);

	....

	switch (test) {
	case USB_TEST_SINGLE_STEP_GET_DESC:
		start_test();
		wait_15_seconds();
		finish_test();
		break;
	...

	default:
		return -ENOTSUP;
	}

	return ret;
}

...

static struct hc_driver ehci_hcd_driver = {
	....

	.test_mode	= ehci_test_mode,

	...
};

> > > What other test modes would you want to support?
> > 
> > anything that USB[23]0CV supports today. There are even link layer tests
> > for USB3 and a bunch of others. This SINGLE_STEP_SET_FEATURE is but one
> > of a large(-ish) test suite which needs to be supported.
> 
> That's what I'm trying to find out.  What are the special features that 
> we would need to implement in order to support the entire test suite?

I haven't looked at USB??CV spec for a while, maybe Jack knows better ?

> > > Is it worth adding this support to the standard host controller
> > > drivers, or should there be a special version (a Kconfig option like
> > > CONFIG_RCU_TORTURE_TEST) to enable it?  Putting a lot of testing code
> > > in distribution kernels where it will never be used seems like a big
> > > waste.
> > 
> > right, I think it should be hidden by Kconfig, not arguing against that.
> 
> Therefore we both agree the $SUBJECT patch should not be accepted in
> its current form.  At the very least, the new code in ehci-hcd should
> be conditional on a CONFIG_USB_HCD_TEST_MODE option.  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.

right

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-08-13 15:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1591113.JYQdTBbFW7@dabox>
2013-07-03  3:13 ` [PATCH 0/2] usb: Add support for EHSET Jack Pham
2013-07-03  3:13   ` [PATCH 1/2] usb: misc: EHSET Test Fixture device driver for host compliance Jack Pham
2013-07-03  3:13   ` [RFC/PATCH 2/2] usb: ehci: Add support for SINGLE_STEP_SET_FEATURE test of EHSET Jack Pham
2013-07-25 18:46     ` Greg KH
2013-07-25 19:44       ` Alan Stern
2013-07-25 20:54         ` Felipe Balbi
2013-07-25 21:33           ` Alan Stern
2013-08-09 13:41             ` Felipe Balbi
2013-08-09 14:37               ` Alan Stern
2013-08-09 14:44                 ` Felipe Balbi
2013-08-09 15:04                   ` Alan Stern
     [not found]                     ` <Pine.LNX.4.44L0.1308091053450.1405-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2013-08-12 17:53                       ` Felipe Balbi
2013-08-12 18:52                         ` Alan Stern
2013-08-13 15:32                           ` Felipe Balbi [this message]
2013-08-13 16:47                             ` Alan Stern
2013-08-13 23:05                             ` Jack Pham
2013-08-14 14:10                               ` Alan Stern
2013-08-14 17:05                                 ` Jack Pham
2013-07-25 22:09     ` Jack Pham
     [not found]       ` <20130725220925.GA28634-NjF/qFWh7jSrUKQWM4GlyCPyLMyjRtWwAL8bYrjMMd8@public.gmane.org>
2013-08-08 23:49         ` [PATCH " Jack Pham
2013-08-09  0:05           ` Greg KH
2013-08-09  2:12             ` Jack Pham
2013-08-09  2:32               ` Greg KH

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=20130813153257.GH27954@radagast \
    --to=balbi@ti.com \
    --cc=greg@kroah.com \
    --cc=jackp@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mgautam@codeaurora.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tim@krieglstein.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).