• B
    ath11k: Handle MSI enablement during rmmod and SSR · 96527d52
    Baochen Qiang 提交于
    When doing "rmmod ath11k_pci", ath11k performs global SOC reset
    and MHI reset, where 0 address access is captured by IOMMU. See
    log below:
    
    ...
    [  133.953860] ath11k_pci 0000:02:00.0: setting mhi state: DEINIT(1)
    [  133.959714] ath11k_pci 0000:02:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000a address=0x0 flags=0x0020]
    [  133.973854] ath11k_pci 0000:02:00.0: MHISTATUS 0xff04
    [  133.974095] ath11k_pci 0000:02:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000a address=0x0 flags=0x0020]
    ...
    
    This issue is also observed in SSR process, cause a similar
    sequence as above is performed.
    
    Such an invalid access occurs because, during rmmod or SSR, MSI
    address is cleared but HW MSI functionality not disabled, thus HW
    target is able to raise an MSI transaction with 0 as MSI address.
    
    So it can be fixed by simply disabling MSI before reset. For SSR,
    since MSI functionality is still needed after target is brought
    back, we need to reenable it.
    
    Also change naming of some interfaces related.
    
    Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
    Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
    Signed-off-by: NBaochen Qiang <bqiang@codeaurora.org>
    Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
    Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210913180246.193388-5-jouni@codeaurora.org
    96527d52
pci.c 35.5 KB