From nobody Mon Feb 9 19:52:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553609562041516.9677543208395; Tue, 26 Mar 2019 07:12:42 -0700 (PDT) Received: from localhost ([127.0.0.1]:60683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8mog-0004HT-VM for importer@patchew.org; Tue, 26 Mar 2019 10:12:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8miS-0007sW-M7 for qemu-devel@nongnu.org; Tue, 26 Mar 2019 10:06:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8miO-00037H-Va for qemu-devel@nongnu.org; Tue, 26 Mar 2019 10:06:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45152) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8miN-00030D-8U for qemu-devel@nongnu.org; Tue, 26 Mar 2019 10:06:07 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D3DB307EA8E for ; Tue, 26 Mar 2019 14:06:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4A026092E; Tue, 26 Mar 2019 14:06:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DE16417535; Tue, 26 Mar 2019 15:05:59 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2019 15:05:58 +0100 Message-Id: <20190326140559.21476-2-kraxel@redhat.com> In-Reply-To: <20190326140559.21476-1-kraxel@redhat.com> References: <20190326140559.21476-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 26 Mar 2019 14:06:03 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] ohci: don't die on ED_LINK_LIMIT overflow 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: Laurent Vivier , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Laurent Vivier Stop processing the descriptor list instead. The next frame timer tick will resume the work Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=3D1686705 Suggested-by: Gerd Hoffmann Signed-off-by: Laurent Vivier Message-id: 20190321085212.10796-1-lvivier@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ohci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 196a9f72002d..81cf5ab7a5a7 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1200,7 +1200,7 @@ static int ohci_service_ed_list(OHCIState *ohci, uint= 32_t head, int completion) if (head =3D=3D 0) return 0; =20 - for (cur =3D head; cur; cur =3D next_ed) { + for (cur =3D head; cur && link_cnt++ < ED_LINK_LIMIT; cur =3D next_ed)= { if (ohci_read_ed(ohci, cur, &ed)) { trace_usb_ohci_ed_read_error(cur); ohci_die(ohci); @@ -1209,11 +1209,6 @@ static int ohci_service_ed_list(OHCIState *ohci, uin= t32_t head, int completion) =20 next_ed =3D ed.next & OHCI_DPTR_MASK; =20 - if (++link_cnt > ED_LINK_LIMIT) { - ohci_die(ohci); - return 0; - } - if ((ed.head & OHCI_ED_H) || (ed.flags & OHCI_ED_K)) { uint32_t addr; /* Cancel pending packets for ED that have been paused. */ --=20 2.18.1