* [PATCH net-next 0/5] eth: fbnic: trivial code tweaks
@ 2025-06-24 14:28 Jakub Kicinski
2025-06-24 14:28 ` [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros Jakub Kicinski
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-24 14:28 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr, Jakub Kicinski
A handful of code cleanups. No functional changes.
Jakub Kicinski (5):
eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros
eth: fbnic: fix stampinn typo in a comment
eth: fbnic: realign whitespace
eth: fbnic: sort includes
eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl
drivers/net/ethernet/meta/fbnic/fbnic_csr.h | 22 ++----
drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 8 +-
.../net/ethernet/meta/fbnic/fbnic_netdev.h | 5 +-
drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 3 -
.../net/ethernet/meta/fbnic/fbnic_devlink.c | 4 +-
.../net/ethernet/meta/fbnic/fbnic_ethtool.c | 73 +++++++++----------
drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 30 ++++----
drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 2 +-
8 files changed, 69 insertions(+), 78 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
@ 2025-06-24 14:28 ` Jakub Kicinski
2025-06-25 11:07 ` Simon Horman
2025-06-24 14:28 ` [PATCH net-next 2/5] eth: fbnic: fix stampinn typo in a comment Jakub Kicinski
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-24 14:28 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr, Jakub Kicinski
Somehow we ended up with two copies of FBNIC_MAX_[TR]XQS in fbnic_txrx.h.
Remove the one mixed with the struct declarations.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h
index f46616af41ea..2e361d6f03ff 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h
@@ -141,9 +141,6 @@ struct fbnic_napi_vector {
struct fbnic_q_triad qt[];
};
-#define FBNIC_MAX_TXQS 128u
-#define FBNIC_MAX_RXQS 128u
-
netdev_tx_t fbnic_xmit_frame(struct sk_buff *skb, struct net_device *dev);
netdev_features_t
fbnic_features_check(struct sk_buff *skb, struct net_device *dev,
--
2.49.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 2/5] eth: fbnic: fix stampinn typo in a comment
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
2025-06-24 14:28 ` [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros Jakub Kicinski
@ 2025-06-24 14:28 ` Jakub Kicinski
2025-06-24 15:35 ` Vadim Fedorenko
2025-06-24 14:28 ` [PATCH net-next 3/5] eth: fbnic: realign whitespace Jakub Kicinski
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-24 14:28 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr, Jakub Kicinski
Fix a typo:
stampinn -> stamping
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/meta/fbnic/fbnic_netdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
index a3dc85d3838b..805a31cd94b5 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
@@ -66,7 +66,7 @@ struct fbnic_net {
struct fbnic_queue_stats rx_stats;
u64 link_down_events;
- /* Time stampinn filter config */
+ /* Time stamping filter config */
struct kernel_hwtstamp_config hwtstamp_config;
};
--
2.49.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 3/5] eth: fbnic: realign whitespace
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
2025-06-24 14:28 ` [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros Jakub Kicinski
2025-06-24 14:28 ` [PATCH net-next 2/5] eth: fbnic: fix stampinn typo in a comment Jakub Kicinski
@ 2025-06-24 14:28 ` Jakub Kicinski
2025-06-25 11:07 ` Simon Horman
2025-06-24 14:28 ` [PATCH net-next 4/5] eth: fbnic: sort includes Jakub Kicinski
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-24 14:28 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr, Jakub Kicinski
Relign various whitespace things. Some of it is spaces which should
be tabs and some is making sure the values are actually correctly
aligned to "columns" with 8 space tabs. Whitespace changes only.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/meta/fbnic/fbnic_csr.h | 22 ++----
drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 4 +-
.../net/ethernet/meta/fbnic/fbnic_netdev.h | 1 +
.../net/ethernet/meta/fbnic/fbnic_ethtool.c | 73 +++++++++----------
drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 10 +--
5 files changed, 52 insertions(+), 58 deletions(-)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_csr.h b/drivers/net/ethernet/meta/fbnic/fbnic_csr.h
index 1d8ff0cbe607..9c89d5378668 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_csr.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_csr.h
@@ -493,7 +493,7 @@ enum {
#define FBNIC_PTP_ADD_VAL_NS 0x04806 /* 0x12018 */
#define FBNIC_PTP_ADD_VAL_NS_MASK CSR_GENMASK(15, 0)
-#define FBNIC_PTP_ADD_VAL_SUBNS 0x04807 /* 0x1201c */
+#define FBNIC_PTP_ADD_VAL_SUBNS 0x04807 /* 0x1201c */
#define FBNIC_PTP_CTR_VAL_HI 0x04808 /* 0x12020 */
#define FBNIC_PTP_CTR_VAL_LO 0x04809 /* 0x12024 */
@@ -816,16 +816,12 @@ enum {
#define FBNIC_CSR_START_MAC_STAT 0x11a00
#define FBNIC_MAC_STAT_RX_BYTE_COUNT_L 0x11a08 /* 0x46820 */
#define FBNIC_MAC_STAT_RX_BYTE_COUNT_H 0x11a09 /* 0x46824 */
-#define FBNIC_MAC_STAT_RX_ALIGN_ERROR_L \
- 0x11a0a /* 0x46828 */
-#define FBNIC_MAC_STAT_RX_ALIGN_ERROR_H \
- 0x11a0b /* 0x4682c */
+#define FBNIC_MAC_STAT_RX_ALIGN_ERROR_L 0x11a0a /* 0x46828 */
+#define FBNIC_MAC_STAT_RX_ALIGN_ERROR_H 0x11a0b /* 0x4682c */
#define FBNIC_MAC_STAT_RX_TOOLONG_L 0x11a0e /* 0x46838 */
#define FBNIC_MAC_STAT_RX_TOOLONG_H 0x11a0f /* 0x4683c */
-#define FBNIC_MAC_STAT_RX_RECEIVED_OK_L \
- 0x11a12 /* 0x46848 */
-#define FBNIC_MAC_STAT_RX_RECEIVED_OK_H \
- 0x11a13 /* 0x4684c */
+#define FBNIC_MAC_STAT_RX_RECEIVED_OK_L 0x11a12 /* 0x46848 */
+#define FBNIC_MAC_STAT_RX_RECEIVED_OK_H 0x11a13 /* 0x4684c */
#define FBNIC_MAC_STAT_RX_PACKET_BAD_FCS_L \
0x11a14 /* 0x46850 */
#define FBNIC_MAC_STAT_RX_PACKET_BAD_FCS_H \
@@ -882,10 +878,8 @@ enum {
0x11a42 /* 0x46908 */
#define FBNIC_MAC_STAT_TX_TRANSMITTED_OK_H \
0x11a43 /* 0x4690c */
-#define FBNIC_MAC_STAT_TX_IFOUTERRORS_L \
- 0x11a46 /* 0x46918 */
-#define FBNIC_MAC_STAT_TX_IFOUTERRORS_H \
- 0x11a47 /* 0x4691c */
+#define FBNIC_MAC_STAT_TX_IFOUTERRORS_L 0x11a46 /* 0x46918 */
+#define FBNIC_MAC_STAT_TX_IFOUTERRORS_H 0x11a47 /* 0x4691c */
#define FBNIC_MAC_STAT_TX_MULTICAST_L 0x11a4a /* 0x46928 */
#define FBNIC_MAC_STAT_TX_MULTICAST_H 0x11a4b /* 0x4692c */
#define FBNIC_MAC_STAT_TX_BROADCAST_L 0x11a4c /* 0x46930 */
@@ -969,7 +963,7 @@ enum {
0x3107e /* 0xc41f8 */
#define FBNIC_PUL_USER_OB_RD_DBG_CNT_NP_CRED_63_32 \
0x3107f /* 0xc41fc */
-#define FBNIC_CSR_END_PUL_USER 0x310ea /* CSR section delimiter */
+#define FBNIC_CSR_END_PUL_USER 0x310ea /* CSR section delimiter */
/* Queue Registers
*
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
index 08bf87c5ddf6..f3ed65cf976a 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
@@ -19,10 +19,10 @@ struct fbnic_fw_mbx {
};
// FW_VER_MAX_SIZE must match ETHTOOL_FWVERS_LEN
-#define FBNIC_FW_VER_MAX_SIZE 32
+#define FBNIC_FW_VER_MAX_SIZE 32
// Formatted version is in the format XX.YY.ZZ_RRR_COMMIT
#define FBNIC_FW_CAP_RESP_COMMIT_MAX_SIZE (FBNIC_FW_VER_MAX_SIZE - 13)
-#define FBNIC_FW_LOG_MAX_SIZE 256
+#define FBNIC_FW_LOG_MAX_SIZE 256
struct fbnic_fw_ver {
u32 version;
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
index 805a31cd94b5..ab8b8b0f9f64 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
@@ -81,6 +81,7 @@ int fbnic_netdev_register(struct net_device *netdev);
void fbnic_netdev_unregister(struct net_device *netdev);
void fbnic_reset_queues(struct fbnic_net *fbn,
unsigned int tx, unsigned int rx);
+
void fbnic_set_ethtool_ops(struct net_device *dev);
int fbnic_ptp_setup(struct fbnic_dev *fbd);
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
index 7fe9983d3c0e..588da02d6e22 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
@@ -1676,43 +1676,42 @@ fbnic_get_rmon_stats(struct net_device *netdev,
}
static const struct ethtool_ops fbnic_ethtool_ops = {
- .supported_coalesce_params =
- ETHTOOL_COALESCE_USECS |
- ETHTOOL_COALESCE_RX_MAX_FRAMES,
- .rxfh_max_num_contexts = FBNIC_RPC_RSS_TBL_COUNT,
- .get_drvinfo = fbnic_get_drvinfo,
- .get_regs_len = fbnic_get_regs_len,
- .get_regs = fbnic_get_regs,
- .get_link = ethtool_op_get_link,
- .get_coalesce = fbnic_get_coalesce,
- .set_coalesce = fbnic_set_coalesce,
- .get_ringparam = fbnic_get_ringparam,
- .set_ringparam = fbnic_set_ringparam,
- .get_pauseparam = fbnic_phylink_get_pauseparam,
- .set_pauseparam = fbnic_phylink_set_pauseparam,
- .get_strings = fbnic_get_strings,
- .get_ethtool_stats = fbnic_get_ethtool_stats,
- .get_sset_count = fbnic_get_sset_count,
- .get_rxnfc = fbnic_get_rxnfc,
- .set_rxnfc = fbnic_set_rxnfc,
- .get_rxfh_key_size = fbnic_get_rxfh_key_size,
- .get_rxfh_indir_size = fbnic_get_rxfh_indir_size,
- .get_rxfh = fbnic_get_rxfh,
- .set_rxfh = fbnic_set_rxfh,
- .get_rxfh_fields = fbnic_get_rss_hash_opts,
- .set_rxfh_fields = fbnic_set_rss_hash_opts,
- .create_rxfh_context = fbnic_create_rxfh_context,
- .modify_rxfh_context = fbnic_modify_rxfh_context,
- .remove_rxfh_context = fbnic_remove_rxfh_context,
- .get_channels = fbnic_get_channels,
- .set_channels = fbnic_set_channels,
- .get_ts_info = fbnic_get_ts_info,
- .get_ts_stats = fbnic_get_ts_stats,
- .get_link_ksettings = fbnic_phylink_ethtool_ksettings_get,
- .get_fecparam = fbnic_phylink_get_fecparam,
- .get_eth_mac_stats = fbnic_get_eth_mac_stats,
- .get_eth_ctrl_stats = fbnic_get_eth_ctrl_stats,
- .get_rmon_stats = fbnic_get_rmon_stats,
+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+ ETHTOOL_COALESCE_RX_MAX_FRAMES,
+ .rxfh_max_num_contexts = FBNIC_RPC_RSS_TBL_COUNT,
+ .get_drvinfo = fbnic_get_drvinfo,
+ .get_regs_len = fbnic_get_regs_len,
+ .get_regs = fbnic_get_regs,
+ .get_link = ethtool_op_get_link,
+ .get_coalesce = fbnic_get_coalesce,
+ .set_coalesce = fbnic_set_coalesce,
+ .get_ringparam = fbnic_get_ringparam,
+ .set_ringparam = fbnic_set_ringparam,
+ .get_pauseparam = fbnic_phylink_get_pauseparam,
+ .set_pauseparam = fbnic_phylink_set_pauseparam,
+ .get_strings = fbnic_get_strings,
+ .get_ethtool_stats = fbnic_get_ethtool_stats,
+ .get_sset_count = fbnic_get_sset_count,
+ .get_rxnfc = fbnic_get_rxnfc,
+ .set_rxnfc = fbnic_set_rxnfc,
+ .get_rxfh_key_size = fbnic_get_rxfh_key_size,
+ .get_rxfh_indir_size = fbnic_get_rxfh_indir_size,
+ .get_rxfh = fbnic_get_rxfh,
+ .set_rxfh = fbnic_set_rxfh,
+ .get_rxfh_fields = fbnic_get_rss_hash_opts,
+ .set_rxfh_fields = fbnic_set_rss_hash_opts,
+ .create_rxfh_context = fbnic_create_rxfh_context,
+ .modify_rxfh_context = fbnic_modify_rxfh_context,
+ .remove_rxfh_context = fbnic_remove_rxfh_context,
+ .get_channels = fbnic_get_channels,
+ .set_channels = fbnic_set_channels,
+ .get_ts_info = fbnic_get_ts_info,
+ .get_ts_stats = fbnic_get_ts_stats,
+ .get_link_ksettings = fbnic_phylink_ethtool_ksettings_get,
+ .get_fecparam = fbnic_phylink_get_fecparam,
+ .get_eth_mac_stats = fbnic_get_eth_mac_stats,
+ .get_eth_ctrl_stats = fbnic_get_eth_ctrl_stats,
+ .get_rmon_stats = fbnic_get_rmon_stats,
};
void fbnic_set_ethtool_ops(struct net_device *dev)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
index 01756aba29fb..ab58572c27aa 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
@@ -376,11 +376,11 @@ fbnic_fw_get_cmpl_by_type(struct fbnic_dev *fbd, u32 msg_type)
*
* Return:
* One the following values:
- * -EOPNOTSUPP: Is not ASIC so mailbox is not supported
- * -ENODEV: Device I/O error
- * -ENOMEM: Failed to allocate message
- * -EBUSY: No space in mailbox
- * -ENOSPC: DMA mapping failed
+ * -EOPNOTSUPP: Is not ASIC so mailbox is not supported
+ * -ENODEV: Device I/O error
+ * -ENOMEM: Failed to allocate message
+ * -EBUSY: No space in mailbox
+ * -ENOSPC: DMA mapping failed
*
* This function sends a single TLV header indicating the host wants to take
* some action. However there are no other side effects which means that any
--
2.49.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 4/5] eth: fbnic: sort includes
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
` (2 preceding siblings ...)
2025-06-24 14:28 ` [PATCH net-next 3/5] eth: fbnic: realign whitespace Jakub Kicinski
@ 2025-06-24 14:28 ` Jakub Kicinski
2025-06-25 11:08 ` Simon Horman
2025-06-24 14:28 ` [PATCH net-next 5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl Jakub Kicinski
2025-06-26 13:10 ` [PATCH net-next 0/5] eth: fbnic: trivial code tweaks patchwork-bot+netdevbpf
5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-24 14:28 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr, Jakub Kicinski
Make sure includes are in alphabetical order.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/meta/fbnic/fbnic_netdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
index ab8b8b0f9f64..86576ae04262 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
@@ -4,8 +4,8 @@
#ifndef _FBNIC_NETDEV_H_
#define _FBNIC_NETDEV_H_
-#include <linux/types.h>
#include <linux/phylink.h>
+#include <linux/types.h>
#include "fbnic_csr.h"
#include "fbnic_rpc.h"
--
2.49.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next 5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
` (3 preceding siblings ...)
2025-06-24 14:28 ` [PATCH net-next 4/5] eth: fbnic: sort includes Jakub Kicinski
@ 2025-06-24 14:28 ` Jakub Kicinski
2025-06-25 11:08 ` Simon Horman
2025-06-26 13:10 ` [PATCH net-next 0/5] eth: fbnic: trivial code tweaks patchwork-bot+netdevbpf
5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-24 14:28 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr, Jakub Kicinski
fbnic_fw_clear_cmpl() does the inverse of fbnic_mbx_set_cmpl().
It removes the completion from the mailbox table.
It also calls fbnic_mbx_set_cmpl_slot() internally.
It should have fbnic_mbx prefix, not fbnic_fw.
I'm not very clear on what the distinction is between the two
prefixes but the matching "set" and "clear" functions should
use the same prefix.
While at it move the "clear" function closer to the "set".
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 4 ++--
.../net/ethernet/meta/fbnic/fbnic_devlink.c | 4 ++--
drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 20 +++++++++----------
drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 2 +-
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
index f3ed65cf976a..555b231b38c1 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
@@ -66,6 +66,8 @@ void fbnic_mbx_init(struct fbnic_dev *fbd);
void fbnic_mbx_clean(struct fbnic_dev *fbd);
int fbnic_mbx_set_cmpl(struct fbnic_dev *fbd,
struct fbnic_fw_completion *cmpl_data);
+void fbnic_mbx_clear_cmpl(struct fbnic_dev *fbd,
+ struct fbnic_fw_completion *cmpl_data);
void fbnic_mbx_poll(struct fbnic_dev *fbd);
int fbnic_mbx_poll_tx_ready(struct fbnic_dev *fbd);
void fbnic_mbx_flush_tx(struct fbnic_dev *fbd);
@@ -81,8 +83,6 @@ int fbnic_fw_xmit_fw_write_chunk(struct fbnic_dev *fbd,
int fbnic_fw_xmit_tsene_read_msg(struct fbnic_dev *fbd,
struct fbnic_fw_completion *cmpl_data);
struct fbnic_fw_completion *fbnic_fw_alloc_cmpl(u32 msg_type);
-void fbnic_fw_clear_cmpl(struct fbnic_dev *fbd,
- struct fbnic_fw_completion *cmpl_data);
void fbnic_fw_put_cmpl(struct fbnic_fw_completion *cmpl_data);
#define fbnic_mk_full_fw_ver_str(_rev_id, _delim, _commit, _str, _str_sz) \
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
index 4c4938eedd7b..c5f81f139e7e 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
@@ -182,7 +182,7 @@ fbnic_flash_start(struct fbnic_dev *fbd, struct pldmfw_component *component)
else
err = -ETIMEDOUT;
- fbnic_fw_clear_cmpl(fbd, cmpl);
+ fbnic_mbx_clear_cmpl(fbd, cmpl);
cmpl_free:
fbnic_fw_put_cmpl(cmpl);
@@ -300,7 +300,7 @@ fbnic_flash_component(struct pldmfw *context,
component_name, 0, 0);
}
- fbnic_fw_clear_cmpl(fbd, cmpl);
+ fbnic_mbx_clear_cmpl(fbd, cmpl);
cmpl_free:
fbnic_fw_put_cmpl(cmpl);
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
index ab58572c27aa..1d220d8369e7 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
@@ -338,6 +338,16 @@ static int fbnic_mbx_map_req_w_cmpl(struct fbnic_dev *fbd,
return err;
}
+void fbnic_mbx_clear_cmpl(struct fbnic_dev *fbd,
+ struct fbnic_fw_completion *fw_cmpl)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&fbd->fw_tx_lock, flags);
+ fbnic_mbx_clear_cmpl_slot(fbd, fw_cmpl);
+ spin_unlock_irqrestore(&fbd->fw_tx_lock, flags);
+}
+
static void fbnic_fw_release_cmpl_data(struct kref *kref)
{
struct fbnic_fw_completion *cmpl_data;
@@ -1263,16 +1273,6 @@ struct fbnic_fw_completion *fbnic_fw_alloc_cmpl(u32 msg_type)
return cmpl;
}
-void fbnic_fw_clear_cmpl(struct fbnic_dev *fbd,
- struct fbnic_fw_completion *fw_cmpl)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&fbd->fw_tx_lock, flags);
- fbnic_mbx_clear_cmpl_slot(fbd, fw_cmpl);
- spin_unlock_irqrestore(&fbd->fw_tx_lock, flags);
-}
-
void fbnic_fw_put_cmpl(struct fbnic_fw_completion *fw_cmpl)
{
kref_put(&fw_cmpl->ref_count, fbnic_fw_release_cmpl_data);
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
index 5ff45463f9d2..fd8d67f9048e 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
@@ -796,7 +796,7 @@ static int fbnic_mac_get_sensor_asic(struct fbnic_dev *fbd, int id,
*val = *sensor;
exit_cleanup:
- fbnic_fw_clear_cmpl(fbd, fw_cmpl);
+ fbnic_mbx_clear_cmpl(fbd, fw_cmpl);
exit_free:
fbnic_fw_put_cmpl(fw_cmpl);
--
2.49.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 2/5] eth: fbnic: fix stampinn typo in a comment
2025-06-24 14:28 ` [PATCH net-next 2/5] eth: fbnic: fix stampinn typo in a comment Jakub Kicinski
@ 2025-06-24 15:35 ` Vadim Fedorenko
0 siblings, 0 replies; 12+ messages in thread
From: Vadim Fedorenko @ 2025-06-24 15:35 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, alexanderduyck,
mohsin.bashr
On 24/06/2025 15:28, Jakub Kicinski wrote:
> Fix a typo:
> stampinn -> stamping
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> drivers/net/ethernet/meta/fbnic/fbnic_netdev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
> index a3dc85d3838b..805a31cd94b5 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
> @@ -66,7 +66,7 @@ struct fbnic_net {
> struct fbnic_queue_stats rx_stats;
> u64 link_down_events;
>
> - /* Time stampinn filter config */
> + /* Time stamping filter config */
> struct kernel_hwtstamp_config hwtstamp_config;
> };
>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros
2025-06-24 14:28 ` [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros Jakub Kicinski
@ 2025-06-25 11:07 ` Simon Horman
0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2025-06-25 11:07 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, alexanderduyck,
mohsin.bashr
On Tue, Jun 24, 2025 at 07:28:30AM -0700, Jakub Kicinski wrote:
> Somehow we ended up with two copies of FBNIC_MAX_[TR]XQS in fbnic_txrx.h.
> Remove the one mixed with the struct declarations.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 3/5] eth: fbnic: realign whitespace
2025-06-24 14:28 ` [PATCH net-next 3/5] eth: fbnic: realign whitespace Jakub Kicinski
@ 2025-06-25 11:07 ` Simon Horman
0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2025-06-25 11:07 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, alexanderduyck,
mohsin.bashr
On Tue, Jun 24, 2025 at 07:28:32AM -0700, Jakub Kicinski wrote:
> Relign various whitespace things. Some of it is spaces which should
> be tabs and some is making sure the values are actually correctly
> aligned to "columns" with 8 space tabs. Whitespace changes only.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 4/5] eth: fbnic: sort includes
2025-06-24 14:28 ` [PATCH net-next 4/5] eth: fbnic: sort includes Jakub Kicinski
@ 2025-06-25 11:08 ` Simon Horman
0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2025-06-25 11:08 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, alexanderduyck,
mohsin.bashr
On Tue, Jun 24, 2025 at 07:28:33AM -0700, Jakub Kicinski wrote:
> Make sure includes are in alphabetical order.
\o/
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl
2025-06-24 14:28 ` [PATCH net-next 5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl Jakub Kicinski
@ 2025-06-25 11:08 ` Simon Horman
0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2025-06-25 11:08 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, alexanderduyck,
mohsin.bashr
On Tue, Jun 24, 2025 at 07:28:34AM -0700, Jakub Kicinski wrote:
> fbnic_fw_clear_cmpl() does the inverse of fbnic_mbx_set_cmpl().
> It removes the completion from the mailbox table.
> It also calls fbnic_mbx_set_cmpl_slot() internally.
> It should have fbnic_mbx prefix, not fbnic_fw.
> I'm not very clear on what the distinction is between the two
> prefixes but the matching "set" and "clear" functions should
> use the same prefix.
>
> While at it move the "clear" function closer to the "set".
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 0/5] eth: fbnic: trivial code tweaks
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
` (4 preceding siblings ...)
2025-06-24 14:28 ` [PATCH net-next 5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl Jakub Kicinski
@ 2025-06-26 13:10 ` patchwork-bot+netdevbpf
5 siblings, 0 replies; 12+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-26 13:10 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
alexanderduyck, mohsin.bashr
Hello:
This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 24 Jun 2025 07:28:29 -0700 you wrote:
> A handful of code cleanups. No functional changes.
>
> Jakub Kicinski (5):
> eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros
> eth: fbnic: fix stampinn typo in a comment
> eth: fbnic: realign whitespace
> eth: fbnic: sort includes
> eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl
>
> [...]
Here is the summary with links:
- [net-next,1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros
https://git.kernel.org/netdev/net-next/c/f2657cfb4586
- [net-next,2/5] eth: fbnic: fix stampinn typo in a comment
https://git.kernel.org/netdev/net-next/c/461bc4030dc9
- [net-next,3/5] eth: fbnic: realign whitespace
https://git.kernel.org/netdev/net-next/c/f7d4c21667cc
- [net-next,4/5] eth: fbnic: sort includes
https://git.kernel.org/netdev/net-next/c/536bc9b2d8e8
- [net-next,5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl
https://git.kernel.org/netdev/net-next/c/d42e5248c9fa
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-06-26 13:09 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 14:28 [PATCH net-next 0/5] eth: fbnic: trivial code tweaks Jakub Kicinski
2025-06-24 14:28 ` [PATCH net-next 1/5] eth: fbnic: remove duplicate FBNIC_MAX_.XQS macros Jakub Kicinski
2025-06-25 11:07 ` Simon Horman
2025-06-24 14:28 ` [PATCH net-next 2/5] eth: fbnic: fix stampinn typo in a comment Jakub Kicinski
2025-06-24 15:35 ` Vadim Fedorenko
2025-06-24 14:28 ` [PATCH net-next 3/5] eth: fbnic: realign whitespace Jakub Kicinski
2025-06-25 11:07 ` Simon Horman
2025-06-24 14:28 ` [PATCH net-next 4/5] eth: fbnic: sort includes Jakub Kicinski
2025-06-25 11:08 ` Simon Horman
2025-06-24 14:28 ` [PATCH net-next 5/5] eth: fbnic: rename fbnic_fw_clear_cmpl to fbnic_mbx_clear_cmpl Jakub Kicinski
2025-06-25 11:08 ` Simon Horman
2025-06-26 13:10 ` [PATCH net-next 0/5] eth: fbnic: trivial code tweaks patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).