Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1867892lqa; Tue, 30 Apr 2024 01:17:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2lSw/QV2wvBWsYdbM6KlAMk6zWnT0UZ72u9jlUlw0S0BS4Y+YWkNOVBtzG2xe6LK6xGNtOL5naRXDovnxrd87vN+uIxfAF0O3leukPg== X-Google-Smtp-Source: AGHT+IEwHD6e/o3HnikrA8wqjPcWckNPH2PTQFikDVFIxyJwA0WKr4u1M3rHdMqiXCs+XIYVYXMD X-Received: by 2002:a17:906:3013:b0:a59:1e69:39f with SMTP id 19-20020a170906301300b00a591e69039fmr1234119ejz.39.1714465043479; Tue, 30 Apr 2024 01:17:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714465043; cv=pass; d=google.com; s=arc-20160816; b=DGPkOLHmrw/5U34iZWJRvdnQfun8BqSu/SHG3IM8W+hKRgm5ma0bfAW/DWibmtdvxy 3Lyo7leDqiE5ZGMxm/XvgHQNs8ljsgdZzeEWCxMwOqyPFLQ94JRkHiifsxhSteuBLea1 9Hv46rqGfcDYfODOtMbdDMysfFPUO+JPNHu0a4ozHwotl6xFsZFIixouJxYZ0Oy5Uqe4 Zeh4oIBbrf7AOxBILgyuI3BwUwkxJ6qw6bu8rCNOx/2HnxKqmwdMknUhFpjNCdmnwvoF fDivPiigb3KXIGqg/NTRLb7Ay1WXdMc0aRy+AmxXTXuVwwrdZSPEc3rYQDuPQ0Fv64JH lQbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SGk41959AnFc6RykN6nKaUpg5RkxwVWglWv+3boUFro=; fh=MWxejJ2g1irHE6oQDV1Myn6t7ihsA72JbKRkMnP2mG8=; b=NOx6T+MN+xIslKUVBgxFmEalPJVCzpsgvuah7WpF9yyWy3fHo9JQFN85ATCJECrfB1 VvNWY/WfZW920bW++iLKTZAySYnN0dWMVpAaFebFIbN+eqazak9GwUJwMpOltc1fNAG1 hZYTbWq5k2i/hvdrIWQr9mJq/nKYnZKwsIIYkuXylQAnpEtUVQO+1RlE+uUOYb1soOH1 wXoEr9rqDrW0IINuyeghz12dnvW1yoTd38MBvYtt0jZbi0LRIazPmqq1ZzsojAKDyxUs C11w9HR8ZZy3qF/qi9HuGzg5A9uMGlzzAHi5KGdCcRhWxvaKUA+wlA+rot9YRRu55Wns tdzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fbwyl+aH; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q27-20020a17090622db00b00a55c021e3b7si9803856eja.286.2024.04.30.01.17.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 01:17:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fbwyl+aH; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 635E71F23415 for ; Tue, 30 Apr 2024 08:10:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3171A481DB; Tue, 30 Apr 2024 08:10:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Fbwyl+aH" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7ADE040BF5 for ; Tue, 30 Apr 2024 08:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714464644; cv=none; b=Ug1SCX6/JLlSY0SCP/PTpuY1Ph1JJjSuRAnpIRVGxJmeCPnXX95ZvoOYxyLU9x5cJtIbdJY0jQ9mypyrP0axdf3/mL4CeuWwYJY1zNTGVrwnACUwAHtQpXFK36oG4frDEGJVfVOyX1uGDizh/9lOsGkSmhYf4OpSFP7Z5J7oxEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714464644; c=relaxed/simple; bh=38D/E0QynX5t/3/hbHIk50M6Sl+epAu87XCK1LhciKY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E8YHrb5RYy7aZpOBcZFY5Sihoh9YEIVMG/soGKEg4wi1I6J2wA6EPH1SxcUe73mwgA9yoK+ST4OezyM1rkMvgmd4lj/pluV55lQEFUdVxv68X+K8U77rDbpBMqMTd1TFTLjOqTzGL+pejlEM1/brOfUJWb/V+nZHw3j/CpWljQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Fbwyl+aH; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714464641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SGk41959AnFc6RykN6nKaUpg5RkxwVWglWv+3boUFro=; b=Fbwyl+aHAU02Bjy73ggIcbj38vx091HBtrLxJTyX3B/BaJdhn9+WGbIITC9Bu2UMndgkrC aAGzNg8pxKTPyGmxsGejBVJFIkawlx24wnFBMGUMevdjTdDaot8yNvjOOsf7kZY7PxCG3A LPntYyS9kB95xMDZHmWVJD/LERmwTWI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-v7N2sKfFPZOeRadi5U3lhg-1; Tue, 30 Apr 2024 04:10:38 -0400 X-MC-Unique: v7N2sKfFPZOeRadi5U3lhg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C7C73834FBF; Tue, 30 Apr 2024 08:10:37 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8588F200AFA2; Tue, 30 Apr 2024 08:10:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9F81E180099B; Tue, 30 Apr 2024 10:10:35 +0200 (CEST) Date: Tue, 30 Apr 2024 10:10:35 +0200 From: Gerd Hoffmann To: Guenter Roeck Cc: Alan Stern , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, David Laight Subject: Re: [PATCH v3] usb: ohci: Prevent missed ohci interrupts Message-ID: <723ahlmaul2l2mpqfdykufwz5lyyvhhehbpx5ya6eopquq6mro@qo6h2wnbqm36> References: <20240429154010.1507366-1-linux@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240429154010.1507366-1-linux@roeck-us.net> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 On Mon, Apr 29, 2024 at 08:40:10AM GMT, Guenter Roeck wrote: > Testing ohci functionality with qemu's pci-ohci emulation often results > in ohci interface stalls, resulting in hung task timeouts. > > The problem is caused by lost interrupts between the emulation and the > Linux kernel code. Additional interrupts raised while the ohci interrupt > handler in Linux is running and before the handler clears the interrupt > status are not handled. The fix for a similar problem in ehci suggests > that the problem is likely caused by edge-triggered MSI interrupts. See > commit 0b60557230ad ("usb: ehci: Prevent missed ehci interrupts with > edge-triggered MSI") for details. > > Ensure that the ohci interrupt code handles all pending interrupts before > returning to solve the problem. > > Cc: Gerd Hoffmann > Cc: David Laight > Cc: stable@vger.kernel.org > Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") > Signed-off-by: Guenter Roeck > --- > v3: Check if any interrupts are pending before reading intrenable > Add 'Cc: stable@vger.kernel.org' > v2: Only repeat if the interface is still active Reviewed-by: Gerd Hoffmann take care, Gerd