QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Qemu-devel] [PATCH] xhci: Add No Op Command
@ 2019-07-20  6:04 hikarupsp
  2019-08-05 15:38 ` Hikaru Nishida
  2019-08-14 12:13 ` Gerd Hoffmann
  0 siblings, 2 replies; 4+ messages in thread
From: hikarupsp @ 2019-07-20  6:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hikaru Nishida, Gerd Hoffmann

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)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] xhci: Add No Op Command
  2019-07-20  6:04 [Qemu-devel] [PATCH] xhci: Add No Op Command hikarupsp
@ 2019-08-05 15:38 ` Hikaru Nishida
  2019-08-13  7:48   ` Hikaru Nishida
  2019-08-14 12:13 ` Gerd Hoffmann
  1 sibling, 1 reply; 4+ messages in thread
From: Hikaru Nishida @ 2019-08-05 15:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] xhci: Add No Op Command
  2019-08-05 15:38 ` Hikaru Nishida
@ 2019-08-13  7:48   ` Hikaru Nishida
  0 siblings, 0 replies; 4+ messages in thread
From: Hikaru Nishida @ 2019-08-13  7:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] xhci: Add No Op Command
  2019-07-20  6:04 [Qemu-devel] [PATCH] xhci: Add No Op Command hikarupsp
  2019-08-05 15:38 ` Hikaru Nishida
@ 2019-08-14 12:13 ` Gerd Hoffmann
  1 sibling, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2019-08-14 12:13 UTC (permalink / raw)
  To: hikarupsp; +Cc: qemu-devel

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-20  6:04 [Qemu-devel] [PATCH] xhci: Add No Op Command hikarupsp
2019-08-05 15:38 ` Hikaru Nishida
2019-08-13  7:48   ` Hikaru Nishida
2019-08-14 12:13 ` Gerd Hoffmann

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org qemu-devel@archiver.kernel.org
	public-inbox-index qemu-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox