OSDN Git Service

hv_netvsc: fix vf serial matching with pci slot info
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 15 Oct 2018 19:06:15 +0000 (19:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:21 +0000 (11:08 -0800)
commit3d7d10b9af53f31b1f614d658664801ece85895d
tree590e31e097a6511e28f6595823b95c2c033030fd
parentb85000e84c56eadca14c690170e5f7b997009f9d
hv_netvsc: fix vf serial matching with pci slot info

[ Upstream commit 005479556197f80139771960dda0dfdcd2d2aad5 ]

The VF device's serial number is saved as a string in PCI slot's
kobj name, not the slot->number. This patch corrects the netvsc
driver, so the VF device can be successfully paired with synthetic
NIC.

Fixes: 00d7ddba1143 ("hv_netvsc: pair VF based on serial number")
Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c