lkml.org 
[lkml]   [2018]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw
From
Date
On 13/12/2018 13:35, John Garry wrote:
>
>>
>> to set your controller flags.
>>
>> + if (prot_op == SCSI_PROT_WRITE_INSERT) {
>> + unsigned int interval = scsi_prot_interval(scsi_cmnd);
>> + unsigned int ilog2_interval = ilog2(interval);
>> +
>> + len = (task->total_xfer_len >> ilog2_interval) * 8;
>>
>> scsi_transfer_length(struct scsi_cmnd *scmd)
>
> ok

Hi Martin,

We have an issue with using scsi_transfer_length().

As I understand, for our controller we need to set the host structure
data transfer size to the size of data to write to the disk for WRITE
type command, and at size of info received to host memory for READ type
command. As such, for READ STRIP, we only want the SCSI buf len, and not
the scsi buf len and PI (this is what scsi_transfer_length() provides).

Thanks,
John


\
 
 \ /
  Last update: 2018-12-17 15:52    [W:0.074 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site