Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp170923imd; Wed, 31 Oct 2018 16:45:04 -0700 (PDT) X-Google-Smtp-Source: AJdET5csyiLRkXhBV94FkoB1W7m2HhB0vBy1R7TTc0B82c+GLUc02Za1LG3NPjQ3tAtpUZrhezBK X-Received: by 2002:a65:520a:: with SMTP id o10mr5189037pgp.276.1541029504065; Wed, 31 Oct 2018 16:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029504; cv=none; d=google.com; s=arc-20160816; b=A0D2OyBODG6owG91syiU8KBio3nZaHNJlkXqDgzXqPmazpwntiB0e2PMsJME9zWDai 3xHRDxLgodTDkTjNd6g4wNi30rA5SbQpGFfx6wAnItWVMiAE5ipidIaVg2RznPv3F2ox GBEWUNyp4hS9fEa3pgQvD22Pcx+rX1c/ZoHiLWJaY856xs8gn7nySYttk38TSEiITAxB lgf/MNoSBgMtDcZvb2WS/9/qzqXpqeCMYcxZ0xMsBCArrLh9m3hrvG5csqnxs+1aB4gz 3CRxz0m8Z4TA3EUeu2/ZSh7jWKBCT5C6qkaBHBIBeM+8/9y/7J7fa0Al2F9thPT5RmqE vQgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=kMoqhXCz3bSDrKuQ6rP5UX54mXj9/tlLU3qlBayNpgc=; b=HFFuGjCtop44YqKT/I5KsJrsVOXImMo90v0dNagTvpKxvpn5T0A6U9R4N+f7l6faRI QM2uXwPWoLnqP4dtlWz9XZJEwepZjwHMaN+J0LFSY5Sjs1jULMyXyeLJt+0+vZsKF9sy Z/HBSrB0g50Ps1/7cbp7f7sjFFdcaQEKqDU16IaaDYZqIaoo9XN4KvLZ6YmCuS8c0Xm0 rDoTgg7iF/R3w7ax6d+4cwK7JVPdppouSqZBs5yV9aE6kqadIqqceOrbf04Ci8bif1p2 Y4arg/cu3O1MlsBq4GRPXU1nBEwGdGY7TRJM1SLs/ud/QHnL/FOa5K/yCtpnFa1djMc3 gxUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gkkUymW0; 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 g11-v6si26905452pgs.179.2018.10.31.16.44.49; Wed, 31 Oct 2018 16:45:04 -0700 (PDT) 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=gkkUymW0; 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 S1729237AbeKAIok (ORCPT + 99 others); Thu, 1 Nov 2018 04:44:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:55500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728978AbeKAIHg (ORCPT ); Thu, 1 Nov 2018 04:07:36 -0400 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 C755C20838; Wed, 31 Oct 2018 23:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027245; bh=cS9lFM0fSU86x0TjFVKRQWCLSp5vPysdcFuiAfI6+24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gkkUymW0tMWCO+1IJbyrqAyDTD8to64V8/yyYuyT1d6FEUXQ/IMtlV7fzc1fqghh8 Bz4Dq0hzR34E98oaZIFmyqLBMGqR/r80KZHbzM7Y05iklnpZIjP+3OKLnjW3LDK5gY sKiopGDyYFTcpuMkNG/RbrCZlbmobJ5V41K6H3Jo= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Fabrice Gasnier , Amelie Delaunay , Felipe Balbi , Sasha Levin Subject: [PATCH AUTOSEL 4.19 114/146] usb: dwc2: fix call to vbus supply exit routine, call it unlocked Date: Wed, 31 Oct 2018 19:05:09 -0400 Message-Id: <20181031230541.28822-114-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabrice Gasnier [ Upstream commit 5aa678c7fd5371769efde30763fb43a43a118cd0 ] dwc2_vbus_supply_exit() may call regulator_disable(). It shouldn't be called with interrupts disabled as it might sleep. This is seen with DEBUG_ATOMIC_SLEEP=y. Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external vbus supply") Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc2/hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 2bd6e6bfc241..befaf1e9d98a 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4482,7 +4482,9 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) hprt0 |= HPRT0_SUSP; hprt0 &= ~HPRT0_PWR; dwc2_writel(hsotg, hprt0, HPRT0); + spin_unlock_irqrestore(&hsotg->lock, flags); dwc2_vbus_supply_exit(hsotg); + spin_lock_irqsave(&hsotg->lock, flags); } /* Enter partial_power_down */ -- 2.17.1