From nobody Fri Apr 26 07:06:58 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1596982963; cv=none; d=zohomail.com; s=zohoarc; b=aHqMvMBrOso2HsZESlpRuU7+UTq17nKeaJHjP4OZznjMI1qg/YmN4hFjfPd+3t65IDZSv10qFfynv13DousOzBuxHjBDOAFaHan4YDITtaGdOeUryejsxfwor5dFOTYJKbvcNSOBptPCvAnnq/ORo2COcYFfjD+YnlZ6O6ibE9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596982963; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Subject:To; bh=WmlG5jqJFJBRClLuCYin1hgkvLa0PEPXCC9HjJ5gX68=; b=mMLp8dl5qN5BXErEJV+OmR/5/cECevRQh9+yOQ9ZY3fJtn/89MAeN1uixBPvokiZps4qBrLn+PVmFNnCqUzqQdDjSlWB/P8e27ivGUlS8HX0pB+NKIXjT+FLkqJ0Yl8eqQvTvq+x7OHOAxJQ4XY0rxMwhVOmrXOHsQhs0Rdy/9c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1596982963253489.23920159652346; Sun, 9 Aug 2020 07:22:43 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 1E16410C0024; Sun, 9 Aug 2020 14:22:38 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 1E84910C0012 for ; Sun, 9 Aug 2020 14:22:23 +0000 (UTC) MIME-Version: 1.0 From: weitaowang-oc@zhaoxin.com To: seabios@seabios.org Date: Sun, 09 Aug 2020 14:22:23 -0000 Message-ID: <159698294308.14.13067234241650533818@b63950293ec5> Message-ID-Hash: PW3MCOR2H75H7CEAWWVLDOKMKLZCX2J4 X-Message-ID-Hash: PW3MCOR2H75H7CEAWWVLDOKMKLZCX2J4 X-MailFrom: weitaowang-oc@zhaoxin.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.3.2b1 Precedence: list Subject: [SeaBIOS] [SeaBIOS][PATCH] USB:Fix xHCI initail fail by using longer reset and CNR clear timeout value List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: -- Content-Type: text/plain; charset="utf-8" Some xHCI controller's reset time than 100ms,such as 120ms. On the on hand, xHCI spec has not specified a timeout value. Maybe setting xHCI HCRST and CNR bit clear timeout value larger is a nice thing.As a compromise between compatibility and latency,we can take 1000ms as a timeout value. Signed-off-by: WeitaoWangoc --- src/hw/usb-xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c index 08d1e32..21d091f 100644 --- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -467,9 +467,9 @@ configure_xhci(void *data) dprintf(3, "%s: resetting\n", __func__); writel(&xhci->op->usbcmd, XHCI_CMD_HCRST); - if (wait_bit(&xhci->op->usbcmd, XHCI_CMD_HCRST, 0, 100) !=3D 0) + if (wait_bit(&xhci->op->usbcmd, XHCI_CMD_HCRST, 0, 1000) !=3D 0) goto fail; - if (wait_bit(&xhci->op->usbsts, XHCI_STS_CNR, 0, 100) !=3D 0) + if (wait_bit(&xhci->op->usbsts, XHCI_STS_CNR, 0, 1000) !=3D 0) goto fail; writel(&xhci->op->config, xhci->slots); --=20 2.7.4 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org