[Qemu-devel] [PATCH 1/2] usb: XHCI shall not halt isochronous endpoints

Yuri Benditovich posted 2 patches 6 years, 10 months ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
[Qemu-devel] [PATCH 1/2] usb: XHCI shall not halt isochronous endpoints
Posted by Yuri Benditovich 6 years, 10 months ago
According to the XHCI spec (4.10.2) the controller
never halts isochronous endpoints. This commit prevent
stop of isochronous streaming when sporadic errors
status received from backends.

Signed-off-by: Yuri Benditovich <yuri.benditovich@janustech.com>
---
 hw/usb/hcd-xhci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 8f1a01a..1a8fd96 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1571,6 +1571,11 @@ static void xhci_stall_ep(XHCITransfer *xfer)
     uint32_t err;
     XHCIStreamContext *sctx;
 
+    if (epctx->type == ET_ISO_IN || epctx->type == ET_ISO_OUT) {
+        /* never halt isoch endpoints, 4.10.2 */
+        return;
+    }
+
     if (epctx->nr_pstreams) {
         sctx = xhci_find_stream(epctx, xfer->streamid, &err);
         if (sctx == NULL) {
-- 
2.9.5


Re: [Qemu-devel] [PATCH 1/2] usb: XHCI shall not halt isochronous endpoints
Posted by Dmitry Fleytman 6 years, 10 months ago
> On 28 Jan 2019, at 22:05, Yuri Benditovich <yuri.benditovich@janustech.com> wrote:
> 
> According to the XHCI spec (4.10.2) the controller
> never halts isochronous endpoints. This commit prevent
> stop of isochronous streaming when sporadic errors
> status received from backends.
> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich@janustech.com>

Reviewed-by: Dmitry Fleytman <dmitry.fleytman@janustech.com>

> ---
> hw/usb/hcd-xhci.c | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> index 8f1a01a..1a8fd96 100644
> --- a/hw/usb/hcd-xhci.c
> +++ b/hw/usb/hcd-xhci.c
> @@ -1571,6 +1571,11 @@ static void xhci_stall_ep(XHCITransfer *xfer)
>     uint32_t err;
>     XHCIStreamContext *sctx;
> 
> +    if (epctx->type == ET_ISO_IN || epctx->type == ET_ISO_OUT) {
> +        /* never halt isoch endpoints, 4.10.2 */
> +        return;
> +    }
> +
>     if (epctx->nr_pstreams) {
>         sctx = xhci_find_stream(epctx, xfer->streamid, &err);
>         if (sctx == NULL) {
> -- 
> 2.9.5
>