Passmark USB loopback test plugs

Felipe Balbi felipebalbi at users.sourceforge.net
Tue Nov 20 20:24:19 UTC 2007


Hi,

On Nov 20, 2007 4:13 PM, Greg KH <greg at kroah.com> wrote:
> On Tue, Nov 20, 2007 at 04:07:44PM -0400, Felipe Balbi wrote:
> > On Nov 20, 2007 4:00 PM, Greg KH <greg at kroah.com> wrote:
> > >
> > > On Tue, Nov 20, 2007 at 04:24:26PM +0800, Peter Teoh wrote:
> > > > On Nov 20, 2007 12:31 PM, Greg KH <greg at kroah.com> wrote:
> > > > >
> > > > > Also, please run it through the scripts/checkpatch.pl script to fix all
> > > > > of the obvious coding style issues (no typedefs, line lengths, etc.) so
> > > > > it's in a format that we can be able to review it properly.
> > > > >
> > > > > thanks,
> > > > >
> > > >
> > > > Thank you for your reply.   I will be getting the hardware to test
> > > > soon.   But this is as per your instruction - thank you for the review
> > > > again.
> > >
> > > > /*
> > > >  * USB loopback plug is based on the Cypress CY7C68013A USB2.0 chip
> >
> > so I'm the one wrong here, sorry. I thought this was meant to be a
> > kernel driver :-p
>
> No, this is a kernel driver, as written, so your comments are still
> correct :)

hmm.. ok :-)

>
> My question is _why_ does it need to be a kernel driver, why can't this
> all be done in userspace instead?

On musb driver I was using a kernel driver with a sysfs interface and
a hacked usb cable with 1k
resistor between D+/D- and a switchable load between Vbus and GROUND
(500mA and 100mA).
Of course this code is musb specific and shouldn't even get integrated
to linux-omap nor to mainline.
Having a proper device for running loopback tests (it this is the same
loopback test I'm wondering :-p)
would allow us to provide "portable" code that would work with any
HCD, not only this or that one.

Using a sysfs interface (aka linux device driver), looks better to me,
and that's what I plan to do for
USB HSET and USB Command Verifier tools for linux. If you pay
attention on windows, those tools
provides a different Host Controller Driver from where they can issue
the commands they want.

Well, that's only my opinion. Userspace should only handle the results
reported by sysfs interfaces or
whatever the driver wanna do.

Maybe providing also a fanci UI.


-- 
Best Regards,

Felipe Balbi
felipebalbi at users.sourceforge.net



More information about the devel mailing list