Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp635345pxb; Tue, 14 Sep 2021 05:38:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFvl9aJbp7Yi2Hf1xMOCNVFioqqU5x3cwRrDV3j0TJLvlLHxqMZUc7KAkg0Y0+2gfQ9qCL X-Received: by 2002:a6b:f007:: with SMTP id w7mr13603499ioc.112.1631623091839; Tue, 14 Sep 2021 05:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631623091; cv=none; d=google.com; s=arc-20160816; b=fxeGO42A4b4sxjXR564xi6L8i3u4EeXbsapts15HVblfUT/u5rD+LlnU8yXb+FwOU6 cYtts2Ks7iqgAKjvAx/zO3VI1fB2nN5QOWctcIZ0NiAEyrUbz4pjNLPsKrFok/FRzQyI uAiY0kozbusf067A8pYU5e823NMcfxvPFn7RCAJc/tYVlhM/Ub49eqsRP/bFzPUQdHAU pU8VGmkVNG1MW/tkX3CMUk46IP8/5CthaoBUnuSyr58HV94Zuo7CDBP5Isi/M0W1kjuC UKMd3hzXpihHVItX5eoroa7HQfPBCaGUHJ/viZuij8w/t1rYw+yq3/TXHd7RZ0cXgjjd loeQ== 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=4otODJbbGrMRaZDlY9W/WvdGjxuxp1tVauGSkuDiVVw=; b=XsCTqcTJMvAe3y4sbF2GfT7E3407Z5AYgbc2Z1TfuAbFeKSRAq319Pf5dy/e4dQdUl i29vgkKh4bZSxST14wuLNz5w3flk7dGbMgwtEPWtkt9JB8DoL/elPNtFnUSb0fM5UuW8 /LjzJKNruw9L7ThOfILQ9a6ts5RJz0yzbSfN5/AlZVEVPCbObhoQSm41qGWgI65s8Gaj EsGTR5kqBeEX03/dJRG/ccPF+rNHJZu5TwedKvxQ5RxB4mp6HaKwNIIzXIunnhQSPwSi o8Oii1nQq8rCzNkgmoLV26q4+JnANapq9bje6JVobYXXs1noHchlSupVA3UODgCdpN/1 i/Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AyvBvp3r; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si10328232ilt.110.2021.09.14.05.38.00; Tue, 14 Sep 2021 05:38:11 -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=@kernel.org header.s=k20201202 header.b=AyvBvp3r; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232702AbhINMgy (ORCPT + 99 others); Tue, 14 Sep 2021 08:36:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:38806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbhINMgw (ORCPT ); Tue, 14 Sep 2021 08:36:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AC3BA60FED for ; Tue, 14 Sep 2021 12:35:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631622935; bh=v6AkjW9KH6HTqCpgB1qg29+8WnES0yfsEN29ZRiutTY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AyvBvp3r+bpgEGVlB+uHeCPb9C89UrFZHQo+bHESmCAWUypgJFqmE5L2m0vJwEyIF GaFlZJIJffWfjv5yKHr7/FOu+OcoYNwCorK1jvXIKt8HGcghVihFqTNXJDNWExiuhG EWV00o5OT1JkT8rEgS2VZwJs36pp/F0yPOnLikpNHiNaADxlKhBysfPISrCmHBmljy 2ThQ7AYxMNva2VIhd62y6VCTxs+cubxnrVIMBK0uRiI72BBgxKtVANINO3hQvMPWDh stALc57tN4y0vmvSFBvbwSTd/2B7h+8/+b8vtEAdAwIf6pOMVmxOB4UWjta8y4wlsK FMb1bHNpbdNQw== Received: by mail-ed1-f46.google.com with SMTP id h17so9513876edj.6 for ; Tue, 14 Sep 2021 05:35:35 -0700 (PDT) X-Gm-Message-State: AOAM531l19U30VB6X3yF2h8nLxUtZxJOzShwNeUdp4l3S6NDQunimkrA +ZbY5D5FYtQQv0km4A+RBCoewhic983tv210+A== X-Received: by 2002:a05:6402:150a:: with SMTP id f10mr19053835edw.318.1631622934311; Tue, 14 Sep 2021 05:35:34 -0700 (PDT) MIME-Version: 1.0 References: <20210914043928.4066136-1-saravanak@google.com> <20210914043928.4066136-2-saravanak@google.com> In-Reply-To: <20210914043928.4066136-2-saravanak@google.com> From: Rob Herring Date: Tue, 14 Sep 2021 07:35:23 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/5] driver core: fw_devlink: Improve handling of cyclic dependencies To: Saravana Kannan Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , John Stultz , Marek Szyprowski , Geert Uytterhoeven , Andrew Lunn , Vladimir Oltean , Android Kernel Team , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 11:39 PM Saravana Kannan wrote: > > When we have a dependency of the form: > > Device-A -> Device-C > Device-B > > Device-C -> Device-B > > Where, > * Indentation denotes "child of" parent in previous line. > * X -> Y denotes X is consumer of Y based on firmware (Eg: DT). > > We have cyclic dependency: device-A -> device-C -> device-B -> device-A > > fw_devlink current treats device-C -> device-B dependency as an invalid > dependency and doesn't enforce it but leaves the rest of the > dependencies as is. > > While the current behavior is necessary, it is not sufficient if the > false dependency in this example is actually device-A -> device-C. When > this is the case, device-C will correctly probe defer waiting for > device-B to be added, but device-A will be incorrectly probe deferred by > fw_devlink waiting on device-C to probe successfully. Due to this, none > of the devices in the cycle will end up probing. > > To fix this, we need to go relax all the dependencies in the cycle like > we already do in the other instances where fw_devlink detects cycles. > A real world example of this was reported[1] and analyzed[2]. > > [1] - https://lore.kernel.org/lkml/0a2c4106-7f48-2bb5-048e-8c001a7c3fda@samsung.com/ > [2] - https://lore.kernel.org/lkml/CAGETcx8peaew90SWiux=TyvuGgvTQOmO4BFALz7aj0Za5QdNFQ@mail.gmail.com/ > Fixes: f9aa460672c9 ("driver core: Refactor fw_devlink feature") > Reported-by: Marek Szyprowski > Signed-off-by: Saravana Kannan > --- > drivers/base/core.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) Am I supposed to apply this? What about the revert and mdio-parent-bus support you mentioned? Those are needed too? Please send me a series with what I should apply for 5.15, not fixes and new features combined. Rob