• Sara Sharon's avatar
    iwlwifi: pcie: fix erroneous print · fd31ea11
    Sara Sharon authored
    [ Upstream commit 0916224e ]
    
    When removing the driver, the following flow can happen:
    1. host command is in progress, for example at index 68.
    2. RX interrupt is received with the response.
    3. Before it is processed, the remove flow kicks in, and
       calls iwl_pcie_txq_unmap. The function cleans all DMA,
       and promotes the read pointer to 69.
    4. RX thread proceeds with the processing, and is calling
       iwl_pcie_cmdq_reclaim, which will print this error:
       iwl_pcie_cmdq_reclaim: Read index for DMA queue txq id (0),
       index 4 is out of range [0-256] 69 69.
    
    Detect this situation, and avoid the print. Change it to
    warning while at it, to make such issues more noticeable
    in the future.
    Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
    Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    fd31ea11
tx.c 68.6 KB