RE: [PATCH v2] usb: musb: only set test mode once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe,

> -----Original Message-----
> From: Balbi, Felipe
> Sent: Thursday, April 02, 2015 2:44 PM
> To: Liu, Bin
> Cc: Balbi, Felipe; linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2] usb: musb: only set test mode once
> 
> On Thu, Apr 02, 2015 at 01:48:35PM -0500, Liu, Bin wrote:
> > Felipe,
> >
> > > -----Original Message-----
> > > From: Balbi, Felipe
> > > Sent: Thursday, April 02, 2015 1:22 PM
> > > To: Liu, Bin
> > > Cc: linux-usb@xxxxxxxxxxxxxxx; Balbi, Felipe
> > > Subject: Re: [PATCH v2] usb: musb: only set test mode once
> > >
> > > On Thu, Apr 02, 2015 at 11:44:30AM -0500, Liu, Bin wrote:
> > > > Felipe,
> > > >
> > > > > -----Original Message-----
> > > > > From: Liu, Bin
> > > > > Sent: Tuesday, March 24, 2015 3:09 PM
> > > > > To: linux-usb@xxxxxxxxxxxxxxx
> > > > > Cc: Balbi, Felipe; Liu, Bin
> > > > > Subject: [PATCH v2] usb: musb: only set test mode once
> > > > >
> > > > > The MUSB test mode register can only be set once, otherwise the
> > > > > result is undefined.
> > > > >
> > > > > This prevents the debugfs testmode entry to set the register
> > > > > more than once which causes test failure.
> > > > >
> > > > > Signed-off-by: Bin Liu <b-liu@xxxxxx>
> > > >
> > > > I see you have not picked up this patch yet. Can you please hold
> > > > on it?
> > > >
> > > > I noticed only the USB2.0 Specs mentioned about USB reset to exit
> > > > test mode, but not in the MUSB data manual.
> > > >
> > > > I am guessing running multiple 'test packet' command causing
> > > > incorrect test packets is due to the driver loading the test
> > > > packets into EP0 FIFO multiple times. I simply masked this then
> > > > the analyzer trace shows the test packets are correct even after ran 'test
> packet'
> > > > command multiple times.
> > > >
> > > > I will have to hook up a scope to measure the signal to ensure the
> > > > DP/DM signals are still correct after run each test mode command
> > > > multiple times for MUSB. If so, then the patch we need is to
> > > > ensure not loading the test packet to FIFO multiple times.
> > >
> > > MUSB still needs to obey what USB 2.0 specification says and if it
> > > says we must reset, then we must reset ;-)
> >
> > This is right. But the Specs only says the hub reset is required when
> > *exit* test mode, it did not say a reset is required when switching
> > between test modes.
> 
> to enter a new test mode, you must first exit the previous one ;-)

Yeah, you are right.

> 
> > I really don't care about reset or not, it is just about board reboot,
> > not a big deal. The only thing I want to do is prevent the *** user
> > using the current driver loading test packets to FIFO multiple times
> > which breaks the test.
> 
> You don't need to reboot the board at all. When USB spec says 'reset', it's
> referring to a USB bus reset. See if my device-reset tool helps you out [1]
> 
> [1] https://gitorious.org/usb/usb-
> tools/source/373b417a9f0ded25312d0626486f6e7a2d660c32:device-reset.c

This is to reset the bus, not the controller right? For the MUSB case, the controller itself needs reset, no device/hub is connected on the bus.

Regards,
-Bin.

> 
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux