We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeaadcd commit fce54edCopy full SHA for fce54ed
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -2782,6 +2782,7 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
2782
struct hisi_hba *hisi_hba = shost_priv(shost);
2783
struct device *dev = hisi_hba->dev;
2784
int ret = sas_slave_configure(sdev);
2785
+ unsigned int max_sectors;
2786
2787
if (ret)
2788
return ret;
@@ -2799,6 +2800,12 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
2799
2800
}
2801
2802
2803
+ /* Set according to IOMMU IOVA caching limit */
2804
+ max_sectors = min_t(size_t, queue_max_hw_sectors(sdev->request_queue),
2805
+ (PAGE_SIZE * 32) >> SECTOR_SHIFT);
2806
+
2807
+ blk_queue_max_hw_sectors(sdev->request_queue, max_sectors);
2808
2809
return 0;
2810
2811
0 commit comments