Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp197462imj; Thu, 14 Feb 2019 18:29:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IYBYwE1bASVg7eUh5DEOXEHeafZIrcNOHkrYtg4kvzzrYtX5jP4/5YYjksO2EqKr5Eg47FY X-Received: by 2002:a63:360b:: with SMTP id d11mr2992763pga.156.1550197745244; Thu, 14 Feb 2019 18:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550197745; cv=none; d=google.com; s=arc-20160816; b=qrise1cUjw1YmY1OV8eQp/9Y0ZWYLXynrK9i5IO2zzU1o85+Y2w0Pp7mOUZwiqGa7H M2BtTP2FxsPHA/CyDFF78VivVj7w1SictX4CkEGdugWdZDVHDPr6iNO7irIDW/U2CffF CvCk72ruZq/SCXSIY1SC4qv3Swp/7YSmjrhMbTAPMTSSecxZ2jUcM5QuNzsUtJYiX2PJ OMcZpR0Bu8PTXt4qHUmqDexO+Xqu+om2NmMgp8+JSMGknTOFHxG4v8UtXr0T+dKn4bIB 6VCJMS+no7RWR7xAtUKhZ71TbnSjEAgJyV9c3+HJPUli7PjlFeo907XIafIhoyEyEjdv 3mww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W9c8YnCy+zIHkGzh66oQJZTRzfHyk3WEA8zHKMpf4m8=; b=ipXBik1UAeipkeTgnxIWpRI+IJtkuGFBCrT9Vgt9Tb5RB/tShhZNAg25UxXQHbLsUz Dwr+FJEZD1vHjdQDsW9OQQhVfy3pdFud0aOnqZBhvxUo1xGnRISgL1TvIQYDm0iILbAC vyNcd7at3kOpeJK1+Y21xHCsLPQ8JeMy8h0GX0JnXdkYMUlI4MWnOO09AUL4fwCbwD4h esGRMbD31MI1hHsWHXI/sKV0AdUp5DW31NO+zFi/COobTlkDpWozgKSN4k/UndTuKEYy BcovPVEqeQ0qurL8tvRT8I7MEiQEHXcT1IzKCv8XFCwJtCkm2qXZpjWxwuPxWMig+pDf najQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w1KlrqjH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si4309184plc.241.2019.02.14.18.28.49; Thu, 14 Feb 2019 18:29:05 -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; dkim=pass header.i=@kernel.org header.s=default header.b=w1KlrqjH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731725AbfBOCJT (ORCPT + 99 others); Thu, 14 Feb 2019 21:09:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:49442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731535AbfBOCJP (ORCPT ); Thu, 14 Feb 2019 21:09:15 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA8BC222C9; Fri, 15 Feb 2019 02:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550196554; bh=90by3f4RJ4Le5sQpCAINm3MdVIJ5a6qF+s4R04m7QaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w1KlrqjHYrJIIBCNaVZQYUB4FTdKPmpiTR4OS/V+eXdBxwo5dKJFdOYfDHYatAYx9 /LTzJzFJS6yjf18bUhC5mkHQmUncRQiy9vrkFnsaBEVRpI03fJw46Ob7GZkiylSo0k y+MXFQVVKt5haKTQyFHg2zPeI1bxgZFTyDOyCwoU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bo He , Yu Wang , Felipe Balbi , Sasha Levin , linux-usb@vger.kernel.org Subject: [PATCH AUTOSEL 4.20 12/77] usb: dwc3: gadget: synchronize_irq dwc irq in suspend Date: Thu, 14 Feb 2019 21:07:50 -0500 Message-Id: <20190215020855.176727-12-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215020855.176727-1-sashal@kernel.org> References: <20190215020855.176727-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bo He [ Upstream commit 01c10880d24291a96a4ab0da773e3c5ce4d12da8 ] We see dwc3 endpoint stopped by unwanted irq during suspend resume test, which is caused dwc3 ep can't be started with error "No Resource". Here, add synchronize_irq before suspend to sync the pending IRQ handlers complete. Signed-off-by: Bo He Signed-off-by: Yu Wang Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc3/gadget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2a4ea9a1b1e3..f51527c8925b 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3279,6 +3279,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) dwc3_disconnect_gadget(dwc); __dwc3_gadget_stop(dwc); + synchronize_irq(dwc->irq_gadget); + return 0; } -- 2.19.1