Skip to content

Commit

Permalink
scsi: hisi_sas: Revert change to limit max hw sectors for v3 HW
Browse files Browse the repository at this point in the history
Now that libsas and the SCSI core code limits the default sectors from
commit 4cbfca5 ("scsi: scsi_transport_sas: cap shost opt_sectors
according to DMA optimal limit") and commit 608128d ("scsi: sd: allow
max_sectors be capped at DMA optimal size limit"), there is no need for
the hack to limit the max HW sectors.

Link: https://lore.kernel.org/r/1662378529-101489-2-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>
  • Loading branch information
John Garry authored and Martin K. Petersen committed Sep 7, 2022
1 parent 1ce871d commit 245050a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,6 @@ static int slave_configure_v3_hw(struct scsi_device *sdev)
struct hisi_hba *hisi_hba = shost_priv(shost);
int ret = hisi_sas_slave_configure(sdev);
struct device *dev = hisi_hba->dev;
unsigned int max_sectors;

if (ret)
return ret;
Expand All @@ -2802,12 +2801,6 @@ 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;
}

Expand Down

0 comments on commit 245050a

Please sign in to comment.