Skip to contentSkip to conversation

xhci: Add No Op Command

PATCH In review [email protected] 2 participants 4 messages Jul 20, 2019 – Aug 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xhci: Add No Op Command

From: Hikaru Nishida <[email protected]>

This commit adds No Op Command (23) to xHC for verifying the operation of the Command Ring mechanisms.
No Op Command is defined in XHCI spec (4.6.2) and just reports Command Completion Event with Completion Code == Success.
Before this commit, No Op Command is not implemented so xHC reports Command Completion Event with Completion Code == TRB Error. This commit fixes this behaviour to report Completion Code correctly.

---
 hw/usb/hcd-xhci.c | 3 +++
 1 file changed, 3 insertions(+)
hw/usb/hcd-xhci.c +3 -0
index 5894a18663..5ceff78280 100644
@@ -2542,6 +2542,9 @@ static void xhci_process_commands(XHCIState *xhci)
         case CR_GET_PORT_BANDWIDTH:
             event.ccode = xhci_get_port_bandwidth(xhci, trb.parameter);
             break;
+        case CR_NOOP:
+            event.ccode = CC_SUCCESS;
+            break;
         case CR_VENDOR_NEC_FIRMWARE_REVISION:
             if (xhci->nec_quirks) {
                 event.type = 48; /* NEC reply */
Signature · 1 line
2.20.1 (Apple Git-117)
#1 lore raw

ping...

2019年7月20日(土) 15:04 <[email protected]>:

Quoted 33 lines

From: Hikaru Nishida <[email protected]>

This commit adds No Op Command (23) to xHC for verifying the operation of the Command Ring mechanisms.
No Op Command is defined in XHCI spec (4.6.2) and just reports Command Completion Event with Completion Code == Success.
Before this commit, No Op Command is not implemented so xHC reports Command Completion Event with Completion Code == TRB Error. This commit fixes this behaviour to report Completion Code correctly.

---
 hw/usb/hcd-xhci.c | 3 +++
 1 file changed, 3 insertions(+)
hw/usb/hcd-xhci.c +3 -1
index 5894a18663..5ceff78280 100644
@@ -2542,6 +2542,9 @@ static void xhci_process_commands(XHCIState *xhci)
         case CR_GET_PORT_BANDWIDTH:
             event.ccode = xhci_get_port_bandwidth(xhci, trb.parameter);
             break;
+        case CR_NOOP:
+            event.ccode = CC_SUCCESS;
+            break;
         case CR_VENDOR_NEC_FIRMWARE_REVISION:
             if (xhci->nec_quirks) {
                 event.type = 48; /* NEC reply */
--

2.20.1 (Apple Git-117)

#2 lore raw

ping^2

2019年8月6日(火) 0:38 Hikaru Nishida <[email protected]>:

Quoted 37 lines

ping...

2019年7月20日(土) 15:04 <[email protected]>:

Quoted 33 lines

From: Hikaru Nishida <[email protected]>

This commit adds No Op Command (23) to xHC for verifying the operation of the Command Ring mechanisms.
No Op Command is defined in XHCI spec (4.6.2) and just reports Command Completion Event with Completion Code == Success.
Before this commit, No Op Command is not implemented so xHC reports Command Completion Event with Completion Code == TRB Error. This commit fixes this behaviour to report Completion Code correctly.

---
 hw/usb/hcd-xhci.c | 3 +++
 1 file changed, 3 insertions(+)
hw/usb/hcd-xhci.c +3 -1
index 5894a18663..5ceff78280 100644
@@ -2542,6 +2542,9 @@ static void xhci_process_commands(XHCIState *xhci)
         case CR_GET_PORT_BANDWIDTH:
             event.ccode = xhci_get_port_bandwidth(xhci, trb.parameter);
             break;
+        case CR_NOOP:
+            event.ccode = CC_SUCCESS;
+            break;
         case CR_VENDOR_NEC_FIRMWARE_REVISION:
             if (xhci->nec_quirks) {
                 event.type = 48; /* NEC reply */
--

2.20.1 (Apple Git-117)

#3 lore raw
In reply to [email protected]
Quoted 11 lines · On Sat, Jul 20, 2019 at 03:04:27PM +0900, [email protected] wrote:

From: Hikaru Nishida <[email protected]>

This commit adds No Op Command (23) to xHC for verifying the operation of the Command Ring mechanisms.
No Op Command is defined in XHCI spec (4.6.2) and just reports Command Completion Event with Completion Code == Success.
Before this commit, No Op Command is not implemented so xHC reports Command Completion Event with Completion Code == TRB Error. This commit fixes this behaviour to report Completion Code correctly.

Added to usb patch queue.

thanks,
Gerd