Thread (29 messages) 29 messages, 5 authors, 2024-10-26

RE: [PATCH v5 net-next 05/13] net: enetc: extract common ENETC PF parts for LS1028A and i.MX95 platforms

From: Wei Fang <wei.fang@nxp.com>
Date: 2024-10-25 02:25:02
Also in: imx, linux-devicetree, linux-pci, lkml

On Thu, Oct 24, 2024 at 02:53:20PM +0800, Wei Fang wrote:
quoted
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.h
b/drivers/net/ethernet/freescale/enetc/enetc_pf.h
quoted
index c26bd66e4597..92a26b09cf57 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.h
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.h
@@ -58,3 +58,16 @@ struct enetc_pf {
 int enetc_msg_psi_init(struct enetc_pf *pf);
 void enetc_msg_psi_free(struct enetc_pf *pf);
 void enetc_msg_handle_rxmsg(struct enetc_pf *pf, int mbox_id, u16
*status);
quoted
+
+void enetc_pf_get_primary_mac_addr(struct enetc_hw *hw, int si, u8
*addr);
quoted
+void enetc_pf_set_primary_mac_addr(struct enetc_hw *hw, int si,
+				   const u8 *addr);
+int enetc_pf_set_mac_addr(struct net_device *ndev, void *addr);
+int enetc_setup_mac_addresses(struct device_node *np, struct enetc_pf
*pf);
quoted
+void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
+			   const struct net_device_ops *ndev_ops);
+int enetc_mdiobus_create(struct enetc_pf *pf, struct device_node *node);
+void enetc_mdiobus_destroy(struct enetc_pf *pf);
+int enetc_phylink_create(struct enetc_ndev_priv *priv, struct device_node
*node,
quoted
+			 const struct phylink_mac_ops *ops);
+void enetc_phylink_destroy(struct enetc_ndev_priv *priv);
Could you put the prototypes of functions exported by enetc_pf_common.c
into a header named enetc_pf_common.h? It should be self-contained, i.e.
a dummy C file with just #include "enetc_pf_common.h" in it should compile
fine.
Sure, I'll add a new header file.
I know the enetc driver isn't there yet when it comes to thoroughly
respecting that, but for code we touch now, we should try to follow it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help