Skip to contentSkip to conversation

usb: hcd.h: Fix the values of SetHubDepth and GetPortErrorCount to match USB 3.1 specification

PATCH Superseded Tal Shorer 2 participants 10 messages Aug 7, 2015 1 message not in the archive USB

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CAFDyS3P0rHeG9eNc4ttVx6EX18CtGj2WUi+9W+YRO3=fCvUsBQ@mail.gmail.com

Tal Shorer

author
#1 lore raw

PATCH 1/1 usb: hcd.h: Fix the values of SetHubDepth and GetPortErrorCount to match USB 3.1 specification

Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link
Errors on this port

Fix these two values to match the spec.

---
 include/linux/usb/hcd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/usb/hcd.h +3 -3
index c9aa779..6a24416 100644
@@ -564,9 +564,9 @@ extern void usb_ep0_reinit(struct usb_device *);
 
 /*-------------------------------------------------------------------------*/
 
-/* class requests from USB 3.0 hub spec, table 10-5 */
-#define SetHubDepth		(0x3000 | HUB_SET_DEPTH)
-#define GetPortErrorCount	(0x8000 | HUB_GET_PORT_ERR_COUNT)
+/* class requests from USB 3.1 hub spec, table 10-7 */
+#define SetHubDepth (0x2000 | HUB_SET_DEPTH)
+#define GetPortErrorCount (0xa300 | HUB_GET_PORT_ERR_COUNT)
 
 /*
  * Generic bandwidth allocation constants/support
Signature · 1 line
2.4.6
maintainer
#2 lore raw
Quoted 8 lines · Tal Shorer
Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link
Errors on this port

This doesn't make much sense at all, can you properly format it to look correct?

thanks,

greg k-h

maintainer
#3 lore raw
In reply to Tal Shorer
Quoted 21 lines · Tal Shorer
Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link
Errors on this port

Fix these two values to match the spec.

---
 include/linux/usb/hcd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/usb/hcd.h +0 -0
index c9aa779..6a24416 100644

include/linux/usb/hcd.h extern void usb_ep0_reinit(struct usb_device *); · line 569

Quoted 9 lines
include/linux/usb/hcd.h +3 -3
@@ -564,9 +564,9 @@ extern void usb_ep0_reinit(struct usb_device *);
 
 /*-------------------------------------------------------------------------*/
 
-/* class requests from USB 3.0 hub spec, table 10-5 */
-#define SetHubDepth		(0x3000 | HUB_SET_DEPTH)
-#define GetPortErrorCount	(0x8000 | HUB_GET_PORT_ERR_COUNT)
+/* class requests from USB 3.1 hub spec, table 10-7 */
+#define SetHubDepth (0x2000 | HUB_SET_DEPTH)
+#define GetPortErrorCount (0xa300 | HUB_GET_PORT_ERR_COUNT)

Why did you loose the indentation?

author
#4 lore raw

PATCH v2 1/1 usb: hcd.h: Fix the values of SetHubDepth and GetPortErrorCount to match USB 3.1 specification

Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link
Errors on this port

Fix these two values to match the spec.

---
 include/linux/usb/hcd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/usb/hcd.h +3 -3
index c9aa779..d2784c1 100644
@@ -564,9 +564,9 @@ extern void usb_ep0_reinit(struct usb_device *);
 
 /*-------------------------------------------------------------------------*/
 
-/* class requests from USB 3.0 hub spec, table 10-5 */
-#define SetHubDepth		(0x3000 | HUB_SET_DEPTH)
-#define GetPortErrorCount	(0x8000 | HUB_GET_PORT_ERR_COUNT)
+/* class requests from USB 3.1 hub spec, table 10-7 */
+#define SetHubDepth		(0x2000 | HUB_SET_DEPTH)
+#define GetPortErrorCount	(0xa300 | HUB_GET_PORT_ERR_COUNT)
 
 /*
  * Generic bandwidth allocation constants/support
Signature · 1 line
2.4.6
author
#5 lore raw

Please ignore v2, I missed that you

Quoted 36 lines · Tal Shorer

From the usb 3.1 spec available at http://www.usb.org/developers/docs/
table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link
Errors on this port

Fix these two values to match the spec.

---
 include/linux/usb/hcd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/usb/hcd.h +3 -4
index c9aa779..d2784c1 100644
@@ -564,9 +564,9 @@ extern void usb_ep0_reinit(struct usb_device *);
 
 /*-------------------------------------------------------------------------*/
 
-/* class requests from USB 3.0 hub spec, table 10-5 */
-#define SetHubDepth            (0x3000 | HUB_SET_DEPTH)
-#define GetPortErrorCount      (0x8000 | HUB_GET_PORT_ERR_COUNT)
+/* class requests from USB 3.1 hub spec, table 10-7 */
+#define SetHubDepth            (0x2000 | HUB_SET_DEPTH)
+#define GetPortErrorCount      (0xa300 | HUB_GET_PORT_ERR_COUNT)
 
 /*
  * Generic bandwidth allocation constants/support
--

2.4.6

author
#6 lore raw

PATCH v3 1/1 usb: hcd.h: Fix the values of SetHubDepth and GetPortErrorCount to match USB 3.1 specification

In reply to Greg KH
Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data
SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None
GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link Errors on this port

Fix these two values to match the spec.

---
 include/linux/usb/hcd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/usb/hcd.h +3 -3
index c9aa779..d2784c1 100644
@@ -564,9 +564,9 @@ extern void usb_ep0_reinit(struct usb_device *);
 
 /*-------------------------------------------------------------------------*/
 
-/* class requests from USB 3.0 hub spec, table 10-5 */
-#define SetHubDepth		(0x3000 | HUB_SET_DEPTH)
-#define GetPortErrorCount	(0x8000 | HUB_GET_PORT_ERR_COUNT)
+/* class requests from USB 3.1 hub spec, table 10-7 */
+#define SetHubDepth		(0x2000 | HUB_SET_DEPTH)
+#define GetPortErrorCount	(0xa300 | HUB_GET_PORT_ERR_COUNT)
 
 /*
  * Generic bandwidth allocation constants/support
Signature · 1 line
2.4.6
maintainer
#7 lore raw
Quoted 7 lines · Tal Shorer
Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data
SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None
GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link Errors on this port

Still does not look correct to me, how about you?

author
#8 lore raw
Quoted 11 lines · Greg KH
Quoted 7 lines · Tal Shorer
Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data
SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None
GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link Errors on this port

Still does not look correct to me, how about you?

Not sure what you mean. This is a simple copy-paste from the spec document. Do you want me to put quotation marks around the multi-word Data column?

maintainer
#9 lore raw
Quoted 10 lines · Tal Shorer
Quoted 9 lines · Greg KH
Quoted 7 lines · Tal Shorer
Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data
SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None
GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link Errors on this port

Quoted 5 lines
Quoted 2 lines

Still does not look correct to me, how about you?

Not sure what you mean. This is a simple copy-paste from the spec document. Do you want me to put quotation marks around the multi-word Data column?

I want the columns to line up so that they look sane and someone can understand what they mean :)

author
#10 lore raw

PATCH v4 1/1 usb: hcd.h: Fix the values of SetHubDepth and GetPortErrorCount to match USB 3.1 specification

Quoted 1 line

From the usb 3.1 spec available at http://www.usb.org/developers/docs/

table 10-7 (Hub Class Requests) specifies the values for SetHubDepth and GetPortErrorCount as:

Request bmRequestType bRequest wValue wIndex wLength Data
SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None
GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of Link Errors on this port

Fix these two values to match the spec.

---
 include/linux/usb/hcd.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/usb/hcd.h +3 -3
index c9aa779..d2784c1 100644
@@ -564,9 +564,9 @@ extern void usb_ep0_reinit(struct usb_device *);
 
 /*-------------------------------------------------------------------------*/
 
-/* class requests from USB 3.0 hub spec, table 10-5 */
-#define SetHubDepth		(0x3000 | HUB_SET_DEPTH)
-#define GetPortErrorCount	(0x8000 | HUB_GET_PORT_ERR_COUNT)
+/* class requests from USB 3.1 hub spec, table 10-7 */
+#define SetHubDepth		(0x2000 | HUB_SET_DEPTH)
+#define GetPortErrorCount	(0xa300 | HUB_GET_PORT_ERR_COUNT)
 
 /*
  * Generic bandwidth allocation constants/support
Signature · 1 line
2.4.6