Re: some question about period scheduleing

2013-12-13 Thread vichy
hi

2013/12/2 Alan Stern st...@rowland.harvard.edu:
 On Sun, 1 Dec 2013, vichy wrote:

 hi Alan:

 2013/12/1 Alan Stern st...@rowland.harvard.edu:
  On Fri, 29 Nov 2013, vichy wrote:
 
  hi all:
  My connection like below
  ehci -- high speed hub - full speed device
 
  I have some questions about period scheduling.
  1. when creating  qh for full speed device,  why we set EHCI_TUNE_RL_TT.
 
  Are you asking why EHCI_TUNE_RL_TT is equal to 0?  I don't know -- it
  looks like a mistake.  Do you find that changing it to 3 makes any
  difference?
 Yes, when I change EHCI_TUNE_RL_TT as not 0.
 The transaction can keep going.

 But if EHCI_TUNE_RL_TT is 0, the transfer doesn't work?
No. the transaction will stop since device return Nak.
I copy the usb traffic log for your reference.
usually device will not return NAK in setup token. but in my case, it did.

Thanks for your kind help,
attachment: Device.Nak.png

Re: some question about period scheduleing

2013-12-13 Thread Alan Stern
On Fri, 13 Dec 2013, vichy wrote:

 hi
 
 2013/12/2 Alan Stern st...@rowland.harvard.edu:
  On Sun, 1 Dec 2013, vichy wrote:
 
  hi Alan:
 
  2013/12/1 Alan Stern st...@rowland.harvard.edu:
   On Fri, 29 Nov 2013, vichy wrote:
  
   hi all:
   My connection like below
   ehci -- high speed hub - full speed device
  
   I have some questions about period scheduling.
   1. when creating  qh for full speed device,  why we set EHCI_TUNE_RL_TT.
  
   Are you asking why EHCI_TUNE_RL_TT is equal to 0?  I don't know -- it
   looks like a mistake.  Do you find that changing it to 3 makes any
   difference?
  Yes, when I change EHCI_TUNE_RL_TT as not 0.
  The transaction can keep going.
 
  But if EHCI_TUNE_RL_TT is 0, the transfer doesn't work?
 No. the transaction will stop since device return Nak.
 I copy the usb traffic log for your reference.

The device did not return NAK.  The NAK was sent by the high-speed hub
the device was attached to.

 usually device will not return NAK in setup token. but in my case, it did.

When EHCI_TUNE_RL_TT is set to 0, the controller should never stop
retrying the transfer.  That's what 0 means here -- 3 means stop
(temporarily) after 3 attempts, but 0 means never stop.

This sounds like a bug in your EHCI hardware.  What type of controller 
are you using?

Anyway, I don't mind changing EHCI_TUNE_RL_TT to 3.  Would you like to 
submit a patch?

Alan Stern

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


Re: some question about period scheduleing

2013-12-01 Thread Alan Stern
On Sun, 1 Dec 2013, vichy wrote:

 hi Alan:
 
 2013/12/1 Alan Stern st...@rowland.harvard.edu:
  On Fri, 29 Nov 2013, vichy wrote:
 
  hi all:
  My connection like below
  ehci -- high speed hub - full speed device
 
  I have some questions about period scheduling.
  1. when creating  qh for full speed device,  why we set EHCI_TUNE_RL_TT.
 
  Are you asking why EHCI_TUNE_RL_TT is equal to 0?  I don't know -- it
  looks like a mistake.  Do you find that changing it to 3 makes any
  difference?
 Yes, when I change EHCI_TUNE_RL_TT as not 0.
 The transaction can keep going.

But if EHCI_TUNE_RL_TT is 0, the transfer doesn't work?

  isn't it possible the full speed device return NAK during transaction?
 
  Of course it is possible.
 If so, why we use EHCI_TUNE_RL_TT default as 0?

Like I said above, I don't know -- it looks like a mistake.

Alan Stern

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


Re: some question about period scheduleing

2013-11-30 Thread Alan Stern
On Fri, 29 Nov 2013, vichy wrote:

 hi all:
 My connection like below
 ehci -- high speed hub - full speed device
 
 I have some questions about period scheduling.
 1. when creating  qh for full speed device,  why we set EHCI_TUNE_RL_TT.

Are you asking why EHCI_TUNE_RL_TT is equal to 0?  I don't know -- it 
looks like a mistake.  Do you find that changing it to 3 makes any 
difference?

 isn't it possible the full speed device return NAK during transaction?

Of course it is possible.

 that mean once it react with NAK, the host will stop below transaction.

The host stops the transaction temporarily.  It will restart the 
transaction later.  See section 4.9.1 in the EHCI spec.

 How could we make sure device never react with NAK?

There is no way to do that.

 2. I attach my mon log for your reference.
 there is one thing I am curious
 why below message 'E' mean in bulk/interrupt?
 I have checked Document/usb/usbmon.txt but get nothing.

E means the preceding submission failed.

 d8c32600 190047566 E Bi:1:006:2 -19 0
 d8c32980 190062351 C Bi:1:006:2 -107 0
 d8c32980 190062363 S Bi:1:006:2 -115 1025 
 d8c32980 190072803 E Bi:1:006:2 -19 0

For example, this E means the submission on the line above was 
unsuccessful.  The error code -19 is -ENODEV, which means the device 
has been disconnected.

This is described in Documentation/usb/usbmon.txt:

- Event Type. This type refers to the format of the event, not URB type.
  Available types are: S - submission, C - callback, E - submission error.

Alan Stern

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


Re: some question about period scheduleing

2013-11-30 Thread vichy
hi Alan:

2013/12/1 Alan Stern st...@rowland.harvard.edu:
 On Fri, 29 Nov 2013, vichy wrote:

 hi all:
 My connection like below
 ehci -- high speed hub - full speed device

 I have some questions about period scheduling.
 1. when creating  qh for full speed device,  why we set EHCI_TUNE_RL_TT.

 Are you asking why EHCI_TUNE_RL_TT is equal to 0?  I don't know -- it
 looks like a mistake.  Do you find that changing it to 3 makes any
 difference?
Yes, when I change EHCI_TUNE_RL_TT as not 0.
The transaction can keep going.


 isn't it possible the full speed device return NAK during transaction?

 Of course it is possible.
If so, why we use EHCI_TUNE_RL_TT default as 0?


 that mean once it react with NAK, the host will stop below transaction.

 The host stops the transaction temporarily.  It will restart the
 transaction later.  See section 4.9.1 in the EHCI spec.

I find what you mentioned.

 How could we make sure device never react with NAK?

 There is no way to do that.

 2. I attach my mon log for your reference.
 there is one thing I am curious
 why below message 'E' mean in bulk/interrupt?
 I have checked Document/usb/usbmon.txt but get nothing.

 E means the preceding submission failed.

 d8c32600 190047566 E Bi:1:006:2 -19 0
 d8c32980 190062351 C Bi:1:006:2 -107 0
 d8c32980 190062363 S Bi:1:006:2 -115 1025 
 d8c32980 190072803 E Bi:1:006:2 -19 0

 For example, this E means the submission on the line above was
 unsuccessful.  The error code -19 is -ENODEV, which means the device
 has been disconnected.

 This is described in Documentation/usb/usbmon.txt:

 - Event Type. This type refers to the format of the event, not URB type.
   Available types are: S - submission, C - callback, E - submission error.
Thanks for your help
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


some question about period scheduleing

2013-11-29 Thread vichy
hi all:
My connection like below
ehci -- high speed hub - full speed device

I have some questions about period scheduling.
1. when creating  qh for full speed device,  why we set EHCI_TUNE_RL_TT.
isn't it possible the full speed device return NAK during transaction?
that mean once it react with NAK, the host will stop below transaction.
How could we make sure device never react with NAK?

2. I attach my mon log for your reference.
there is one thing I am curious
why below message 'E' mean in bulk/interrupt?
I have checked Document/usb/usbmon.txt but get nothing.

d8c32600 190047566 E Bi:1:006:2 -19 0
d8c32980 190062351 C Bi:1:006:2 -107 0
d8c32980 190062363 S Bi:1:006:2 -115 1025 
d8c32980 190072803 E Bi:1:006:2 -19 0
d71e1080 190087616 C Bi:1:006:2 -107 0
d71e1080 190087631 S Bi:1:006:2 -115 1025 
d71e1080 190098075 E Bi:1:006:2 -19 0
d8c32e80 190112778 C Ii:1:006:1 -107:1 0
d8c32e80 190112798 S Ii:1:006:1 -115:1 258 
d8c32e80 190112823 E Ii:1:006:1 -19 0

grateful to your help,
d8c1f900 174296127 S Ci:1:006:0 s 80 06 0100  0012 18 
d8c1f900 174324543 C Ci:1:006:0 0 18 = 12010002 ff010140 5c0abe22 12010102 0301
d8c32c80 174328283 S Ci:1:006:0 s 80 06 0600  000a 10 
d8c32c80 174379310 C Ci:1:006:0 -32 0
d8c32c80 174379388 S Ci:1:006:0 s 80 06 0600  000a 10 
d8c32c80 174430320 C Ci:1:006:0 -32 0
d8c32c80 174430384 S Ci:1:006:0 s 80 06 0600  000a 10 
d8c32c80 174479871 C Ci:1:006:0 -32 0
da681c00 174484791 S Ci:1:006:0 s 80 06 0200  0009 9 
da681c00 174520974 C Ci:1:006:0 0 9 = 0902da00 040100e0 00
da681c00 174521041 S Ci:1:006:0 s 80 06 0200  00da 218 
da681c00 174564730 C Ci:1:006:0 0 218 = 0902da00 040100e0 00090400 0003ff01 01000705 81031000 01070582 0241
d8c32680 174571894 S Ci:1:006:0 s 80 06 0300  00ff 255 
d8c32680 174613002 C Ci:1:006:0 0 4 = 04030904
d8c32680 174618720 S Ci:1:006:0 s 80 06 0302 0409 00ff 255 
d8c32680 174661979 C Ci:1:006:0 0 22 = 16034200 43004d00 32003000 37003000 32004100 3000
d8c32680 174662431 S Ci:1:006:0 s 80 06 0301 0409 00ff 255 
d8c32680 174704527 C Ci:1:006:0 0 28 = 1c034200 72006f00 61006400 63006f00 6d002000 43006f00 72007000
d8c32680 174704770 S Ci:1:006:0 s 80 06 0303 0409 00ff 255 
d8c32680 174746502 C Ci:1:006:0 0 26 = 1a033000 30003000 42003600 42004500 44003900 39003800 3600
d8c32680 174807834 S Co:1:006:0 s 00 09 0001   0
d8c32680 174834431 C Co:1:006:0 0 0
d8c32680 174870590 S Co:1:006:0 s 01 0b  0001  0
d8c32680 174897880 C Co:1:006:0 0 0
d8c32e80 174922305 S Ii:1:006:1 -115:1 258 
d8c32b80 174931010 S Ii:1:006:1 -115:1 258 
d8c32480 174931177 S Ii:1:006:1 -115:1 258 
d8c32300 174931267 S Ii:1:006:1 -115:1 258 
d8c32400 174931352 S Ii:1:006:1 -115:1 258 
d8c32f00 174931428 S Ii:1:006:1 -115:1 258 
d8c32e00 174931493 S Ii:1:006:1 -115:1 258 
d8c32a00 174931565 S Ii:1:006:1 -115:1 258 
d8c32280 174931652 S Bi:1:006:2 -115 1025 
d8c32a80 174942316 S Bi:1:006:2 -115 1025 
d8c32580 174953281 S Bi:1:006:2 -115 1025 
d8c32180 174964533 S Bi:1:006:2 -115 1025 
d8c32b00 174975493 S Bi:1:006:2 -115 1025 
d8c32080 174986576 S Bi:1:006:2 -115 1025 
d8c32780 174997454 S Bi:1:006:2 -115 1025 
d8c32f80 175008444 S Bi:1:006:2 -115 1025 
d8c32500 175019240 S Bi:1:006:2 -115 1025 
d8c32600 175030098 S Bi:1:006:2 -115 1025 
d8c32980 175040930 S Bi:1:006:2 -115 1025 
d71e1080 175051876 S Bi:1:006:2 -115 1025 
d71e1700 175062714 S Bi:1:006:4 -115 1025 
d71e1780 175073656 S Bi:1:006:4 -115 1025 
d8c32680 175330914 S Co:1:006:0 s 20 00   0003 3 = 030c00
d8c32680 175359355 C Co:1:006:0 0 3 
d8c32e80 175368360 C Ii:1:006:1 0:1 6 = 0e040103 0c00
d8c32e80 175369092 S Ii:1:006:1 -115:1 258 
d8c32680 175379837 S Co:1:006:0 s 20 00   0003 3 = 051000
d8c32680 175415382 C Co:1:006:0 0 3 
d8c32b80 175424464 C Ii:1:006:1 0:1 13 = 0e0b0105 1000fd03 40080001 00
d8c32b80 175427478 S Ii:1:006:1 -115:1 258 
d8c32680 175435384 S Co:1:006:0 s 20 00   000a 10 = 330c079b 06ff1400 0a00
d8c32680 175471360 C Co:1:006:0 0 10 
d8c32480 175480365 C Ii:1:006:1 0:1 6 = 0e040133 0c00
d8c32480 175480492 S Ii:1:006:1 -115:1 258 
d8c32680 175481017 S Co:1:006:0 s 20 00   0003 3 = 011000
d8c32680 175525553 C Co:1:006:0 0 3 
d8c32300 175534638 C Ii:1:006:1 0:1 14 = 0e0c0101 16b8 21060f00 0e41
d8c32300 175534750 S Ii:1:006:1 -115:1 258 
d8c32680 175535082 S Co:1:006:0 s 20 00   0003 3 = 091000
d8c32680 175579666 C Co:1:006:0 0 3 
d8c32400 175588769 C Ii:1:006:1 0:1 12 = 0e0a0109 10008699 ed6b0b00
d8c32400 175588874 S Ii:1:006:1 -115:1 258 
d8c32680 175589408 S Co:1:006:0 s 20 00   0003 3 = 021000
d8c32680 175635075 C Co:1:006:0 0 3 
d8c32f00 175644175 C Ii:1:006:1 0:1 70 = 0e440102 1000 ff03ccff efffcfff ec1ff20f e8fe3ff7 8fff1c00 61f7
d8c32f00 175644312 S Ii:1:006:1 -115:1 258 
d8c32680 175644670 S Co:1:006:0 s 20 00   0003 3 = 031000
d8c32680 175690521 C Co:1:006:0 0 3 
d8c32e00 175699606 C Ii:1:006:1 0:1 14 = 0e0c0103 1000bffe cffedbff