Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7F52C11F67 for ; Tue, 29 Jun 2021 17:09:17 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E360B61CA2 for ; Tue, 29 Jun 2021 17:09:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E360B61CA2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D5261831B0; Tue, 29 Jun 2021 19:09:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AlHlrYeQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D8BFD831B3; Tue, 29 Jun 2021 19:09:12 +0200 (CEST) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 47B2182DF5 for ; Tue, 29 Jun 2021 19:09:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=olteanv@gmail.com Received: by mail-ej1-x62c.google.com with SMTP id b2so6254190ejg.8 for ; Tue, 29 Jun 2021 10:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BoJvpgMgGD5o07A31zQTcSg6WmU3CkqKazUYcG/gbI4=; b=AlHlrYeQxdBM4wGV6dRpDukhY6pvWv+HU7Z5a75g5VD8tlJe1Qropiu6/Bm3h8iLSQ WYNFvNhuaLSb48STQpVhPJ+zBaaqESqNeEZnNsPsQSfBg3j88xGOWGAi22LZvRjXLMiy kyBljhLLn1a6IypFu+FXgtDPS31wRWZM5k685OwqS0GyiELXjcMJRf/Jwn1DX3rdSF8f MmvsIvWMuC7j4AUkTtzWkCYccSIGsRsMgrNgueF05PlOFhl4IXU8ZIYnO8tcudqR3CQ6 Qng0QYyp+wutAW53k0gIfucx8ieGg68klDqSb0VbETbUOWTuht8QJkV2I/Ggunb0l8Nt tCww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BoJvpgMgGD5o07A31zQTcSg6WmU3CkqKazUYcG/gbI4=; b=QoYeOuubOLiq8gAUzXOQXfRBjUoONnCOpNDZMhnhH1fI0Y/Ie/+rez9psoCUHjbSfQ UALk+LL9foYJjRHpZy4IT4IW/+t7ggzYzTECBF8uuGbKLgHcMntlMzyV8ggkuPfd/oQS llj+uwCua+uYHu8Q2y4nbwT5rvNhN5ha3naZx+QdrV3TZBSJc9nyezr7J4wyS1d429f4 xuRgf7m9cUj6Nr2Gpnd9vPCt/cFHxj1S0UKNmKPiHMlHYEb9ciikc0/Zjr/dbAsO/vxG UC41k+IR7BvdpSk4mr5yfRONDzTvyVQBVMgCMr8CsuaXKtui8z5F3KB6jNYJNuV1Vk5Z BpIQ== X-Gm-Message-State: AOAM531y7+ehja99I/V4B512KatLEtkJy/hKGd9k67ilMO9QNGXuj76q Rwky4rqiIdR5TMnpaS/40rw= X-Google-Smtp-Source: ABdhPJyeovLGYQkyo3QY3pLCBBujpjLfaWOSca2pZmyr36Lt56zL7S3nqjs2Fx9wyTPCfjem+5Hv4g== X-Received: by 2002:a17:906:c14e:: with SMTP id dp14mr5967936ejc.5.1624986549900; Tue, 29 Jun 2021 10:09:09 -0700 (PDT) Received: from localhost.localdomain ([188.26.224.68]) by smtp.gmail.com with ESMTPSA id h19sm9928525edt.87.2021.06.29.10.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 10:09:09 -0700 (PDT) From: Vladimir Oltean To: Joe Hershberger , Ramon Fried , u-boot@lists.denx.de Cc: Claudiu Manoil , Bin Meng , Alex Marginean , Michael Walle , Tim Harvey , Vladimir Oltean Subject: [PATCH 0/6] Call phy_config at port probe time for the Felix DSA driver Date: Tue, 29 Jun 2021 20:08:33 +0300 Message-Id: <20210629170839.2583797-1-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Vladimir Oltean This series makes the Felix DSA driver initialize all its connected PHYs regardless of whether those will be used for networking or not. This is in order to satisfy the expectations of some software in later boot stages. To make this work, it is necessary to introduce a new method in struct dsa_ops: .port_probe(). There is some further refactoring/cleanup along the way. Vladimir Oltean (6): net: dsa: felix: felix_init() can be static net: dsa: use "err" instead of "ret" in dsa_port_probe net: dsa: refactor the code to set the port MAC address into a dedicated function net: dsa: introduce a .port_probe() method in struct dsa_ops net: dsa: felix: call phy_config at .port_probe() time net: dsa: felix: propagate the error code from phy_startup() drivers/net/mscc_eswitch/felix_switch.c | 28 ++++++++------ include/net/dsa.h | 5 ++- net/dsa-uclass.c | 50 ++++++++++++++++--------- 3 files changed, 53 insertions(+), 30 deletions(-) -- 2.25.1