]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: manually allocate and free vadaptors
authorShradha Shah <sshah@solarflare.com>
Tue, 5 May 2015 23:58:54 +0000 (00:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 May 2015 20:16:48 +0000 (16:16 -0400)
commitfcfcdbdd665413c010088d4119d0f9953b1ecd44
tree7241e5767bf3c3e0b512400dbe1c12f2669bfb8f
parentf6bd89c2dd99fe5ed0723a78adad15c5fcb55906
sfc: manually allocate and free vadaptors

To be able to use MC_CMD_VADAPTOR_SET_MAC, vadaptors must be
manually allocated and freed as automatic vadaptors will disappear
when their reference_count reaches zero, which must happen before
the MAC address is changed.

Vadaptors are allocated and freed in the vswitching_probe/remove
functions for PFs and VFs, and this means that vadaptors are restored
correctly following an MC reboot or other reset when required.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/ef10_sriov.c
drivers/net/ethernet/sfc/ef10_sriov.h