Skip to content

Commit e8cb7eb

Browse files
santildavem330
authored andcommitted
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>
1 parent c033a6d commit e8cb7eb

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

drivers/net/ibmveth.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,6 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
903903
union ibmveth_buf_desc desc;
904904
unsigned long lpar_rc;
905905
unsigned long correlator;
906-
unsigned long flags;
907906
unsigned int retry_count;
908907
unsigned int tx_dropped = 0;
909908
unsigned int tx_bytes = 0;
@@ -965,20 +964,18 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
965964
} else {
966965
tx_packets++;
967966
tx_bytes += skb->len;
968-
netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
969967
}
970968

971969
if (!used_bounce)
972970
dma_unmap_single(&adapter->vdev->dev, data_dma_addr,
973971
skb->len, DMA_TO_DEVICE);
974972

975-
out: spin_lock_irqsave(&adapter->stats_lock, flags);
973+
out:
976974
netdev->stats.tx_dropped += tx_dropped;
977975
netdev->stats.tx_bytes += tx_bytes;
978976
netdev->stats.tx_packets += tx_packets;
979977
adapter->tx_send_failed += tx_send_failed;
980978
adapter->tx_map_failed += tx_map_failed;
981-
spin_unlock_irqrestore(&adapter->stats_lock, flags);
982979

983980
dev_kfree_skb(skb);
984981
return NETDEV_TX_OK;
@@ -1290,8 +1287,6 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
12901287
netdev->netdev_ops = &ibmveth_netdev_ops;
12911288
netdev->ethtool_ops = &netdev_ethtool_ops;
12921289
SET_NETDEV_DEV(netdev, &dev->dev);
1293-
netdev->features |= NETIF_F_LLTX;
1294-
spin_lock_init(&adapter->stats_lock);
12951290

12961291
memcpy(netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
12971292

drivers/net/ibmveth.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ struct ibmveth_adapter {
158158
u64 rx_no_buffer;
159159
u64 tx_map_failed;
160160
u64 tx_send_failed;
161-
spinlock_t stats_lock;
162161
};
163162

164163
struct ibmveth_buf_desc_fields {

0 commit comments

Comments
 (0)