Re: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-17 Thread Martin K. Petersen
John, > 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 su

Re: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-17 Thread John Garry
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 >>

Re: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-13 Thread John Garry
On 13/12/2018 02:20, Martin K. Petersen wrote: John, Hi Martin, +static void fill_prot_v3_hw(struct scsi_cmnd *scsi_cmnd, + struct hisi_sas_protect_iu_v3_hw *prot) +{ + u8 prot_type = scsi_get_prot_type(scsi_cmnd); + u8 prot_op = scsi_get_prot_op(scsi_

Re: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-12 Thread Martin K. Petersen
John, > +static void fill_prot_v3_hw(struct scsi_cmnd *scsi_cmnd, > + struct hisi_sas_protect_iu_v3_hw *prot) > +{ > + u8 prot_type = scsi_get_prot_type(scsi_cmnd); > + u8 prot_op = scsi_get_prot_op(scsi_cmnd); > + unsigned int interval = scsi_prot_interval(sc

[PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-06 Thread John Garry
From: Xiang Chen For v3 hw, we support DIF operation for SAS, but not SATA. This patchset adds the SW support for the described features. The main components are as follows: - Get DIF enablement from module param - Fill PI fields - Fill related to DIF in DQ and protection iu memories Signed-off