]> git.baikalelectronics.ru Git - kernel.git/commit
liquidio: fix crash in presence of zeroed-out base address regs
authorRick Farrington <ricardo.farrington@cavium.com>
Wed, 30 Aug 2017 23:19:53 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Aug 2017 05:07:09 +0000 (22:07 -0700)
commit804cfacb68612beba353a59ccf20b268ba4d9452
tree60f309fcdf3198d3f7ee00b319dfd43a3051b27c
parent7b0b53a3a23262d370a9ba5b749c547b7127e890
liquidio: fix crash in presence of zeroed-out base address regs

Fix crash in linux PF driver when BARs have been cleared/de-programmed;
fail early init (prior to mapping BARs) if the BAR0 or
BAR1 registers are zero.

This situation can arise when the PF is added to a VM (PCI pass-through),
then a PF FLR is issued (in the VM).  After this occurs, the BAR registers
will be zero. If we attempt to load the PF driver in the host
(after VM has been shutdown), the host can reset.

Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c