Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp500598ybl; Wed, 8 Jan 2020 00:38:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxYgIlSQEXGDe9uhTdg14T/OzwDN5t8rlxCDVroMrgpvbYSxOOPgUTPqcABpP7a6ByHSg4p X-Received: by 2002:a05:6830:1503:: with SMTP id k3mr3189478otp.213.1578472727951; Wed, 08 Jan 2020 00:38:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578472727; cv=none; d=google.com; s=arc-20160816; b=YnzZkmjOGBHFpFSzu7IuhcmbI+S9TC4vkxWfvpCJlFre3kGPilOnZUbQAb4/JgySFy raN1zYqu6YU8fgkm9a7m7n7vbzQM2pMQwx5QALnx9fFucV7/uVB1Oq9/5yF9sMvbC0H6 7zUz2VecvqdAZkTVh+utO9rQEaHOkK+2ftcMjQwmRegGF5eWbTnKy0JCPS92zfu503oh BhaYwWD4aVoEV7B1edMLNRRvrtJMnXpNcQHIeOTbKQmdHISBvikd8qYlL+9yhIZCgqmT BBlDpHcMxyvlGVhhqu3i53II3+NrJycUMIGLGpZQnCFpw7S1GtSKuaLAt4BcmTfA6IDP Yd6w== 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=yPNIf756cl8D+oxvK8LLBojSG/dQwdM1A+I4zftj8fc=; b=PU8R7xEkt53D7kENMXioDW4xXf2f+pZ9i4xcuDG0mtONjAdZz3kMez7qV4zqsL4769 WSdzmeeAsSsenzjolBpOmDw8+PbMYlDa14sSfBNMpNkRI8js6sHnwWFkkDV2AKY9/Kmk uO3aUPRQB1tQDEva9Cc5kc0jtxPrT0rO86rMoF3r0GsjMGxJqk2S1+M3Ehbm/umUolPN jCjYV4PkgTz+O1yKK/ilFvYOd5IIjXPds5+1oj4EF2aUmG7UsMy9A8tAwA39xaP3nRIV H89vEgCsCle9k/I7zm+ZEjunwFXFfm6DOfzjQ/LVKQJViN1lvPz1V0WIt3Ez8Fo309A7 7rDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=CCbYCLLK; 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=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si1431350otq.262.2020.01.08.00.38.35; Wed, 08 Jan 2020 00:38:47 -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=@st.com header.s=STMicroelectronics header.b=CCbYCLLK; 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=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727382AbgAHIhl (ORCPT + 99 others); Wed, 8 Jan 2020 03:37:41 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:7420 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbgAHIhl (ORCPT ); Wed, 8 Jan 2020 03:37:41 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0088XhNd015078; Wed, 8 Jan 2020 09:37:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=yPNIf756cl8D+oxvK8LLBojSG/dQwdM1A+I4zftj8fc=; b=CCbYCLLKndNABtq/VJGr/ALZrXaWmYLg1OVDSROsAZS7YZEBKnqruYz6+7BcWsLQ3zpR QEb2WFHOvihS+VYxnhBSfGkc+DhvVHv3XZlB2rA0CFFMk/pHR/3fdpm8S7+LxL080asA IMkAIDeaC0KfUXsAR7Qe6MuYkpTTjev5I4MGJZ77r75kNOFWFxEiqj3vJY7qKT91lqBE ExNs5jiV8kreuUcWS3jEnFhNM/YXzZxPwL5UZqoYi5YEi1KvnVMZyKnakkEu162gU/eO u2zlQgfUb/ClR7ETRIcRmuJMyYJ9bL9bcpVbqRPS5PbGjX2545h8Cm9GD3TpHkBDvV0V 5A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2xakuqtqkw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jan 2020 09:37:24 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 065AC10002A; Wed, 8 Jan 2020 09:37:23 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node2.st.com [10.75.127.8]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DF8422A6191; Wed, 8 Jan 2020 09:37:23 +0100 (CET) Received: from lmecxl0912.lme.st.com (10.75.127.51) by SFHDAG3NODE2.st.com (10.75.127.8) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 8 Jan 2020 09:37:23 +0100 Subject: Re: [PATCH] phy: core: Add consumer device link support To: Kishon Vijay Abraham I , Jon Hunter , Greg Kroah-Hartman CC: Yoshihiro Shimoda , , , , linux-tegra References: <20191104143713.11137-1-alexandre.torgue@st.com> <146b2971-d51a-164c-aea8-9b6b4ff5f420@nvidia.com> <341954e6-79f8-d45c-fc05-1ce5bd4e3abb@ti.com> From: Alexandre Torgue Message-ID: Date: Wed, 8 Jan 2020 09:37:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <341954e6-79f8-d45c-fc05-1ce5bd4e3abb@ti.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-08_01:2020-01-07,2020-01-08 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/8/20 8:29 AM, Kishon Vijay Abraham I wrote: > Hi Jon, > > On 07/01/20 5:21 PM, Jon Hunter wrote: >> >> On 04/11/2019 14:37, Alexandre Torgue wrote: >>> In order to enforce suspend/resume ordering, this commit creates link >>> between phy consumers and phy devices. This link avoids to suspend phy >>> before phy consumers. >>> >>> Signed-off-by: Alexandre Torgue >> >> With next-20200106 we are seeing a boot regression on Tegra124 Jetson >> TK1 board. Bisect is pointing to this commit and reverting this on top >> of -next fixes the problem. >> >> The bootlog is showing the following crash on boot ... >> >> [ 1.730024] 8<--- cut here --- >> [ 1.733079] Unable to handle kernel paging request at virtual address fffffe7f >> [ 1.740318] pgd = (ptrval) >> [ 1.743021] [fffffe7f] *pgd=affff841, *pte=00000000, *ppte=00000000 >> [ 1.749304] Internal error: Oops: 27 [#1] SMP ARM >> [ 1.754001] Modules linked in: >> [ 1.757057] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc4-next-20200106-g9eb1b48ca4ce #1 >> [ 1.765654] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) >> [ 1.771919] PC is at device_link_add+0x68/0x4d4 >> [ 1.776444] LR is at device_link_add+0x68/0x4d4 >> [ 1.780967] pc : [] lr : [] psr: 60000013 >> [ 1.787223] sp : ee0e1d60 ip : 60000013 fp : 00000005 >> [ 1.792439] r10: 00000000 r9 : 00000000 r8 : eefedd88 >> [ 1.797657] r7 : ee269c10 r6 : fffffdfb r5 : 00000001 r4 : 00000001 >> [ 1.804173] r3 : ee0d8000 r2 : 00000000 r1 : 00000000 r0 : c1858f88 >> [ 1.810691] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none >> [ 1.817815] Control: 10c5387d Table: 8020406a DAC: 00000051 >> [ 1.823552] Process swapper/0 (pid: 1, stack limit = 0x(ptrval)) >> [ 1.829549] Stack: (0xee0e1d60 to 0xee0e2000) >> [ 1.833904] 1d60: eefedd88 00000040 c07087a0 fffffdfb ee269c10 ee737640 00000000 eefedd88 >> [ 1.842073] 1d80: 00000000 00000000 00000005 c0707d34 00000000 ee3c8a00 ee7375c0 ee269c10 >> [ 1.850242] 1da0: eefedd88 c0a0bd2c c1704e48 ee269c10 ee269c00 ee3c8a00 00000000 c0a0c4a8 >> [ 1.858409] 1dc0: ee269c10 c1704e48 c186603c 00000000 c186603c 00000000 00000000 bc98ab22 >> [ 1.866577] 1de0: ffffffff ee269c10 00000000 c186603c ee269c00 c186603c 00000000 00000000 >> [ 1.874744] 1e00: c1656690 c0a0ffe0 00000000 bc98ab22 ee269c10 ee269c10 00000000 c186603c >> [ 1.882913] 1e20: 00000000 c186603c 00000000 c09887e0 c18ff9dc ee269c10 c18ff9e0 c0986860 >> [ 1.891082] 1e40: ee269c10 c186603c c186603c c1704e48 00000000 c15003f0 c15c3854 c0986af0 >> [ 1.899249] 1e60: c15c3854 c0d128b4 c10e48ec ee269c10 00000000 c186603c c1704e48 00000000 >> [ 1.907416] 1e80: c15003f0 c15c3854 c1656690 c0986da0 00000000 c186603c ee269c10 c0986e28 >> [ 1.915583] 1ea0: 00000000 c186603c c0986da8 c0984ba0 c15003f0 ee20c058 ee242334 bc98ab22 >> [ 1.923752] 1ec0: c18588c8 c186603c ee737200 c18588c8 00000000 c0985b94 c133ef10 ffffe000 >> [ 1.931919] 1ee0: c186603c c186603c c18aaf80 ffffe000 c158b72c c09878ac c1704e48 c18aaf80 >> [ 1.940088] 1f00: ffffe000 c0302f80 00000168 c0367d84 c143e5b4 c1371000 00000000 00000006 >> [ 1.948255] 1f20: 00000006 c125b1b4 00000000 c1704e48 c126f324 c125b228 00000000 efffec88 >> [ 1.956424] 1f40: 00000000 bc98ab22 00000000 c18b6bc0 c18b6bc0 bc98ab22 c18b6bc0 c18b6bc0 >> [ 1.964591] 1f60: 00000007 c15c3834 00000169 c1500f28 00000006 00000006 00000000 c15003f0 >> [ 1.972758] 1f80: 00000000 00000000 c0ef1cdc 00000000 00000000 00000000 00000000 00000000 >> [ 1.980924] 1fa0: 00000000 c0ef1ce4 00000000 c03010e8 00000000 00000000 00000000 00000000 >> [ 1.989092] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >> [ 1.997260] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 >> [ 2.005440] [] (device_link_add) from [] (devm_of_phy_get+0x6c/0xb0) >> [ 2.013528] [] (devm_of_phy_get) from [] (ahci_platform_get_phy+0x28/0xd0) >> [ 2.022134] [] (ahci_platform_get_phy) from [] (ahci_platform_get_resources+0x384/0x468) >> [ 2.031952] [] (ahci_platform_get_resources) from [] (tegra_ahci_probe+0x14/0x650) >> [ 2.041254] [] (tegra_ahci_probe) from [] (platform_drv_probe+0x48/0x98) >> [ 2.049686] [] (platform_drv_probe) from [] (really_probe+0x234/0x34c) >> [ 2.057944] [] (really_probe) from [] (driver_probe_device+0x60/0x168) >> [ 2.066202] [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) >> [ 2.075064] [] (device_driver_attach) from [] (__driver_attach+0x80/0xbc) >> [ 2.083582] [] (__driver_attach) from [] (bus_for_each_dev+0x74/0xb4) >> [ 2.091751] [] (bus_for_each_dev) from [] (bus_add_driver+0x164/0x1e8) >> [ 2.100008] [] (bus_add_driver) from [] (driver_register+0x7c/0x114) >> [ 2.108094] [] (driver_register) from [] (do_one_initcall+0x54/0x22c) >> [ 2.116271] [] (do_one_initcall) from [] (kernel_init_freeable+0x14c/0x1b0) >> [ 2.124967] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x10c) >> [ 2.133139] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c) >> [ 2.140697] Exception stack(0xee0e1fb0 to 0xee0e1ff8) >> [ 2.145743] 1fa0: 00000000 00000000 00000000 00000000 >> [ 2.153910] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >> [ 2.162076] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 >> [ 2.168686] Code: e59f0470 03844040 eb15cb16 eb004c8a (e5d63084) >> [ 2.174824] ---[ end trace fddbf111e88ec722 ]--- >> >> >> I believe that there is a bug in this patch and the following fixed it for me ... >> >> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c >> index 8dfb4868c8c3..2eb28cc2d2dc 100644 >> --- a/drivers/phy/phy-core.c >> +++ b/drivers/phy/phy-core.c >> @@ -799,6 +799,7 @@ struct phy *devm_of_phy_get(struct device *dev, struct device_node *np, >> devres_add(dev, ptr); >> } else { >> devres_free(ptr); >> + return phy; >> } >> >> link = device_link_add(dev, &phy->dev, DL_FLAG_STATELESS); > > Thank you for spotting this. I've included the fix now. Thanks guys, and sorry for this regression. alex > > Thanks > Kishon >