Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3100355ybi; Thu, 18 Jul 2019 21:02:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgQHL29kzwEJZui6dm5SbhOA6xE9rM46pON952jDPBQEpjTBlwyVCgUeCk3xbptakDWp/N X-Received: by 2002:a17:90a:bc0c:: with SMTP id w12mr24730082pjr.111.1563508945898; Thu, 18 Jul 2019 21:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508945; cv=none; d=google.com; s=arc-20160816; b=Rn2BELcVFZXyX/4xQ7I4lYTlQDU5cWhYZMsDxlvhz7Z68nIASCrLAMpKbVoLpv4drk XZyfPlJAkFlhDYwJ98TDRxdxYHhU5qI6oeaOIr3uwuI8nPPKnbqQ4lCmTCVvSZd2BGTL O9QoqktjNTYVMvekH2f1e1iu8guknLo1ppQLDbaMwbXwuvqSWZ7IlT0dFVSK3QROf2os uv8C309T15ud81FpY5GopMzPwQDRQEw+zBvwwdsd3Y1yKMZxp53ioQAH6ixVV6NEYZp+ AgDy4CcunU88+kkcZ0+/LVKshd0lsBjMmQRkfuY3ySA+h5jqYW1Rx2JjgTKfpAdSgAcT rorg== 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=Nhw9lKXE6Zm7nMWLUdf8r6CjDZA353TugelUUAIT4o8=; b=YhT19sGCrIKKCb/oT/KSp/I35wZKiLzDBzdL+ffv2skrQ+uf4m8pXbseWLRESSu6px nXXJ4GNFNhFD3rlOEPpcaMAXPPjwYwc1D8uCuRdlk6umCCNo6zpF1n19tvsemYmI939g 8/mchfjDM+cl0PPtP9nfdGP8sDnT+ORHXiwIyA7dsEe+MzJ3g/7e89UHfOaWfCnRlqyC fD2uEWJFAyc/QafbWGXzREy3qRhsmF4CqQoy869tEUjzgtJgMP37x71eBVm+wh+ZenCO WAujQDp8TCLF/chaZawnBUQzcNz2JXSyxB9+PZxqjjecHK0QuvD2/rAXRW/XgavSXund u3sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="aVRWS/+k"; 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 m45si643073pje.39.2019.07.18.21.02.10; Thu, 18 Jul 2019 21:02:25 -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="aVRWS/+k"; 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 S1727728AbfGSD7v (ORCPT + 99 others); Thu, 18 Jul 2019 23:59:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:59548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728891AbfGSD7t (ORCPT ); Thu, 18 Jul 2019 23:59:49 -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 5487321873; Fri, 19 Jul 2019 03:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508788; bh=zf5ao4F8rb16M8OQVxdQOMg95lCMsO8s27tKgCZ4R9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aVRWS/+kaZ1uJzlRd0q7G7DHiL8ukrmpvseeL4QvSAyNYHDiYT3EE6MXB+kspx0rc zug/n/xYFtlHmvYZeC0SC/hmW3AcGqAJivMpOPQxyr319JqrsL88AXZlZZ8NhuITHs xZWBZgjOFlKxgKgkGayabdE7LRl00HJJRdfHlhg0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Neil Armstrong , Kevin Hilman , Kishon Vijay Abraham I , Sasha Levin , linux-amlogic@lists.infradead.org Subject: [PATCH AUTOSEL 5.2 088/171] phy: meson-g12a-usb3-pcie: disable locking for cr_regmap Date: Thu, 18 Jul 2019 23:55:19 -0400 Message-Id: <20190719035643.14300-88-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review 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: Neil Armstrong [ Upstream commit 5fc2aa3ec9efad97dd7c316f3c8e4c6268bbed9b ] Locking is not needed for the phy_g12a_usb3_pcie_cr_bus_read/write() and currently it causes the following BUG because of the usage of the regmap_read_poll_timeout() running in spinlock_irq, configured by regmap fast_io. Simply disable locking in the cr_regmap config since it's only used from the PHY init callback function. BUG: sleeping function called from invalid context at drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c:85 in_atomic(): 1, irqs_disabled(): 128, pid: 60, name: kworker/3:1 [snip] Workqueue: events deferred_probe_work_func Call trace: dump_backtrace+0x0/0x190 show_stack+0x14/0x20 dump_stack+0x90/0xb4 ___might_sleep+0xec/0x110 __might_sleep+0x50/0x88 phy_g12a_usb3_pcie_cr_bus_addr.isra.0+0x80/0x1a8 phy_g12a_usb3_pcie_cr_bus_read+0x34/0x1d8 _regmap_read+0x60/0xe0 _regmap_update_bits+0xc4/0x110 regmap_update_bits_base+0x60/0x90 phy_g12a_usb3_pcie_init+0xdc/0x210 phy_init+0x74/0xd0 dwc3_meson_g12a_probe+0x2cc/0x4d0 platform_drv_probe+0x50/0xa0 really_probe+0x20c/0x3b8 driver_probe_device+0x68/0x150 __device_attach_driver+0xa8/0x170 bus_for_each_drv+0x64/0xc8 __device_attach+0xd8/0x158 device_initial_probe+0x10/0x18 bus_probe_device+0x90/0x98 deferred_probe_work_func+0x94/0xe8 process_one_work+0x1e0/0x338 worker_thread+0x230/0x458 kthread+0x134/0x138 ret_from_fork+0x10/0x1c Fixes: 36077e16c050 ("phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo PHY Driver") Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sasha Levin --- drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c index 6233a7979a93..ac322d643c7a 100644 --- a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c +++ b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c @@ -188,7 +188,7 @@ static const struct regmap_config phy_g12a_usb3_pcie_cr_regmap_conf = { .reg_read = phy_g12a_usb3_pcie_cr_bus_read, .reg_write = phy_g12a_usb3_pcie_cr_bus_write, .max_register = 0xffff, - .fast_io = true, + .disable_locking = true, }; static int phy_g12a_usb3_init(struct phy *phy) -- 2.20.1