From patchwork Fri Apr 23 15:59:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 12220829 X-Patchwork-Delegate: kuba@kernel.org 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 4DA9AC433B4 for ; Fri, 23 Apr 2021 16:00:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1012A6147F for ; Fri, 23 Apr 2021 16:00:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243230AbhDWQAi (ORCPT ); Fri, 23 Apr 2021 12:00:38 -0400 Received: from mail-vi1eur05on2101.outbound.protection.outlook.com ([40.107.21.101]:55911 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231401AbhDWQAf (ORCPT ); Fri, 23 Apr 2021 12:00:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O9XYV1JHdTVto0ydv9flGQlWGejGHrc1OgcwUOvej9H7/AGebLGWXv0eqOUC9PNkVRXDhdnimUiEMlA/ct9r9Jav1h8ifYvQ/mZCeKda4x8dGC31LVweNzIYwCQdkWum4DNlTqNjER57FfgEbesUjYYWMgLpbxMIBbzpfgH8EFbb3ZNQirg073RQ3+4BuBD8VAdOInj+I+agrMrwQ9t3Lj+RpIZFFanewdxEYw95AKmpInW5RTMF+RKurCLUGf5K2uD46NQZuXUaXfYvTr1Q48h/sXtgMEf0jBwK8ANn6JLuOawSo9UIjJ8JpQTdb6MaFSlPwkzQ9AgajFaQ2DVptA== 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-SenderADCheck; bh=5NKXDFpJvS5LZiIYIqD/TwjKaHwmi/y80w80rBqpHiw=; b=BoAqkpP6uvAfK3Ic+/juHFhxJYTqbhX5N8WB3nkEHllgf/tijNjLG3AIOhUhAeiiRPRRqSZ7lJ5reyLJE3c058H1/hRCNSRWQRemTar2nWkPW2IISr4HVKYYg4PNFKLs8DhgmmYo4Mmb2jMfCIqTnQriKScKIL4kcMxqcwxruyDjx8JHCx7NR7GN9vQgRKgPS5YKa1DchzzJ9+T0vKVWY7e5BWuuDcAYN7h7YBhWZuPf/0ZhvldCFXHYLgZr40gqJKCFkkjPuciZRyZxu+UqP/G+SXuH7fq3VSTF0hrtjSl6W24kTjOhHYTv6XMVwlTW23mdak4kVnZUBPs3q0XUIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5NKXDFpJvS5LZiIYIqD/TwjKaHwmi/y80w80rBqpHiw=; b=i9eoXHYgqbWUjzIqXRfiavEcHWGb9sAeYI6hdpVGY4W7ZvSwRsYq15Kl1t91vzXcpNRDKQnbSLSq2Cvp2G52mSeoFvng76zO+y0yjZ6DWf3RHyowBYIw/RKD8ibK5GZUOaraeQ/rJAPk0t5WczB2UT5TmbcI4eOOqKzAX/OhrKM= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=plvision.eu; Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) by HE1P190MB0187.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:cb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Fri, 23 Apr 2021 15:59:55 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::a03e:2330:7686:125c]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::a03e:2330:7686:125c%7]) with mapi id 15.20.4065.023; Fri, 23 Apr 2021 15:59:55 +0000 From: Vadym Kochan To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Vadym Kochan , Taras Chornyi , linux-kernel@vger.kernel.org, Mickey Rachamim , Vadym Kochan Subject: [PATCH net-next 1/3] net: marvell: prestera: bump supported firmware version to 3.0 Date: Fri, 23 Apr 2021 18:59:31 +0300 Message-Id: <20210423155933.29787-2-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210423155933.29787-1-vadym.kochan@plvision.eu> References: <20210423155933.29787-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AS8PR04CA0147.eurprd04.prod.outlook.com (2603:10a6:20b:127::32) To HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc60716vkochan.x.ow.s (217.20.186.93) by AS8PR04CA0147.eurprd04.prod.outlook.com (2603:10a6:20b:127::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 15:59:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a4f458b-6804-4e53-24b9-08d90670d6ab X-MS-TrafficTypeDiagnostic: HE1P190MB0187: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:102; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HWK6oKZ0wlVX7qOmrziDs9eYH9RIA4vXvw7toR6AEp8bbPTlmKaCCXf1dcfIXO28A1l+pKpI1pwU6IcZEYVSr8/bK9Xhb08FoZsSZS/hcvoXtjFJIXPjW3WEMtlIVvLa49aNspfikEkp8Pd6EiXr3eWE7taWOe7a+0y0FIOXpPzskPrZYS/ndVsfYxYiMGj/x8A/0Irby9qVQqK5CfhrSxvA3IpbW3s+7zgYJ9chpz1d5eWbjvelxAqqpKRzSY6JzB/NEVzN6+qp493SFzuA6/z9Pi0w1MEkWCyBr0dwki9KDoSQHvI0fOkpnIwJCr6duAAxJLwiGbREhP4LQHrQi4Mka2i5viG4U+2v6I7fcC2oVpP7ZQNzRqLM15PoGImgYFyeUEzfNRbaE7lO3RYM5qz66ex0OCrrE93CHs/8757mTQKI6ZiD0gq5FBmYdVYtCF8db4k3eqZUGEKNVFEJQBxSolimUGSLQjYSdDeR7sCVrWOnAEu1uDExRuMTRUCKMxTnWxoL8B7uUuDBWtDvs1zYyvFuC7Cv859X1fwqGz8O2OczXF6aBEt7CjDFjjAwu17tXNZ6QdEO7JuNzyITM74ukM43/apOAed5+hnnGers+QgBcbFNyTNWssZs3qPd9nqidjsRzzbXtmYEVDfCAU6PJY9LCqnfC/0513bSuEs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1P190MB0539.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(39830400003)(136003)(396003)(376002)(346002)(366004)(86362001)(66556008)(66476007)(6666004)(5660300002)(4326008)(66946007)(186003)(2906002)(316002)(36756003)(1076003)(6512007)(478600001)(54906003)(2616005)(4744005)(110136005)(6506007)(26005)(8676002)(16526019)(8936002)(956004)(6486002)(83380400001)(52116002)(44832011)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: jvZjQH6foBClTlGFnhwUsWTAmIs2FBbpUTYedaPid9sAJC+NMap4He+qcQKUo6a5xIKtCNVgO1muiveejQItT2vZweHprV32PxqU8exVlURbmwOEFVQjHbDMNDi5NGlabM4uB+p8/7WRwfrI7DptobYniZhoA3a8XG6KgRyge1e/JUaxUPF0ygKLDj2hIcRf2xtqP864vkt8916jkQkzW7rcyqAl3ROgxo4pYtMnMz5Bg9OdcUGtRNA9usp1jyaIlW01e9AX9sokwcPiFXiiQI1RmFfBpNz6bjTyYIWexJggQdj16z6Z36ceQ8eHBFyPYmusxtlfFvzQ9h07fPaq9CDKiM0KFGryQqCU5FfhsYER677QBTKO0eZS8K9J0zdcs3vQjm3Ya6WY6RmuHtdfczKBQIFXqGr+hdDotYI3I2jJk+E+ksiBv+NH5nQEqsrRWzNIfap8C90WXYVRTYwPqY7SETEmlcQMcJ5MtS9ZDdKQeG05E1u81AXJx4hDSkP8AKdYeSSQakYa/evd+jVfq+eG4lFKVzfGPLSbS4oDhY7hvSyobfFv+a3Q1xgnRq1QXhgNgPF3IHP8rgoqoA6rjo61p4lifIbrwK16j8kQx0JuKQfPPeYWZJimgLe0oD8QvZ+7tXu1UEXl/q23PPxJ+jdRsYz0EN4yhoe5b1hcAharFDUQToWd0FrRjBNZ38POk1yCgPL3TG5eT4jBYd9C3J6HnTdFmqpEUafCg2xxiXquv/H0Kx+icc87Xt2q6JYYNvGJ878jhw73zFpxbgcH13swapW1pDU1EcEQ49nQaPd4BK2sJDtZgrZIlC6q3MmfrqZeQiCrq/HQRniKOBsIWELwjfdh2SuaVAhpFrti0RXRyVJFWKiZ76SiOCPuUVhLVquA6QLvhQTqlLSIapwsFqQuF7Pz/BnIQGIa7oV3Ie4Oh3X2QfszoP+sF67Bnk7bgwQR/DQxszwwckDks+WU12lEuH2ZEO4H9FZOuqsysK8Ali3etYX962961z+etckm6bURrRx8ZhZdkMfhzU9VXsNBlHopt1KKjNVotGgb5mCEQfTaktoa+TgDR13f1nIZ+dcXY6Zk9mQso65fT8DaaRgTj/B/AcuP7SB5Lgb+S6ExRo4L1cKPQZaePSOK8zd/cZ3moZBegB76ZzR92Bu2F+6YPx2mNxBWKFfGWVeB/Zc2C+v1ydyBKVI6HCMsZ4gVzuqNVVegYkaW7QtSXblp0OctFECS75qVNaT0fwEIE/xkjqxUoinvw3hBUNYSKmEyXUBKBBM4G8f0Vxyj7hc/ZKMPD2ik78ZYDDc+7tck0xo3Cgm0hIKZ/QBL9vfJ/cCu X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: 4a4f458b-6804-4e53-24b9-08d90670d6ab X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 15:59:55.9108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a0+Ng55XPC14LcReiaL6Lbr0oavDofcLltWR0g7kirkC9hDMKlJdne0AkWalQGg9sMrf2hrWqDeWfxmA3RhHSpY2ZX3nRflJYKOnNXwezVk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0187 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadym Kochan New firmware version has some ABI and feature changes like: - LAG support - initial L3 support - changed events handling logic Signed-off-by: Vadym Kochan --- drivers/net/ethernet/marvell/prestera/prestera_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c index 298110119272..80fb5daf1da8 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c @@ -13,7 +13,7 @@ #define PRESTERA_MSG_MAX_SIZE 1500 -#define PRESTERA_SUPP_FW_MAJ_VER 2 +#define PRESTERA_SUPP_FW_MAJ_VER 3 #define PRESTERA_SUPP_FW_MIN_VER 0 #define PRESTERA_FW_PATH_FMT "mrvl/prestera/mvsw_prestera_fw-v%u.%u.img" From patchwork Fri Apr 23 15:59:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 12220831 X-Patchwork-Delegate: kuba@kernel.org 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 0604AC433ED for ; Fri, 23 Apr 2021 16:00:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D42436144A for ; Fri, 23 Apr 2021 16:00:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243256AbhDWQAk (ORCPT ); Fri, 23 Apr 2021 12:00:40 -0400 Received: from mail-vi1eur05on2101.outbound.protection.outlook.com ([40.107.21.101]:55911 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243191AbhDWQAg (ORCPT ); Fri, 23 Apr 2021 12:00:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dBVgaroNesc0z/Pib/IOZS/TtdckGUuq6XTScjdIEm/iUBqd1Sb5C5AhAVp7XenPlCAiyaLMDJZ7s7mM7BNYpJFBC+42ux3QVgUPi8KjJUNh7B+fsE0y80Zj4RqyGZdHZHUtUvpv1ekTmyt5IUHHKQCEBe/RiiByqrRPM6k9+UTJv2HwzcU6XTj7BIGRxwGZ3qLMU77VxHeTV5Sj75yzoxaxcC9w6OsezfRpaTrH7Msd+SZm4yXvVbfsq4pCSUIM41K0XqLACjC41CGz4jHdC80CZlFcenEOnx8/Px9cZCXCvO4kjkfHshXohoZ8pszep101yaYTqV5RrbemHGbFMg== 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-SenderADCheck; bh=f93B8to9WRvGZ85Dvo2jUmUOm6m26h9Kxbwk+2gVPCo=; b=NQq/Bgnp7EhiyYnjgfcbHUJkqfSDdzbvd+UcnVlloA8SXLvOkC5vefx6y8zCKgIj584JiVVwXf8+0wpOYlnZY84Vr+YtuWzjTL0YR6PhtEDVz0metIm51SOeXDtGVkt5a3AxuP+R9h5zQlOWKHIrBSG0HFQhfAz+iJ4BW3lV/SQPjlU91uw6AHrnFAQGo8xBAOGNc4nNL08M1kPJTDQogxuoGsUIBBUe6yTkfN+qBME+/qRK7gY5SRgv46L3Iiqq4YwE2OefDg1tt6uIwx++ClT0QvUqcIgErf8uEG9WfqNQrDu2lFcW0mi8jSjIYKr8hGASVznf8qJMcSGAOhdyAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f93B8to9WRvGZ85Dvo2jUmUOm6m26h9Kxbwk+2gVPCo=; b=lT9NhiMBCbx2kS2QxMwO24UBI5GD9aknC39ofzsIEVTe/VU5Hdc66l7QxTqex++lfw9ty8CFrMK4N8to0SWY3QHHHJz8ADkpaeuGgerPL/AQG1DkhVUf1DLCg/eZFcRpo08gVLwGiiOUdGRpQlpGaj18l9pdCsBL3j6PYvDOG8Y= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=plvision.eu; Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) by HE1P190MB0187.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:cb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Fri, 23 Apr 2021 15:59:56 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::a03e:2330:7686:125c]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::a03e:2330:7686:125c%7]) with mapi id 15.20.4065.023; Fri, 23 Apr 2021 15:59:56 +0000 From: Vadym Kochan To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Vadym Kochan , Taras Chornyi , linux-kernel@vger.kernel.org, Mickey Rachamim , Vadym Kochan Subject: [PATCH net-next 2/3] net: marvell: prestera: disable events interrupt while handling Date: Fri, 23 Apr 2021 18:59:32 +0300 Message-Id: <20210423155933.29787-3-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210423155933.29787-1-vadym.kochan@plvision.eu> References: <20210423155933.29787-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AS8PR04CA0147.eurprd04.prod.outlook.com (2603:10a6:20b:127::32) To HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc60716vkochan.x.ow.s (217.20.186.93) by AS8PR04CA0147.eurprd04.prod.outlook.com (2603:10a6:20b:127::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 15:59:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88bf2f84-5a0b-4db7-fce1-08d90670d72d X-MS-TrafficTypeDiagnostic: HE1P190MB0187: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zJAing/QHj0OBuabGdbJwxMPOdvgPwvlfgySRcUTKxyDTJyi5vgP43lPH6vk15SiBZss9OBfhV14BZ3uquVTuQm4L37TxX6yfjdk5j3VTrF5A6US8YRnd0dH2ujTqFp4FOMk1vVIgA9U6KQyf2zULScCf++0Y+eJ9oWwn6T65s91/GC/Xo/1A7l3FVNcItNT0hahbq9uzSVwKIJq1EPQVgZhLEmgtTVKBdDj2kVtajbXHga7ybOPentn1XLoDDpTUfPV28UuoZTEWOwcwalQeXvTAdxIIjAezR7/Y5POCK3BZ80b3GDHuR/ahNstouaAJYZhdmNy5vWuO4+mdz+Ej9xEU/J60EjCOB6PmYJllQSOYodfkZFQhkjzA572Ig0ThshUMXejAyTpNL2htUN+Qj8huG6EHuBLqeRAHI793RRz3KoNBBat1SNiAvVD6iop1wvKP64Dtf/Hm0g9/wDoze81EZq+n4uxRiEpFjoEdJreiOOoZ3g9egL4Ay1RwhsythIbDxpLN9uWZgY6LCoZnqc9LrleCqLDqUVVx3qSA0ZN/NNDlUGq1IL35Q+a8UtwJIPzhip8WQAlXx6ZC3ZYC5Jqk15fNk5xPEbjLkS7Uu/bHH3hNMWQQFAjCrABXGCaLZlzR8Pyj0/5JPxlI8riKGScRc1eNlc6FiXtG9ZEnZ0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1P190MB0539.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(39830400003)(136003)(396003)(376002)(346002)(366004)(86362001)(66556008)(66476007)(6666004)(5660300002)(4326008)(66946007)(186003)(2906002)(316002)(36756003)(1076003)(6512007)(478600001)(54906003)(2616005)(110136005)(6506007)(26005)(8676002)(16526019)(8936002)(956004)(6486002)(52116002)(44832011)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: +OCeZweuaADCzO11sKqQhoW0HUCrU41R685ter5M79Mf0t0FbX+IrzhYRrLAEzQ3duIepMlkvrcgMDr4wDeCd00ReCewFbipyS3YYTYFJee9ZBaXd+AFEG3pU/7HThkjNpjxTbdPib/XCeZdcqPT1BuyFaUfjPfD9iyls3nA3iNZHbmnOVJfyHHXw4SCyKO0RE6Manci3eMOFdvuZagTakhb7UXgdHQsRihd8Etsry3l/F49zQrcuAwoAKEkQgky35zLIOBsqGANWyV2fu+ZS7Im0h72okqLKUwBmlpO7WPFjoOJFhN+CcT1nC9+4X3LwtLQNUNdcMDmA4HDOYvpkFdzSBdEe3p0HO57777hrlE3ZcL1GdNeGtfRkyC8vYwH+t4ohYRDHUDQFVTFKwzED2FkLZaPHo/ZBr2FUXyoVea3K9UtqT2hshkrzUCRUQhveY49cTydbSeOZPRe/dw/GPCajtt1W4Q7jAiCIhWBBwDIU/yrT4hgkWKT4bYDw9BdJsoShl0IozEEqO/UHvYc8AbgfUSDNiTAnbgPAJ8AT9kKX/mXsxnBNypp++W45uoBQbV31aiy5tz28hBJp0lGBgo2pBPCAKTQpvc3TgZw/9ewrr3cInSLQF99EZzaEVbo2aZO8/NpD+5ZrNN4QIxfmkJ5mABdhuU4iMy5K/rsUMjYhCpGLTntpMlJsHoXTNZ9+r4Q0dvcQq/2z89khbV57/Us+ZLknR+lXNQ8XTxOTIoS/qB3jC8G5ZcFfvyNzQdNaNmRdx0aXa3AJAxz6zEXHga+SfzYW0G53fUa0/+54SrydLhZ4vkzWDLJ66TQhPIji+rL1rZCn4zZR1yUD5VOw1KojDSXNeB6Owql0IxS1cgOGWU+N/omJk8GrqEDKmU2atoiqeT2Pt9Y0i5TDQik3NKzYodV+O8W+uatUfF+GV1MZ2UgIpWtuNy5/lQFf0OHLSGXftwX15e8t4c2MYJjPK8JKlsfQnk/32F921omXU72jUx+H3KU+Pf7fdDQaQptI0v8T0kz3VYsyFt6o6q47fCDGMGz+iv3QV8HJF1CBgKEv1H/jQg/5KshMvvJ+ilebpCDNhlDXPfFYDaqWp4m/vk+U/S05OVBngGlg1eVUa6W6V2BSPFnqLZ6KMzMxQ/ER3+bzD52fev6nN82lGVBoEzsONuW0nUtM4UiNXMzOyX4F1lg7eJWHiz40Y0yhGOtHubR7Y/ZZL8MDtkIUwrpIGiVOKG+aIV6UVWtGpSQk9RjZntoVbOnPC566pBQ6/tsggSH/HxW6PNziXx0x5hm9h6wOOAQbTLi8hpkbAaHSVjQ4GjMmy5cfug3tgEVMGXK X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: 88bf2f84-5a0b-4db7-fce1-08d90670d72d X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 15:59:56.7084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wronJiVEo+su80G4H2u+vWbfq7gBi64XFmZC4cFUZ6afmOGd0v0PXNPlrA+gn76W1ZqvNhAn83zS+ElII/L0eHAPnV+0/tuJYJgPDnfhRSQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0187 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadym Kochan There are change in firmware which requires that receiver will disable event interrupts before handling them and enable them after finish with handling. Events still may come into the queue but without receiver interruption. Signed-off-by: Vadym Kochan --- .../ethernet/marvell/prestera/prestera_pci.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c index 80fb5daf1da8..5edd4d2ac672 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */ +#include #include #include #include @@ -144,6 +145,11 @@ struct prestera_fw_regs { /* PRESTERA_CMD_RCV_CTL_REG flags */ #define PRESTERA_CMD_F_REPL_SENT BIT(0) +#define PRESTERA_FW_EVT_CTL_STATUS_MASK GENMASK(1, 0) + +#define PRESTERA_FW_EVT_CTL_STATUS_ON 0 +#define PRESTERA_FW_EVT_CTL_STATUS_OFF 1 + #define PRESTERA_EVTQ_REG_OFFSET(q, f) \ (PRESTERA_FW_REG_OFFSET(evtq_list) + \ (q) * sizeof(struct prestera_fw_evtq_regs) + \ @@ -260,6 +266,15 @@ static u8 prestera_fw_evtq_pick(struct prestera_fw *fw) return PRESTERA_EVT_QNUM_MAX; } +static void prestera_fw_evt_ctl_status_set(struct prestera_fw *fw, u32 val) +{ + u32 status = prestera_fw_read(fw, PRESTERA_FW_STATUS_REG); + + u32p_replace_bits(&status, val, PRESTERA_FW_EVT_CTL_STATUS_MASK); + + prestera_fw_write(fw, PRESTERA_FW_STATUS_REG, status); +} + static void prestera_fw_evt_work_fn(struct work_struct *work) { struct prestera_fw *fw; @@ -269,6 +284,8 @@ static void prestera_fw_evt_work_fn(struct work_struct *work) fw = container_of(work, struct prestera_fw, evt_work); msg = fw->evt_msg; + prestera_fw_evt_ctl_status_set(fw, PRESTERA_FW_EVT_CTL_STATUS_OFF); + while ((qid = prestera_fw_evtq_pick(fw)) < PRESTERA_EVT_QNUM_MAX) { u32 idx; u32 len; @@ -288,6 +305,8 @@ static void prestera_fw_evt_work_fn(struct work_struct *work) if (fw->dev.recv_msg) fw->dev.recv_msg(&fw->dev, msg, len); } + + prestera_fw_evt_ctl_status_set(fw, PRESTERA_FW_EVT_CTL_STATUS_ON); } static int prestera_fw_wait_reg32(struct prestera_fw *fw, u32 reg, u32 cmp, From patchwork Fri Apr 23 15:59:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 12220833 X-Patchwork-Delegate: kuba@kernel.org 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 803C1C43461 for ; Fri, 23 Apr 2021 16:00:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48C6861450 for ; Fri, 23 Apr 2021 16:00:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243286AbhDWQAn (ORCPT ); Fri, 23 Apr 2021 12:00:43 -0400 Received: from mail-vi1eur05on2101.outbound.protection.outlook.com ([40.107.21.101]:55911 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243216AbhDWQAi (ORCPT ); Fri, 23 Apr 2021 12:00:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j7dkwkwqZC3QGEWAQnk8Dhrtp78u9pvSca3+LZJjbu+7mRLfhg6P5fTROAVLe4Ws1UXNKBf8Bynp0oKUgC9n4KQGGQMkDLKDuzzCpMcGy9Cx+rDPCjemusMtE0AmT/wzpaxD4ISONibiFW9b+Y+vQiqeji0XY3dgQwXoGfuzexrVHUCJpZGTEFkIe8+Hy4c+FQOQLXNdRcC+ob/qo+gwiFhlMW3idw00OBb+I+d5j6HgAhy+yIDlZF4wzEOuuMYkaOTRwatM4UAH0tnAMYKlZ5OptR50fYTEUTcNX+6vUJtk88GV9Wmnc+iGc2hCT4r5JAG2zRDczqsOYdv/uleCow== 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-SenderADCheck; bh=KFpqKsR6aKyV1WiLABviZ6okCsrssu6rdDIzdKlGqog=; b=GL5I31cNQ7IwFFO86ACHlR8dMVxMfwxlC8AGsaULQA7oCoZ4kyKambPBYAOLYRQcm/84U/C08w3NROdG+XmqsDbF095sPwShaoksC+yTLhBSDHhlMUFzNGCBoF+obp12VRN4hcvUSsExYHynJD2MJdRFYFMJ5F4gu54lncnGT1kJ0fdNNAA47u6HmMuuuu0qM2XIgags8lTHLwqm8wu0nikTTqbAJ2vxCrDgX6Ng3Bcy2Cc4oqTAbF4+6T7OxYNtb27EgjSz2E5H+7nFIMY/6yVpMXlk19fdPTbi/rVnO/EJvtsbjajXqVSU72so/W6RYY/T8VVP9uTdOuUIjrR9hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KFpqKsR6aKyV1WiLABviZ6okCsrssu6rdDIzdKlGqog=; b=acyrrkjV8qK3q+QxDiii3NnTPiUf+9gUsgz+6CIN/IXjjp1Vlg4xbzJh3DghVDr5/QNAG6PK6le/u1qvPY1rm1fMMWcLx7nCfYH2vo/abzgNsbk95Q//QhXNrgqVWlf4ElwR4PGlBWFBmO8cOcp6Ra1ZXAcKNT9revjwY1CnK5o= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=plvision.eu; Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) by HE1P190MB0187.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:cb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Fri, 23 Apr 2021 15:59:57 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::a03e:2330:7686:125c]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::a03e:2330:7686:125c%7]) with mapi id 15.20.4065.023; Fri, 23 Apr 2021 15:59:57 +0000 From: Vadym Kochan To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Vadym Kochan , Taras Chornyi , linux-kernel@vger.kernel.org, Mickey Rachamim , Vadym Kochan Subject: [PATCH net-next 3/3] net: marvell: prestera: align flood setting according to latest firmware version Date: Fri, 23 Apr 2021 18:59:33 +0300 Message-Id: <20210423155933.29787-4-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210423155933.29787-1-vadym.kochan@plvision.eu> References: <20210423155933.29787-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AS8PR04CA0147.eurprd04.prod.outlook.com (2603:10a6:20b:127::32) To HE1P190MB0539.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:56::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc60716vkochan.x.ow.s (217.20.186.93) by AS8PR04CA0147.eurprd04.prod.outlook.com (2603:10a6:20b:127::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 15:59:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ece516d6-4751-4704-aea6-08d90670d7a7 X-MS-TrafficTypeDiagnostic: HE1P190MB0187: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:644; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tBbKF8SvHzQPnEIn1JA7irTjxr6/G5eM8VAdo5HbbeG1SV21V5rch3GzO7a872/Z0hQohnOgQd33bk8iFCcyqPrduSwphhFqbgFUx10dpbGJvn/Gn0n1+FEdJvqH18b6Ua/oYGtFYcMmLoUHzlwZh4m+7lF6PXF36TtT7MeVU+GQ99j/CxqpEMDkGSSFgw7JPhjSZqQO6WZLqGuAmN7jFYUXIrr+a1ET6VMnnfRqKkA22XNnjHDj7rps9lRB5ZO/u1x2zvNyXf8+IRrkan8V6Nauw029sjPTBz5X7DkM14+Jun7XtBNGUWMIJ1KRRurPHyAuimCela+Rme5enUhGPbp1Y1CIxp9lRsbd1JxY5iuhkWFdKCQszUAODhYal9mMBV0tunfjFaXgJ0uhh5b9d+OmFJLqCADwX7m0noivwTJDMQ2Mx8BZouV4t+lUAcCQHvLNR2LnVNWmBHj7CEYnRbMSAdfEQmmXHb+iR6zN0S9GgvdSNJsJOcnKNPHUEAwRqmdrTiyJb+EIw2KjiospeRJyUnV0gvZvo+sH6/ZFhR86yqx4MHC52k5Mnx2SKpRawYXT86WS+w4m7BbWTJY6PtAtdX5Qw0EWJlAi2htvE14NJtRIBJC8yu0fL0DrQo937hHZCFeshBQPasKT+CyOUZ4wXxF7MmOTSLMwBwkJeB0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1P190MB0539.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(39830400003)(136003)(396003)(376002)(346002)(366004)(86362001)(66556008)(66476007)(6666004)(5660300002)(4326008)(66946007)(186003)(2906002)(316002)(36756003)(1076003)(6512007)(478600001)(54906003)(2616005)(110136005)(6506007)(26005)(8676002)(16526019)(8936002)(956004)(6486002)(83380400001)(52116002)(44832011)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: byTmgalO4TFDfihJhOoOgY5jnU/JV+9Wax5Xz02t/w97Fv6464FiIrLnXXFS7upyHzRTmQ+d56CC+8HpsGv17DwMRu20cB0j7IokeXu7hVxfJtBz4st+CDHExCAMbeX3Nk4aQ2dk1uQDITni7bkMHvD/XeuNxw/RNrHZiFg7x0pC5QWNoadzqxwaWJXYf9Oy1nUfbi2kj6DR9kDRR/P4cP4t0WD8Fh9oguhOYfO1N/IEWCZuBzpPMZULF4LOR+TErt45pMOE1V/hBbdboNXQDII30ev/P+wBxrOfwtrvHpuAke6tZKEPkX+N3qwVyNmqsDeBW65tq+stKmrDVUkEKBd2NvOSirct8SKQpEVbJr8dXezGLqR9BE6xUA8846IEEb+GpWDFdJbUXFS9ie446kZHbyeHxNYJ5qkRh7/Yk3ZORqG/9+EnQ1Q+UUIIwc1In8iNQk81z1JKsou8DzDntD7yGpH3xaNO0K/PP7mEctjLg02xV3LvS/ve8+UsWypE7ZotzGGMUzUFBQ2P8cPfXKfE8Ug9rksNhEdki85NwwjKwqr3HtB8Hp4y7EBhAtnSqRWfT9ku3UBWP3pYRy7D/Xnwq1dG8WjqZyUj3eV1mji9gtdDjcyeJg4jKaqJDb8VCF8nDlYcjn74zt+O7SklG/MeTDtp4oeAmzEKcNSLagSbdiIhBRsjgLK0HvpBVx1MhvlsYpqxk9i/I6TY4OG0wLDs9Qpb8wK0AzON8OCTJu/oKrRBL/tSHP8yDDYJ1VKftpIWb2HMyNXEAgkjL85Uy0DBoasR0u+asuCaZ3YGOHyDdm2gzvBRKHgfMBoWo6En0NTZ2X4un0iHecYvZlsvM516dvOjx4y1MyvAwm7IoCv7QHstIaAeYRfbMjMd5ARim368wU8VRlmh6a+5Mg7qXJdrO0nrQefg+H2qljeLoadPfe8ev2khLn8kOsBIIyUY9EIgYQhfW75Yrw0OBk1IFHiMDXKXqXu7IAAIbPkfnv9OcEmeAWNiRgunmBU227wkRBNXBFB5mihhgIX1zApurMzATTdTLYACESyWjLZ7iqzlEC0xyQl5g3ghJYcPenFaXGHlyuJBfbstobm/D55oqNP6ab/2QDvoKIcoszSFrS6zIcv7pLSn5h1m8mNW8uW91Beu+ZrHC7CrzVpF4/Fhq/I0NYK9GVnVwEsyUq55HDlx49o+VV0wxRWOUgwSEW42MIm1OhBpQZkN8L0sMI5BufkotzGyxfXD81yf5TPwRaN7I3Gx7QiBw5woIIRNYcjDjunVlxovutpyCapw0QlQxFEEKupYwNv7rJDnNy/37kuPpr3Cbha5DWBcDFmKIh0s X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: ece516d6-4751-4704-aea6-08d90670d7a7 X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 15:59:57.5289 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XWD5+K9vtQoZaSbYy+2QDbduXo5pq0tBeIn9AJlueWGreJAiWse1rYCSeaXS2E7Hs2r/+Vb3+ZcKr5mprZ1a0O9rVMlrwcJFN2cIORiF6R8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0187 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadym Kochan Latest FW IPC flood message format was changed to configure uc/mc flooding separately, so change code according to this. Signed-off-by: Vadym Kochan --- .../ethernet/marvell/prestera/prestera_hw.c | 37 ++++++++++++-- .../ethernet/marvell/prestera/prestera_hw.h | 3 +- .../marvell/prestera/prestera_switchdev.c | 50 +++++++++++++++---- 3 files changed, 76 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_hw.c b/drivers/net/ethernet/marvell/prestera/prestera_hw.c index 0424718d5998..4afef6e14db3 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_hw.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.c @@ -85,6 +85,11 @@ enum { PRESTERA_PORT_TP_AUTO, }; +enum { + PRESTERA_PORT_FLOOD_TYPE_UC = 0, + PRESTERA_PORT_FLOOD_TYPE_MC = 1, +}; + enum { PRESTERA_PORT_GOOD_OCTETS_RCV_CNT, PRESTERA_PORT_BAD_OCTETS_RCV_CNT, @@ -188,6 +193,11 @@ struct prestera_msg_port_mdix_param { u8 admin_mode; }; +struct prestera_msg_port_flood_param { + u8 type; + u8 enable; +}; + union prestera_msg_port_param { u8 admin_state; u8 oper_state; @@ -196,7 +206,6 @@ union prestera_msg_port_param { u8 accept_frm_type; u32 speed; u8 learning; - u8 flood; u32 link_mode; u8 type; u8 duplex; @@ -205,6 +214,7 @@ union prestera_msg_port_param { struct prestera_msg_port_mdix_param mdix; struct prestera_msg_port_autoneg_param autoneg; struct prestera_msg_port_cap_param cap; + struct prestera_msg_port_flood_param flood; }; struct prestera_msg_port_attr_req { @@ -988,14 +998,35 @@ int prestera_hw_port_learning_set(struct prestera_port *port, bool enable) &req.cmd, sizeof(req)); } -int prestera_hw_port_flood_set(struct prestera_port *port, bool flood) +int prestera_hw_port_uc_flood_set(struct prestera_port *port, bool flood) +{ + struct prestera_msg_port_attr_req req = { + .attr = PRESTERA_CMD_PORT_ATTR_FLOOD, + .port = port->hw_id, + .dev = port->dev_id, + .param = { + .flood = { + .type = PRESTERA_PORT_FLOOD_TYPE_UC, + .enable = flood, + } + } + }; + + return prestera_cmd(port->sw, PRESTERA_CMD_TYPE_PORT_ATTR_SET, + &req.cmd, sizeof(req)); +} + +int prestera_hw_port_mc_flood_set(struct prestera_port *port, bool flood) { struct prestera_msg_port_attr_req req = { .attr = PRESTERA_CMD_PORT_ATTR_FLOOD, .port = port->hw_id, .dev = port->dev_id, .param = { - .flood = flood, + .flood = { + .type = PRESTERA_PORT_FLOOD_TYPE_MC, + .enable = flood, + } } }; diff --git a/drivers/net/ethernet/marvell/prestera/prestera_hw.h b/drivers/net/ethernet/marvell/prestera/prestera_hw.h index b2b5ac95b4e3..109a677951cc 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_hw.h +++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.h @@ -138,7 +138,8 @@ int prestera_hw_port_mdix_get(const struct prestera_port *port, u8 *status, int prestera_hw_port_mdix_set(const struct prestera_port *port, u8 mode); int prestera_hw_port_speed_get(const struct prestera_port *port, u32 *speed); int prestera_hw_port_learning_set(struct prestera_port *port, bool enable); -int prestera_hw_port_flood_set(struct prestera_port *port, bool flood); +int prestera_hw_port_uc_flood_set(struct prestera_port *port, bool flood); +int prestera_hw_port_mc_flood_set(struct prestera_port *port, bool flood); int prestera_hw_port_accept_frm_type(struct prestera_port *port, enum prestera_accept_frm_type type); /* Vlan API */ diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c index cb564890a3dc..f615ebe683f0 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c @@ -404,9 +404,13 @@ prestera_bridge_1d_port_join(struct prestera_bridge_port *br_port) if (err) return err; - err = prestera_hw_port_flood_set(port, br_port->flags & BR_FLOOD); + err = prestera_hw_port_uc_flood_set(port, br_port->flags & BR_FLOOD); if (err) - goto err_port_flood_set; + goto err_port_uc_flood_set; + + err = prestera_hw_port_mc_flood_set(port, br_port->flags & BR_MCAST_FLOOD); + if (err) + goto err_port_mc_flood_set; err = prestera_hw_port_learning_set(port, br_port->flags & BR_LEARNING); if (err) @@ -415,8 +419,10 @@ prestera_bridge_1d_port_join(struct prestera_bridge_port *br_port) return 0; err_port_learning_set: - prestera_hw_port_flood_set(port, false); -err_port_flood_set: + prestera_hw_port_mc_flood_set(port, false); +err_port_mc_flood_set: + prestera_hw_port_uc_flood_set(port, false); +err_port_uc_flood_set: prestera_hw_bridge_port_delete(port, bridge->bridge_id); return err; @@ -528,7 +534,8 @@ static void prestera_port_bridge_leave(struct prestera_port *port, prestera_bridge_1d_port_leave(br_port); prestera_hw_port_learning_set(port, false); - prestera_hw_port_flood_set(port, false); + prestera_hw_port_uc_flood_set(port, false); + prestera_hw_port_mc_flood_set(port, false); prestera_port_vid_stp_set(port, PRESTERA_VID_ALL, BR_STATE_FORWARDING); prestera_bridge_port_put(br_port); } @@ -591,21 +598,36 @@ static int prestera_port_attr_br_flags_set(struct prestera_port *port, return 0; if (flags.mask & BR_FLOOD) { - err = prestera_hw_port_flood_set(port, flags.val & BR_FLOOD); + err = prestera_hw_port_uc_flood_set(port, + flags.val & BR_FLOOD); + if (err) + goto err_port_uc_flood_set; + } + + if (flags.mask & BR_MCAST_FLOOD) { + err = prestera_hw_port_mc_flood_set(port, + flags.val & BR_MCAST_FLOOD); if (err) - return err; + goto err_port_mc_flood_set; } if (flags.mask & BR_LEARNING) { err = prestera_hw_port_learning_set(port, flags.val & BR_LEARNING); if (err) - return err; + goto err_port_learning_set; } memcpy(&br_port->flags, &flags.val, sizeof(flags.val)); return 0; + +err_port_learning_set: + prestera_hw_port_mc_flood_set(port, false); +err_port_mc_flood_set: + prestera_hw_port_uc_flood_set(port, false); +err_port_uc_flood_set: + return err; } static int prestera_port_attr_br_ageing_set(struct prestera_port *port, @@ -901,9 +923,13 @@ prestera_port_vlan_bridge_join(struct prestera_port_vlan *port_vlan, if (port_vlan->br_port) return 0; - err = prestera_hw_port_flood_set(port, br_port->flags & BR_FLOOD); + err = prestera_hw_port_uc_flood_set(port, br_port->flags & BR_FLOOD); if (err) - return err; + goto err_port_uc_flood_set; + + err = prestera_hw_port_mc_flood_set(port, br_port->flags & BR_MCAST_FLOOD); + if (err) + goto err_port_mc_flood_set; err = prestera_hw_port_learning_set(port, br_port->flags & BR_LEARNING); if (err) @@ -934,6 +960,10 @@ prestera_port_vlan_bridge_join(struct prestera_port_vlan *port_vlan, err_port_vid_stp_set: prestera_hw_port_learning_set(port, false); err_port_learning_set: + prestera_hw_port_mc_flood_set(port, false); +err_port_mc_flood_set: + prestera_hw_port_uc_flood_set(port, false); +err_port_uc_flood_set: return err; }