diff options
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r-- | drivers/net/jme.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 0f31497833df..c0b59a555384 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx) | |||
946 | jme->jme_vlan_rx(skb, jme->vlgrp, | 946 | jme->jme_vlan_rx(skb, jme->vlgrp, |
947 | le16_to_cpu(rxdesc->descwb.vlan)); | 947 | le16_to_cpu(rxdesc->descwb.vlan)); |
948 | NET_STAT(jme).rx_bytes += 4; | 948 | NET_STAT(jme).rx_bytes += 4; |
949 | } else { | ||
950 | dev_kfree_skb(skb); | ||
949 | } | 951 | } |
950 | } else { | 952 | } else { |
951 | jme->jme_rx(skb); | 953 | jme->jme_rx(skb); |
@@ -2081,12 +2083,45 @@ jme_tx_timeout(struct net_device *netdev) | |||
2081 | jme_reset_link(jme); | 2083 | jme_reset_link(jme); |
2082 | } | 2084 | } |
2083 | 2085 | ||
2086 | static inline void jme_pause_rx(struct jme_adapter *jme) | ||
2087 | { | ||
2088 | atomic_dec(&jme->link_changing); | ||
2089 | |||
2090 | jme_set_rx_pcc(jme, PCC_OFF); | ||
2091 | if (test_bit(JME_FLAG_POLL, &jme->flags)) { | ||
2092 | JME_NAPI_DISABLE(jme); | ||
2093 | } else { | ||
2094 | tasklet_disable(&jme->rxclean_task); | ||
2095 | tasklet_disable(&jme->rxempty_task); | ||
2096 | } | ||
2097 | } | ||
2098 | |||
2099 | static inline void jme_resume_rx(struct jme_adapter *jme) | ||
2100 | { | ||
2101 | struct dynpcc_info *dpi = &(jme->dpi); | ||
2102 | |||
2103 | if (test_bit(JME_FLAG_POLL, &jme->flags)) { | ||
2104 | JME_NAPI_ENABLE(jme); | ||
2105 | } else { | ||
2106 | tasklet_hi_enable(&jme->rxclean_task); | ||
2107 | tasklet_hi_enable(&jme->rxempty_task); | ||
2108 | } | ||
2109 | dpi->cur = PCC_P1; | ||
2110 | dpi->attempt = PCC_P1; | ||
2111 | dpi->cnt = 0; | ||
2112 | jme_set_rx_pcc(jme, PCC_P1); | ||
2113 | |||
2114 | atomic_inc(&jme->link_changing); | ||
2115 | } | ||
2116 | |||
2084 | static void | 2117 | static void |
2085 | jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | 2118 | jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) |
2086 | { | 2119 | { |
2087 | struct jme_adapter *jme = netdev_priv(netdev); | 2120 | struct jme_adapter *jme = netdev_priv(netdev); |
2088 | 2121 | ||
2122 | jme_pause_rx(jme); | ||
2089 | jme->vlgrp = grp; | 2123 | jme->vlgrp = grp; |
2124 | jme_resume_rx(jme); | ||
2090 | } | 2125 | } |
2091 | 2126 | ||
2092 | static void | 2127 | static void |