fpga: dfl: Avoid reads to AFU CSRs during enumeration
authorRuss Weight <russell.h.weight@intel.com>
Thu, 16 Sep 2021 21:07:33 +0000 (14:07 -0700)
committerMoritz Fischer <mdf@kernel.org>
Thu, 16 Sep 2021 22:20:55 +0000 (15:20 -0700)
commite9a9970bf520c99e530d8f1fa5b5c22671fad4ef
tree2197e0266005ead0be3097696f477dc6ba0d047f
parenta1e4470823d99e75b596748086e120dea169ed3c
fpga: dfl: Avoid reads to AFU CSRs during enumeration

CSR address space for Accelerator Functional Units (AFU) is not available
during the early Device Feature List (DFL) enumeration. Early access
to this space results in invalid data and port errors. This change adds
a condition to prevent an early read from the AFU CSR space.

Fixes: 1604986c3e6b ("fpga: dfl: expose feature revision from struct dfl_device")
Cc: stable@vger.kernel.org
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/dfl.c