diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2011-09-01 12:19:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 11:56:19 -0700 |
commit | bf769375c9175b29fe72b10394888e0090c6b133 (patch) | |
tree | c9f3d480171aa4c953acd9331fffdc2a20a44de2 | |
parent | 8a5f9edc4dd6c1f9fb2446a36e7cd44b79412271 (diff) | |
download | op-kernel-dev-bf769375c9175b29fe72b10394888e0090c6b133.zip op-kernel-dev-bf769375c9175b29fe72b10394888e0090c6b133.tar.gz |
staging: hv: fix the return status of netvsc_start_xmit()
Fix the return status, so the upper layer will retry if transmission
fails.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/netvsc_drv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 81e3c49..30b9c80 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -140,12 +140,12 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) (num_pages * sizeof(struct hv_page_buffer)) + sizeof(struct rndis_filter_packet), GFP_ATOMIC); if (!packet) { - /* out of memory, silently drop packet */ + /* out of memory, drop packet */ netdev_err(net, "unable to allocate hv_netvsc_packet\n"); dev_kfree_skb(skb); net->stats.tx_dropped++; - return NETDEV_TX_OK; + return NETDEV_TX_BUSY; } packet->extension = (void *)(unsigned long)packet + @@ -194,7 +194,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) dev_kfree_skb_any(skb); } - return NETDEV_TX_OK; + return ret ? NETDEV_TX_BUSY : NETDEV_TX_OK; } /* |