Lines Matching full:si

16 	struct enetc_hw *hw = &pf->si->hw;  in enetc4_get_port_caps()
31 static void enetc4_pf_set_si_primary_mac(struct enetc_hw *hw, int si, in enetc4_pf_set_si_primary_mac() argument
37 if (si != 0) { in enetc4_pf_set_si_primary_mac()
38 __raw_writel(upper, hw->port + ENETC4_PSIPMAR0(si)); in enetc4_pf_set_si_primary_mac()
39 __raw_writew(lower, hw->port + ENETC4_PSIPMAR1(si)); in enetc4_pf_set_si_primary_mac()
46 static void enetc4_pf_get_si_primary_mac(struct enetc_hw *hw, int si, in enetc4_pf_get_si_primary_mac() argument
52 upper = __raw_readl(hw->port + ENETC4_PSIPMAR0(si)); in enetc4_pf_get_si_primary_mac()
53 lower = __raw_readw(hw->port + ENETC4_PSIPMAR1(si)); in enetc4_pf_get_si_primary_mac()
64 static int enetc4_pf_struct_init(struct enetc_si *si) in enetc4_pf_struct_init() argument
66 struct enetc_pf *pf = enetc_si_priv(si); in enetc4_pf_struct_init()
68 pf->si = si; in enetc4_pf_struct_init()
69 pf->total_vfs = pci_sriov_get_totalvfs(si->pdev); in enetc4_pf_struct_init()
93 struct enetc_hw *hw = &pf->si->hw; in enetc4_default_rings_allocation()
132 static void enetc4_pf_set_si_vlan_promisc(struct enetc_hw *hw, int si, bool en) in enetc4_pf_set_si_vlan_promisc() argument
137 val |= BIT(si); in enetc4_pf_set_si_vlan_promisc()
139 val &= ~BIT(si); in enetc4_pf_set_si_vlan_promisc()
146 struct enetc_hw *hw = &pf->si->hw; in enetc4_set_default_si_vlan_promisc()
155 /* Allocate the number of MSI-X vectors for per SI. */
158 struct enetc_hw *hw = &pf->si->hw; in enetc4_set_si_msix_num()
177 struct enetc_hw *hw = &pf->si->hw; in enetc4_enable_all_si()
191 struct enetc_hw *hw = &pf->si->hw; in enetc4_configure_port_si()
200 /* Disable SI MAC multicast & unicast promiscuous */ in enetc4_configure_port_si()
221 struct enetc_si *si = pf->si; in enetc4_set_trx_frame_size() local
223 enetc_port_mac_wr(si, ENETC4_PM_MAXFRM(0), in enetc4_set_trx_frame_size()
226 enetc4_pf_reset_tc_msdu(&si->hw); in enetc4_set_trx_frame_size()
240 struct enetc_hw *hw = &pf->si->hw; in enetc4_set_default_rss_key()
249 struct enetc_hw *hw = &pf->si->hw; in enetc4_enable_trx()
265 struct device *dev = &pf->si->pdev->dev; in enetc4_pf_init()
299 struct enetc_ndev_priv *priv = netdev_priv(pf->si->ndev); in enetc4_mac_config()
300 struct enetc_si *si = pf->si; in enetc4_mac_config() local
303 val = enetc_port_mac_rd(si, ENETC4_PM_IF_MODE(0)); in enetc4_mac_config()
336 enetc_port_mac_wr(si, ENETC4_PM_IF_MODE(0), val); in enetc4_mac_config()
355 val = enetc_port_rd(&priv->si->hw, ENETC4_PCR); in enetc4_set_port_speed()
371 enetc_port_wr(&priv->si->hw, ENETC4_PCR, val); in enetc4_set_port_speed()
376 struct enetc_si *si = pf->si; in enetc4_set_rgmii_mac() local
379 old_val = enetc_port_mac_rd(si, ENETC4_PM_IF_MODE(0)); in enetc4_set_rgmii_mac()
399 enetc_port_mac_wr(si, ENETC4_PM_IF_MODE(0), val); in enetc4_set_rgmii_mac()
404 struct enetc_si *si = pf->si; in enetc4_set_rmii_mac() local
407 old_val = enetc_port_mac_rd(si, ENETC4_PM_IF_MODE(0)); in enetc4_set_rmii_mac()
424 enetc_port_mac_wr(si, ENETC4_PM_IF_MODE(0), val); in enetc4_set_rmii_mac()
429 struct enetc_si *si = pf->si; in enetc4_set_hd_flow_control() local
435 old_val = enetc_port_mac_rd(si, ENETC4_PM_CMD_CFG(0)); in enetc4_set_hd_flow_control()
440 enetc_port_mac_wr(si, ENETC4_PM_CMD_CFG(0), val); in enetc4_set_hd_flow_control()
445 struct enetc_si *si = pf->si; in enetc4_set_rx_pause() local
448 old_val = enetc_port_mac_rd(si, ENETC4_PM_CMD_CFG(0)); in enetc4_set_rx_pause()
453 enetc_port_mac_wr(si, ENETC4_PM_CMD_CFG(0), val); in enetc4_set_rx_pause()
460 struct enetc_hw *hw = &pf->si->hw; in enetc4_set_tx_pause()
495 enetc_port_mac_wr(pf->si, ENETC4_PM_PAUSE_QUANTA(0), init_quanta); in enetc4_set_tx_pause()
496 enetc_port_mac_wr(pf->si, ENETC4_PM_PAUSE_THRESH(0), refresh_quanta); in enetc4_set_tx_pause()
503 struct enetc_si *si = pf->si; in enetc4_enable_mac() local
506 val = enetc_port_mac_rd(si, ENETC4_PM_CMD_CFG(0)); in enetc4_enable_mac()
510 enetc_port_mac_wr(si, ENETC4_PM_CMD_CFG(0), val); in enetc4_enable_mac()
519 struct enetc_si *si = pf->si; in enetc4_pl_mac_link_up() local
523 priv = netdev_priv(si->ndev); in enetc4_pl_mac_link_up()
582 struct enetc_pf *pf = enetc_si_priv(priv->si); in enetc4_link_init()
614 struct enetc_pf *pf = enetc_si_priv(priv->si); in enetc4_link_deinit()
620 static int enetc4_pf_netdev_create(struct enetc_si *si) in enetc4_pf_netdev_create() argument
622 struct device *dev = &si->pdev->dev; in enetc4_pf_netdev_create()
628 si->num_tx_rings, si->num_rx_rings); in enetc4_pf_netdev_create()
640 enetc_pf_netdev_setup(si, ndev, &enetc4_ndev_ops); in enetc4_pf_netdev_create()
646 dev_err(dev, "Failed to configure SI\n"); in enetc4_pf_netdev_create()
680 static void enetc4_pf_netdev_destroy(struct enetc_si *si) in enetc4_pf_netdev_destroy() argument
682 struct enetc_ndev_priv *priv = netdev_priv(si->ndev); in enetc4_pf_netdev_destroy()
683 struct net_device *ndev = si->ndev; in enetc4_pf_netdev_destroy()
695 struct enetc_si *si; in enetc4_pf_probe() local
708 /* si is the private data. */ in enetc4_pf_probe()
709 si = pci_get_drvdata(pdev); in enetc4_pf_probe()
710 if (!si->hw.port || !si->hw.global) in enetc4_pf_probe()
714 si->revision = enetc_get_ip_revision(&si->hw); in enetc4_pf_probe()
715 err = enetc_get_driver_data(si); in enetc4_pf_probe()
720 err = enetc4_pf_struct_init(si); in enetc4_pf_probe()
724 pf = enetc_si_priv(si); in enetc4_pf_probe()
729 enetc_get_si_caps(si); in enetc4_pf_probe()
731 return enetc4_pf_netdev_create(si); in enetc4_pf_probe()
736 struct enetc_si *si = pci_get_drvdata(pdev); in enetc4_pf_remove() local
738 enetc4_pf_netdev_destroy(si); in enetc4_pf_remove()