diff options
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 841b60831df1..8a852b5f215f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -882,7 +882,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
882 | dev_warn(&dev->dev, | 882 | dev_warn(&dev->dev, |
883 | "Unexpected TXQ (%d) queue failure: %d\n", qnum, err); | 883 | "Unexpected TXQ (%d) queue failure: %d\n", qnum, err); |
884 | dev->stats.tx_dropped++; | 884 | dev->stats.tx_dropped++; |
885 | kfree_skb(skb); | 885 | dev_kfree_skb_any(skb); |
886 | return NETDEV_TX_OK; | 886 | return NETDEV_TX_OK; |
887 | } | 887 | } |
888 | virtqueue_kick(sq->vq); | 888 | virtqueue_kick(sq->vq); |
@@ -938,7 +938,7 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd, | |||
938 | sgs[out_num] = &stat; | 938 | sgs[out_num] = &stat; |
939 | 939 | ||
940 | BUG_ON(out_num + 1 > ARRAY_SIZE(sgs)); | 940 | BUG_ON(out_num + 1 > ARRAY_SIZE(sgs)); |
941 | BUG_ON(virtqueue_add_sgs(vi->cvq, sgs, out_num, 1, vi, GFP_ATOMIC) < 0); | 941 | virtqueue_add_sgs(vi->cvq, sgs, out_num, 1, vi, GFP_ATOMIC); |
942 | 942 | ||
943 | if (unlikely(!virtqueue_kick(vi->cvq))) | 943 | if (unlikely(!virtqueue_kick(vi->cvq))) |
944 | return status == VIRTIO_NET_OK; | 944 | return status == VIRTIO_NET_OK; |
@@ -1000,16 +1000,16 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev, | |||
1000 | u64 tpackets, tbytes, rpackets, rbytes; | 1000 | u64 tpackets, tbytes, rpackets, rbytes; |
1001 | 1001 | ||
1002 | do { | 1002 | do { |
1003 | start = u64_stats_fetch_begin_bh(&stats->tx_syncp); | 1003 | start = u64_stats_fetch_begin_irq(&stats->tx_syncp); |
1004 | tpackets = stats->tx_packets; | 1004 | tpackets = stats->tx_packets; |
1005 | tbytes = stats->tx_bytes; | 1005 | tbytes = stats->tx_bytes; |
1006 | } while (u64_stats_fetch_retry_bh(&stats->tx_syncp, start)); | 1006 | } while (u64_stats_fetch_retry_irq(&stats->tx_syncp, start)); |
1007 | 1007 | ||
1008 | do { | 1008 | do { |
1009 | start = u64_stats_fetch_begin_bh(&stats->rx_syncp); | 1009 | start = u64_stats_fetch_begin_irq(&stats->rx_syncp); |
1010 | rpackets = stats->rx_packets; | 1010 | rpackets = stats->rx_packets; |
1011 | rbytes = stats->rx_bytes; | 1011 | rbytes = stats->rx_bytes; |
1012 | } while (u64_stats_fetch_retry_bh(&stats->rx_syncp, start)); | 1012 | } while (u64_stats_fetch_retry_irq(&stats->rx_syncp, start)); |
1013 | 1013 | ||
1014 | tot->rx_packets += rpackets; | 1014 | tot->rx_packets += rpackets; |
1015 | tot->tx_packets += tpackets; | 1015 | tot->tx_packets += tpackets; |
@@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, | |||
1285 | if (channels->rx_count || channels->tx_count || channels->other_count) | 1285 | if (channels->rx_count || channels->tx_count || channels->other_count) |
1286 | return -EINVAL; | 1286 | return -EINVAL; |
1287 | 1287 | ||
1288 | if (queue_pairs > vi->max_queue_pairs) | 1288 | if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) |
1289 | return -EINVAL; | 1289 | return -EINVAL; |
1290 | 1290 | ||
1291 | get_online_cpus(); | 1291 | get_online_cpus(); |