nfp: refactor the per-chip PCIe config
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 28 Aug 2018 20:20:39 +0000 (13:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Aug 2018 23:01:47 +0000 (16:01 -0700)
commit9bf6cce893072a078aaab0eaa8e399974b815bb1
tree5197b9c47a016f6009eb5b4301726146870b607c
parent0377505c540c4182ef50005188fe3940e17642d9
nfp: refactor the per-chip PCIe config

Use a switch statement instead of ifs for code dependent
on chip version.  While at it make sure we fail for unknown
chip revisions.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h