Lines Matching refs:intf
34 void bcmasp_enable_tx_irq(struct bcmasp_intf *intf, int en)
36 struct bcmasp_priv *priv = intf->parent;
39 _intr2_mask_clear(priv, ASP_INTR2_TX_DESC(intf->channel));
41 _intr2_mask_set(priv, ASP_INTR2_TX_DESC(intf->channel));
45 void bcmasp_enable_rx_irq(struct bcmasp_intf *intf, int en)
47 struct bcmasp_priv *priv = intf->parent;
50 _intr2_mask_clear(priv, ASP_INTR2_RX_ECH(intf->channel));
52 _intr2_mask_set(priv, ASP_INTR2_RX_ECH(intf->channel));
67 static void bcmasp_intr2_handling(struct bcmasp_intf *intf, u32 status)
69 if (status & ASP_INTR2_RX_ECH(intf->channel)) {
70 if (likely(napi_schedule_prep(&intf->rx_napi))) {
71 bcmasp_enable_rx_irq(intf, 0);
72 __napi_schedule_irqoff(&intf->rx_napi);
76 if (status & ASP_INTR2_TX_DESC(intf->channel)) {
77 if (likely(napi_schedule_prep(&intf->tx_napi))) {
78 bcmasp_enable_tx_irq(intf, 0);
79 __napi_schedule_irqoff(&intf->tx_napi);
87 struct bcmasp_intf *intf;
101 list_for_each_entry(intf, &priv->intfs, list)
102 bcmasp_intr2_handling(intf, status);
107 void bcmasp_flush_rx_port(struct bcmasp_intf *intf)
109 struct bcmasp_priv *priv = intf->parent;
112 switch (intf->port) {
497 void bcmasp_netfilt_suspend(struct bcmasp_intf *intf)
499 struct bcmasp_priv *priv = intf->parent;
507 priv->net_filters[i].port != intf->port)
531 int bcmasp_netfilt_get_all_active(struct bcmasp_intf *intf, u32 *rule_locs,
534 struct bcmasp_priv *priv = intf->parent;
539 priv->net_filters[i].port != intf->port)
558 int bcmasp_netfilt_get_active(struct bcmasp_intf *intf)
560 struct bcmasp_priv *priv = intf->parent;
565 priv->net_filters[i].port != intf->port)
580 bool bcmasp_netfilt_check_dup(struct bcmasp_intf *intf,
583 struct bcmasp_priv *priv = intf->parent;
590 priv->net_filters[i].port != intf->port)
647 struct bcmasp_net_filter *bcmasp_netfilt_get_init(struct bcmasp_intf *intf,
652 struct bcmasp_priv *priv = intf->parent;
677 priv->net_filters[i].port == intf->port)
699 nfilter->port = intf->port;
713 void bcmasp_netfilt_release(struct bcmasp_intf *intf,
716 struct bcmasp_priv *priv = intf->parent;
733 static void bcmasp_set_mda_filter(struct bcmasp_intf *intf,
738 struct bcmasp_priv *priv = intf->parent;
754 static void bcmasp_en_mda_filter(struct bcmasp_intf *intf, bool en,
757 struct bcmasp_priv *priv = intf->parent;
763 priv->mda_filters[i].port = intf->port;
765 rx_filter_core_wl(priv, ((intf->channel + 8) |
767 ASP_RX_FILTER_MDA_CFG_UMC_SEL(intf->port)),
792 #define ASP_RX_FILT_MDA(intf, name) (((intf)->index * \
801 void bcmasp_set_promisc(struct bcmasp_intf *intf, bool en)
803 unsigned int i = ASP_RX_FILT_MDA(intf, PROMISC);
808 bcmasp_set_mda_filter(intf, promisc, promisc, i);
809 bcmasp_en_mda_filter(intf, en, i);
812 void bcmasp_set_allmulti(struct bcmasp_intf *intf, bool en)
815 unsigned int i = ASP_RX_FILT_MDA(intf, ALLMULTI);
818 bcmasp_set_mda_filter(intf, allmulti, allmulti, i);
819 bcmasp_en_mda_filter(intf, en, i);
822 void bcmasp_set_broad(struct bcmasp_intf *intf, bool en)
824 unsigned int i = ASP_RX_FILT_MDA(intf, BROADCAST);
828 bcmasp_set_mda_filter(intf, addr, addr, i);
829 bcmasp_en_mda_filter(intf, en, i);
832 void bcmasp_set_oaddr(struct bcmasp_intf *intf, const unsigned char *addr,
836 unsigned int i = ASP_RX_FILT_MDA(intf, OWN_ADDR);
838 bcmasp_set_mda_filter(intf, addr, mask, i);
839 bcmasp_en_mda_filter(intf, en, i);
842 void bcmasp_disable_all_filters(struct bcmasp_intf *intf)
844 struct bcmasp_priv *priv = intf->parent;
848 res_count = bcmasp_total_res_mda_cnt(intf->parent);
853 priv->mda_filters[i].port == intf->port)
854 bcmasp_en_mda_filter(intf, 0, i);
858 static int bcmasp_combine_set_filter(struct bcmasp_intf *intf,
862 struct bcmasp_priv *priv = intf->parent;
878 bcmasp_set_mda_filter(intf, addr, mask, i);
886 int bcmasp_set_en_mda_filter(struct bcmasp_intf *intf, unsigned char *addr,
889 struct bcmasp_priv *priv = intf->parent;
893 res_count = bcmasp_total_res_mda_cnt(intf->parent);
898 priv->mda_filters[i].port != intf->port)
902 ret = bcmasp_combine_set_filter(intf, addr, mask, i);
904 intf->mib.filters_combine_cnt++;
914 bcmasp_set_mda_filter(intf, addr, mask, i);
915 bcmasp_en_mda_filter(intf, 1, i);
1011 void bcmasp_core_clock_set_intf(struct bcmasp_intf *intf, bool en)
1013 u32 intf_mask = ASP_CTRL_CLOCK_CTRL_ASP_RGMII_DIS(intf->port);
1014 struct bcmasp_priv *priv = intf->parent;
1092 static void bcmasp_enable_wol_shared(struct bcmasp_intf *intf, bool en)
1094 struct bcmasp_priv *priv = intf->parent;
1099 set_bit(intf->port, &priv->wol_irq_enabled_mask);
1104 set_bit(intf->port, &priv->wol_irq_enabled_mask);
1111 clear_bit(intf->port, &priv->wol_irq_enabled_mask);
1131 struct bcmasp_intf *intf;
1134 list_for_each_entry(intf, &priv->intfs, list) {
1135 irq = bcmasp_get_and_request_irq(priv, intf->port + 1);
1138 intf->port, irq);
1142 intf->wol_irq = irq;
1143 intf->wol_irq_enabled = false;
1148 static void bcmasp_enable_wol_per_intf(struct bcmasp_intf *intf, bool en)
1150 struct device *dev = &intf->parent->pdev->dev;
1152 if (en ^ intf->wol_irq_enabled)
1153 irq_set_irq_wake(intf->wol_irq, en);
1155 intf->wol_irq_enabled = en;
1161 struct bcmasp_intf *intf;
1163 list_for_each_entry(intf, &priv->intfs, list) {
1164 if (intf->wol_irq > 0)
1165 free_irq(intf->wol_irq, priv);
1216 struct bcmasp_intf *intf, *n;
1218 list_for_each_entry_safe(intf, n, &priv->intfs, list) {
1219 list_del(&intf->list);
1220 bcmasp_interface_destroy(intf);
1230 struct bcmasp_intf *intf;
1304 intf = bcmasp_interface_create(priv, intf_node, i);
1305 if (!intf) {
1311 list_add_tail(&intf->list, &priv->intfs);
1328 list_for_each_entry(intf, &priv->intfs, list) {
1329 ret = register_netdev(intf->ndev);
1331 netdev_err(intf->ndev,
1368 struct bcmasp_intf *intf;
1371 list_for_each_entry(intf, &priv->intfs, list) {
1372 ret = bcmasp_interface_suspend(intf);
1396 struct bcmasp_intf *intf;
1417 list_for_each_entry(intf, &priv->intfs, list) {
1418 ret = bcmasp_interface_resume(intf);