]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Mon, 14 Aug 2017 15:48:45 +0000 (23:48 +0800)
committerBorislav Petkov <bp@suse.de>
Sat, 19 Aug 2017 08:47:24 +0000 (10:47 +0200)
commit48d62d5b0054cdf1ec8017cddea9cb00ce2b9e37
tree269ceff2bff83778940cf2f4750798530b624688
parent65c1b8e9802a30ed74aa060ad39b38a5c1a1142b
EDAC, pnd2: Conditionally unhide/hide the P2SB PCI device to read BAR

On Deverton server, the P2SB PCI device (DEV:1F, FUN:1) is used by multiple
device drivers.

If it's hidden by some device driver (e.g. with the i801 I2C driver,
the commit

  4542d8604e5b ("i2c: i801: Create iTCO device on newer Intel PCHs")

unconditionally hid the P2SB PCI device wrongly) it will make the
pnd2_edac driver read out an invalid BAR value of 0xffffffff and then
fail on ioremap().

Therefore, store the presence state of P2SB PCI device before unhiding
it for reading BAR and restore the presence state after reading BAR.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: linux-i2c@vger.kernel.org
Link: http://lkml.kernel.org/r/20170814154845.21663-1-qiuxu.zhuo@intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/pnd2_edac.c