Skip to content

Commit 86a44f0

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: core: Increase the maximum data buffer size
Measurements for one particular UFS controller + UFS device show a 25% higher read bandwidth if the maximum data buffer size is increased from 512 KiB to 1 MiB. Hence increase the maximum size of the data buffer associated with a single request from SCSI_DEFAULT_MAX_SECTORS (1024) * 512 bytes = 512 KiB to 1 MiB. Notes: - The maximum data buffer size supported by the UFSHCI specification is 65535 * 256 KiB or about 16 GiB. - The maximum data buffer size for READ(10) commands is 65535 logical blocks. To transfer more than 65535 * 4096 bytes = 255 MiB with a single SCSI command, the READ(16) command is required. Support for READ(16) is optional in the UFS 3.1 and UFS 4.0 standards. Link: https://lore.kernel.org/r/[email protected] Cc: Adrian Hunter <[email protected]> Cc: Avri Altman <[email protected]> Cc: Bean Huo <[email protected]> Cc: Stanley Chu <[email protected]> Tested-by: Avri Altman <[email protected]> Acked-by: Avri Altman <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent f00e0d7 commit 86a44f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8304,6 +8304,7 @@ static struct scsi_host_template ufshcd_driver_template = {
83048304
.cmd_per_lun = UFSHCD_CMD_PER_LUN,
83058305
.can_queue = UFSHCD_CAN_QUEUE,
83068306
.max_segment_size = PRDT_DATA_BYTE_COUNT_MAX,
8307+
.max_sectors = (1 << 20) / SECTOR_SIZE, /* 1 MiB */
83078308
.max_host_blocked = 1,
83088309
.track_queue_depth = 1,
83098310
.sdev_groups = ufshcd_driver_groups,

0 commit comments

Comments
 (0)