#include <asm/unaligned.h>
#include <linux/mdio.h>
#include <linux/module.h>
#include <linux/fsl/enetc_mdio.h>
#include <linux/of_platform.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
#include <linux/pcs-lynx.h>
#include "enetc_ierb.h"
#include "enetc_pf.h"
#define ENETC_DRV_NAME_STR …
static void enetc_pf_get_primary_mac_addr(struct enetc_hw *hw, int si, u8 *addr)
{ … }
static void enetc_pf_set_primary_mac_addr(struct enetc_hw *hw, int si,
const u8 *addr)
{ … }
static int enetc_pf_set_mac_addr(struct net_device *ndev, void *addr)
{ … }
static void enetc_set_vlan_promisc(struct enetc_hw *hw, char si_map)
{ … }
static void enetc_enable_si_vlan_promisc(struct enetc_pf *pf, int si_idx)
{ … }
static void enetc_disable_si_vlan_promisc(struct enetc_pf *pf, int si_idx)
{ … }
static void enetc_set_isol_vlan(struct enetc_hw *hw, int si, u16 vlan, u8 qos)
{ … }
static int enetc_mac_addr_hash_idx(const u8 *addr)
{ … }
static void enetc_reset_mac_addr_filter(struct enetc_mac_filter *filter)
{ … }
static void enetc_add_mac_addr_em_filter(struct enetc_mac_filter *filter,
const unsigned char *addr)
{ … }
static void enetc_add_mac_addr_ht_filter(struct enetc_mac_filter *filter,
const unsigned char *addr)
{ … }
static void enetc_clear_mac_ht_flt(struct enetc_si *si, int si_idx, int type)
{ … }
static void enetc_set_mac_ht_flt(struct enetc_si *si, int si_idx, int type,
unsigned long hash)
{ … }
static void enetc_sync_mac_filters(struct enetc_pf *pf)
{ … }
static void enetc_pf_set_rx_mode(struct net_device *ndev)
{ … }
static void enetc_set_vlan_ht_filter(struct enetc_hw *hw, int si_idx,
unsigned long hash)
{ … }
static int enetc_vid_hash_idx(unsigned int vid)
{ … }
static void enetc_sync_vlan_ht_filter(struct enetc_pf *pf, bool rehash)
{ … }
static int enetc_vlan_rx_add_vid(struct net_device *ndev, __be16 prot, u16 vid)
{ … }
static int enetc_vlan_rx_del_vid(struct net_device *ndev, __be16 prot, u16 vid)
{ … }
static void enetc_set_loopback(struct net_device *ndev, bool en)
{ … }
static int enetc_pf_set_vf_mac(struct net_device *ndev, int vf, u8 *mac)
{ … }
static int enetc_pf_set_vf_vlan(struct net_device *ndev, int vf, u16 vlan,
u8 qos, __be16 proto)
{ … }
static int enetc_pf_set_vf_spoofchk(struct net_device *ndev, int vf, bool en)
{ … }
static int enetc_setup_mac_address(struct device_node *np, struct enetc_pf *pf,
int si)
{ … }
static int enetc_setup_mac_addresses(struct device_node *np,
struct enetc_pf *pf)
{ … }
static void enetc_port_assign_rfs_entries(struct enetc_si *si)
{ … }
static void enetc_port_si_configure(struct enetc_si *si)
{ … }
void enetc_set_ptcmsdur(struct enetc_hw *hw, u32 *max_sdu)
{ … }
void enetc_reset_ptcmsdur(struct enetc_hw *hw)
{ … }
static void enetc_configure_port_mac(struct enetc_si *si)
{ … }
static void enetc_mac_config(struct enetc_si *si, phy_interface_t phy_mode)
{ … }
static void enetc_mac_enable(struct enetc_si *si, bool en)
{ … }
static void enetc_configure_port(struct enetc_pf *pf)
{ … }
static u16 enetc_msg_pf_set_vf_primary_mac_addr(struct enetc_pf *pf,
int vf_id)
{ … }
void enetc_msg_handle_rxmsg(struct enetc_pf *pf, int vf_id, u16 *status)
{ … }
#ifdef CONFIG_PCI_IOV
static int enetc_sriov_configure(struct pci_dev *pdev, int num_vfs)
{ … }
#else
#define enetc_sriov_configure …
#endif
static int enetc_pf_set_features(struct net_device *ndev,
netdev_features_t features)
{ … }
static int enetc_pf_setup_tc(struct net_device *ndev, enum tc_setup_type type,
void *type_data)
{ … }
static const struct net_device_ops enetc_ndev_ops = …;
static void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev,
const struct net_device_ops *ndev_ops)
{ … }
static int enetc_mdio_probe(struct enetc_pf *pf, struct device_node *np)
{ … }
static void enetc_mdio_remove(struct enetc_pf *pf)
{ … }
static int enetc_imdio_create(struct enetc_pf *pf)
{ … }
static void enetc_imdio_remove(struct enetc_pf *pf)
{ … }
static bool enetc_port_has_pcs(struct enetc_pf *pf)
{ … }
static int enetc_mdiobus_create(struct enetc_pf *pf, struct device_node *node)
{ … }
static void enetc_mdiobus_destroy(struct enetc_pf *pf)
{ … }
static struct phylink_pcs *
enetc_pl_mac_select_pcs(struct phylink_config *config, phy_interface_t iface)
{ … }
static void enetc_pl_mac_config(struct phylink_config *config,
unsigned int mode,
const struct phylink_link_state *state)
{ … }
static void enetc_force_rgmii_mac(struct enetc_si *si, int speed, int duplex)
{ … }
static void enetc_pl_mac_link_up(struct phylink_config *config,
struct phy_device *phy, unsigned int mode,
phy_interface_t interface, int speed,
int duplex, bool tx_pause, bool rx_pause)
{ … }
static void enetc_pl_mac_link_down(struct phylink_config *config,
unsigned int mode,
phy_interface_t interface)
{ … }
static const struct phylink_mac_ops enetc_mac_phylink_ops = …;
static int enetc_phylink_create(struct enetc_ndev_priv *priv,
struct device_node *node)
{ … }
static void enetc_phylink_destroy(struct enetc_ndev_priv *priv)
{ … }
static int enetc_init_port_rfs_memory(struct enetc_si *si)
{ … }
static int enetc_init_port_rss_memory(struct enetc_si *si)
{ … }
static int enetc_pf_register_with_ierb(struct pci_dev *pdev)
{ … }
static struct enetc_si *enetc_psi_create(struct pci_dev *pdev)
{ … }
static void enetc_psi_destroy(struct pci_dev *pdev)
{ … }
static int enetc_pf_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ … }
static void enetc_pf_remove(struct pci_dev *pdev)
{ … }
static void enetc_fixup_clear_rss_rfs(struct pci_dev *pdev)
{ … }
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID_PF,
enetc_fixup_clear_rss_rfs);
static const struct pci_device_id enetc_pf_id_table[] = …;
MODULE_DEVICE_TABLE(pci, enetc_pf_id_table);
static struct pci_driver enetc_pf_driver = …;
module_pci_driver(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;