From patchwork Wed May 19 14:33:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 443898 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 17423C43460 for ; Wed, 19 May 2021 14:34:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB6D66135C for ; Wed, 19 May 2021 14:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348033AbhESOgL (ORCPT ); Wed, 19 May 2021 10:36:11 -0400 Received: from mail-eopbgr50128.outbound.protection.outlook.com ([40.107.5.128]:4932 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1347952AbhESOgF (ORCPT ); Wed, 19 May 2021 10:36:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KDwW0LMngTn2O6fRNulfZQtwyYcyEUrE0/LElGoCNLPcimokb01k9kCMoc17IljUny+66EQV8STaalLJKo+RHzlbJLHiw7wmvXXCCNzN0MjCQKyQlrYxDaEiOn1XLhF34kj73KL05S1ukvKbUEl11gRGSYOGzeGRN0D39dB0zIHDJ0R10HCH3W6GOjdDkApRsXxeeMdGnw6IsPlpcB/Nc53Xhpp943tDhN5L8XrJ9JNeybiDR+x2YD0W0uhl5iKDoaCZi280PlvOd5fdOp5ukVD0XhMJtGS4/0deN7Oikg3rOlFI9Ky84LqdseTmmx9xSAC+6HZvnXBoepB8RbV8Zw== 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=at6np8YpD6vbG5XkPNhnpT8Ue/atgoAQkkRRXoPY2rU=; b=QPPixJzIv05ur3FQyBCJA1QJppaxwBaZeXSKfwOOdSbO0wpkRGiCZqJlJoTUJLq82eEQmEDNlwLCIhgBl8XrS4bYNlM31j4O/hfuTqd4Y/DEC3XFrENR6ah6rFlcLLLkScibblxI7ajC9cpPSxU+eBaQTQAl5Hb7faW/JQxI+85yphuAnfZRBMUx5211FGg1tGQJnyaOSG4Zs14p4FqCXolMmLOCnyTOk6amfFtUrshUtbKtaX6xKZK8zfkjL7lotE0WzxgKahJmztJfCindkicc6Msl66iCULEtCElw/Xki0Q+0e4QbX/ROkg5YHHioNWhTalnnRI9/CQIXq/IWFw== 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=at6np8YpD6vbG5XkPNhnpT8Ue/atgoAQkkRRXoPY2rU=; b=CG3V5VP3MPoQhs8f69vECcvpS2Dk7Rf0Le7h2pACVlHp4PGRxx8NPpV6k9mee66QXSOf9IDWNasKELimPKmQKqb2+RkS6tSdSb/JU7dYVlMwsElZJHAzpaS620Be0eWEBtYwz7j5UVhpTxP5ABBLdRU5MCk3MLO+9oVy0lyGIBY= 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 HE1P190MB0058.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:ca::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Wed, 19 May 2021 14:34:42 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a%5]) with mapi id 15.20.4129.033; Wed, 19 May 2021 14:34:42 +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: [RFC net-next 1/4] net: marvell: prestera: try to load previous fw version Date: Wed, 19 May 2021 17:33:18 +0300 Message-Id: <20210519143321.849-2-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210519143321.849-1-vadym.kochan@plvision.eu> References: <20210519143321.849-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) 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 AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.33 via Frontend Transport; Wed, 19 May 2021 14:34:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eda62854-34e9-4560-674f-08d91ad33d62 X-MS-TrafficTypeDiagnostic: HE1P190MB0058: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:254; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c+j5frUZE7BAyyNFkGdkXFhXmw79wJrrUEOqc/wIXve7enjeXJM/Gsm9wV12t6unj0qa/h5hp4vx6erHLtA9mO6y8PTigKhjB4GbbuDNhyN0LZIQykJ1N18GoISIXPjT8WX92jrdXPRcgXGAGfYfR6cVMcraGhiP3Cp4e6NlwWLJ+rqhwVjOcSWwbhuIYSzXBuZz0VYml2wOthgMbZogtP0Cljog2tNlgnfLr53qUkPuwW67uBjnRi6Fw2D0+G931k4VJMfsFfBQ/HZSt3W+4XbYocwYcnYUvS4KUBQaC5qgPyafUnEYP1uF877aHQHKVM7wVb+T1fJC7BOdVqa59DutfVsMs9IrTMQhip4rdl1fAmi82zQAOmol2bULETFyTmPGSgABmlWu+5F+RV/Kmf4pY8jkr0jsWLhvgQoqEgvckqsSwhKalzRDUIRFm1Ik1gA7HGotg87Qu//tNDtApCPVo8vKJlozY0meDJ3oLHmJb4cKxxMeqMADGvO/w4hqOuTpcckC9isplZknx6gOoblwvR9jPVZ7EnX7r9iKzXgJLjjVz/aoNXRaRK/OIBbRp9cLhxkD3tmFKLlXTNFL6r+faBMWuL7CQ7IesUwd8s+kzWjUE+2vPhNAqOStoHxbffYRFcPnDePwpFnUC8fkOA== 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:(366004)(396003)(376002)(39830400003)(136003)(346002)(66946007)(478600001)(4326008)(316002)(38350700002)(38100700002)(52116002)(5660300002)(16526019)(66476007)(110136005)(66556008)(186003)(6486002)(54906003)(2906002)(36756003)(8676002)(2616005)(956004)(26005)(86362001)(1076003)(6506007)(44832011)(8936002)(6512007)(6666004)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: RqHwS8XtOvjJc1JopveUWLBm6nLjNFi7eQzkqiwdTOvmGggbAyk6l3Q95Dn8WmGZDViRN8aTQjQ/vTEhK4Ywl2R2Negc86kbqGp8Jd7jRrxG+KlQ983jfPgGiAxYRsKCV8/eYaYZKh1uuDBazwLGwB1IRIx405ARrekJXRh8Ne8PStZfB7/v9l1lvAmyyDx8k9QAK1lf6cNkMrc1wXNTLsYPHyExpfjxTR2lNuJDyAMAAK/rxJwGhBNGrRnhhYMDDLe7K3P/Vfn2++qPtwxCI9y5Qyoz+WUtn1htk+89fhSjz7roPI4YQd+6O0AOwG81WUccGlMPQW3b+svsJ2uYo64OUxxVctgr3hhAj9OIk4a1ilfjWv1rikwN7njihEiFkIR6bZNPNPbMSlVMQDNuaRP9YN/uC7FLPKzeiIPySTF6EwLg7QzcriijYnicykvhBkdau2ovUkIZ18lUV4BEdd7vUKe30EHJd+JdAzRb5UWNiT/crFVSnc0dsSaDcf++rhYLWOq+EuaOOcKZpoRaiWSBJlGyxKm4d0zHFGBI1w+ze3sTzIofexgLG+TrSKx12t9EUzN7NrqD/Go/fKU4fav95c14ykmB2I1VBVOziKrjcP4POjY27U4EET/s6KAkQSFaI7tzk+owTOUDMIj8NSgfB+z7BEZVHr5+ZqqG4ipx+uBuirgQ5p0HkFLammel+v3HFVJheexjV4oCURP9G9tUl2YnJytW1zZqtZX7YcvMZL5LIXHAIJFBzu3xYwq/+VGZFyrSNRqy4fezvlE9ix6aV8quC0K2jHKZcxKrJg8qd+XwHzSpHLg7rXv7Wy9+f+FWdrweBST1dQy2EI1itFgMuiWg83FrW7SZn/xoFqOPjlBYFOk5EDYV3IlYCyJzBJpHPPbStEAsfCiSmAWOSHG/x60epYouCxpcnc+vh2/lG0C1Pyymwy0syCO6Vf2MT6ZUGSgqxXeP7ued260HqaPG9+lZtYxhh3K5ulHDYqRfXZ6grFBBJ/Oa6MGFj3Yldt7j7Lk61JFQf90c9u3C3JJW/ECWfIeM4K3joNra/p3UD3c7FLjxuzLsLgZeSIAH82goBqfgsD5sdeq7gdFn1UXfAP/VbEQ4ydG9z6tjeLhKet+cspqcgD0nKTJNrplfSYUMk4czUwncdhrnQSZQVgvRJyMjUkHeK4Kz07lBwiy+vKrQekYZIeQWtNjo2UGPFWRwgJpMpvZJIoQdPVFwAQhOdEgilCH9fZMEYVx50nYZVtZ8N72fe2AOggrcWA/yxmTa0m7E6StWjdYGv7pR1WK2U+gCnOpqCH/aLAQZQGsXu9QZR2cGczYkGQqeJDdY X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: eda62854-34e9-4560-674f-08d91ad33d62 X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 14:34:42.1315 (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: SC2D4s36j1XvtNgj7PfNgn4+fmwXu8pUieH3faLHc716Erny9E3TNU/uHJ96zaWsc9+iK1AEO4VhqFV0vlUcAYOktUwdkOd6mok8V9rC/ss= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0058 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vadym Kochan Lets try to load previous fw version in case the latest one is missing on existing system. Signed-off-by: Vadym Kochan --- .../ethernet/marvell/prestera/prestera_pci.c | 75 ++++++++++++++----- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c index 298110119272..d384dcacd579 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c @@ -166,6 +166,8 @@ struct prestera_fw_evtq { }; struct prestera_fw { + struct prestera_fw_rev rev_supp; + const struct firmware *bin; struct workqueue_struct *wq; struct prestera_device dev; u8 __iomem *ldr_regs; @@ -576,25 +578,24 @@ static void prestera_fw_rev_parse(const struct prestera_fw_header *hdr, static int prestera_fw_rev_check(struct prestera_fw *fw) { struct prestera_fw_rev *rev = &fw->dev.fw_rev; - u16 maj_supp = PRESTERA_SUPP_FW_MAJ_VER; - u16 min_supp = PRESTERA_SUPP_FW_MIN_VER; - if (rev->maj == maj_supp && rev->min >= min_supp) + if (rev->maj == fw->rev_supp.maj && rev->min >= fw->rev_supp.min) return 0; dev_err(fw->dev.dev, "Driver supports FW version only '%u.%u.x'", - PRESTERA_SUPP_FW_MAJ_VER, PRESTERA_SUPP_FW_MIN_VER); + fw->rev_supp.maj, fw->rev_supp.min); return -EINVAL; } -static int prestera_fw_hdr_parse(struct prestera_fw *fw, - const struct firmware *img) +static int prestera_fw_hdr_parse(struct prestera_fw *fw) { - struct prestera_fw_header *hdr = (struct prestera_fw_header *)img->data; struct prestera_fw_rev *rev = &fw->dev.fw_rev; + struct prestera_fw_header *hdr; u32 magic; + hdr = (struct prestera_fw_header *)fw->bin->data; + magic = be32_to_cpu(hdr->magic_number); if (magic != PRESTERA_FW_HDR_MAGIC) { dev_err(fw->dev.dev, "FW img hdr magic is invalid"); @@ -609,11 +610,51 @@ static int prestera_fw_hdr_parse(struct prestera_fw *fw, return prestera_fw_rev_check(fw); } +static int prestera_fw_get(struct prestera_fw *fw) +{ + int ver_maj = PRESTERA_SUPP_FW_MAJ_VER; + int ver_min = PRESTERA_SUPP_FW_MIN_VER; + char fw_path[128]; + int err; + +pick_fw_ver: + snprintf(fw_path, sizeof(fw_path), PRESTERA_FW_PATH_FMT, + ver_maj, ver_min); + + err = request_firmware_direct(&fw->bin, fw_path, fw->dev.dev); + if (err) { + if (ver_maj == PRESTERA_SUPP_FW_MAJ_VER) { + ver_maj--; + goto pick_fw_ver; + } else { + dev_err(fw->dev.dev, "failed to request firmware file\n"); + return err; + } + } + + if (ver_maj < PRESTERA_SUPP_FW_MAJ_VER) + dev_warn(fw->dev.dev, + "using older FW version %u.%u than expected %u.%u\n", + ver_maj, ver_min, + PRESTERA_SUPP_FW_MAJ_VER, PRESTERA_SUPP_FW_MIN_VER); + + dev_info(fw->dev.dev, "Loading %s ...", fw_path); + + fw->rev_supp.maj = ver_maj; + fw->rev_supp.min = ver_min; + fw->rev_supp.sub = 0; + + return 0; +} + +static void prestera_fw_put(struct prestera_fw *fw) +{ + release_firmware(fw->bin); +} + static int prestera_fw_load(struct prestera_fw *fw) { size_t hlen = sizeof(struct prestera_fw_header); - const struct firmware *f; - char fw_path[128]; int err; err = prestera_ldr_wait_reg32(fw, PRESTERA_LDR_READY_REG, @@ -632,30 +673,26 @@ static int prestera_fw_load(struct prestera_fw *fw) fw->ldr_wr_idx = 0; - snprintf(fw_path, sizeof(fw_path), PRESTERA_FW_PATH_FMT, - PRESTERA_SUPP_FW_MAJ_VER, PRESTERA_SUPP_FW_MIN_VER); - - err = request_firmware_direct(&f, fw_path, fw->dev.dev); + err = prestera_fw_get(fw); if (err) { dev_err(fw->dev.dev, "failed to request firmware file\n"); return err; } - err = prestera_fw_hdr_parse(fw, f); + err = prestera_fw_hdr_parse(fw); if (err) { dev_err(fw->dev.dev, "FW image header is invalid\n"); goto out_release; } - prestera_ldr_write(fw, PRESTERA_LDR_IMG_SIZE_REG, f->size - hlen); + prestera_ldr_write(fw, PRESTERA_LDR_IMG_SIZE_REG, fw->bin->size - hlen); prestera_ldr_write(fw, PRESTERA_LDR_CTL_REG, PRESTERA_LDR_CTL_DL_START); - dev_info(fw->dev.dev, "Loading %s ...", fw_path); - - err = prestera_ldr_fw_send(fw, f->data + hlen, f->size - hlen); + err = prestera_ldr_fw_send(fw, fw->bin->data + hlen, + fw->bin->size - hlen); out_release: - release_firmware(f); + prestera_fw_put(fw); return err; } From patchwork Wed May 19 14:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 443897 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 82A8CC433B4 for ; Wed, 19 May 2021 14:34:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6744C613AF for ; Wed, 19 May 2021 14:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348031AbhESOgP (ORCPT ); Wed, 19 May 2021 10:36:15 -0400 Received: from mail-eopbgr50128.outbound.protection.outlook.com ([40.107.5.128]:4932 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1347905AbhESOgH (ORCPT ); Wed, 19 May 2021 10:36:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IyOwio0FSdTLTgl2XTKhwe1ON0/03A8InmPh7+lTx0XsHxa75Hu49ThFTVz9Ur55paQJf/9x0p/Qe/NeRSVFqMEset3OE18FglU5d5hIRZXg7mTskBCosmuT7OVrjnGIZoUnu1eBSFtS9mILhrmBL1yGbQ6Yt30lUXebBdx7qWDQLiIP69lLj2uX9daZvWbQCMVjhgBH9hIJYZUt0wckzEfgbseQ8bPs3ISG/zp21wvJAhLHxr5rNbusA8yhjdp9CSoI57Brai24oTt1wz6NHfSFJd/0XKCobxB7MdKSPfmLWpyzmVc5oIv92eMu90ThvnnBbwkYFpeeyO5TZzw3DQ== 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=h4YhyQ+luXaCasg21ELxIVG0PGOo2ZGaFRKq4gyC204=; b=m3BzEPVOsXr5zaFrLS7+VvOKelxZaA7UGW2oaEpsP8SkDlBfaZ7c5v88MnjJV5GlsbK+Z0lkUBrjvi1D7GAFGR41rfLyQ/9+s64iBHmhz2lvH3Doc+77Vwu48TkfWSQ6Jnh3nh4dm2vGvxFajpY3MQVm7IZLPv6zILF1rSuk4voYaaEv5MA3iEUALUx+tmbsCu5/wwh1CjRjYmCu57IqpBZgOCp3A6MQnEsUaxIRGApqEHAgRHuqmlqNeiH1fczFyqPVU4l+DDbgaxNN6gIdbLQ7ZwAUl163dFMWdtHGRRRvDfCChEEq0W4pZ7zppbElXEN9N+mMSLzyLIwWXgUZrg== 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=h4YhyQ+luXaCasg21ELxIVG0PGOo2ZGaFRKq4gyC204=; b=RMMg6ikHQfT4c4jx2dx0WOKsWqWM0yapQSpkDTWX1AR3oPVNXYxLSbytmmNJSeHxgahbGVb0y87S45NeAA6O6LZJWVgUdS2HkJN2a0+NvI2wN8rrdPhUqZx9sjHSHq31y+83PRq6VT1tJ30p1CUZ5fSwxVI+zhJQ0qY+vdw8I1U= 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 HE1P190MB0058.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:ca::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Wed, 19 May 2021 14:34:43 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a%5]) with mapi id 15.20.4129.033; Wed, 19 May 2021 14:34:43 +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: [RFC net-next 2/4] net: marvell: prestera: disable events interrupt while handling Date: Wed, 19 May 2021 17:33:19 +0300 Message-Id: <20210519143321.849-3-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210519143321.849-1-vadym.kochan@plvision.eu> References: <20210519143321.849-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) 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 AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.33 via Frontend Transport; Wed, 19 May 2021 14:34:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8099301-5ef1-487d-6683-08d91ad33de5 X-MS-TrafficTypeDiagnostic: HE1P190MB0058: 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: hS/MsLZ2JLqzHCB7oQkWFT9pCe1A/m+f5My1zogQxdFtQMEEiZXCe5Ok32tteDDb90ttL5gliDLyCF3BQlck1HQ/Dfr47CVO7YAWNNgMSXHcEz9GwXE9GaiW7aqn2mmGqMvVqgeLT6W6MzwSqDoyu06PesKjRPCWaf0dTbL3DecpBLNWOT97Pkjrm697mbvK0IFoLn82nuII6gsUkzXZgq8O7US8JnEtV6nh2oh34CRS8I9Rd+dasMiOkuXFtrVKUunxTGfcBDA2xjoD/Kww3ru4dZ+6Jn1sF6WtwIQh11gLwbdKvGJYD0pK/IaqMiBX4xLeucamEBQCvHaHOVsmd3eS/FvGp/2+OljLpQYHevcRUWjSjSkkORGcQGtFD5IltRttDJrEgSS7oXQjwEC9ALm3k6PjzwCRI/3I7diGOVawpnaXQBLJdn6OfEG8Zm591/LWwrdST6d/LjrVZiXbE8dwYFsgGBVLDpBFBCYhvQ3WomCW3k13J/MCXvv61ESLyemQRzcTFnGkmM2YT/yKaUtE+J0ajvpZbbiACcp668aDWpronwkLEeD8F3xde/PaL3sRTg9j7hC+xhvR79ziwAAo7kk3ZJ4O5MrT8tqDut3uz7UGMk7J0Sxe2AkUyAJzHfRnlZEpEr2k9SYLanJQCg== 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:(366004)(396003)(376002)(39830400003)(136003)(346002)(66946007)(478600001)(4326008)(316002)(38350700002)(38100700002)(52116002)(5660300002)(16526019)(66476007)(110136005)(66556008)(186003)(6486002)(54906003)(2906002)(36756003)(8676002)(2616005)(956004)(26005)(86362001)(1076003)(6506007)(44832011)(8936002)(6512007)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: LJ27sp0GaJ10yKijQsYQG8qqvKVDvZ4EXiIQNe76xLgrSD63ZhwIZO7ruByQ3K/kdLU6dCKMLmTnfccHboXBK7xzMUTSxsg5BWMb3FGR7A5lEK3iKOjFz5dYvV1U0mm+45tLeqgxq4uyRwjLt3knGOxlx8cstNSQ/KAKpTAUH/9SvOrDsUCAVcpCYuteOPhhRwAjz7Zxvu+4K/aBFZrILUp9548KAJ65W/VDd8wOMVCCxs4OD8lcu8Jst3otGrlfke8FaYnKgaOLz33rMPHrl8Hs+QKl0exzj7dXPBJuFbhjRwEID2gQQ5BF29U4jSikRO3gHOWl/0CfdZmmFxVwaehEXSmnWbF3wzUHQfR78VClSEnlqIvi+h0lFN8Q2/NNKkL34Rfk7lr2SSoSa/HksPhZ6su8PIym4ysuligD0nReENNhyWZOw5rSKj+pGIPNWT/fyi0zLK18Dmm6FTCcEFSYq8ZdpCATEOHJAHZeyxLJOx0VD0XSh0K9JyIqCsMToNE3aCkGxVAoP8hAoQ+lfyg9+G/bZh+RO02OdkuA6NHnvGvtD6ao3+1MyiloxiG5mNP+DMb12+aJpF9PEEHgxZqzecP+5o7ikKpOwtl4ZcC+j1BIqhh6kMcD3qrYtHUeqFldg+h5VAQB5MpoPeCtDEOTZ3XDQDhEI4pc0HewLKPkLmPLgfqqb28WyUOmCe0bciadTDPZoGn59rjW8y+kG8QgJKF8ZdzmYHnk7WT8ibBc0qj/kL3jOAWgyyn0SeeNb3EFoi7H3ECOH7XIIU8p0EA7ehY68UKxDJojMLvjSAnAxmFwEu8T1SoykkeEEYsujFBUT0OWkij3hYugodkG05HAvIsWqByBV87BohBgV4bQzhvXV2yf4o1hvpsNI5QRb7dFRg5VzUgT6uFi8iKt+Kpf2lphK5Xte/WNCMKvsCPwzwZcrztdqxUp3BZW+RyIJkCLMSJwrmJPhCOeBVIUf84OxU0EYf2utfHJQsqRwZfM92CdlLn0q+ZwJlWX6u4CVlJ+Hrm4LLJjZuyB7ohWWj/R4JDWyDhofOVBBj6rQ1L6pOPVocsag3WqMiQtsmyYUqF1qLq5853t1z5XZtrSfH4Jey4dsJi99UIHdALma1tNx/PtyzRzKHAp8TaJ28qoLuqTS7ILfkGRJO/Ct6ib2E4WZKUzT9j0EmQalL6A0nt2/0AspXCCfr4EV6gTrm05fl6hL2eIa4rtsKK4uxfjH/l/vooeiAnvgs6BGtS7wfz4kw9NpURqoRU5NK3zWh0l5eAY7povODWmApRUdcmWW4BqPkBDq5PUPAkPx6JtFboOr6zMLMeRnAzFgpxUw0x1 X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: e8099301-5ef1-487d-6683-08d91ad33de5 X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 14:34:43.0140 (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: wglerWqAqbswrIG9AmauUjXiIQT4mARUdKcWXudYII8JHAVW5AWWs9CXwYKk5jLgoaBtgR9866YMaLpZ0wJpYtXlPelVafe504VWLacPU7U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0058 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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 d384dcacd579..7ac045e82fab 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) + \ @@ -262,6 +268,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; @@ -271,6 +286,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; @@ -290,6 +307,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 Wed May 19 14:33:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 443031 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 65C5EC433B4 for ; Wed, 19 May 2021 14:34:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4046E61355 for ; Wed, 19 May 2021 14:34:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347993AbhESOgI (ORCPT ); Wed, 19 May 2021 10:36:08 -0400 Received: from mail-eopbgr130127.outbound.protection.outlook.com ([40.107.13.127]:11181 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1347944AbhESOgF (ORCPT ); Wed, 19 May 2021 10:36:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EbcgMNLd72NHTNnczAfvBcRpw9ykRH+rRhQ0Bmen8gCobN4ooNY7xC+ccE7Yt3VDYBSd7+pMdIfPO0mvk1m/RZSO7dmUQqRRq2Ia7NRFP0zVfFBAawZ7WasI6I/9bmDfrmW77rBrnG6zjeh6S3P+HM5f/AuUnIQUdLLeeo9t8uWY+LGExOP4xC0WXvJn/GLOxvTvMt2izj755XtxTRhAqz3ArKZCryiyS4kWdNN7KC1oyj8h6QLDs0/apGHtUmOD4JDJwEClex46v4DGHyyGAcgiRYv6FJmQ2Q1xJbL1ArLjiH4BVIYKy1OmhEMsmN9c6WDzgX5bAGvLPoqQ9i49Ew== 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=5plG8tDRJvRLVsKKRKjo1qBppECZW5Ht3vnKvs1ruCs=; b=naqZqJ7A0F8QueVtDrIhB0Q2ZVyWADPBLAqBPEjQgsrKgyWd5PcDPId6TtcZfd7Wiao0YTDj5/h2oYL/6uoqmfZZxqP3MjgUkjmGgjOQtUQRxDNbJJCHZQ/Um14aBhj0a6s9kj3jTxyg0u25gGKALLZGijJWu1+roAh0PIyFjculPZetRTaHA5xhR+oZHhHs0Zri53LbdFS+npz8ZWf8S+AyPx706KsGBxO9EQ4iK2owpZSws+RY5dMDEzk9AD0ftCIfn6lJo77oO0AWmr721RzSWq+X7dVj6U0QWUnuhg1xGG3P+JVHWi0riXEs1F3XZunTErVIz2LEtosbrYJhEQ== 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=5plG8tDRJvRLVsKKRKjo1qBppECZW5Ht3vnKvs1ruCs=; b=ISIWRQgSJxYmL9jjtKzy6ozbZt6msCUSLtvmUlQzGNUr1Oicrk73Uv6cn1BaU9J3GvA16efdPnUZ67D3243CoI9Osex24nAqiZDXqOCYPKQRoZF2r8ytUeezec5p8zvECEkEA/wo7Ko47cnZpHjJO5RBaUhQw+/5juppKnbs4n8= 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 HE1P190MB0025.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:c0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Wed, 19 May 2021 14:34:44 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a%5]) with mapi id 15.20.4129.033; Wed, 19 May 2021 14:34:44 +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: [RFC net-next 3/4] net: marvell: prestera: align flood setting according to latest firmware version Date: Wed, 19 May 2021 17:33:20 +0300 Message-Id: <20210519143321.849-4-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210519143321.849-1-vadym.kochan@plvision.eu> References: <20210519143321.849-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) 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 AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.33 via Frontend Transport; Wed, 19 May 2021 14:34:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4765fe5-f5e6-48ec-06f9-08d91ad33e9b X-MS-TrafficTypeDiagnostic: HE1P190MB0025: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZIziyrgoWnh5u9jY4xvUZ5oMyNLY2TnOd8KnvLinTAl5QT2+Sxii0t9dQPey1kszU81/JVKI8U/JuBCoLCh/Z4FPGGt5DS4Mq9XuuUI2xWxhXi0fYoWC1okCab6siDQiIDv/ROE8X14yjxaN9+0ZW0kR636Z+8Dy8BdbMfnfoJIJUXUi3SjMIGHz6a6dkxJTWUts1112qqXsJFXOL+YWzXS2soUQjdiSgg6S3YE+rQiI8wdF1R43D7aorrdD1AqsRWq4vSUMu/6NPZkr8R4lszBlJ5hYV47kGnvCBubQC50ImadZ4GTmVKlBRsPId/BLmQ8bsVQHK3GCVX4TAZ/WTKw74PVDO+FntTpLlRkRS8lXb/h20szssGdIvVA4CuC1x34dxH/TkJJ7exO/lVotjkoqGyW4XXTBHqpE3Rj7dWQ2kET2qZWFdh8Dr+mumSLFl54XsqStO4SFNI9X9XEN0q3LEOaabz0KhTpfAUyb6Ppb+Mlo9sUXlq+8ffJ81wXpzdPeH8vJYAx/XI5ifjZzDUHNrNr/M+Pi7JPm6jEjiA8sWJpEqt9rmV8GzLloFS+jpQHLyKHL+WCI3T3MchF4SpTIgvHdojhoWUJz+bP51qRkzHu4zy6S33VNCfrh7WNNuKzZ2qlgKe+V3B0yBn4UjA== 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:(396003)(366004)(39830400003)(376002)(346002)(136003)(66556008)(66946007)(38350700002)(316002)(66476007)(38100700002)(5660300002)(86362001)(52116002)(8676002)(54906003)(6666004)(1076003)(8936002)(478600001)(26005)(110136005)(44832011)(6506007)(6486002)(16526019)(186003)(956004)(2616005)(4326008)(36756003)(2906002)(6512007)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: WuCc2+/y5l2/rSR9fEt3UGX5cFGLcQT00b4PYsL0mcZprohXkK2D9RUzNi+ZU9eHeyIF+9t6CIY8fQ6yLzJdFH6+a2LNz9OvjyfT1S98WFhArC5jWx7fgh/M82XiNzJNX1fr4fpPs/CbsipoipWA1G2ALbmEgmcwx8auiwzgg+Vy3f1uligxo2LYGZBzaSGvlfIPejlEloK4LHSRfD+1pk1OFPUAAFo0013aY/epIcEnJjhrWpNdk5MlCORfxVGYJyf9GJYgODXg1LopTvmNkZoPre7ExZOXOc2gBoiJEsihOzu4K8CqxHp4WUH7Zt9SvKyXU77op6HEBVxMWsncZ4eDLO7EfWOPqxPwP7lX0yuSSK2WgvN6ahKPv0gyAcblDGDr3DWXHncFjDHvYEFG9aW4hqrk3lpI96MpFxDZ5FMDnGbp+rxZKiS0zOeflCFnKhsJtbtuzG3pLctI4fOCqwsTRXdr3zk+1agh677XbMABiquFXsmK5WgutyI2srtFI+n7Ye67rJumHU8UcoDvJPjVnhRTDlDgc/AGTX9KzPOCs0SQpcuh7Ap/InjpdpMYbudXGO9KEzQ1To4AS9QrIOAZ57bZIF5cd/+rd8JTkiowqxVxyPRVdimcNKGsArYsU30iXt9pTzUKMYrBs3+WnaXI3799Ke570LhMxpCU4eDV1fgokyncje3o4DmNmfIW+FXNRzHpMvUctMIZjOwxmEKjcMepkAF7rV9mhyJgHYa5NBkdxDBRsknRsR/ci/14zzdIF6M0Oj2aaZB9H1pQ7YTPeR2B/luBFTLGEQdcXyHr22ZAaxhI8Z82R+tyiBR7/MbeF3GcbyqqcXoll/o3Ce0argVnt0fY2AdgYR1/5m+sAtJYJ/hPKJOdeT0ckVGYaWf0iXL5eMv7fYgQM/9RlVEo8q/VrHsQSCYGDZmKnbw3jUIDLWBW0K9praJR3ucqfPiNLc7tgF35r6ZoVFSXt6hez4sqqhXpZxRPjXTakI5wnGmyuSc7KiZOdbXJHih4g1tzEtT2o0oM9lqalW7Up43MhxMyh0TRcA6zSd9x2fb1MgbHVdNDaj2qPErAEsylEhynLAfLD14V/rXePPD9Y+wdGuVe40d8gOsmsLOcHYocDO3LcgPL4TBEpmTx/jWiylmr6MQIWAbiRgCCfwN8FQmjE0qnV7G1bCblS+oaJAoin4FgmGYgqt73dq8mNVCQMwiJC8AmVqQ8MJyYcRzZ70d7PKKH3uzwH7sb6EmEBfdtxJKIOEyJsciMRSyU1F/oQZIqfPq1O/O69NwdLECT1LVTh9buc6o94OQX4rMogGfiZaIWNepD0rENQrALQ2w4 X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: d4765fe5-f5e6-48ec-06f9-08d91ad33e9b X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 14:34:44.1663 (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: 8QKlQG369hyBygxt0jhy23Pw93+6+os7lyQV6z8zZDO6O+MaB1ydVJ1ocQi/AlHY9ckFjnoCRPsMm5yS0a7aWHmHZC4eYurUsFpY32x4HLo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0025 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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 --- PATCH -> RFC: 1) Add support for previous FW ABI version (suggested by Andrew Lunn) .../ethernet/marvell/prestera/prestera_hw.c | 85 ++++++++++++++++++- .../ethernet/marvell/prestera/prestera_hw.h | 3 +- .../marvell/prestera/prestera_switchdev.c | 17 ++-- 3 files changed, 94 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_hw.c b/drivers/net/ethernet/marvell/prestera/prestera_hw.c index 0424718d5998..96ce73b50fec 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_hw.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.c @@ -2,6 +2,7 @@ /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */ #include +#include #include #include @@ -85,6 +86,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 +194,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; @@ -205,6 +216,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_ext; }; struct prestera_msg_port_attr_req { @@ -988,7 +1000,43 @@ 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) +static 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_ext = { + .type = PRESTERA_PORT_FLOOD_TYPE_UC, + .enable = flood, + } + } + }; + + return prestera_cmd(port->sw, PRESTERA_CMD_TYPE_PORT_ATTR_SET, + &req.cmd, sizeof(req)); +} + +static 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_ext = { + .type = PRESTERA_PORT_FLOOD_TYPE_MC, + .enable = flood, + } + } + }; + + return prestera_cmd(port->sw, PRESTERA_CMD_TYPE_PORT_ATTR_SET, + &req.cmd, sizeof(req)); +} + +static int prestera_hw_port_flood_set_v2(struct prestera_port *port, bool flood) { struct prestera_msg_port_attr_req req = { .attr = PRESTERA_CMD_PORT_ATTR_FLOOD, @@ -1003,6 +1051,41 @@ int prestera_hw_port_flood_set(struct prestera_port *port, bool flood) &req.cmd, sizeof(req)); } +int prestera_hw_port_flood_set(struct prestera_port *port, unsigned long mask, + unsigned long val) +{ + int err; + + if (port->sw->dev->fw_rev.maj <= 2) { + if (!(mask & BR_FLOOD)) + return 0; + + return prestera_hw_port_flood_set_v2(port, val & BR_FLOOD); + } + + if (mask & BR_FLOOD) { + err = prestera_hw_port_uc_flood_set(port, val & BR_FLOOD); + if (err) + goto err_uc_flood; + } + + if (mask & BR_MCAST_FLOOD) { + err = prestera_hw_port_mc_flood_set(port, val & BR_MCAST_FLOOD); + if (err) + goto err_mc_flood; + } + + return 0; + +err_mc_flood: + prestera_hw_port_mc_flood_set(port, 0); +err_uc_flood: + if (mask & BR_FLOOD) + prestera_hw_port_uc_flood_set(port, 0); + + return err; +} + int prestera_hw_vlan_create(struct prestera_switch *sw, u16 vid) { struct prestera_msg_vlan_req req = { diff --git a/drivers/net/ethernet/marvell/prestera/prestera_hw.h b/drivers/net/ethernet/marvell/prestera/prestera_hw.h index b2b5ac95b4e3..e8dd0e2b81d2 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_flood_set(struct prestera_port *port, unsigned long mask, + unsigned long val); 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..6442dc411285 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c @@ -404,7 +404,8 @@ 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_flood_set(port, BR_FLOOD | BR_MCAST_FLOOD, + br_port->flags); if (err) goto err_port_flood_set; @@ -415,7 +416,6 @@ 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_bridge_port_delete(port, bridge->bridge_id); @@ -528,7 +528,7 @@ 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_flood_set(port, BR_FLOOD | BR_MCAST_FLOOD, 0); prestera_port_vid_stp_set(port, PRESTERA_VID_ALL, BR_STATE_FORWARDING); prestera_bridge_port_put(br_port); } @@ -590,11 +590,9 @@ static int prestera_port_attr_br_flags_set(struct prestera_port *port, if (!br_port) return 0; - if (flags.mask & BR_FLOOD) { - err = prestera_hw_port_flood_set(port, flags.val & BR_FLOOD); - if (err) - return err; - } + err = prestera_hw_port_flood_set(port, flags.mask, flags.val); + if (err) + return err; if (flags.mask & BR_LEARNING) { err = prestera_hw_port_learning_set(port, @@ -901,7 +899,8 @@ 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_flood_set(port, BR_FLOOD | BR_MCAST_FLOOD, + br_port->flags); if (err) return err; From patchwork Wed May 19 14:33:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 443030 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 90B35C433ED for ; Wed, 19 May 2021 14:34:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77F7461355 for ; Wed, 19 May 2021 14:34:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348175AbhESOgM (ORCPT ); Wed, 19 May 2021 10:36:12 -0400 Received: from mail-eopbgr130127.outbound.protection.outlook.com ([40.107.13.127]:11181 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1347957AbhESOgH (ORCPT ); Wed, 19 May 2021 10:36:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f3U6j/7AuDNIQQNQ61ruqQ1XLmnG/x7U9gpCfB3us5JP3WG5Sgsp9akWoXmHbQhH3S26i2N2/RywVGG7KJMbXTtiGqPetlESLR+6AoWQ8xtbnG9seqBS7nPga9VDaabtKd6jNTD3o8XkzQC9XFAWd7PlFGljOva2t8MKxMmFinwcl0wZgM6Qmnoq2M389foW8YRCHzfjugg9Aagfd1uuOPAXJA47tYBC+wJmqvZs+8JrZxgz0wUdeXuVpBtsRycicuiDtx6kRs2P2FvttKJjMYCw7fgPTR2fFRu3KLbshRlL6Dg5bDbwk1wDIjktNXOLKnGkezrZE+19VrDZ/tk0Jg== 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=gWBw7raq9qTGbUe6nLBfmXtp4IZ6pjhcD7FKWBOlyMk=; b=BmvBuIuv6zzGdaaX9F8rWVN67gCgFq5enZD237d77fb3HUYKfXhj8jsLyNearDmIXmHd8dWL88heyMjWLvV6w7GfNcnbZ2WeGRVsTmD+/+MZ0m1lvJoWGzFreKPnJXgKQSE+/m5M/qty+xB/iRQRQjKhKFULW5RUJwLHGemcm2fkKSvho3qlIwObDjHPA2JcTJMZDBlNHlOxWXP1nAv2WPEthsxINe2Gyoc/PxUUsHoyQO9clGrfhyi3g73i1QtMhAj/EKt6VBLtC6a6nBDqwSXTqQOUKd3Ww1GVQRwCLU/nQPEPcaQZ1qXDOqGdJqX9E8bFvi6vA2pCyAPIXH57tQ== 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=gWBw7raq9qTGbUe6nLBfmXtp4IZ6pjhcD7FKWBOlyMk=; b=RlXMfWNjGPxenHGsaXNm2ODbmzCeqY6WOeL+WZtdDWqZL7nYJYgKrGf2L6Zea7aZ3jHkZ/OoG3P0uF2KEE7xIz5FSR4WiEIwTXW5RjV8cTor+cnfk+MjXmxz9+P2tj2nzy9lxM/y4cJnAdHfxBvGAoagL79rZSsWh241VfRr/5s= 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 HE1P190MB0025.EURP190.PROD.OUTLOOK.COM (2603:10a6:3:c0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Wed, 19 May 2021 14:34:45 +0000 Received: from HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a]) by HE1P190MB0539.EURP190.PROD.OUTLOOK.COM ([fe80::edb4:ae92:2efe:8c8a%5]) with mapi id 15.20.4129.033; Wed, 19 May 2021 14:34:45 +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: [RFC net-next 4/4] net: marvell: prestera: bump supported firmware version to 3.0 Date: Wed, 19 May 2021 17:33:21 +0300 Message-Id: <20210519143321.849-5-vadym.kochan@plvision.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210519143321.849-1-vadym.kochan@plvision.eu> References: <20210519143321.849-1-vadym.kochan@plvision.eu> X-Originating-IP: [217.20.186.93] X-ClientProxiedBy: AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) 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 AM5PR0601CA0074.eurprd06.prod.outlook.com (2603:10a6:206::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.33 via Frontend Transport; Wed, 19 May 2021 14:34:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bbc9823f-9f0b-4d8e-2d38-08d91ad33f1e X-MS-TrafficTypeDiagnostic: HE1P190MB0025: 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: /WoKp8XNmGiPikXnYTk6aD6/+w4aJ7emdMUYyiZ/IZoWQsHDq/wnpu1/h52BUuEEHnnIXQ4u7qcih07WAzSkbqk3GGmLT7iuVFuHAv/bDf2nZefWlOfBK9+3c7uSEuwh/nxsrUR7aNQG+QEPaRbZn8TFMjCGqwFFca9o+IUuKQORiF3DucJnnr2W4TjofshF2VK8bwx2f08nuQGiUlV5RNRXRZU7gNMH+zEehHtnr01aKVqXwZcBapkqzSXV0/UMTv1joSVniOA8nlpmkcJ1W9iWWsANvkWENspWhpMWksacywyJfYPwnP4dQMuKg7j7IbGms8XBTGaE/Mo8gUykQl7l0YjRPdIBw86Ey9qdecuGfF5SiWT1FaQv9AS0eTyhbgMpfHGetk0/u9IabJrvCy1DNzWzXCcHDxUNFTLGv2dpj6QHBVBagKaRmN1jOWo1/cKVQn9nwnC7goH3gfEw9+5XqaWIJq93+YbII7iYaDWG1VpUIGs+2RdSejW2YJE7AAtUiMNdyn8jDDU0gRSlsX3hVgNUembgPJTtOoKh31cncRn1YcKySVZ8vO7y1egl/0u3Pqc88aTWuopB/y20rXkWcL260quLPm5PLh+LKGu8oknpCO+/+izmInReAk1LUg96Yzg0MOEtUkYJMr2GTw== 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:(396003)(366004)(39830400003)(376002)(346002)(136003)(66556008)(66946007)(38350700002)(316002)(66476007)(38100700002)(4744005)(5660300002)(86362001)(52116002)(8676002)(54906003)(6666004)(1076003)(8936002)(478600001)(26005)(110136005)(44832011)(6506007)(6486002)(16526019)(186003)(956004)(2616005)(4326008)(36756003)(2906002)(6512007)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: gtbHhvJPFf89vounfO76wuQ5UExbhYEkGZjrTZJ+Sj6+EVenVonhgOmwFf67aym+Sycp2/li45peN2UCgvnWZF/WHcCskTt/L4ZJ3oCNwAMgfEz44H9KzlwTReMlTwHv5QOMHyUL20Pynq+n30MNi+jFck+AnZx5+kTDcdDTDXCJB70e22wyngPaCpLkF5WrHFAaqtXmcPpJeV07Xrb4P4HWxoTczO7xgoyZR97uqevJAorOHo5QZnWO/3Oqq6EevazQfc7SuHVwPaBzaO7XcyH0Ko1JtYWS04pxF5D/tRrBsWHpnl1ps5O21qlOYnUaTkXNhO/YMcyFcKiYmA7+gpD5xhQlCiUju9R2GIHOD+7Q4OfHRGX5j5Qvh5hQkgZmo6W2+MiUMwlFpGNzVAavSfoyIsCK6gDZn9NPrXiTGrudsYrMCBSBf+/GyRGvpni8MdtOxoi3+HVN7jr3EVWP4aE5NxdxcXGDpCAQ4pQaXwOGTjr8+DyOKg+Cf0bnbAG6msbDHf6GEGx/Gqnp32UbVUZLd/gXDn2YZD3eCOEUJ5XMWCcUsl9dVTYKF+R+tEEjcsRTjf4F8vRhPwx60+l7Xv/GHdFx+WIX8liWu8wnT8jISTtpFJEQTjL+LVD6r7wodrR5O8k/SMSry/a6gK0EReEUd1lkCEbkwZbRpvRePJZWZhzH17YK7ry0Zq8zl8T4OYfqk0gsOuuGfsFQkbFAd8wJ1yDl+f7EPGR1Xz0LgsBAKlBX15EGbFsVC5uaOzeh/1ZucU8ctjh0vrXXLWfpWRdEtjn/n4+S9agxZZRXcVIhTrNOBNbvi4hJAtpfH+Px7lzaFM6XUQBM8H7l4sGz/rmtKZmF8H23hFZGsrDRmwkmswteIKHsfh52ghbu2lF8tuFnyLus/eIf4/AUBXaWKm1h/7t+gjM63ItGtoAPkiPBEECpmlILTEkeSX8XZOZn5aUW2DJeh+7T20tS7Qsgsrh8JPuiNQI+h66jL91tHfr+WLRxhs+uzkcAnAA5O2m8voD+znkabkTGFdNfQq06K1cpTVV+Sd8LtFBvwg18OsZVASeem168l9Gd+evc90AAM0okrE+3BS1hhkvyIvH+vXxzxRo6e80u5mZJu+STiNQt0l/N8WkaWQfMLpwNmqx6+q2oVqz54njaPfZoSc75hdBr+zNvdW3Cs2STmSpBVgyw7qvC/+4mhoCSTXYFin/J3Vf22K5W8S1syKARqbjPXXTPmdoq1vhQVt2o7JDfjD4iS0nSpOPgtUkjGJeQH0LbxAjyjzkN+l7vxKCPFub9RnMEkvjNhK/Z83VslHi/L74YKp8PgMfzhhQleqh/+lw3 X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: bbc9823f-9f0b-4d8e-2d38-08d91ad33f1e X-MS-Exchange-CrossTenant-AuthSource: HE1P190MB0539.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 14:34:45.1238 (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: P81jmp6zl880mUY5+hfNzylN5WQm4vKsiXh0zs4rbFZZVOitMZ19OE2E7bJ/Aj4N2xSDbe1ocTjSQXa1UEBR+L336riFfIwTZ00NMhHfzeg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0025 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.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 7ac045e82fab..e26f1d93606a 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c @@ -14,7 +14,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"