On 6/4/2014 1:18 AM, Martin K. Petersen wrote:
"Mike" == Mike Christie writes:
Mike> On 06/01/2014 11:19 AM, Sagi Grimberg wrote:
+/*
+ * data integrity helpers
+ */
+static inline unsigned +iscsi_prot_len(unsigned data_len, unsigned
sector_size) +{
+ switch (sector_size) {
+ case 512:
+ retur
On 6/3/2014 7:11 PM, Mike Christie wrote:
On 06/01/2014 11:19 AM, Sagi Grimberg wrote:
/**
+ * iscsi_adjust_dl - Adjust SCSI data length to include PI
+ * @sc: scsi command.
+ * @data_length: command data length.
+ *
+ * Adjust the data length to account for how much data
+ * is actually on th
> "Mike" == Mike Christie writes:
Mike> On 06/01/2014 11:19 AM, Sagi Grimberg wrote:
>>
>> +/*
>> + * data integrity helpers
>> + */
>> +static inline unsigned +iscsi_prot_len(unsigned data_len, unsigned
>> sector_size) +{
>> + switch (sector_size) {
>> + case 512:
>> + return (data_len >> 9
On 06/01/2014 11:19 AM, Sagi Grimberg wrote:
> /**
> + * iscsi_adjust_dl - Adjust SCSI data length to include PI
> + * @sc: scsi command.
> + * @data_length: command data length.
> + *
> + * Adjust the data length to account for how much data
> + * is actually on the wire.
> + *
> + * returns the
On 06/01/2014 11:19 AM, Sagi Grimberg wrote:
>
> +/*
> + * data integrity helpers
> + */
> +static inline unsigned
> +iscsi_prot_len(unsigned data_len, unsigned sector_size)
> +{
> + switch (sector_size) {
> + case 512:
> + return (data_len >> 9) * 8;
> + case 1024:
> +
In case protection information exists over the wire
iscsi header data_length field is required to include it.
Also remove iser transfer length checks for each task as
they are not always true and somewhat redundant anyway.
Signed-off-by: Sagi Grimberg
---
drivers/infiniband/ulp/iser/iser_initia