From patchwork Tue Mar 16 14:55:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 12142349 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, 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 2212FC433E0 for ; Tue, 16 Mar 2021 14:56:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDCD56509A for ; Tue, 16 Mar 2021 14:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237578AbhCPO4D (ORCPT ); Tue, 16 Mar 2021 10:56:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbhCPOzd (ORCPT ); Tue, 16 Mar 2021 10:55:33 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D728EC061756 for ; Tue, 16 Mar 2021 07:55:32 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id bf3so21843819edb.6 for ; Tue, 16 Mar 2021 07:55:32 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=5cY1vttggKJxfAN1gIvxnaprcsfV9QcSRjH3K9V2X4U=; b=q8f+L0OoaYxQp/tInGT2IySMb9wsEN5dBE9JYwmTMsM0jov756vFi9PyoNuxqzSQDJ 0eoLt4vc+85sYtnh1fUFsInGCDaMuPRCHL1CKg/5/tUSYmYek4Sv3XWPO0TPw4kLanYt UEHkdC+4jxuFoLCaOTUDq6ZlefCqe3WZoWhU6ZCwiGuT192WGGCet95NVvSLIYsOow7A rbOIGlYCzybwNw7Jnxe3bzFR4FOhYryuJaZ7VEjHyAdL1SMtzH9qq0szDO4Y2HUmzRQr Gw4pSlQdzY/FypsNX8XtR0HxinaaN5eDYUZPe7oAX3UmAGnXAVobr3j9k5mGRbVEEKsU XzFg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=5cY1vttggKJxfAN1gIvxnaprcsfV9QcSRjH3K9V2X4U=; b=Gn+YKAfKurSko2oms5kEeCT2Xouh9amSzYvyDVD2+KZvdhncJ7xK+Po22oFVtOstVl aSOO6frw5Hm1rt4mmJol0h4HxBZujsoJVPqYmKR3Wl92itR0zo3x38wNFDVzBOALVeAA T0ckvHs3QnbcJ4TCiRtzNrbRTXca/92chx+lOfb1brLTr20BlHHBkiIfQUCH44DROczF QU2hwCIy3NuYt8I+4W10BPHtsJ1Khj0SKf9rT5miVeOYX/iOlKB1WXHGZS2z2lkvt18e DInegUV67PkZKQmbAhkeuk7yztp53nx5O7//p4lL4e6qyPhQScuMcpfZGyse03yo3F+0 8SFA== X-Gm-Message-State: AOAM530W89Mgh7Ll0u00XcOHQxm2wwpxPOvUa+iZAaeFtqd48lXU08L3 1jWi0Koo8l9nwWELxFROejGwYWlVhiI= X-Google-Smtp-Source: ABdhPJyoJn27BeFC/cHs4v9BJuDh6QIJlfXUhohByU1dOkYwG+NGFglJqxxdvC/5qySnEAMuTQp8jA== X-Received: by 2002:aa7:c403:: with SMTP id j3mr36565981edq.137.1615906531538; Tue, 16 Mar 2021 07:55:31 -0700 (PDT) Received: from yoga-910.localhost (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id w18sm9681402ejn.23.2021.03.16.07.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 07:55:31 -0700 (PDT) From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, yangbo.lu@nxp.com, Ioana Ciornei Subject: [PATCH net-next 1/5] dpaa2-switch: remove unused ABI functions Date: Tue, 16 Mar 2021 16:55:08 +0200 Message-Id: <20210316145512.2152374-2-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210316145512.2152374-1-ciorneiioana@gmail.com> References: <20210316145512.2152374-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ioana Ciornei Cleanup the dpaa2-switch driver a bit by removing any unused MC firmware ABI definitions. Signed-off-by: Ioana Ciornei --- .../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 7 -- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 70 +------------------ drivers/net/ethernet/freescale/dpaa2/dpsw.h | 6 -- 3 files changed, 1 insertion(+), 82 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h index eb620e832412..2371fd5c40e3 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h @@ -75,8 +75,6 @@ #define DPSW_CMDID_FDB_DUMP DPSW_CMD_ID(0x08A) #define DPSW_CMDID_IF_GET_PORT_MAC_ADDR DPSW_CMD_ID(0x0A7) -#define DPSW_CMDID_IF_GET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A8) -#define DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A9) #define DPSW_CMDID_CTRL_IF_GET_ATTR DPSW_CMD_ID(0x0A0) #define DPSW_CMDID_CTRL_IF_SET_POOLS DPSW_CMD_ID(0x0A1) @@ -443,11 +441,6 @@ struct dpsw_rsp_if_get_mac_addr { u8 mac_addr[6]; }; -struct dpsw_cmd_if_set_mac_addr { - __le16 if_id; - u8 mac_addr[6]; -}; - struct dpsw_cmd_set_egress_flood { __le16 fdb_id; u8 flood_type; diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.c b/drivers/net/ethernet/freescale/dpaa2/dpsw.c index 5189f156100e..f94874381b69 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.c @@ -397,7 +397,7 @@ int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io, * @if_id: Interface id * @state: Link state 1 - linkup, 0 - link down or disconnected * - * @Return '0' on Success; Error code otherwise. + * Return: '0' on Success; Error code otherwise. */ int dpsw_if_get_link_state(struct fsl_mc_io *mc_io, u32 cmd_flags, @@ -1356,74 +1356,6 @@ int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, return 0; } -/** - * dpsw_if_get_primary_mac_addr() - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPSW object - * @if_id: Interface Identifier - * @mac_addr: MAC address of the physical port, if any, otherwise 0 - * - * Return: Completion status. '0' on Success; Error code otherwise. - */ -int dpsw_if_get_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, - u16 token, u16 if_id, u8 mac_addr[6]) -{ - struct dpsw_rsp_if_get_mac_addr *rsp_params; - struct fsl_mc_command cmd = { 0 }; - struct dpsw_cmd_if *cmd_params; - int err, i; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR, - cmd_flags, - token); - cmd_params = (struct dpsw_cmd_if *)cmd.params; - cmd_params->if_id = cpu_to_le16(if_id); - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpsw_rsp_if_get_mac_addr *)cmd.params; - for (i = 0; i < 6; i++) - mac_addr[5 - i] = rsp_params->mac_addr[i]; - - return 0; -} - -/** - * dpsw_if_set_primary_mac_addr() - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPSW object - * @if_id: Interface Identifier - * @mac_addr: MAC address of the physical port, if any, otherwise 0 - * - * Return: Completion status. '0' on Success; Error code otherwise. - */ -int dpsw_if_set_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, - u16 token, u16 if_id, u8 mac_addr[6]) -{ - struct dpsw_cmd_if_set_mac_addr *cmd_params; - struct fsl_mc_command cmd = { 0 }; - int i; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR, - cmd_flags, - token); - cmd_params = (struct dpsw_cmd_if_set_mac_addr *)cmd.params; - cmd_params->if_id = cpu_to_le16(if_id); - for (i = 0; i < 6; i++) - cmd_params->mac_addr[i] = mac_addr[5 - i]; - - /* send command to mc*/ - return mc_send_command(mc_io, &cmd); -} - /** * dpsw_ctrl_if_enable() - Enable control interface * @mc_io: Pointer to MC portal's I/O object diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.h b/drivers/net/ethernet/freescale/dpaa2/dpsw.h index 9e04350f3277..e5e9c35604a7 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.h @@ -707,12 +707,6 @@ int dpsw_get_api_version(struct fsl_mc_io *mc_io, int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, u8 mac_addr[6]); -int dpsw_if_get_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, - u16 token, u16 if_id, u8 mac_addr[6]); - -int dpsw_if_set_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, - u16 token, u16 if_id, u8 mac_addr[6]); - /** * struct dpsw_fdb_cfg - FDB Configuration * @num_fdb_entries: Number of FDB entries From patchwork Tue Mar 16 14:55:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 12142351 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, 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 5A114C4332B for ; Tue, 16 Mar 2021 14:56:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 342DF6508A for ; Tue, 16 Mar 2021 14:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237641AbhCPO4X (ORCPT ); Tue, 16 Mar 2021 10:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbhCPOze (ORCPT ); Tue, 16 Mar 2021 10:55:34 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0F1C061762 for ; Tue, 16 Mar 2021 07:55:33 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id dm8so21889842edb.2 for ; Tue, 16 Mar 2021 07:55:33 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=GOcsnumBGmuLOKygYRRBDZmidHGd/6joY3FP+GTAY7I=; b=G+FgMMaR39LMpPD6BBXvYgNrwdUWvpnL6fCy4W5c74w+CPehqS2IfJ0Qg6tUtQWqpl NRr+TUnJqSGjeUWT5/TPkDM+IOFkDd6rK0Hxp4HIc/WVVwgx6bmmXUjNW7a/HTF1Ms+e 8Ew5G0Zu/xAOtz3bPOKVI/vW9JvbM/0ElmpJ4jEt0fhzsNH31XkTbVPpwviQUtrvFRN7 EYrgyEsQ+nYRm8E7Y2NxODgeibhHnuM24xclJCHC+/7mZnFwAJcGvxlirKhLbvI1oIn5 UiseQhAI2o9jaYhuGFAJTGYfPfv4TX6mTBLOgpHW88BiCX2sm3uYeMJx35xtx9+TD5pV VRcw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=GOcsnumBGmuLOKygYRRBDZmidHGd/6joY3FP+GTAY7I=; b=Z2vNCjQfhxfHAOs66W3K0aT7mfg98PlIs0Lm8IXfyWp1DrAQsrdanr0RmOkiadyu7N 8gTDtfN53e6tVOYfqCaILDAt0ZytW2fSBcN4u0TcxGRBuOHBsXtbnl/X3qFnbRZII+Mf q0uq5h1RCS0gn1PdyZDRZegOdRscBkD2qbql0UGtT9Kd246seJlhxNcLJiqM0+Uw8Ka8 ++yirhJoDg8kUpRJL2J668OUmcKEImopSTZSza1ZeoO9XLbLER8c8k1tj11tOneE4NNB HjqIVmxWnxavgTQTJY+fLIe1mbtzFpD9Mj7OgLGLI+lsEtHwxdFCFZuNQY6kYN0GQj8L 3iCQ== X-Gm-Message-State: AOAM531Mom2ZkLiLHZrwvw8qmry/lQvbCAz2GUcWXBBIXAGjA6HsnA2l Wloy7GXYIgoeQINLg6WKKKk= X-Google-Smtp-Source: ABdhPJxEtst1VRXWGmdgWWYXg6Zcnwr1v6JczxBlmzhdbl8P3YlQU1kIg0Ukz2yrxVtQI8zcSFXW+g== X-Received: by 2002:a50:e882:: with SMTP id f2mr36669136edn.184.1615906532427; Tue, 16 Mar 2021 07:55:32 -0700 (PDT) Received: from yoga-910.localhost (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id w18sm9681402ejn.23.2021.03.16.07.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 07:55:32 -0700 (PDT) From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, yangbo.lu@nxp.com, Ioana Ciornei Subject: [PATCH net-next 2/5] dpaa2-switch: fix kdoc warnings Date: Tue, 16 Mar 2021 16:55:09 +0200 Message-Id: <20210316145512.2152374-3-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210316145512.2152374-1-ciorneiioana@gmail.com> References: <20210316145512.2152374-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ioana Ciornei Running kernel-doc over the dpaa2-switch driver generates a bunch of warnings. Fix them up by removing code comments for macros which are self-explanatory and adding a bit more context for the dpsw_if_get_port_mac_addr() function and the fields of the dpsw_vlan_if_cfg structure. Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 2 +- drivers/net/ethernet/freescale/dpaa2/dpsw.h | 57 +++++---------------- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.c b/drivers/net/ethernet/freescale/dpaa2/dpsw.c index f94874381b69..ad7a4c03b130 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.c @@ -1319,7 +1319,7 @@ int dpsw_get_api_version(struct fsl_mc_io *mc_io, } /** - * dpsw_if_get_port_mac_addr() + * dpsw_if_get_port_mac_addr() - Retrieve MAC address associated to the physical port * @mc_io: Pointer to MC portal's I/O object * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' * @token: Token of DPSW object diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.h b/drivers/net/ethernet/freescale/dpaa2/dpsw.h index e5e9c35604a7..6807b15f5807 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.h @@ -14,17 +14,10 @@ struct fsl_mc_io; -/** - * DPSW general definitions - */ +/* DPSW general definitions */ -/** - * Maximum number of traffic class priorities - */ #define DPSW_MAX_PRIORITIES 8 -/** - * Maximum number of interfaces - */ + #define DPSW_MAX_IF 64 int dpsw_open(struct fsl_mc_io *mc_io, @@ -36,30 +29,20 @@ int dpsw_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -/** - * DPSW options - */ +/* DPSW options */ /** - * Disable flooding + * DPSW_OPT_FLOODING_DIS - Flooding was disabled at device create */ #define DPSW_OPT_FLOODING_DIS 0x0000000000000001ULL /** - * Disable Multicast + * DPSW_OPT_MULTICAST_DIS - Multicast was disabled at device create */ #define DPSW_OPT_MULTICAST_DIS 0x0000000000000004ULL /** - * Support control interface + * DPSW_OPT_CTRL_IF_DIS - Control interface support is disabled */ #define DPSW_OPT_CTRL_IF_DIS 0x0000000000000010ULL -/** - * Disable flooding metering - */ -#define DPSW_OPT_FLOODING_METERING_DIS 0x0000000000000020ULL -/** - * Enable metering - */ -#define DPSW_OPT_METERING_EN 0x0000000000000040ULL /** * enum dpsw_component_type - component type of a bridge @@ -116,15 +99,13 @@ int dpsw_reset(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -/** - * DPSW IRQ Index and Events - */ +/* DPSW IRQ Index and Events */ #define DPSW_IRQ_INDEX_IF 0x0000 #define DPSW_IRQ_INDEX_L2SW 0x0001 /** - * IRQ event - Indicates that the link state changed + * DPSW_IRQ_EVENT_LINK_CHANGED - Indicates that the link state changed */ #define DPSW_IRQ_EVENT_LINK_CHANGED 0x0001 @@ -229,9 +210,6 @@ enum dpsw_queue_type { DPSW_QUEUE_RX_ERR, }; -/** - * Maximum number of DPBP - */ #define DPSW_MAX_DPBP 8 /** @@ -293,21 +271,9 @@ enum dpsw_action { DPSW_ACTION_REDIRECT = 1 }; -/** - * Enable auto-negotiation - */ #define DPSW_LINK_OPT_AUTONEG 0x0000000000000001ULL -/** - * Enable half-duplex mode - */ #define DPSW_LINK_OPT_HALF_DUPLEX 0x0000000000000002ULL -/** - * Enable pause frames - */ #define DPSW_LINK_OPT_PAUSE 0x0000000000000004ULL -/** - * Enable a-symmetric pause frames - */ #define DPSW_LINK_OPT_ASYM_PAUSE 0x0000000000000008ULL /** @@ -376,10 +342,11 @@ int dpsw_if_get_tci(struct fsl_mc_io *mc_io, /** * enum dpsw_stp_state - Spanning Tree Protocol (STP) states - * @DPSW_STP_STATE_BLOCKING: Blocking state + * @DPSW_STP_STATE_DISABLED: Disabled state * @DPSW_STP_STATE_LISTENING: Listening state * @DPSW_STP_STATE_LEARNING: Learning state * @DPSW_STP_STATE_FORWARDING: Forwarding state + * @DPSW_STP_STATE_BLOCKING: Blocking state * */ enum dpsw_stp_state { @@ -524,6 +491,10 @@ int dpsw_vlan_add(struct fsl_mc_io *mc_io, * list for this VLAN * @if_id: The set of interfaces that are * assigned to the egress list for this VLAN + * @options: Options map for this command (DPSW_VLAN_ADD_IF_OPT_FDB_ID) + * @fdb_id: FDB id to be used by this VLAN on these specific interfaces + * (taken into account only if the DPSW_VLAN_ADD_IF_OPT_FDB_ID is + * specified in the options field) */ struct dpsw_vlan_if_cfg { u16 num_ifs; From patchwork Tue Mar 16 14:55:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 12142353 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, 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 69F77C4332D for ; Tue, 16 Mar 2021 14:56:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E5856508D for ; Tue, 16 Mar 2021 14:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237645AbhCPO4a (ORCPT ); Tue, 16 Mar 2021 10:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237622AbhCPOzf (ORCPT ); Tue, 16 Mar 2021 10:55:35 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A41C2C061764 for ; Tue, 16 Mar 2021 07:55:34 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id bx7so21871154edb.12 for ; Tue, 16 Mar 2021 07:55:34 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=YceSsyGj6Df8mB1FsukmhP7Yi1mnM+5eBcLsmQTFyrA=; b=t5OtSJmN9NpAHa8KnRboyjWt53gpTY/vhfjRP2SbO9s0S5ekmPvMShyhM8mGs65MM5 BuLrR5wVdvYPadUB3VeGiikI64OJoyRZJ3z0IIbakzmS6uWxE52NGfY7TKXrwBvvkdVB Dm5xPf9b53QRfnWj7G9sWsuLubbPy8empB5VWDUFPn5f4mE+GKxQNWCI3F4C9+FYNOsp D2fUdlRZTwHbmRJq5cSfGwct4ndZ+azKjR4foTad2/PTezgz9Ih+ZCyuoIDBbaYDvCEH xu0O/vNd3xSVffE684pKB+5+PDaJLevKj8YNeNaeGHX2mWVHlQVZurEFYGTxmxoRcWkC 2Gcg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=YceSsyGj6Df8mB1FsukmhP7Yi1mnM+5eBcLsmQTFyrA=; b=uG7GyDqbuSUTuHw8bre7jDK49T1UxZnqQNnz2XNDi90Z0pgcQt3QbaZPXuwEgTtuqP 0HaYID6vC2g6rsFb8FQH/I8/jrewFCVRhE1RLUAgm8nhKiZpLXmLHeqgnS3jVkupoOVD HytRJGVkOQpUhPn4cfT9rrF7rFQkX0jcZqFVrKyN1yfJDK+9Usx7mO56xVGmEWhRWi98 FeNItO9EtSg9U1cp2MWPl0IN9R4+m6JaS0cgCWV4NnTH0SyYgcZ/wtMndkBTXBP83qZd eMREwlKo+z4WTyq/rj5byTeCPgVrootdhwzk6kjIK4mBex3TeV9MfLw3n7pFJZ249PgL I0Ug== X-Gm-Message-State: AOAM530Q+V0eskc12D13rWxi/tfdt56gDgAJYzLh7U2NEbsETEjSUs0Z GdlS+309p34oy9O5X6bGtRs= X-Google-Smtp-Source: ABdhPJz8/O5O3b2cDEnIKN35ZSu0wd/vT4LPHu85jYIzYz7eO3DfDJXRtKFeyiOncOItO07d1Ha88w== X-Received: by 2002:a05:6402:d4:: with SMTP id i20mr36864653edu.147.1615906533374; Tue, 16 Mar 2021 07:55:33 -0700 (PDT) Received: from yoga-910.localhost (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id w18sm9681402ejn.23.2021.03.16.07.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 07:55:33 -0700 (PDT) From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, yangbo.lu@nxp.com, Ioana Ciornei Subject: [PATCH net-next 3/5] dpaa2-switch: reduce the size of the if_id bitmap to 64 bits Date: Tue, 16 Mar 2021 16:55:10 +0200 Message-Id: <20210316145512.2152374-4-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210316145512.2152374-1-ciorneiioana@gmail.com> References: <20210316145512.2152374-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ioana Ciornei The maximum number of DPAA2 switch interfaces, including the control interface, is 64. Even though this restriction existed from the first place, the command structures which use an interface id bitmap were poorly described and even though a single uint64_t is enough, all of them used an array of 4 uint64_t's. Fix this by reducing the size of the interface id field to a single uint64_t. Signed-off-by: Ioana Ciornei --- .../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 4 ++-- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h index 2371fd5c40e3..996a59dcd01d 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h @@ -340,7 +340,7 @@ struct dpsw_cmd_vlan_manage_if { __le16 vlan_id; __le32 pad1; /* cmd word 1-4 */ - __le64 if_id[4]; + __le64 if_id; }; struct dpsw_cmd_vlan_remove { @@ -386,7 +386,7 @@ struct dpsw_cmd_fdb_multicast_op { u8 mac_addr[6]; __le16 pad2; /* cmd word 2-5 */ - __le64 if_id[4]; + __le64 if_id; }; struct dpsw_cmd_fdb_dump { diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.c b/drivers/net/ethernet/freescale/dpaa2/dpsw.c index ad7a4c03b130..ef0f90ae683f 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.c @@ -773,16 +773,18 @@ int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { + struct dpsw_cmd_vlan_add_if *cmd_params; struct fsl_mc_command cmd = { 0 }; - struct dpsw_cmd_vlan_manage_if *cmd_params; /* prepare command */ cmd.header = mc_encode_cmd_header(DPSW_CMDID_VLAN_ADD_IF, cmd_flags, token); - cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; + cmd_params = (struct dpsw_cmd_vlan_add_if *)cmd.params; cmd_params->vlan_id = cpu_to_le16(vlan_id); - build_if_id_bitmap(cmd_params->if_id, cfg->if_id, cfg->num_ifs); + cmd_params->options = cpu_to_le16(cfg->options); + cmd_params->fdb_id = cpu_to_le16(cfg->fdb_id); + build_if_id_bitmap(&cmd_params->if_id, cfg->if_id, cfg->num_ifs); /* send command to mc*/ return mc_send_command(mc_io, &cmd); @@ -820,7 +822,7 @@ int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, token); cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; cmd_params->vlan_id = cpu_to_le16(vlan_id); - build_if_id_bitmap(cmd_params->if_id, cfg->if_id, cfg->num_ifs); + build_if_id_bitmap(&cmd_params->if_id, cfg->if_id, cfg->num_ifs); /* send command to mc*/ return mc_send_command(mc_io, &cmd); @@ -854,7 +856,7 @@ int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, token); cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; cmd_params->vlan_id = cpu_to_le16(vlan_id); - build_if_id_bitmap(cmd_params->if_id, cfg->if_id, cfg->num_ifs); + build_if_id_bitmap(&cmd_params->if_id, cfg->if_id, cfg->num_ifs); /* send command to mc*/ return mc_send_command(mc_io, &cmd); @@ -890,7 +892,7 @@ int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, token); cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; cmd_params->vlan_id = cpu_to_le16(vlan_id); - build_if_id_bitmap(cmd_params->if_id, cfg->if_id, cfg->num_ifs); + build_if_id_bitmap(&cmd_params->if_id, cfg->if_id, cfg->num_ifs); /* send command to mc*/ return mc_send_command(mc_io, &cmd); @@ -1140,7 +1142,7 @@ int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, cmd_params->fdb_id = cpu_to_le16(fdb_id); cmd_params->num_ifs = cpu_to_le16(cfg->num_ifs); dpsw_set_field(cmd_params->type, ENTRY_TYPE, cfg->type); - build_if_id_bitmap(cmd_params->if_id, cfg->if_id, cfg->num_ifs); + build_if_id_bitmap(&cmd_params->if_id, cfg->if_id, cfg->num_ifs); for (i = 0; i < 6; i++) cmd_params->mac_addr[i] = cfg->mac_addr[5 - i]; @@ -1182,7 +1184,7 @@ int dpsw_fdb_remove_multicast(struct fsl_mc_io *mc_io, cmd_params->fdb_id = cpu_to_le16(fdb_id); cmd_params->num_ifs = cpu_to_le16(cfg->num_ifs); dpsw_set_field(cmd_params->type, ENTRY_TYPE, cfg->type); - build_if_id_bitmap(cmd_params->if_id, cfg->if_id, cfg->num_ifs); + build_if_id_bitmap(&cmd_params->if_id, cfg->if_id, cfg->num_ifs); for (i = 0; i < 6; i++) cmd_params->mac_addr[i] = cfg->mac_addr[5 - i]; From patchwork Tue Mar 16 14:55:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 12142357 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, 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 B096FC433E6 for ; Tue, 16 Mar 2021 14:57:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E1E56508D for ; Tue, 16 Mar 2021 14:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237657AbhCPO4i (ORCPT ); Tue, 16 Mar 2021 10:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237624AbhCPOzg (ORCPT ); Tue, 16 Mar 2021 10:55:36 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2FD3C06174A for ; Tue, 16 Mar 2021 07:55:35 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id h10so21840856edt.13 for ; Tue, 16 Mar 2021 07:55:35 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=NQC9xTJlDB3OBIMKW1RuChvCDlrV0iAAytW1b7tX35w=; b=Uy/vU5cfz0EvSq1z5dqph5efAWf5B3SKI4/S6Ri32tIDnD292x7XawVTU6WKANdHkI jTe9Vo6z/rL6OvfkAQ/yY4znRH7z1fp8Au/qsz+isQrkF7jl4NPlqmUgocu7cI4jjpmQ mc3VmJ/bKPrZ44BzYavqDQAgBemlBVIzyoEPcv1DNT66JGvXg7RLbgsgbauQGdUQbtMz zG8FLr/3vHL9k5EhVjh66g2P7bkYbq9wjMOT2pvygWvhS2D2fWBo+yu9mejDAnNQ56vL K7/4Q+lbAysFKEpeGcqW1XIG7bOxbgu/VHahDMluw6962D0BPn1DKS3zeU16roii0lZ+ pkiQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=NQC9xTJlDB3OBIMKW1RuChvCDlrV0iAAytW1b7tX35w=; b=eP02A2wr08y59H/ZIcLo6DS4Zk13To+QgS7b8EudGSk+2N2S4TenkaGAGB2Q1x6eqL 9uqkRshvH8N1HPyIkh4by2y9NgEF2ATsa6I5c20OIiMn1RcbbrXjVJA6a2NU7v6CCXIo LIBrIzbiaEiug+PvmBOrF/0qYVOLXBHvEp9cAJ7lBI6mE/hukngh6GJv7kbCClH54qDl rHA8zYX66lIzpYM0fEf/7GJ8KOAremBx0Ok1jmBhh3BuJK6xgsbx1+c7nC3qlQJ0kxeA JMSVrF/tefRXTmG/HwZFOmFJMw0PY4yaSQ8OY7c9nO6IHl+twTLXqOhVlf/7w3//XGbv h2Vg== X-Gm-Message-State: AOAM5324q4Vhc+86JkBzuyFvknHb7AXC4v1JGXgQow0b/uXZ4I1cpkUL XkwB5azEQcLIbPyLkAZswDY= X-Google-Smtp-Source: ABdhPJzaqsjY2edFdn/usqQwk4ZVZ1RvwCdsVbX0vr0S8RAh0W7MUDbfQN4moP99B2QF+5ZZPVAQfg== X-Received: by 2002:a05:6402:104c:: with SMTP id e12mr35556153edu.108.1615906534337; Tue, 16 Mar 2021 07:55:34 -0700 (PDT) Received: from yoga-910.localhost (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id w18sm9681402ejn.23.2021.03.16.07.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 07:55:34 -0700 (PDT) From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, yangbo.lu@nxp.com, Ioana Ciornei Subject: [PATCH net-next 4/5] dpaa2-switch: fit the function declaration on the same line Date: Tue, 16 Mar 2021 16:55:11 +0200 Message-Id: <20210316145512.2152374-5-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210316145512.2152374-1-ciorneiioana@gmail.com> References: <20210316145512.2152374-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ioana Ciornei Multiple ABI function declarations are split unnecessarry on multiple lines. Fix this so that we have a consistent coding style. Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 191 +++++------------- drivers/net/ethernet/freescale/dpaa2/dpsw.h | 202 ++++++-------------- 2 files changed, 107 insertions(+), 286 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.c b/drivers/net/ethernet/freescale/dpaa2/dpsw.c index ef0f90ae683f..56f3c23fce07 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.c @@ -9,9 +9,7 @@ #include "dpsw.h" #include "dpsw-cmd.h" -static void build_if_id_bitmap(__le64 *bmap, - const u16 *id, - const u16 num_ifs) +static void build_if_id_bitmap(__le64 *bmap, const u16 *id, const u16 num_ifs) { int i; @@ -38,10 +36,7 @@ static void build_if_id_bitmap(__le64 *bmap, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_open(struct fsl_mc_io *mc_io, - u32 cmd_flags, - int dpsw_id, - u16 *token) +int dpsw_open(struct fsl_mc_io *mc_io, u32 cmd_flags, int dpsw_id, u16 *token) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_open *cmd_params; @@ -76,9 +71,7 @@ int dpsw_open(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_close(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token) +int dpsw_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token) { struct fsl_mc_command cmd = { 0 }; @@ -99,9 +92,7 @@ int dpsw_close(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token) +int dpsw_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token) { struct fsl_mc_command cmd = { 0 }; @@ -122,9 +113,7 @@ int dpsw_enable(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_disable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token) +int dpsw_disable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token) { struct fsl_mc_command cmd = { 0 }; @@ -145,9 +134,7 @@ int dpsw_disable(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_reset(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token) +int dpsw_reset(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token) { struct fsl_mc_command cmd = { 0 }; @@ -175,11 +162,8 @@ int dpsw_reset(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_set_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 en) +int dpsw_set_irq_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u8 en) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_set_irq_enable *cmd_params; @@ -212,11 +196,8 @@ int dpsw_set_irq_enable(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_set_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 mask) +int dpsw_set_irq_mask(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u32 mask) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_set_irq_mask *cmd_params; @@ -245,11 +226,8 @@ int dpsw_set_irq_mask(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_get_irq_status(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *status) +int dpsw_get_irq_status(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u32 *status) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_get_irq_status *cmd_params; @@ -288,11 +266,8 @@ int dpsw_get_irq_status(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_clear_irq_status(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 status) +int dpsw_clear_irq_status(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u32 status) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_clear_irq_status *cmd_params; @@ -318,9 +293,7 @@ int dpsw_clear_irq_status(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, +int dpsw_get_attributes(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, struct dpsw_attr *attr) { struct fsl_mc_command cmd = { 0 }; @@ -367,10 +340,7 @@ int dpsw_get_attributes(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, struct dpsw_link_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; @@ -399,11 +369,8 @@ int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_if_get_link_state(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, - struct dpsw_link_state *state) +int dpsw_if_get_link_state(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 if_id, struct dpsw_link_state *state) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_if_get_link_state *cmd_params; @@ -441,10 +408,7 @@ int dpsw_if_get_link_state(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_set_tci(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_set_tci(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, const struct dpsw_tci_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; @@ -476,10 +440,7 @@ int dpsw_if_set_tci(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_get_tci(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_get_tci(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, struct dpsw_tci_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; @@ -521,10 +482,7 @@ int dpsw_if_get_tci(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_set_stp(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_set_stp(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, const struct dpsw_stp_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; @@ -554,12 +512,8 @@ int dpsw_if_set_stp(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_get_counter(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, - enum dpsw_counter type, - u64 *counter) +int dpsw_if_get_counter(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 if_id, enum dpsw_counter type, u64 *counter) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_if_get_counter *cmd_params; @@ -595,10 +549,7 @@ int dpsw_if_get_counter(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id) +int dpsw_if_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_if *cmd_params; @@ -623,10 +574,7 @@ int dpsw_if_enable(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_disable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id) +int dpsw_if_disable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_if *cmd_params; @@ -693,11 +641,8 @@ int dpsw_if_get_attributes(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_set_max_frame_length(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, - u16 frame_length) +int dpsw_if_set_max_frame_length(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 if_id, u16 frame_length) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_if_set_max_frame_length *cmd_params; @@ -731,11 +676,8 @@ int dpsw_if_set_max_frame_length(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_add(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_cfg *cfg) +int dpsw_vlan_add(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_vlan_add *cmd_params; @@ -767,11 +709,8 @@ int dpsw_vlan_add(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { struct dpsw_cmd_vlan_add_if *cmd_params; struct fsl_mc_command cmd = { 0 }; @@ -807,11 +746,8 @@ int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_vlan_manage_if *cmd_params; @@ -841,11 +777,8 @@ int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_vlan_manage_if *cmd_params; @@ -877,11 +810,8 @@ int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_vlan_manage_if *cmd_params; @@ -907,9 +837,7 @@ int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_remove(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, +int dpsw_vlan_remove(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 vlan_id) { struct fsl_mc_command cmd = { 0 }; @@ -996,11 +924,8 @@ int dpsw_fdb_remove(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 fdb_i * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_add_unicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_unicast_cfg *cfg) +int dpsw_fdb_add_unicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_unicast_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_fdb_unicast_op *cmd_params; @@ -1039,13 +964,8 @@ int dpsw_fdb_add_unicast(struct fsl_mc_io *mc_io, * The struct fdb_dump_entry array must be parsed until the end of memory * area or until an entry with mac_addr set to zero is found. */ -int dpsw_fdb_dump(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - u64 iova_addr, - u32 iova_size, - u16 *num_entries) +int dpsw_fdb_dump(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 fdb_id, + u64 iova_addr, u32 iova_size, u16 *num_entries) { struct dpsw_cmd_fdb_dump *cmd_params; struct dpsw_rsp_fdb_dump *rsp_params; @@ -1082,11 +1002,8 @@ int dpsw_fdb_dump(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_remove_unicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_unicast_cfg *cfg) +int dpsw_fdb_remove_unicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_unicast_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_fdb_unicast_op *cmd_params; @@ -1124,11 +1041,8 @@ int dpsw_fdb_remove_unicast(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_multicast_cfg *cfg) +int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_multicast_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_fdb_multicast_op *cmd_params; @@ -1166,11 +1080,8 @@ int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, * * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_remove_multicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_multicast_cfg *cfg) +int dpsw_fdb_remove_multicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_multicast_cfg *cfg) { struct fsl_mc_command cmd = { 0 }; struct dpsw_cmd_fdb_multicast_op *cmd_params; @@ -1296,10 +1207,8 @@ int dpsw_ctrl_if_set_queue(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, * * Return: '0' on Success; Error code otherwise. */ -int dpsw_get_api_version(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 *major_ver, - u16 *minor_ver) +int dpsw_get_api_version(struct fsl_mc_io *mc_io, u32 cmd_flags, + u16 *major_ver, u16 *minor_ver) { struct fsl_mc_command cmd = { 0 }; struct dpsw_rsp_get_api_version *rsp_params; diff --git a/drivers/net/ethernet/freescale/dpaa2/dpsw.h b/drivers/net/ethernet/freescale/dpaa2/dpsw.h index 6807b15f5807..f108cc61bb27 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpsw.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpsw.h @@ -20,14 +20,9 @@ struct fsl_mc_io; #define DPSW_MAX_IF 64 -int dpsw_open(struct fsl_mc_io *mc_io, - u32 cmd_flags, - int dpsw_id, - u16 *token); +int dpsw_open(struct fsl_mc_io *mc_io, u32 cmd_flags, int dpsw_id, u16 *token); -int dpsw_close(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); +int dpsw_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); /* DPSW options */ @@ -87,17 +82,11 @@ enum dpsw_broadcast_cfg { DPSW_BROADCAST_PER_FDB, }; -int dpsw_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); +int dpsw_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -int dpsw_disable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); +int dpsw_disable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -int dpsw_reset(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); +int dpsw_reset(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); /* DPSW IRQ Index and Events */ @@ -121,29 +110,17 @@ struct dpsw_irq_cfg { int irq_num; }; -int dpsw_set_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 en); - -int dpsw_set_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 mask); - -int dpsw_get_irq_status(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *status); - -int dpsw_clear_irq_status(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 status); +int dpsw_set_irq_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u8 en); + +int dpsw_set_irq_mask(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u32 mask); + +int dpsw_get_irq_status(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u32 *status); + +int dpsw_clear_irq_status(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u8 irq_index, u32 status); /** * struct dpsw_attr - Structure representing DPSW attributes @@ -184,9 +161,7 @@ struct dpsw_attr { enum dpsw_broadcast_cfg broadcast_cfg; }; -int dpsw_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, +int dpsw_get_attributes(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, struct dpsw_attr *attr); /** @@ -286,11 +261,9 @@ struct dpsw_link_cfg { u64 options; }; -int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, struct dpsw_link_cfg *cfg); + /** * struct dpsw_link_state - Structure representing DPSW link state * @rate: Rate @@ -303,11 +276,8 @@ struct dpsw_link_state { u8 up; }; -int dpsw_if_get_link_state(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, - struct dpsw_link_state *state); +int dpsw_if_get_link_state(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 if_id, struct dpsw_link_state *state); /** * struct dpsw_tci_cfg - Tag Control Information (TCI) configuration @@ -328,16 +298,10 @@ struct dpsw_tci_cfg { u16 vlan_id; }; -int dpsw_if_set_tci(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_set_tci(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, const struct dpsw_tci_cfg *cfg); -int dpsw_if_get_tci(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_get_tci(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, struct dpsw_tci_cfg *cfg); /** @@ -367,10 +331,7 @@ struct dpsw_stp_cfg { enum dpsw_stp_state state; }; -int dpsw_if_set_stp(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, +int dpsw_if_set_stp(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, const struct dpsw_stp_cfg *cfg); /** @@ -418,22 +379,12 @@ enum dpsw_counter { DPSW_CNT_ING_NO_BUFF_DISCARD = 0xc, }; -int dpsw_if_get_counter(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, - enum dpsw_counter type, - u64 *counter); +int dpsw_if_get_counter(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 if_id, enum dpsw_counter type, u64 *counter); -int dpsw_if_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id); +int dpsw_if_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id); -int dpsw_if_disable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id); +int dpsw_if_disable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id); /** * struct dpsw_if_attr - Structure representing DPSW interface attributes @@ -463,11 +414,8 @@ struct dpsw_if_attr { int dpsw_if_get_attributes(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, struct dpsw_if_attr *attr); -int dpsw_if_set_max_frame_length(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 if_id, - u16 frame_length); +int dpsw_if_set_max_frame_length(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 if_id, u16 frame_length); /** * struct dpsw_vlan_cfg - VLAN Configuration @@ -477,11 +425,8 @@ struct dpsw_vlan_cfg { u16 fdb_id; }; -int dpsw_vlan_add(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_cfg *cfg); +int dpsw_vlan_add(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_cfg *cfg); #define DPSW_VLAN_ADD_IF_OPT_FDB_ID 0x0001 @@ -503,33 +448,19 @@ struct dpsw_vlan_if_cfg { u16 fdb_id; }; -int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg); - -int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg); - -int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg); - -int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 vlan_id, - const struct dpsw_vlan_if_cfg *cfg); - -int dpsw_vlan_remove(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, +int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg); + +int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg); + +int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg); + +int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg); + +int dpsw_vlan_remove(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 vlan_id); /** @@ -554,17 +485,11 @@ struct dpsw_fdb_unicast_cfg { u16 if_egress; }; -int dpsw_fdb_add_unicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_unicast_cfg *cfg); +int dpsw_fdb_add_unicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_unicast_cfg *cfg); -int dpsw_fdb_remove_unicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_unicast_cfg *cfg); +int dpsw_fdb_remove_unicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_unicast_cfg *cfg); #define DPSW_FDB_ENTRY_TYPE_DYNAMIC BIT(0) #define DPSW_FDB_ENTRY_TYPE_UNICAST BIT(1) @@ -583,13 +508,8 @@ struct fdb_dump_entry { u8 if_mask[8]; }; -int dpsw_fdb_dump(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - u64 iova_addr, - u32 iova_size, - u16 *num_entries); +int dpsw_fdb_dump(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 fdb_id, + u64 iova_addr, u32 iova_size, u16 *num_entries); /** * struct dpsw_fdb_multicast_cfg - Multi-cast entry configuration @@ -605,17 +525,11 @@ struct dpsw_fdb_multicast_cfg { u16 if_id[DPSW_MAX_IF]; }; -int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_multicast_cfg *cfg); +int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_multicast_cfg *cfg); -int dpsw_fdb_remove_multicast(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u16 fdb_id, - const struct dpsw_fdb_multicast_cfg *cfg); +int dpsw_fdb_remove_multicast(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, + u16 fdb_id, const struct dpsw_fdb_multicast_cfg *cfg); /** * enum dpsw_fdb_learning_mode - Auto-learning modes @@ -670,10 +584,8 @@ struct dpsw_fdb_attr { u16 max_fdb_mc_groups; }; -int dpsw_get_api_version(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 *major_ver, - u16 *minor_ver); +int dpsw_get_api_version(struct fsl_mc_io *mc_io, u32 cmd_flags, + u16 *major_ver, u16 *minor_ver); int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 if_id, u8 mac_addr[6]); From patchwork Tue Mar 16 14:55:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 12142355 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, 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 7A6CFC433E0 for ; Tue, 16 Mar 2021 14:57:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52F776508A for ; Tue, 16 Mar 2021 14:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237647AbhCPO4e (ORCPT ); Tue, 16 Mar 2021 10:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237625AbhCPOzh (ORCPT ); Tue, 16 Mar 2021 10:55:37 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD8F4C061756 for ; Tue, 16 Mar 2021 07:55:36 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id z1so21883284edb.8 for ; Tue, 16 Mar 2021 07:55:36 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=XpsaULRDZIuJ/b8yaUxAw4xsmV7cBtmwTUOB+YQLc4s=; b=pO+tJC5/SKdSseqLYrMUmQb06pzFA8GIwEAMKgBD4Rf3mRCUsrP+Jzap0DKWkRqjdy mv82X3eV3hc7WdxTplzJzxYEoAtAtgeXQTvFxSUHUiBsLqF7VNOGnGmq3+TQVrzSUiiq eH2bnLtTxq+EtY+JDO60pSJ77k/qtNXrt0UZdGA0HzoeXlynZD29l+1HxZ+sCFR7Dp9s dlwF8r+tcb9Hd3nFgTWxwLZT3jacTFlesAOufipClesx+cY8v8n9cxmmpnapLy5sHQf1 6fvUk1gZ9MQWpbk3dibw12Q/n2lMVMyP8cwP7NlIYn8fYO84ckx/rBIC6aRsYWn1sj0a DNKg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=XpsaULRDZIuJ/b8yaUxAw4xsmV7cBtmwTUOB+YQLc4s=; b=U6rrNo01vq+a+EizkaS7pqNe27gJD0B7F35MR3D6qZ3QZpFNKFS8qKr3MapOmejqoH jP8wWDCZ9Sr2B2SK7DhCYQvZ4UTDOh3b64k2lPytIw8fXJ/kTjEbJPkxS+99OBa1NlUm iJO5sDARL9fUc2H0UG73apJJ99vvuaASrZABrpO7/QF3bFABaUpYZmdhDJcgQJ1CNN+Q XQV9aQ+XqhXXypeIAy0sNp2qSqORa4lbZGEozypvONPr2+w/Xb9P+Yzfh8FH9at3xnAE swbPws1DqAbtUu6iNX/sT3+NcLR5TshmDazrWgtz8l9r5yddMNoGFNPzcZVaYuajv6bS TOOQ== X-Gm-Message-State: AOAM53030NfjugVwcc/tirvaxeR1Kc2bHXz3KYG/oNuda5nKkNMM2y3A rxicwSHiByFroSnr87L5UpE= X-Google-Smtp-Source: ABdhPJyiiUeIciZoavHNPrBxTpgYhg+RgbRJQszmQzD9fpbnu7FMOiH0cGtEvA6JYURQe4LI2zce+A== X-Received: by 2002:a05:6402:270e:: with SMTP id y14mr36577165edd.283.1615906535468; Tue, 16 Mar 2021 07:55:35 -0700 (PDT) Received: from yoga-910.localhost (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id w18sm9681402ejn.23.2021.03.16.07.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 07:55:34 -0700 (PDT) From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: ruxandra.radulescu@nxp.com, yangbo.lu@nxp.com, Ioana Ciornei Subject: [PATCH net-next 5/5] dpaa2-eth: fixup kdoc warnings Date: Tue, 16 Mar 2021 16:55:12 +0200 Message-Id: <20210316145512.2152374-6-ciorneiioana@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210316145512.2152374-1-ciorneiioana@gmail.com> References: <20210316145512.2152374-1-ciorneiioana@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ioana Ciornei Running kernel-doc over the dpaa2-eth driver generates a bunch of warnings. Fix them up by removing code comments for macros which are self-explanatory, respecting the kdoc format for macro documentation and other small changes like describing the expected return values of functions. Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpkg.h | 5 +- drivers/net/ethernet/freescale/dpaa2/dpmac.h | 24 +-- drivers/net/ethernet/freescale/dpaa2/dpni.c | 6 + drivers/net/ethernet/freescale/dpaa2/dpni.h | 162 ++++++++----------- drivers/net/ethernet/freescale/dpaa2/dprtc.h | 3 - 5 files changed, 82 insertions(+), 118 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpkg.h b/drivers/net/ethernet/freescale/dpaa2/dpkg.h index 6de613b13e4d..6f596a5fbeeb 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpkg.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpkg.h @@ -13,11 +13,12 @@ /** Key Generator properties */ /** - * Number of masks per key extraction + * DPKG_NUM_OF_MASKS - Number of masks per key extraction */ #define DPKG_NUM_OF_MASKS 4 + /** - * Number of extractions per key profile + * DPKG_MAX_NUM_OF_EXTRACTS - Number of extractions per key profile */ #define DPKG_MAX_NUM_OF_EXTRACTS 10 diff --git a/drivers/net/ethernet/freescale/dpaa2/dpmac.h b/drivers/net/ethernet/freescale/dpaa2/dpmac.h index 135f143097a5..8f7ceb731282 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpmac.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpmac.h @@ -83,39 +83,21 @@ int dpmac_get_attributes(struct fsl_mc_io *mc_io, u16 token, struct dpmac_attr *attr); -/** - * DPMAC link configuration/state options - */ +/* DPMAC link configuration/state options */ -/** - * Enable auto-negotiation - */ #define DPMAC_LINK_OPT_AUTONEG BIT_ULL(0) -/** - * Enable half-duplex mode - */ #define DPMAC_LINK_OPT_HALF_DUPLEX BIT_ULL(1) -/** - * Enable pause frames - */ #define DPMAC_LINK_OPT_PAUSE BIT_ULL(2) -/** - * Enable a-symmetric pause frames - */ #define DPMAC_LINK_OPT_ASYM_PAUSE BIT_ULL(3) -/** - * Advertised link speeds - */ +/* Advertised link speeds */ #define DPMAC_ADVERTISED_10BASET_FULL BIT_ULL(0) #define DPMAC_ADVERTISED_100BASET_FULL BIT_ULL(1) #define DPMAC_ADVERTISED_1000BASET_FULL BIT_ULL(2) #define DPMAC_ADVERTISED_10000BASET_FULL BIT_ULL(4) #define DPMAC_ADVERTISED_2500BASEX_FULL BIT_ULL(5) -/** - * Advertise auto-negotiation enable - */ +/* Advertise auto-negotiation enable */ #define DPMAC_ADVERTISED_AUTONEG BIT_ULL(3) /** diff --git a/drivers/net/ethernet/freescale/dpaa2/dpni.c b/drivers/net/ethernet/freescale/dpaa2/dpni.c index aa429c17c343..d6afada99fb6 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpni.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpni.c @@ -17,6 +17,8 @@ * This function has to be called before the following functions: * - dpni_set_rx_tc_dist() * - dpni_set_qos_table() + * + * Return: '0' on Success; Error code otherwise. */ int dpni_prepare_key_cfg(const struct dpkg_profile_cfg *cfg, u8 *key_cfg_buf) { @@ -1793,6 +1795,8 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io, * If cfg.enable is set to 0 the command will clear flow steering table. * The packets will be classified according to settings made in * dpni_set_rx_hash_dist() + * + * Return: '0' on Success; Error code otherwise. */ int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io, u32 cmd_flags, @@ -1826,6 +1830,8 @@ int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io, * If cfg.enable is set to 1 the packets will be classified using a hash * function based on the key received in cfg.key_cfg_iova parameter. * If cfg.enable is set to 0 the packets will be sent to the default queue + * + * Return: '0' on Success; Error code otherwise. */ int dpni_set_rx_hash_dist(struct fsl_mc_io *mc_io, u32 cmd_flags, diff --git a/drivers/net/ethernet/freescale/dpaa2/dpni.h b/drivers/net/ethernet/freescale/dpaa2/dpni.h index 4e96d9362dd2..7de0562bbf59 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpni.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpni.h @@ -10,73 +10,76 @@ struct fsl_mc_io; -/** - * Data Path Network Interface API +/* Data Path Network Interface API * Contains initialization APIs and runtime control APIs for DPNI */ /** General DPNI macros */ /** - * Maximum number of traffic classes + * DPNI_MAX_TC - Maximum number of traffic classes */ #define DPNI_MAX_TC 8 /** - * Maximum number of buffer pools per DPNI + * DPNI_MAX_DPBP - Maximum number of buffer pools per DPNI */ #define DPNI_MAX_DPBP 8 /** - * All traffic classes considered; see dpni_set_queue() + * DPNI_ALL_TCS - All traffic classes considered; see dpni_set_queue() */ #define DPNI_ALL_TCS (u8)(-1) /** - * All flows within traffic class considered; see dpni_set_queue() + * DPNI_ALL_TC_FLOWS - All flows within traffic class considered; see + * dpni_set_queue() */ #define DPNI_ALL_TC_FLOWS (u16)(-1) /** - * Generate new flow ID; see dpni_set_queue() + * DPNI_NEW_FLOW_ID - Generate new flow ID; see dpni_set_queue() */ #define DPNI_NEW_FLOW_ID (u16)(-1) /** - * Tx traffic is always released to a buffer pool on transmit, there are no - * resources allocated to have the frames confirmed back to the source after - * transmission. + * DPNI_OPT_TX_FRM_RELEASE - Tx traffic is always released to a buffer pool on + * transmit, there are no resources allocated to have the frames confirmed back + * to the source after transmission. */ #define DPNI_OPT_TX_FRM_RELEASE 0x000001 /** - * Disables support for MAC address filtering for addresses other than primary - * MAC address. This affects both unicast and multicast. Promiscuous mode can - * still be enabled/disabled for both unicast and multicast. If promiscuous mode - * is disabled, only traffic matching the primary MAC address will be accepted. + * DPNI_OPT_NO_MAC_FILTER - Disables support for MAC address filtering for + * addresses other than primary MAC address. This affects both unicast and + * multicast. Promiscuous mode can still be enabled/disabled for both unicast + * and multicast. If promiscuous mode is disabled, only traffic matching the + * primary MAC address will be accepted. */ #define DPNI_OPT_NO_MAC_FILTER 0x000002 /** - * Allocate policers for this DPNI. They can be used to rate-limit traffic per - * traffic class (TC) basis. + * DPNI_OPT_HAS_POLICING - Allocate policers for this DPNI. They can be used to + * rate-limit traffic per traffic class (TC) basis. */ #define DPNI_OPT_HAS_POLICING 0x000004 /** - * Congestion can be managed in several ways, allowing the buffer pool to - * deplete on ingress, taildrop on each queue or use congestion groups for sets - * of queues. If set, it configures a single congestion groups across all TCs. - * If reset, a congestion group is allocated for each TC. Only relevant if the - * DPNI has multiple traffic classes. + * DPNI_OPT_SHARED_CONGESTION - Congestion can be managed in several ways, + * allowing the buffer pool to deplete on ingress, taildrop on each queue or + * use congestion groups for sets of queues. If set, it configures a single + * congestion groups across all TCs. If reset, a congestion group is allocated + * for each TC. Only relevant if the DPNI has multiple traffic classes. */ #define DPNI_OPT_SHARED_CONGESTION 0x000008 /** - * Enables TCAM for Flow Steering and QoS look-ups. If not specified, all - * look-ups are exact match. Note that TCAM is not available on LS1088 and its - * variants. Setting this bit on these SoCs will trigger an error. + * DPNI_OPT_HAS_KEY_MASKING - Enables TCAM for Flow Steering and QoS look-ups. + * If not specified, all look-ups are exact match. Note that TCAM is not + * available on LS1088 and its variants. Setting this bit on these SoCs will + * trigger an error. */ #define DPNI_OPT_HAS_KEY_MASKING 0x000010 /** - * Disables the flow steering table. + * DPNI_OPT_NO_FS - Disables the flow steering table. */ #define DPNI_OPT_NO_FS 0x000020 /** - * Flow steering table is shared between all traffic classes + * DPNI_OPT_SHARED_FS - Flow steering table is shared between all traffic + * classes */ #define DPNI_OPT_SHARED_FS 0x001000 @@ -129,20 +132,14 @@ int dpni_reset(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -/** - * DPNI IRQ Index and Events - */ +/* DPNI IRQ Index and Events */ -/** - * IRQ index - */ #define DPNI_IRQ_INDEX 0 -/** - * IRQ events: - * indicates a change in link state - * indicates a change in endpoint - */ + +/* DPNI_IRQ_EVENT_LINK_CHANGED - indicates a change in link state */ #define DPNI_IRQ_EVENT_LINK_CHANGED 0x00000001 + +/* DPNI_IRQ_EVENT_ENDPOINT_CHANGED - indicates a change in endpoint */ #define DPNI_IRQ_EVENT_ENDPOINT_CHANGED 0x00000002 int dpni_set_irq_enable(struct fsl_mc_io *mc_io, @@ -222,32 +219,30 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io, u16 token, struct dpni_attr *attr); -/** - * DPNI errors - */ +/* DPNI errors */ /** - * Extract out of frame header error + * DPNI_ERROR_EOFHE - Extract out of frame header error */ #define DPNI_ERROR_EOFHE 0x00020000 /** - * Frame length error + * DPNI_ERROR_FLE - Frame length error */ #define DPNI_ERROR_FLE 0x00002000 /** - * Frame physical error + * DPNI_ERROR_FPE - Frame physical error */ #define DPNI_ERROR_FPE 0x00001000 /** - * Parsing header error + * DPNI_ERROR_PHE - Parsing header error */ #define DPNI_ERROR_PHE 0x00000020 /** - * Parser L3 checksum error + * DPNI_ERROR_L3CE - Parser L3 checksum error */ #define DPNI_ERROR_L3CE 0x00000004 /** - * Parser L3 checksum error + * DPNI_ERROR_L4CE - Parser L3 checksum error */ #define DPNI_ERROR_L4CE 0x00000001 @@ -281,36 +276,35 @@ int dpni_set_errors_behavior(struct fsl_mc_io *mc_io, u16 token, struct dpni_error_cfg *cfg); -/** - * DPNI buffer layout modification options - */ +/* DPNI buffer layout modification options */ /** - * Select to modify the time-stamp setting + * DPNI_BUF_LAYOUT_OPT_TIMESTAMP - Select to modify the time-stamp setting */ #define DPNI_BUF_LAYOUT_OPT_TIMESTAMP 0x00000001 /** - * Select to modify the parser-result setting; not applicable for Tx + * DPNI_BUF_LAYOUT_OPT_PARSER_RESULT - Select to modify the parser-result + * setting; not applicable for Tx */ #define DPNI_BUF_LAYOUT_OPT_PARSER_RESULT 0x00000002 /** - * Select to modify the frame-status setting + * DPNI_BUF_LAYOUT_OPT_FRAME_STATUS - Select to modify the frame-status setting */ #define DPNI_BUF_LAYOUT_OPT_FRAME_STATUS 0x00000004 /** - * Select to modify the private-data-size setting + * DPNI_BUF_LAYOUT_OPT_PRIVATE_DATA_SIZE - Select to modify the private-data-size setting */ #define DPNI_BUF_LAYOUT_OPT_PRIVATE_DATA_SIZE 0x00000008 /** - * Select to modify the data-alignment setting + * DPNI_BUF_LAYOUT_OPT_DATA_ALIGN - Select to modify the data-alignment setting */ #define DPNI_BUF_LAYOUT_OPT_DATA_ALIGN 0x00000010 /** - * Select to modify the data-head-room setting + * DPNI_BUF_LAYOUT_OPT_DATA_HEAD_ROOM - Select to modify the data-head-room setting */ #define DPNI_BUF_LAYOUT_OPT_DATA_HEAD_ROOM 0x00000020 /** - * Select to modify the data-tail-room setting + * DPNI_BUF_LAYOUT_OPT_DATA_TAIL_ROOM - Select to modify the data-tail-room setting */ #define DPNI_BUF_LAYOUT_OPT_DATA_TAIL_ROOM 0x00000040 @@ -343,7 +337,8 @@ struct dpni_buffer_layout { * @DPNI_QUEUE_TX: Tx queue * @DPNI_QUEUE_TX_CONFIRM: Tx confirmation queue * @DPNI_QUEUE_RX_ERR: Rx error queue - */enum dpni_queue_type { + */ +enum dpni_queue_type { DPNI_QUEUE_RX, DPNI_QUEUE_TX, DPNI_QUEUE_TX_CONFIRM, @@ -424,7 +419,7 @@ int dpni_get_tx_data_offset(struct fsl_mc_io *mc_io, * lack of buffers * @page_2.egress_discarded_frames: Egress discarded frame count * @page_2.egress_confirmed_frames: Egress confirmed frame count - * @page3: Page_3 statistics structure + * @page_3: Page_3 statistics structure * @page_3.egress_dequeue_bytes: Cumulative count of the number of bytes * dequeued from egress FQs * @page_3.egress_dequeue_frames: Cumulative count of the number of frames @@ -501,30 +496,14 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io, u8 page, union dpni_statistics *stat); -/** - * Enable auto-negotiation - */ #define DPNI_LINK_OPT_AUTONEG 0x0000000000000001ULL -/** - * Enable half-duplex mode - */ #define DPNI_LINK_OPT_HALF_DUPLEX 0x0000000000000002ULL -/** - * Enable pause frames - */ #define DPNI_LINK_OPT_PAUSE 0x0000000000000004ULL -/** - * Enable a-symmetric pause frames - */ #define DPNI_LINK_OPT_ASYM_PAUSE 0x0000000000000008ULL - -/** - * Enable priority flow control pause frames - */ #define DPNI_LINK_OPT_PFC_PAUSE 0x0000000000000010ULL /** - * struct - Structure representing DPNI link configuration + * struct dpni_link_cfg - Structure representing DPNI link configuration * @rate: Rate * @options: Mask of available options; use 'DPNI_LINK_OPT_' values */ @@ -687,8 +666,8 @@ int dpni_set_rx_tc_dist(struct fsl_mc_io *mc_io, const struct dpni_rx_tc_dist_cfg *cfg); /** - * When used for fs_miss_flow_id in function dpni_set_rx_dist, - * will signal to dpni to drop all unclassified frames + * DPNI_FS_MISS_DROP - When used for fs_miss_flow_id in function + * dpni_set_rx_dist, will signal to dpni to drop all unclassified frames */ #define DPNI_FS_MISS_DROP ((uint16_t)-1) @@ -766,7 +745,7 @@ enum dpni_dest { /** * struct dpni_queue - Queue structure - * @destination - Destination structure + * @destination: - Destination structure * @destination.id: ID of the destination, only relevant if DEST_TYPE is > 0. * Identifies either a DPIO or a DPCON object. * Not relevant for Tx queues. @@ -837,9 +816,7 @@ struct dpni_queue_id { u16 qdbin; }; -/** - * Set User Context - */ +/* Set User Context */ #define DPNI_QUEUE_OPT_USER_CTX 0x00000001 #define DPNI_QUEUE_OPT_DEST 0x00000002 #define DPNI_QUEUE_OPT_FLC 0x00000004 @@ -904,9 +881,9 @@ struct dpni_dest_cfg { /* DPNI congestion options */ /** - * This congestion will trigger flow control or priority flow control. - * This will have effect only if flow control is enabled with - * dpni_set_link_cfg(). + * DPNI_CONG_OPT_FLOW_CONTROL - This congestion will trigger flow control or + * priority flow control. This will have effect only if flow control is + * enabled with dpni_set_link_cfg(). */ #define DPNI_CONG_OPT_FLOW_CONTROL 0x00000040 @@ -990,23 +967,24 @@ struct dpni_rule_cfg { }; /** - * Discard matching traffic. If set, this takes precedence over any other - * configuration and matching traffic is always discarded. + * DPNI_FS_OPT_DISCARD - Discard matching traffic. If set, this takes + * precedence over any other configuration and matching traffic is always + * discarded. */ #define DPNI_FS_OPT_DISCARD 0x1 /** - * Set FLC value. If set, flc member of struct dpni_fs_action_cfg is used to - * override the FLC value set per queue. + * DPNI_FS_OPT_SET_FLC - Set FLC value. If set, flc member of struct + * dpni_fs_action_cfg is used to override the FLC value set per queue. * For more details check the Frame Descriptor section in the hardware * documentation. */ #define DPNI_FS_OPT_SET_FLC 0x2 /** - * Indicates whether the 6 lowest significant bits of FLC are used for stash - * control. If set, the 6 least significant bits in value are interpreted as - * follows: + * DPNI_FS_OPT_SET_STASH_CONTROL - Indicates whether the 6 lowest significant + * bits of FLC are used for stash control. If set, the 6 least significant bits + * in value are interpreted as follows: * - bits 0-1: indicates the number of 64 byte units of context that are * stashed. FLC value is interpreted as a memory address in this case, * excluding the 6 LS bits. @@ -1068,7 +1046,7 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io, u16 *major_ver, u16 *minor_ver); /** - * struct dpni_tx_shaping - Structure representing DPNI tx shaping configuration + * struct dpni_tx_shaping_cfg - Structure representing DPNI tx shaping configuration * @rate_limit: Rate in Mbps * @max_burst_size: Burst size in bytes (up to 64KB) */ diff --git a/drivers/net/ethernet/freescale/dpaa2/dprtc.h b/drivers/net/ethernet/freescale/dpaa2/dprtc.h index 05c413719e55..01d77c685a5b 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dprtc.h +++ b/drivers/net/ethernet/freescale/dpaa2/dprtc.h @@ -13,9 +13,6 @@ struct fsl_mc_io; -/** - * Number of irq's - */ #define DPRTC_MAX_IRQ_NUM 1 #define DPRTC_IRQ_INDEX 0