Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2383491pxb; Mon, 20 Sep 2021 20:55:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxM+oGgadNKwBIXKiqXuIEpP73/ThdfK8MOcd1HsAzPrD5sdi8pDbT/8zoVpsbY8GBLutSZ X-Received: by 2002:a05:6602:2c05:: with SMTP id w5mr21745259iov.160.1632196527338; Mon, 20 Sep 2021 20:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632196527; cv=none; d=google.com; s=arc-20160816; b=p2BZPaor5YAA7iBhzzxXVngTTQUvcDZQVdGISIkmwjrBRU8FEj34BGNA02ipmaislV 47tuXYbppapabk7zoq+GttpIMVl3ZUV0jbH/y3EEHPlFqPLbQwUM1QQU9fZfj/+fbVKM IDJYY7zisUVGCzj1u9GBBpYTFBxmREyeI7Sub5wUbBKwrkJmaLlaHv4B2HxRa6WnIP9e utjQQ/tuzk8W5kDg+DBUccoCf/fDt2/l5pZjbXfA5fNbjVKeHixtWPqai9YREobhNkwE 9k+VfUo82ozuBZlt2MFbl/hmXQBOs52hFO4x7EyXex7Jt/nCXjD65wXEUBiMpWJLwZ8S YEmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6KdWjc4JH8nTnUNPhQ1Hy5/Kks3XFtj9NpPMeFZ5VIA=; b=BFf/L1O+3hUPU64J5jPyNzxciW2Ky4SLC2RbHsRxOzvHS0f3ivIcb/OrPM3NwB9I3h b7ncleNYTNN/+k3g5pPv9C0RPqXJKiKG60Zf9UM8teawpbSkr8/LoFGmTugaQyRxDoeF JeYeZWHcmeFN+YvAd0Xjv4Jhxz9r59AswCYKpAL0u+V6/yMo49JnpEIhOe499hyDcsfk hlv39FnA067nF9CU7H1ap4J2IsjRW07Nf+X6OwcV6rhPqNotB1I+pFbIT0KZ+j62HjUp UXsZNwqfnDh4M15wg2dSeo6E9pFit7SszzcNUp1pC4dg7uZcUix5mczhqGn6kSucNA9j 3Gtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k7HBRtk5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si8790785ilg.115.2021.09.20.20.55.16; Mon, 20 Sep 2021 20:55:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k7HBRtk5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232060AbhIUBoz (ORCPT + 99 others); Mon, 20 Sep 2021 21:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233150AbhIUBlG (ORCPT ); Mon, 20 Sep 2021 21:41:06 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC43CC06EAAF; Mon, 20 Sep 2021 13:50:58 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id e15so34022989lfr.10; Mon, 20 Sep 2021 13:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6KdWjc4JH8nTnUNPhQ1Hy5/Kks3XFtj9NpPMeFZ5VIA=; b=k7HBRtk5aJbC4XVF8r6dm4MO4GClWLIob482BKxdVR+kSRNHdUzMoLfOXK8hTHbjo6 Cl4zJuQFw4DxGVkgu/BmiahSFSTFnwOJK81AQTOcjGx0KgPF9w5DPmNnbAC0QSKoekYt rocy89V2TgkTuG/Akwu8IvVyyrwAUo9YyPCaGmWsmx37nWgeA2PCFgsyscYZ2gV3JoVh +OuctQs5AdbxcW+GnBjMftq5X0Y0TD/B5bTs8bXQvGY+rCsXLmBwKA0jw4JX7ez/csms iLwxN0LqMtXo/qW+0Y/vC4geUdLzG9qIbBWCSCZ8szXVSW5QwSz/fEVwJJqbbHXoXUx5 KN1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6KdWjc4JH8nTnUNPhQ1Hy5/Kks3XFtj9NpPMeFZ5VIA=; b=4i6Vre8/BNPOvcaqFlZG+atS09D+Vdzlu0SzAfyfA3o/I+gGaousIJxHVH8SYbXlPV J5OSvT0PwH0PdyLHw/LvUC5jQFj4+0bvk2IiFqxtL7fFajFT0fKY1zS4o5K1aEQNyYMa KdkXKkBTWfX4+CktL44Zn8dLy1xgQlSePerEdp50I20Gm/UOfz/ZM8TkkOmgsho/x0Lw xMaKqpVEtJ9bJFGwPV9a6SV5IFzLh9JyJSPFkjR7o1wZNugTZXiumXQXBQtM/aJtCHJ8 z2WgsgrZLrqBjlgN0C7eyg0fkLV8kFua4yF4bNnofF5CJyWCkrIzawhhBSNBb22KWewV vYog== X-Gm-Message-State: AOAM533PBOiDkfMcREuR09h+ZympaUbY9Oxsgo72SsuCHznsrnG6f3Ix 6gp+aH+cm9ZGWktezsUIpEWOaMsI1RGZ86B6Pmc= X-Received: by 2002:a2e:b8c9:: with SMTP id s9mr25236214ljp.203.1632171056766; Mon, 20 Sep 2021 13:50:56 -0700 (PDT) MIME-Version: 1.0 References: <039c9214-423f-0f62-f6d2-6f2c969512fa@kontron.de> In-Reply-To: <039c9214-423f-0f62-f6d2-6f2c969512fa@kontron.de> From: Fabio Estevam Date: Mon, 20 Sep 2021 17:50:45 -0300 Message-ID: Subject: Re: imx8mm board crash in drivers/usb/chipidea/ci_hdrc_imx.c To: Frieder Schrempf Cc: Heiko Thiery , Peter Chen , Jun Li , Yu Kuai , Sascha Hauer , Mark Brown , USB list , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , Shawn Guo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frieder, On Mon, Sep 20, 2021 at 11:26 AM Frieder Schrempf wrote: > Commit ed5a419bb019 ("usb: chipidea: imx: "fsl,usbphy" phandle is not > mandatory now") explains, that the core driver already covers reading > the "phys" property (see ci_hdrc_probe()): > > Since the chipidea common code support get the USB PHY phandle from > "phys", the glue layer is not mandatory to get the "fsl,usbphy" > phandle any more. > > This seems to be the reason why ci_hdrc_imx_probe() doesn't return any > error in case "fsl,usbphy" is not set. It expects that the core will > handle data->phy = NULL and already checks for a "phys" property. chipidea core populates ci->usb_phy when phys is used. The charger detection function only checks data->usb_phy, so they don't see ci->usb_phy that was populated by the chipidea core. We could change the signature of all charger detection functions to receive struct ci_hdrc *ci, but that will be a huge patch that will probably not meet the stable requirements, so I think to minimally fix stable we should go with the proposed fix I suggested. > > Therefore I'm not sure Fabio's fix is the right way to go. Could it be > that the ci_hdrc_imx driver expects that it will be probed before the > ci_hdrc core and this isn't true in Heiko's case?