OSDN Git Service

nfp: only try to get to PCIe ctrl memory if BARs are wide enough
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 29 May 2017 00:52:56 +0000 (17:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 15:27:04 +0000 (11:27 -0400)
commit321b5e9afe2d2b31f78b60724d58a9d02888bb57
treee64a8286047d40facbba50627233ca9b7f94672a
parent09b857945b21706d432f6e4e1c9e5028be5f14ff
nfp: only try to get to PCIe ctrl memory if BARs are wide enough

For accessing PCIe ctrl memory we depend on the BAR aperture being
large enough to reach all registers.  Since the BAR aperture can
be set in the flash make sure the driver won't oops the kernel
when the PCIe configuration is unusual.

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