diff options
| author | David S. Miller <davem@davemloft.net> | 2014-10-08 16:22:22 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-10-08 16:22:22 -0400 |
| commit | 64b1f00a0830e1c53874067273a096b228d83d36 (patch) | |
| tree | dd547b0f1d431d0995b8eaa711cedb92399f31fe /drivers/net/hyperv | |
| parent | 16b99a4f6644d58c94acb4b4253e84049de588c5 (diff) | |
| parent | 5301e3e117d88ef0967ce278912e54757f1a31a2 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/hyperv')
| -rw-r--r-- | drivers/net/hyperv/netvsc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 977984bc238a..7d76c9523395 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c | |||
| @@ -717,6 +717,7 @@ int netvsc_send(struct hv_device *device, | |||
| 717 | unsigned int section_index = NETVSC_INVALID_INDEX; | 717 | unsigned int section_index = NETVSC_INVALID_INDEX; |
| 718 | u32 msg_size = 0; | 718 | u32 msg_size = 0; |
| 719 | struct sk_buff *skb; | 719 | struct sk_buff *skb; |
| 720 | u16 q_idx = packet->q_idx; | ||
| 720 | 721 | ||
| 721 | 722 | ||
| 722 | net_device = get_outbound_net_device(device); | 723 | net_device = get_outbound_net_device(device); |
| @@ -781,24 +782,24 @@ int netvsc_send(struct hv_device *device, | |||
| 781 | 782 | ||
| 782 | if (ret == 0) { | 783 | if (ret == 0) { |
| 783 | atomic_inc(&net_device->num_outstanding_sends); | 784 | atomic_inc(&net_device->num_outstanding_sends); |
| 784 | atomic_inc(&net_device->queue_sends[packet->q_idx]); | 785 | atomic_inc(&net_device->queue_sends[q_idx]); |
| 785 | 786 | ||
| 786 | if (hv_ringbuf_avail_percent(&out_channel->outbound) < | 787 | if (hv_ringbuf_avail_percent(&out_channel->outbound) < |
| 787 | RING_AVAIL_PERCENT_LOWATER) { | 788 | RING_AVAIL_PERCENT_LOWATER) { |
| 788 | netif_tx_stop_queue(netdev_get_tx_queue( | 789 | netif_tx_stop_queue(netdev_get_tx_queue( |
| 789 | ndev, packet->q_idx)); | 790 | ndev, q_idx)); |
| 790 | 791 | ||
| 791 | if (atomic_read(&net_device-> | 792 | if (atomic_read(&net_device-> |
| 792 | queue_sends[packet->q_idx]) < 1) | 793 | queue_sends[q_idx]) < 1) |
| 793 | netif_tx_wake_queue(netdev_get_tx_queue( | 794 | netif_tx_wake_queue(netdev_get_tx_queue( |
| 794 | ndev, packet->q_idx)); | 795 | ndev, q_idx)); |
| 795 | } | 796 | } |
| 796 | } else if (ret == -EAGAIN) { | 797 | } else if (ret == -EAGAIN) { |
| 797 | netif_tx_stop_queue(netdev_get_tx_queue( | 798 | netif_tx_stop_queue(netdev_get_tx_queue( |
| 798 | ndev, packet->q_idx)); | 799 | ndev, q_idx)); |
| 799 | if (atomic_read(&net_device->queue_sends[packet->q_idx]) < 1) { | 800 | if (atomic_read(&net_device->queue_sends[q_idx]) < 1) { |
| 800 | netif_tx_wake_queue(netdev_get_tx_queue( | 801 | netif_tx_wake_queue(netdev_get_tx_queue( |
| 801 | ndev, packet->q_idx)); | 802 | ndev, q_idx)); |
| 802 | ret = -ENOSPC; | 803 | ret = -ENOSPC; |
| 803 | } | 804 | } |
| 804 | } else { | 805 | } else { |
