Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'bcmgenet-next'

Florian Fainelli says:

====================
net: bcmgenet: misc fixes

This patch series contains some misc. fixes for the bcmgenet driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+10 -14
+10 -13
drivers/net/ethernet/broadcom/genet/bcmgenet.c
··· 868 868 struct bcmgenet_priv *priv = netdev_priv(dev); 869 869 int last_tx_cn, last_c_index, num_tx_bds; 870 870 struct enet_cb *tx_cb_ptr; 871 + struct netdev_queue *txq; 871 872 unsigned int c_index; 872 873 873 874 /* Compute how many buffers are transmited since last xmit call */ 874 875 c_index = bcmgenet_tdma_ring_readl(priv, ring->index, TDMA_CONS_INDEX); 876 + txq = netdev_get_tx_queue(dev, ring->queue); 875 877 876 878 last_c_index = ring->c_index; 877 879 num_tx_bds = ring->size; ··· 919 917 if (ring->free_bds > (MAX_SKB_FRAGS + 1)) 920 918 ring->int_disable(priv, ring); 921 919 922 - if (__netif_subqueue_stopped(dev, ring->queue)) 923 - netif_wake_subqueue(dev, ring->queue); 920 + if (netif_tx_queue_stopped(txq)) 921 + netif_tx_wake_queue(txq); 924 922 925 923 ring->c_index = c_index; 926 924 } ··· 1108 1106 { 1109 1107 struct bcmgenet_priv *priv = netdev_priv(dev); 1110 1108 struct bcmgenet_tx_ring *ring = NULL; 1109 + struct netdev_queue *txq; 1111 1110 unsigned long flags = 0; 1112 1111 int nr_frags, index; 1113 1112 u16 dma_desc_flags; ··· 1128 1125 else 1129 1126 index -= 1; 1130 1127 1131 - if ((index != DESC_INDEX) && (index > priv->hw_params->tx_queues - 1)) { 1132 - netdev_err(dev, "%s: queue_mapping %d is invalid\n", 1133 - __func__, skb_get_queue_mapping(skb)); 1134 - dev->stats.tx_errors++; 1135 - dev->stats.tx_dropped++; 1136 - ret = NETDEV_TX_OK; 1137 - goto out; 1138 - } 1139 1128 nr_frags = skb_shinfo(skb)->nr_frags; 1140 1129 ring = &priv->tx_rings[index]; 1130 + txq = netdev_get_tx_queue(dev, ring->queue); 1141 1131 1142 1132 spin_lock_irqsave(&ring->lock, flags); 1143 1133 if (ring->free_bds <= nr_frags + 1) { 1144 - netif_stop_subqueue(dev, ring->queue); 1134 + netif_tx_stop_queue(txq); 1145 1135 netdev_err(dev, "%s: tx ring %d full when queue %d awake\n", 1146 1136 __func__, index, ring->queue); 1147 1137 ret = NETDEV_TX_BUSY; ··· 1172 1176 } 1173 1177 } 1174 1178 1179 + skb_tx_timestamp(skb); 1180 + 1175 1181 /* we kept a software copy of how much we should advance the TDMA 1176 1182 * producer index, now write it down to the hardware 1177 1183 */ ··· 1181 1183 ring->prod_index, TDMA_PROD_INDEX); 1182 1184 1183 1185 if (ring->free_bds <= (MAX_SKB_FRAGS + 1)) { 1184 - netif_stop_subqueue(dev, ring->queue); 1186 + netif_tx_stop_queue(txq); 1185 1187 ring->int_enable(priv, ring); 1186 1188 } 1187 1189 ··· 2496 2498 2497 2499 bcmgenet_set_hw_params(priv); 2498 2500 2499 - spin_lock_init(&priv->lock); 2500 2501 /* Mii wait queue */ 2501 2502 init_waitqueue_head(&priv->wq); 2502 2503 /* Always use RX_BUF_LENGTH (2KB) buffer for all chips */
-1
drivers/net/ethernet/broadcom/genet/bcmgenet.h
··· 523 523 void __iomem *base; 524 524 enum bcmgenet_version version; 525 525 struct net_device *dev; 526 - spinlock_t lock; 527 526 u32 int0_mask; 528 527 u32 int1_mask; 529 528