i2c-imc-skylake: warn when SMBCNTL cannot be read
The TSOD-polling check silently skipped a channel whose SMBCNTL read failed, so on a system without ECAM the driver bound with the check silently not performed. Binding is still allowed - the register is best-effort on top of the allow_unsafe_access gate, like the existing warning when no iMC channel function is found - but say so in the log instead of pretending the check ran.
This commit is contained in:
+5
-1
@@ -597,8 +597,12 @@ static int imc_check_firmware_polling(struct pci_dev *pdev)
|
|||||||
for (i = 0; i < ARRAY_SIZE(imc_chans); i++) {
|
for (i = 0; i < ARRAY_SIZE(imc_chans); i++) {
|
||||||
u32 cntl;
|
u32 cntl;
|
||||||
|
|
||||||
if (pci_read_config_dword(imc, IMC_SMBCNTL(i), &cntl))
|
if (pci_read_config_dword(imc, IMC_SMBCNTL(i), &cntl)) {
|
||||||
|
dev_warn(&pdev->dev,
|
||||||
|
"%s ch%d SMBCNTL unreadable; cannot verify that TSOD polling is disabled\n",
|
||||||
|
pci_name(imc), i);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (cntl & SMBCNTL_TSOD_POLL_EN) {
|
if (cntl & SMBCNTL_TSOD_POLL_EN) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
|
|||||||
Reference in New Issue
Block a user