From patchwork Thu May 27 20:45:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12285323 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.7 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,URIBL_BLOCKED,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 D36B5C4707F for ; Thu, 27 May 2021 20:45:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4DA9613E3 for ; Thu, 27 May 2021 20:45:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235611AbhE0UrP (ORCPT ); Thu, 27 May 2021 16:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235379AbhE0UrN (ORCPT ); Thu, 27 May 2021 16:47:13 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAA5BC061574 for ; Thu, 27 May 2021 13:45:39 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id y7so2378489eda.2 for ; Thu, 27 May 2021 13:45:39 -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=SaT/vLHCQCyzy7/SOjdKUNsHHBOiv8MZKllqNWNqN+U=; b=Hlww5TEyH4Bi0p3cYm+dIjyRQBl9KSUg7OgignRdqTtKE0dAAYniWT9cXFHsHHYyP8 qOLRPmMlrdwwTiUA9yK8hrCl2TBxzFqTzzCzdU84CHRV5YaWcF3Yum/Q+CHsKUjjluqJ CGvuM7V7wjScdHe0dGgJer1ABwo3o8NJxpbBZt4WiW5FWhLeS7PhdLg3kMy0z6Y5cqUk HG5w/NCodK1hfKrGaX6mh5mGS4N1dh54AXcSuu/doe+wVKyKJl+lHLmkXIopz1yFOFlk UFcjS96RGZVEa9cTtSQmiF/9sT/FKG4CE58zmoUDvN5CjvxP9cwEgJFtkHQWcIiiepoy scog== 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=SaT/vLHCQCyzy7/SOjdKUNsHHBOiv8MZKllqNWNqN+U=; b=f6mmJEDh+3J8L0B2XiaoWhWmcrKppJ3oKiLioX0CAGQi2+0ZxudP3oihb0vpRW0VZp 2A5+kNKm3fBeaiHaAoHcQNrpeict2k+sPAfep1yzRrtnj14WL6BB1VzqwBntbEkvZQof ZF9esh+M7RtY70Ta0KkKfMXYu5fpQu9bx+aAiqjbJBT1Iq2iWq6LNBOvdJAvsVQTjFH5 KTb/SZlQ7VS+4VX5b9ztLDel9ig0fcvGmfNMdaX+IYsMW+07+gx30MLp9cYjQMvrzd5n nDgzUJbnLNzvDxrPszylmJKxp1YTImBk6A+Zq4EAavNoZlfU1y20Rnl2angIOng/B3xq ZNPw== X-Gm-Message-State: AOAM533rBpLWh6n4mRmxOjp/xnNd26LYh+aMJaSdgQ3tNiZ5sdltR75S hJvDqzvBJtX4SRlkrGnHhQRzFZdaCWc= X-Google-Smtp-Source: ABdhPJxtlTh4Qyz5TWaxPWkpkRXhjSh4yszF2aCvGos94vL1d3NwJqWMoj3EggX5v/6WHFyH4WVwuA== X-Received: by 2002:a05:6402:c8:: with SMTP id i8mr6249535edu.380.1622148338201; Thu, 27 May 2021 13:45:38 -0700 (PDT) Received: from localhost.localdomain ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id g11sm1654145edt.85.2021.05.27.13.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 13:45:37 -0700 (PDT) From: Vladimir Oltean To: Jakub Kicinski , "David S. Miller" , netdev@vger.kernel.org Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Heiner Kallweit , Russell King - ARM Linux admin , Florian Fainelli , Andrew Lunn , Ong Boon Leong , Michael Sit Wei Hong , Vladimir Oltean Subject: [RFC PATCH net-next 0/8] Convert xpcs to phylink_pcs_ops Date: Thu, 27 May 2021 23:45:20 +0300 Message-Id: <20210527204528.3490126-1-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC From: Vladimir Oltean This patch series is COMPLETELY UNTESTED (I don't have stmmac hardware with the xpcs) hence the RFC tag. If people from Intel could test this it would be great. Background: the sja1105 DSA driver currently drives a Designware XPCS for SGMII and 2500base-X, and it would be nice to reuse some code with the xpcs module. This would also help consolidate the phylink_pcs_ops, since the only user of that, currently, is the lynx_pcs. Therefore, this series makes the xpcs expose the same kind of API that the lynx_pcs module does. Note: this patch series must be applied on top of: https://patchwork.kernel.org/project/netdevbpf/patch/20210527155959.3270478-1-olteanv@gmail.com/ Vladimir Oltean (8): net: pcs: xpcs: delete shim definition for mdio_xpcs_get_ops() net: pcs: xpcs: check for supported PHY interface modes in phylink_validate net: pcs: xpcs: export xpcs_validate net: pcs: export xpcs_config_eee net: pcs: xpcs: export xpcs_probe net: pcs: xpcs: convert to phylink_pcs_ops net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write} net: pcs: xpcs: convert to mdio_device drivers/net/ethernet/stmicro/stmmac/common.h | 3 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 14 -- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 5 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 41 +--- .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 41 ++-- drivers/net/pcs/pcs-xpcs.c | 199 +++++++++++------- include/linux/pcs/pcs-xpcs.h | 35 +-- 7 files changed, 162 insertions(+), 176 deletions(-) Signed-off-by: Vladimir Oltean