diff options
| author | Avri Altman <[email protected]> | 2021-08-08 12:00:22 +0300 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-08-11 22:25:36 -0400 |
| commit | 07106f86ae13d9197bfd38c2d47743304b14099e (patch) | |
| tree | 2f8d772b9ee9579afdd375135136a7ae30007016 /tools/perf/scripts/python/bin | |
| parent | 283e61c5a9bed2c2acde3f50a3f76f09816c0aab (diff) | |
scsi: ufs: ufshpb: Use a correct max multi chunk
In HPB2.0, if pre_req_min_tr_len < transfer_len < pre_req_max_tr_len, the
driver is expected to send a HPB-WRITE-BUFFER companion to HPB-READ.
The upper bound should fit into a single byte, regardless of bMAX_
DATA_SIZE_FOR_HPB_SINGLE_CMD which being an attribute (u32) can be
significantly larger.
To further illustrate the issue, consider the following scenario:
- SCSI_DEFAULT_MAX_SECTORS is 1024 limiting the I/O chunks to 512KB
- The OEM changes scsi_host_template .max_sectors to be 2048 which allows
for 1MB requests: transfer_len = 256
- pre_req_max_tr_len = HPB_MULTI_CHUNK_HIGH = 256
- ufshpb_is_supported_chunk() returns true (256 <= 256)
- WARN_ON_ONCE(256 > 256) doesn't warn
- ufshpb_set_hpb_read_to_upiu() casts transfer_len to u8: transfer_len = 0
- The command is failing with ILLEGAL REQUEST
Link: https://lore.kernel.org/r/[email protected]
Fixes: 41d8a9333cc9 (scsi: ufs: ufshpb: Add HPB 2.0 support)
Signed-off-by: Avri Altman <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions