From patchwork Mon Sep 26 00:29:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 609872 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD7D8C04A95 for ; Mon, 26 Sep 2022 00:31:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233228AbiIZAbI (ORCPT ); Sun, 25 Sep 2022 20:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233150AbiIZAau (ORCPT ); Sun, 25 Sep 2022 20:30:50 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2111.outbound.protection.outlook.com [40.107.96.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2649728E33; Sun, 25 Sep 2022 17:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grMGP8gQEwf/fIaOPdetS0O/cv+DfML+VW55LDJM0qyj3kWitdYgi4HwKinadDs98Q/GiJ+Lu/w/cIKibajySozUEkQBIDOYrT7W4P6c+NbTfuvoVm3RGWdcnbr/MoZVuZRVi/1/wrz/a2sFNrnTqNJIXc5XxHeLVO1XrkCXAeenosHK7h+ZCPstcOKfTsoErS7dbC0vBvVflwT2T7FfRO8tuzSzjvnA6N+XdAACUD13YPWOCBifqH/jguRz0qVQVGaM30MD+6960IV4bO/xfSlnBIHoey7VgiCCXJh9IX/dny7DiAqNAfW20/gtgD2m/pXgOmEXl4Edp3ZmMkf5fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W+Au91cu3uuL08D0+MPuTCF6Asxdf83Cs5VMNNrP7Pc=; b=GjIp2r5kebtARfwwFwXMfBUoVfN8LHMTwgxi/k7pJ5kcYRHEVDpoVSMR/vllMYipRf6wvcLdOhMspNVKuTBkDBa22M/wZTmahL5Sy8x0gbxGBe3tj/4pgRBz0Bhr/3S88j3zWQ1r3lx14IsQapBIaXILYQScs5qhA1WKPvtvtfQES2g/AX4yisSRZyusieMs5O/NG2GlF/ycBb+JnTZ1JHXctWW2ne8b8SGp3GKbJdlWelh6pOZbjyDaQVodB/VMKVQY6rGhDvnjHY0gh7t54LfHW1Jct7cj3Ui4ztd6EClUfi4flmtTcdvSN76KxopCaETPQ5ctY/LSbhfQqZrXCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W+Au91cu3uuL08D0+MPuTCF6Asxdf83Cs5VMNNrP7Pc=; b=p4uc5Kbs/p7X0Ow0GknIngfQ41Yepd5bgyaI/zdR1RqmfusaTIaHXRi4xy4G6/b0MoZLv8MB14ab2ZhKkZtpMye1uP9vVnWVqp8iBmR1KRqXI02d7imRnSlUcbvi5PFs1yUnfJ/dJF8ZypX8YK39lqU9yIjEyv8sGQ/31W0c21Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by BLAPR10MB4849.namprd10.prod.outlook.com (2603:10b6:208:321::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 26 Sep 2022 00:30:23 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::b417:2ac7:1925:8f69]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::b417:2ac7:1925:8f69%4]) with mapi id 15.20.5654.025; Mon, 26 Sep 2022 00:30:23 +0000 From: Colin Foster To: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org Cc: Russell King , Linus Walleij , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Lee Jones , Krzysztof Kozlowski , Rob Herring , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Vivien Didelot , Andrew Lunn Subject: [PATCH v3 net-next 07/14] net: dsa: felix: populate mac_capabilities for all ports Date: Sun, 25 Sep 2022 17:29:21 -0700 Message-Id: <20220926002928.2744638-8-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220926002928.2744638-1-colin.foster@in-advantage.com> References: <20220926002928.2744638-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR04CA0260.namprd04.prod.outlook.com (2603:10b6:303:88::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|BLAPR10MB4849:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d2a36fe-b75d-400b-e7e8-08da9f564c72 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZjTTEGLtWpXKd4WjXRhZw/z7qJWpE5fat3sf6VR4ee8zaFzEvIhUlvpSePy/oS4HXkw8P1aB2rh4eViZkQBF/0h0ptfTFqZt7IMT6KNm91ivegnip6p5dewBM2JVsc+Rs9bC5j+itkzCjVoccwYd0PRk5ZdvGmMQGYZ+FuqkJZIpF3ZP+sUQIHz+94ba3ykq9KfezzRCrAnp+autntRDGMNZrmfbCjRLNXC9pNua22lm9eUrtrjHys041uHlKDw2KB3bZVohmgZ5eyisk8y61JdyYsYZLLH6/gNyEyMBq2eNp84aeuHqMLuNNM+25Nj5JjOlrx6tgQPfG1eIhi1a9/Ea7pCn7n+lIk2esyyLC9JP9qrlZAiLW3Ae3gmxx15R617Gf65EeVOMOC//jhWylS91DYc57UkoqLDC16n193Ia3ip60rsxMGJ8vGOoignhbQR1oslEQcFse873fXwQ4ISBDXSX3xwTGKqUiQAH6IY6fqeTQ0koSswEeT1KaSlybUJocqQW3a/3stUPFYjGpIdD36nB70/kGLtNYPDr4eTx+lWGbmdYu5vdUNzStDhoGENeQvuTuzODngvf21hevH6zh0BSydQuvrva9KOhJjbZc8l6ywmTaJZO/CfjwOIi3kgPG4o0cXH8aQ6QqgtDJnostnik2PrzH69pOqIrlmuYiwLYUZKYIn3k4S967HNMTrVgsY5y3IJCMVC7FnX7Sn8pY43r53JxXueSTKDsYrTkFjRNDM1KAe4EgY/63aVl X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2351.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(346002)(376002)(39830400003)(366004)(136003)(451199015)(54906003)(38100700002)(478600001)(6486002)(316002)(2906002)(2616005)(6506007)(6512007)(26005)(5660300002)(1076003)(8936002)(7416002)(186003)(52116002)(86362001)(8676002)(38350700002)(36756003)(44832011)(41300700001)(83380400001)(66946007)(66556008)(4326008)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zoSy74fb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ArPDyYvIqnSj4wz4PahdMQzZx5rJcvy3CxRkipwtr0JqYnTcl0EyBKejyb1/Nkm3xkI4UhKaelrEbH+hMxaAvUPGdMjn+cXKxmIKi3RP+ABSIEDh7OYRtsgcwlHFfWJaZiTQSoMwxYfKHdrAtmyhxZ396L7l5Ew6b1XUe0BpHSMqPBSjwZMaf4QTFZ/BJcRzWapq2RxcXXgk/1Tbh4SwK1SDK9l8ekNB/h4hcVbxz45gCO5Nk2f4+VMc4Jt9A1PsbJoNNZlHGPwupd2V59iP+LDHK8lRXMOO31dUoYi7zqklcm3H3v/RvsMUp73hfroQIUKrXol51JObVMhaLSp179t86GYQLQRMO/VMqRyn3J61JOc6AH7k2JhNltoCccqjFIzkg6/eyZl0TtamRLn/IpeHxYlMkCh2mrFrBefJEMCjp1IySg3VTwNSJ1xCg+VqG11v/mHBHzR1UeH4wySyG3rvkznG+1/0gfC4vbbBvT5Q73IbtXFTXbr6JskFBQLC7icymZUNV6/B6y2Hay1Qz7XzqsX+mxw== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d2a36fe-b75d-400b-e7e8-08da9f564c72 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2022 00:30:22.6980 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FysgqR6xYrYbGrYV+1j/DE6fC52B4DTnTqTQa/UclnWmF/tTqxl6uen0Mybohl6GwAtd8n1lfqvD5HjPi73+pqrWk1jNII9PSTCKF1XOzb8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4849 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org phylink_generic_validate() requires that mac_capabilities is correctly populated. While no existing felix drivers have used phylink_generic_validate(), the ocelot_ext.c driver will. Populate this element so the use of existing functions is possible. Signed-off-by: Colin Foster --- v3 * No change v2 * Updated commit message to indicate "no existing felix drivers" instead of "no existing drivers" v1 from previous RFC: * New patch --- drivers/net/dsa/ocelot/felix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index 07c2f1b6913d..a8196cdedcc5 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -1050,6 +1050,9 @@ static void felix_phylink_get_caps(struct dsa_switch *ds, int port, __set_bit(ocelot->ports[port]->phy_mode, config->supported_interfaces); + + config->mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE | MAC_10 | + MAC_100 | MAC_1000FD | MAC_2500FD; } static void felix_phylink_validate(struct dsa_switch *ds, int port,