aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorSantiago Leon <santil@linux.vnet.ibm.com>2010-09-03 14:28:15 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-06 21:20:33 -0400
commite8cb7eb473ac47703282db6f90b4926f31cdf376 (patch)
tree9855055dd1cf1a0498e6000a72c449943dc3698b /drivers/net/ibmveth.c
parentc033a6d1390bb6cc0c11c3b4137b856dfd8cb7c8 (diff)
ibmveth: Remove LLTX
The ibmveth adapter needs locking in the transmit routine to protect the bounce_buffer but it sets LLTX and forgets to add any of its own locking. Just remove the deprecated LLTX option. Remove the stats lock in the process. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r--drivers/net/ibmveth.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 3515ef318eb0..9d662dec21b0 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -903,7 +903,6 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
903 union ibmveth_buf_desc desc; 903 union ibmveth_buf_desc desc;
904 unsigned long lpar_rc; 904 unsigned long lpar_rc;
905 unsigned long correlator; 905 unsigned long correlator;
906 unsigned long flags;
907 unsigned int retry_count; 906 unsigned int retry_count;
908 unsigned int tx_dropped = 0; 907 unsigned int tx_dropped = 0;
909 unsigned int tx_bytes = 0; 908 unsigned int tx_bytes = 0;
@@ -965,20 +964,18 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
965 } else { 964 } else {
966 tx_packets++; 965 tx_packets++;
967 tx_bytes += skb->len; 966 tx_bytes += skb->len;
968 netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
969 } 967 }
970 968
971 if (!used_bounce) 969 if (!used_bounce)
972 dma_unmap_single(&adapter->vdev->dev, data_dma_addr, 970 dma_unmap_single(&adapter->vdev->dev, data_dma_addr,
973 skb->len, DMA_TO_DEVICE); 971 skb->len, DMA_TO_DEVICE);
974 972
975out: spin_lock_irqsave(&adapter->stats_lock, flags); 973out:
976 netdev->stats.tx_dropped += tx_dropped; 974 netdev->stats.tx_dropped += tx_dropped;
977 netdev->stats.tx_bytes += tx_bytes; 975 netdev->stats.tx_bytes += tx_bytes;
978 netdev->stats.tx_packets += tx_packets; 976 netdev->stats.tx_packets += tx_packets;
979 adapter->tx_send_failed += tx_send_failed; 977 adapter->tx_send_failed += tx_send_failed;
980 adapter->tx_map_failed += tx_map_failed; 978 adapter->tx_map_failed += tx_map_failed;
981 spin_unlock_irqrestore(&adapter->stats_lock, flags);
982 979
983 dev_kfree_skb(skb); 980 dev_kfree_skb(skb);
984 return NETDEV_TX_OK; 981 return NETDEV_TX_OK;
@@ -1290,8 +1287,6 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
1290 netdev->netdev_ops = &ibmveth_netdev_ops; 1287 netdev->netdev_ops = &ibmveth_netdev_ops;
1291 netdev->ethtool_ops = &netdev_ethtool_ops; 1288 netdev->ethtool_ops = &netdev_ethtool_ops;
1292 SET_NETDEV_DEV(netdev, &dev->dev); 1289 SET_NETDEV_DEV(netdev, &dev->dev);
1293 netdev->features |= NETIF_F_LLTX;
1294 spin_lock_init(&adapter->stats_lock);
1295 1290
1296 memcpy(netdev->dev_addr, &adapter->mac_addr, netdev->addr_len); 1291 memcpy(netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
1297 1292