Re: Linux USB file storage gadget with new UDC

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

 



On Mon, 14 Oct 2013, Victor Yeo wrote:

> Hi,
> 
> >> Victor, if you can get hold of a USB bus analyzer, you would be able to
> >> see directly when the DATA1 packet does or does not get sent.
> 
> > I am in the process of getting a USB bus analyzer.
> 
> >> No -- the problem is that the UDC completes the Set-Config request
> >> before it should.  In other words, it sends the DATA1 packet when it
> >> really should send a NAK packet.
> 
> > In the status stage of Set-Config request, i make the driver sends the
> > NAK packet after it receives the IN packet. However, the next
> > Get-Config request is still sent out by host. With the USB bus
> > analyzer, hopefully i can verify the packets.
> 
> I am sorry for the three month delay. Today i got hold of the LeCroy USB
> bus analyzer to debug the USBCV "Device Descriptor Test-Addressed State"
> problem. The ascii text capture from the USB bus analyzer is attached.

The text capture is incomplete.  It is missing lots of packets.  In 
particular, it is missing all the packets between 202489 and 202502.

Also, I don't understand the "Dir H(S)" part of the capture lines.  
What do they mean?  They are present on every packet.

> Basically, it is confirmed that DATA1 packet of the Set-Config is sent out
> before the Get-Config request.The timing sequence of the USB request
> packets is correct.

This was never the issue.  I'm sure the DATA1 packet of the Set-Config 
was sent before the Get-Config request.  The real question is whether 
the DATA1 packet was sent before the Set-Config request had been fully 
processed.

To get more information, try adding

	msleep(100);

just before the final "return rc;" line in do_set_config().  We should 
be able to see in the analyzer log if this 100-ms delay is present.

Here's a second test you can try.  In handle_exception(), the
FSG_STATE_CONFIG_CHANGE case, comment out the

	ep0_queue(fsg);

line.  Without that line the Set-Config request should time out,
because the gadget will never complete the status stage.  If the
request does complete normally, it will prove that the UDC driver isn't
working right.

Alan Stern

--
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