Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp418002ybi; Fri, 31 May 2019 03:38:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpM3n0g+HaXbqPz4FmDAfELSjy+uqSW3mOsHRzkmr3WlzDow9LrwpFF0CBAbOuMQQYGE5G X-Received: by 2002:a17:90a:9f93:: with SMTP id o19mr8574910pjp.70.1559299119108; Fri, 31 May 2019 03:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559299119; cv=none; d=google.com; s=arc-20160816; b=PxIHts4XTx1C+kx78S82L4i6ZX8/lr96JS5Puvm5zy+HcNwwRizDhl0KmGOKziUdjG 38Pjw2bKuoOyPtqIe7bg2FgTmnGsaD4SGPkhRy6tfsA6HbHGGcWAyJUoBl6TD7ClEmLQ qoqxRIMxRtrpspmuPYpJctp+v8ehT3oVNB54JauFBfQwuzC5Wf6LNS7nCDr9a+dwnW5W Xcnyew+I7CqxnrSEmr/BGByYwHdg7z3aDxU6luOe0pxo1a//RF5HdQvpMO4+20R2lYln JrNgtyAAJA38sBntgeDf6ckRqOmGUNHJ+ZIdntEGUhiNCoR2dW50uUulcP3qNRmaAt9E 8qAw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=CzbjU0Ihjxmyqaja+55JLIFIki74kmD3t8bDbSvqjsQ=; b=NpgWmyvxTEV4MwWlSk6kSCOXy+by9CbSdN8SaLvojZXELbBNlH/eKfC0+f3+6WOxbP 386i5KL0P9R6gYOP6CBWN+rY01B5usUMKpEgQgVDwqQNJNEwftFsUJdihSsvxjB5J6fd K0Aq6bJjhtQ3WsJHIT/2HPhkG8y0WoWjKN2TiQTpPkFIl+rmiu6UWQ0hsnd6lKJM8u19 G0oPQOSzBJ9GDWb8ywHltaKgy/Jw+SAnGvb0OinPgGN7h09/X9yi4ZRpmlnRwf12pq/e BQf93XmR3k7HFub3Ew0Ot1ze39io5tQHyU0Yw7s2ESfxGsY3IHRS6ILWrRGfYf8ffWGB t3QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vVlAAbHF; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si6124074pff.166.2019.05.31.03.38.20; Fri, 31 May 2019 03:38:39 -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=@ti.com header.s=ti-com-17Q1 header.b=vVlAAbHF; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726555AbfEaKg4 (ORCPT + 99 others); Fri, 31 May 2019 06:36:56 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:55590 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfEaKgz (ORCPT ); Fri, 31 May 2019 06:36:55 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4VAapmv036779; Fri, 31 May 2019 05:36:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1559299011; bh=CzbjU0Ihjxmyqaja+55JLIFIki74kmD3t8bDbSvqjsQ=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=vVlAAbHFR3U3keZIRpkjALJwT5cp/90mvTFOeqLELeyEU9sgLoIrDGEQ7hd8QEBxz Hm7MeR2XjhsFPSe1WLj01JlcCJf82rr8qc1KXZ+ccvOb2S/JJLw1vvnj0eSQQ8cLkV tip2379nJ5CzMkyE3nf29eQdwFAGqVZrkfgjwgqA= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4VAappj058923 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 May 2019 05:36:51 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 31 May 2019 05:36:50 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 31 May 2019 05:36:51 -0500 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x4VAalDs032476; Fri, 31 May 2019 05:36:50 -0500 Subject: Re: [PATCH] phy: meson-g12a-usb3-pcie: disable locking for cr_regmap To: Neil Armstrong CC: , , References: <20190531103137.14901-1-narmstrong@baylibre.com> From: Kishon Vijay Abraham I Message-ID: <4dc22a2e-66ca-0556-3aa3-4ed8887c2b1b@ti.com> Date: Fri, 31 May 2019 16:05:28 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190531103137.14901-1-narmstrong@baylibre.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 31/05/19 4:01 PM, Neil Armstrong wrote: > Fix the following BUG by disabling locking for the cr_regmap config. What caused the BUG in the first place? The commit log needs more details or else this looks like a workaround to mask a BUG. Thanks Kishon > > 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 > --- > 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) >