From nobody Sun Apr 28 22:51:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14945073491201.8654429957334742; Thu, 11 May 2017 05:55:49 -0700 (PDT) Received: from localhost ([::1]:48110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8ndD-0004G8-Mh for importer@patchew.org; Thu, 11 May 2017 08:55:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8naw-0002rD-7x for qemu-devel@nongnu.org; Thu, 11 May 2017 08:53:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8nat-000096-HU for qemu-devel@nongnu.org; Thu, 11 May 2017 08:53:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39134) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8nat-00008Z-B4 for qemu-devel@nongnu.org; Thu, 11 May 2017 08:53:23 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31216C059742 for ; Thu, 11 May 2017 12:53:22 +0000 (UTC) Received: from dhcp-1-107.brq.redhat.com (dhcp-1-114.brq.redhat.com [10.34.1.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7322C88B36; Thu, 11 May 2017 12:53:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 31216C059742 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lprosek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 31216C059742 From: Ladi Prosek To: qemu-devel@nongnu.org Date: Thu, 11 May 2017 14:53:13 +0200 Message-Id: <20170511125314.24549-2-lprosek@redhat.com> In-Reply-To: <20170511125314.24549-1-lprosek@redhat.com> References: <20170511125314.24549-1-lprosek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 11 May 2017 12:53:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] xhci: fix logging X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" slotid and epid were deleted from XHCITransfer in commit d6fcb29. Also deleting one unused forward declaration. Signed-off-by: Ladi Prosek --- hw/usb/hcd-xhci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index a2d3143..d3d47bf 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1790,9 +1790,6 @@ static void xhci_stall_ep(XHCITransfer *xfer) } } =20 -static int xhci_submit(XHCIState *xhci, XHCITransfer *xfer, - XHCIEPContext *epctx); - static int xhci_setup_packet(XHCITransfer *xfer) { USBEndpoint *ep; @@ -1806,7 +1803,7 @@ static int xhci_setup_packet(XHCITransfer *xfer) ep =3D xhci_epid_to_usbep(xfer->epctx); if (!ep) { DPRINTF("xhci: slot %d has no device\n", - xfer->slotid); + xfer->epctx->slotid); return -1; } } @@ -1980,7 +1977,7 @@ static int xhci_submit(XHCIState *xhci, XHCITransfer = *xfer, XHCIEPContext *epctx { uint64_t mfindex; =20 - DPRINTF("xhci_submit(slotid=3D%d,epid=3D%d)\n", xfer->slotid, xfer->ep= id); + DPRINTF("xhci_submit(slotid=3D%d,epid=3D%d)\n", epctx->slotid, epctx->= epid); =20 xfer->in_xfer =3D epctx->type>>2; =20 --=20 2.9.3 From nobody Sun Apr 28 22:51:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1494507278933651.9763123108773; Thu, 11 May 2017 05:54:38 -0700 (PDT) Received: from localhost ([::1]:48103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8nc3-0003QG-8o for importer@patchew.org; Thu, 11 May 2017 08:54:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8naw-0002rC-7r for qemu-devel@nongnu.org; Thu, 11 May 2017 08:53:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8nau-00009g-N1 for qemu-devel@nongnu.org; Thu, 11 May 2017 08:53:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39830) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8nau-00009B-GN for qemu-devel@nongnu.org; Thu, 11 May 2017 08:53:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61D678123A for ; Thu, 11 May 2017 12:53:23 +0000 (UTC) Received: from dhcp-1-107.brq.redhat.com (dhcp-1-114.brq.redhat.com [10.34.1.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FC3C88B36; Thu, 11 May 2017 12:53:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 61D678123A Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lprosek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 61D678123A From: Ladi Prosek To: qemu-devel@nongnu.org Date: Thu, 11 May 2017 14:53:14 +0200 Message-Id: <20170511125314.24549-3-lprosek@redhat.com> In-Reply-To: <20170511125314.24549-1-lprosek@redhat.com> References: <20170511125314.24549-1-lprosek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 11 May 2017 12:53:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] usb-hub: clear PORT_STAT_SUSPEND on wakeup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The spec says: Suspend: (PORT_SUSPEND) This field indicates whether or not the device on this port is suspended. Setting this field causes the device to suspend by not propagating bus traffic downstream. This field may be reset by a request or by resume signaling from the device attached to the port. I can't find any specific statement like "the PORT_SUSPEND field is reset automatically on remote wakeup", but without this patch, the only way to reset it is via the ClearPortFeature request so the ".. or by resume signaling from the device" clause is clearly not implemented on the remote wakeup path. The default xhci Windows driver does not issue the ClearPortFeature request and suspended devices attached to a hub don't properly get out of the suspended state. Interestingly, the default uhci Windows driver *does* issue the ClearPortFeature request and does not exhibit this problem. Signed-off-by: Ladi Prosek --- hw/usb/dev-hub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 9fe7333..47b7519 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -208,6 +208,7 @@ static void usb_hub_wakeup(USBPort *port1) USBHubPort *port =3D &s->ports[port1->index]; =20 if (port->wPortStatus & PORT_STAT_SUSPEND) { + port->wPortStatus &=3D ~PORT_STAT_SUSPEND; port->wPortChange |=3D PORT_STAT_C_SUSPEND; usb_wakeup(s->intr, 0); } --=20 2.9.3