[Qemu-devel] [PATCH] xhci: Add No Op Command

hikarupsp@gmail.com posted 1 patch 6 years, 3 months ago
Test checkpatch passed
Test s390x passed
Test asan passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190720060427.50457-1-hikarupsp@gmail.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c | 3 +++
1 file changed, 3 insertions(+)
[Qemu-devel] [PATCH] xhci: Add No Op Command
Posted by hikarupsp@gmail.com 6 years, 3 months ago
From: Hikaru Nishida <hikarupsp@gmail.com>

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.

Signed-off-by: Hikaru Nishida <hikarupsp@gmail.com>
---
 hw/usb/hcd-xhci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 5894a18663..5ceff78280 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -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)


Re: [Qemu-devel] [PATCH] xhci: Add No Op Command
Posted by Hikaru Nishida 6 years, 3 months ago
ping...

2019年7月20日(土) 15:04 <hikarupsp@gmail.com>:

> From: Hikaru Nishida <hikarupsp@gmail.com>
>
> 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.
>
> Signed-off-by: Hikaru Nishida <hikarupsp@gmail.com>
> ---
>  hw/usb/hcd-xhci.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> index 5894a18663..5ceff78280 100644
> --- a/hw/usb/hcd-xhci.c
> +++ b/hw/usb/hcd-xhci.c
> @@ -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)
>
>
Re: [Qemu-devel] [PATCH] xhci: Add No Op Command
Posted by Hikaru Nishida 6 years, 3 months ago
ping^2

2019年8月6日(火) 0:38 Hikaru Nishida <hikarupsp@gmail.com>:

> ping...
>
> 2019年7月20日(土) 15:04 <hikarupsp@gmail.com>:
>
>> From: Hikaru Nishida <hikarupsp@gmail.com>
>>
>> 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.
>>
>> Signed-off-by: Hikaru Nishida <hikarupsp@gmail.com>
>> ---
>>  hw/usb/hcd-xhci.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
>> index 5894a18663..5ceff78280 100644
>> --- a/hw/usb/hcd-xhci.c
>> +++ b/hw/usb/hcd-xhci.c
>> @@ -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)
>>
>>
Re: [Qemu-devel] [PATCH] xhci: Add No Op Command
Posted by Gerd Hoffmann 6 years, 2 months ago
On Sat, Jul 20, 2019 at 03:04:27PM +0900, hikarupsp@gmail.com wrote:
> From: Hikaru Nishida <hikarupsp@gmail.com>
> 
> 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.
> 
> Signed-off-by: Hikaru Nishida <hikarupsp@gmail.com>

Added to usb patch queue.

thanks,
  Gerd