Received: by 10.223.185.116 with SMTP id b49csp6114867wrg; Thu, 8 Mar 2018 01:58:51 -0800 (PST) X-Google-Smtp-Source: AG47ELvi3dkiybnZahp0w9gvqQghbECPMcZ1bsghDWHViQ4aNehO2d9v8Q46lixfPT/MdVzlbKlk X-Received: by 2002:a17:902:7f0c:: with SMTP id d12-v6mr16007662plm.350.1520503131762; Thu, 08 Mar 2018 01:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520503131; cv=none; d=google.com; s=arc-20160816; b=Bw63P+MV8B9YussSfOIHI+dfCR5vjwI7rq1U/DUJf+i0jnMFAMOFFunqgcmTk3s0SM hai7NMtWbQT0ftDn/5LcY9vlZP0X+n1u5ElbKhnudZXEBW8h92YAXQUntlGJxg9H8SnN IW3tUxCBTiGfpYsoNaFDdVSwIRvO6peC5SOVBOGrQG5MR4AHYxPTJHxHBIfzkNH6zGl3 gof7zZtFAaidF9uKO+k7cMWYiWm4XAc2bIqcfpOmAz6qJBm61yp2VT+NfvEkazNR0XnW R5PFMGj5chjfVRFuMJY58jRkG7hDhVftozpw9p88Ig3EXvk8KlOSck6r5XQ6idSt5bAU kddA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=pfi/KIlLJ2M7KWu9NbgmCb8kjFBgAek6wgIosLy18yQ=; b=inNQK9QjpfETTih2uFxvmD/AyjhqjcssH+BXIAFCSVJsKJSHIVPrNfXNn35KLX01ZV OMGOjejQJmQytZ/aVwQ1q4o9ji/sj6cw4krAXrN6MHSs6NpbbR2KlcG1dKn3gHSf3598 wy92gXlHWDxj6ZPvPcLh5siNW5JZ0SMiBsM2oPR3L5fmxFRCn7/NwH67FL3Wsq/H1ATe o9r8erSYNExGBFzaux8y61yUyassGqZ6sAy7wEad1L3qLM/nFPhqBWKFtP9wXqi27vVc U8QQahvLo23O0HMcJq49CvFX8docJlfjCDNmwRziAEdqf8aHzV56dfE5KdTuhPi86KFi 7/3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d64si15497322pfa.384.2018.03.08.01.58.37; Thu, 08 Mar 2018 01:58:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755559AbeCHJ5r (ORCPT + 99 others); Thu, 8 Mar 2018 04:57:47 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:38310 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbeCHJ5q (ORCPT ); Thu, 8 Mar 2018 04:57:46 -0500 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1etsIt-0006oE-Rq; Thu, 08 Mar 2018 10:57:39 +0100 Date: Thu, 8 Mar 2018 10:57:39 +0100 From: Sebastian Andrzej Siewior To: Mauro Carvalho Chehab Cc: Frederic Weisbecker , LKML , Peter Zijlstra , Thomas Gleixner , Alan Stern , linux-usb@vger.kernel.org Subject: Re: [RFC PATCH] usb: hcd: complete URBs in threaded-IRQ context instead of tasklet Message-ID: <20180308095739.okdn7ghvlpy4oiy5@linutronix.de> References: <20180216170450.yl5owfphuvltstnt@breakpoint.cc> <20180227143934.2aa847ac@vento.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180227143934.2aa847ac@vento.lan> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-27 14:39:34 [-0300], Mauro Carvalho Chehab wrote: > Hi Sebastian, Hi Mauro, > Sorry for taking some time to test it, has been busy those days... :) > Anyway, I tested it today. Didn't work. It keep losing data. Okay, this was unexpected. What I learned from the thread is that you use the dwc2 controller and once upgrade to a kernel which completes the URBs in BH context then you starting losing data from your DVB-s USB device. And it was assumed that this is because BH/ksoftirq is getting "paused" if it is running for too long. If that is the case then a revert of "let us complete the URB in BH context" should get it working again. Is that so? diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4287,7 +4287,9 @@ void dwc2_host_complete(struct dwc2_hsotg *hsotg, struct dwc2_qtd *qtd, kfree(qtd->urb); qtd->urb = NULL; + spin_unlock(&hsotg->lock); usb_hcd_giveback_urb(dwc2_hsotg_to_hcd(hsotg), urb, status); + spin_lock(&hsotg->lock); } /* @@ -4968,7 +4970,7 @@ static struct hc_driver dwc2_hc_driver = { .hcd_priv_size = sizeof(struct wrapper_priv_data), .irq = _dwc2_hcd_irq, - .flags = HCD_MEMORY | HCD_USB2 | HCD_BH, + .flags = HCD_MEMORY | HCD_USB2, .start = _dwc2_hcd_start, .stop = _dwc2_hcd_stop, -- 2.16.2 > Regards, Sebastian