diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2022-07-07 17:20:43 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-07-07 17:20:43 -0400 |
commit | 11e50ed239b5b7f383874dd737283ae93f62ece3 (patch) | |
tree | 6f990dd80caf1efee86926541b30cad9e2003cef /drivers/scsi/hisi_sas | |
parent | 88f1669019bd62b3009a3cebf772fbaaa21b9f38 (diff) | |
parent | fce54ed027577517df1e74b7d54dc2b1bd536887 (diff) |
Merge branch '5.19/scsi-fixes' into 5.20/scsi-staging
Bring in fixes to resolve a merge conflict in the lpfc driver update.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 7d819fc0395e..eb86afb21aab 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2782,6 +2782,7 @@ static int slave_configure_v3_hw(struct scsi_device *sdev) struct hisi_hba *hisi_hba = shost_priv(shost); struct device *dev = hisi_hba->dev; int ret = sas_slave_configure(sdev); + unsigned int max_sectors; if (ret) return ret; @@ -2799,6 +2800,12 @@ static int slave_configure_v3_hw(struct scsi_device *sdev) } } + /* Set according to IOMMU IOVA caching limit */ + max_sectors = min_t(size_t, queue_max_hw_sectors(sdev->request_queue), + (PAGE_SIZE * 32) >> SECTOR_SHIFT); + + blk_queue_max_hw_sectors(sdev->request_queue, max_sectors); + return 0; } |