]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Add initialization of tx_table in netvsc_device_add()
authorHaiyang Zhang <haiyangz@microsoft.com>
Fri, 13 Oct 2017 19:28:05 +0000 (12:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Oct 2017 01:42:55 +0000 (18:42 -0700)
commit96659764d710f1364f45f899845d43f4b720ae09
tree397df71338800881d1bf18ac5add6bfa19fe8fba
parent484a38d1c304a8f383d1e259a489357357ed51b3
hv_netvsc: Add initialization of tx_table in netvsc_device_add()

tx_table is part of the private data of kernel net_device. It is only
zero-ed out when allocating net_device.

We may recreate netvsc_device w/o recreating net_device, so the private
netdev data, including tx_table, are not zeroed. It may contain channel
numbers for the older netvsc_device.

This patch adds initialization of tx_table each time we recreate
netvsc_device.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c