]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
nfp: handle SR-IOV already enabled when driver is probing
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 27 Jun 2017 07:50:25 +0000 (00:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jun 2017 19:48:49 +0000 (15:48 -0400)
commit0dc78621918693face1700d1379c2b9f740282f5
treef5e644d21cd976362ed611b4aad39ee28a6e37b3
parent168c478e107e790456cd6ebb308529756c21de3f
nfp: handle SR-IOV already enabled when driver is probing

We assumed that when we probe number of enabled VFs will be at 0.
This doesn't have to be the case for example if previous driver left
SR-IOV enabled due to some VFs being assigned.  Read the number of VFs
enabled.  Fail probe if it's above current FWs limit.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_main.c