]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: i2c: i801: Restore the presence state of P2SB PCI device after reading BAR
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Mon, 14 Aug 2017 16:04:50 +0000 (00:04 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:35:03 +0000 (07:35 -0500)
commitf844bf9ca4a58c28fd70ec48526aad7cad94f20e
treecbb17d96278c6149b3f6a8ec329be3ae60ffcf6c
parent5a154c79d819641056925feef475fc213962fba2
UBUNTU: SAUCE: i2c: i801: Restore the presence state of P2SB PCI device after reading BAR

BugLink: http://bugs.launchpad.net/bugs/1709257
Sun, Yunying reported the following failure on Denverton micro-server:

 EDAC DEBUG: pnd2_init:
 EDAC DEBUG: pnd2_probe:
 EDAC DEBUG: dnv_rd_reg: Read b_cr_tolud_pci=00000000_80000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_touud_lo_pci=00000000_80000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_touud_hi_pci=00000000_00000004
 EDAC DEBUG: dnv_rd_reg: Read b_cr_asym_mem_region0_mchbar=00000000_00000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_asym_mem_region1_mchbar=00000000_00000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_mot_out_base_mchbar=00000000_00000000
 EDAC DEBUG: dnv_rd_reg: Read b_cr_mot_out_mask_mchbar=00000000_00000000
 EDAC pnd2: Failed to register device with error -19.

On Denverton micro-server, the presence of the P2SB bridge PCI device is
enabled or disabled by the item 'RelaxSecConf' in BIOS setup menu. When
'RelaxSecConf' is enabled, the P2SB PCI device is present and the pnd2_edac
EDAC driver also uses it to get BAR. Hiding the P2SB PCI device caused the
pnd2_edac EDAC driver failed to get BAR then reported the above failure.

Therefor, 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>
Reported-by: Yunying Sun <yunying.sun@intel.com>
Tested-by: Yunying Sun <yunying.sun@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit bfd4473b850c8cfaa1cdf56b8ef52fae4e8a6ee5
 git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/i2c/busses/i2c-i801.c