[RFC][pci/pm] pci config space save restore issues during suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
We found two issues in the code during suspend:

1. Andy Shevchenko found that, the save restore of pci config space
    might cause potential issue. Current code uses
    pci_read_config_dword() to read pci config header. However
    hardware is not obliged to react correctly when trying to read
    two/three 'adjacent' pci config registers with one dword read.

    Q1: Should we save/restore the pci config space header according
    to the PCI spec strictly(pci_read_config_dword() for 32bit, while
pci_read_config_word()
    for 16bits, etc)?

2. The pci config space of some problematic devices(or due to firmware
    bug) might become inaccessible after resumed from S3(suspend to mem)
    on VM.

    Q2: Should we do sanity check on pci config space before saving them?
    Say, invoke pci_dev_is_present() before suspend, if the pci config space is
    not sane, bypass the config space saving process, because there's no need
    to save invalid pci config space.

Comments would be appreciated.
-- 
thanks,
Chenyu



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux