# \[PATCH v2 39/40\] iommu/arm-smmu-v3: Add support for PRI

- From: Jean-Philippe Brucker \<hidden\>
- Date: 2018-05-29 10:27:48 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2018/05/6488062
- Thread: https://ratatoskr.run/linux-arm-kernel/2018/05/6487703/t/2.md

```text
On 25/05/18 15:08, Bharat Kumar Gogada wrote:
>> +	master->can_fault = true;
>> +	master->ste.prg_resp_needs_ssid =
>> pci_prg_resp_requires_prefix(pdev);
> 
> Any reason why this is not cleared in arm_smmu_disable_pri ?

Actually, setting it here is wrong. Since we now call enable_pri()
lazily, prg_resp_needs_ssid isn't initialized when writing the STE. That
bit is read by the SMMU when the PRIQ is full and it needs to
auto-respond. Fortunately the PRI doesn't need to be enabled in order to
read this bit, so we can move pci_prg_resp_requires_prefix() to
add_device() and clear the bit in remove_device(). Thanks for catching this.

Jean
```
