]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: hisi_sas: Limit max hw sectors for v3 HW
authorJohn Garry <john.garry@huawei.com>
Thu, 23 Jun 2022 12:41:59 +0000 (20:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:20:14 +0000 (21:20 +0200)
commit24cd0b9bfdff126c066032b0d40ab0962d35e777
treec769eaf286118c3ddb230ab516cd17207b8532c1
parentc458ebd6591e4dea76849ddfe62bf3c623e09b19
scsi: hisi_sas: Limit max hw sectors for v3 HW

[ Upstream commit fce54ed027577517df1e74b7d54dc2b1bd536887 ]

If the controller is behind an IOMMU then the IOMMU IOVA caching range can
affect performance, as discussed in [0].

Limit the max HW sectors to not exceed this limit. We need to hardcode the
value until a proper DMA mapping API is available.

[0] https://lore.kernel.org/linux-iommu/20210129092120.1482-1-thunder.leizhen@huawei.com/

Link: https://lore.kernel.org/r/1655988119-223714-1-git-send-email-john.garry@huawei.com
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c