Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp833922pxb; Wed, 13 Jan 2021 17:49:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdifKFNGhir70zZhBu1OfqM0E9T1oWl3qVK5dAvVxnVjgCRmTyOHRxG2VJf6rmQwQod4S+ X-Received: by 2002:a17:906:85cd:: with SMTP id i13mr3607767ejy.553.1610588955741; Wed, 13 Jan 2021 17:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610588955; cv=none; d=google.com; s=arc-20160816; b=LZwtsU92JCWDNv+xvFUIHicrZvBXym6Nfp9Ofqg4ZmieUPxJ7L5TYG6W/o0wJ2h5tD clJ8hx4XDUEV5hEx8LhU3BTlMBwdaZQbeSx6rVjclD33vHb58yB2TxDQpvjTpk9fy3TU 36/HHPgJMsJEcGh4ugFaIcyWrBsJHATmPZHmtGO2UrrNdq39CiWzR/h3Zo8c7GKlXwal XP8xNrevBGUeNu8KCuT3tJ4Tf6IS7tmXbm1H0xBCJAKOlvfdsyMiP8h+nVJfw7uxmsH8 EIZPtSJhAV+rkNBbYp4jGcMFBHS54dk2kDvgD2H+Jnz1MwWQ8NSunkrMq8So7zv0hjYv wraw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8PvMhL6fxWNFHCVbbnqtdK4bZl7XKsjepw1o5suSyi8=; b=uQi7naYwWeUEbMISd5QrYd69oHwPVXTG6o9r07rDtjbc5sn67Z9YhQFkQSPv8R4RkN Fc1A0x1TJ99FGUJxFu8RwA2WbOlV5LMVc/J5GJPItTS1OL1+jxcI5ARS67z1Ha3xR/im MsyYwhdEwqOalmr8/ldLhysBJ9fWYuAxyVEv16MALN3VI+naIAJiIXvHF/HVCn/j1n34 1IUOiAjIBc2wFmJc1Ek2Oa1bQrg9ALvlN0gD+2W+IbzNXHlBLtHMzNPLx8h+7FNuBK/K I/ficnGHNxOh8F8pmHa5NqbWMPd7/q1m5eRlEIsf/MpJijuRyT5HSyk6ZF1iTGwiG+B+ fQlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TaTQmWAq; 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 o27si2075288edi.277.2021.01.13.17.48.52; Wed, 13 Jan 2021 17:49:15 -0800 (PST) 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=20161025 header.b=TaTQmWAq; 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 S1726863AbhANBrL (ORCPT + 99 others); Wed, 13 Jan 2021 20:47:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbhANAz4 (ORCPT ); Wed, 13 Jan 2021 19:55:56 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F6FFC0617A2; Wed, 13 Jan 2021 16:55:03 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id c79so2358283pfc.2; Wed, 13 Jan 2021 16:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8PvMhL6fxWNFHCVbbnqtdK4bZl7XKsjepw1o5suSyi8=; b=TaTQmWAqV5uxDSklOLTXDoqh/CSQNEG2k/gb4SnywDb4Qi1K0fouvgrAfTPzQTRBBM BNXwEHK63XMrDPkvUiNQ7Htk4EhhCpoztLYZYnqUbH0Q9SJiNdHptS7qW56HG+bc7Sx5 J4oLIRGJUrT8ywmjhttvHyjMjiu3mF9QCyBOVDckBiBUfiEZ20bEYateyzUuFKd5hl5n UAdQ5MJzLgJ3yE0P0gQ+m5fZFEW0HQm+K4GM7v8arLEl64K7rG+oJ7I4fUHu1C9iE4V8 0ikiHBQ9fshpVEx1zaDfcgsJNLwwgPsQyMil4Rw8+WJn8fqeeX8CQxjAj4SbsvlClY9b Ogkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8PvMhL6fxWNFHCVbbnqtdK4bZl7XKsjepw1o5suSyi8=; b=XhwtXqLqYWWaF4mmqjq1ZtdGSpyF8vHIu9XZNkGdCLEKwkNW+uvEZmWFYIRo6JKhhd bNg52RmTlZ1xPOSEiK4DNRVVcLDu/exps3zP7ZdRw2ZBFKmNAU3QHvQZF1x0VhIubVbf nsvIC1LVBm0hva2jY1mkHD1+cjR3lDQfiPojCajGC4bC7oQZR5FjJcm9+LENNzdSX1WT Fhpox9m2mhJrZM7ujCWCJuAj7zwy7WW8vFkxbtkQ3XrdSnA1vKR2nvVQnbX6hsj4F6RC LX98ukAInbR+WzrvuDK/hMmUuI+Q/cLFMSLXENGp298SI0ukON8OkqAW8Hm4rFLWvGEL 1zKQ== X-Gm-Message-State: AOAM5321Gk8mfXwpLKRUvGkHGTmwgxPmPUuL3SbyupyZL3W2HWJrSinj YLK7ZE3wuYlTzYkHkEpNZUw= X-Received: by 2002:a63:f404:: with SMTP id g4mr4694268pgi.114.1610585702870; Wed, 13 Jan 2021 16:55:02 -0800 (PST) Received: from b29397-desktop ([84.17.34.154]) by smtp.gmail.com with ESMTPSA id f64sm3661663pfb.146.2021.01.13.16.54.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jan 2021 16:55:02 -0800 (PST) Date: Thu, 14 Jan 2021 08:54:54 +0800 From: Peter Chen To: Stephan Gerhold Cc: "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux Kernel Mailing List , Peter Chen , Kishon Vijay Abraham I , "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , Thierry Reding Subject: Re: Infinite recursion in device_reorder_to_tail() due to circular device links Message-ID: <20210114005454.GA14220@b29397-desktop> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-01-13 12:18:35, Stephan Gerhold wrote: > > Also, on a completely different note I looked again at the chipidea USB > driver that produces this situation. To request the PHY (which ends up > in the circular device link) it does: > > /* Look for a generic PHY first */ > ci->phy = devm_phy_get(dev->parent, "usb-phy"); > > To me it doesn't really seem great to use the devm_* helpers on the > parent device either, so I will check if I can refactor this somehow. > Perhaps this situation can be prevented entirely. > Hi Stephan, You could try to get the PHY at parent driver (drivers/usb/chipidea/ci_hdrc_msm.c) to see the difference. -- Thanks, Peter Chen