Skip to content

Commit

Permalink
ipr: Inhibit underlength data check for AFDASD in raw mode.
Browse files Browse the repository at this point in the history
Disable underlength error verification based on count of bytes actually
transferred for AF DASD devices when SIS pipe mode is enabled.

This avoids unexpected underlength errors when issuing some commands in
raw mode.

Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
  • Loading branch information
Gabriel Krisman Bertazi authored and James Bottomley committed Aug 28, 2015
1 parent c75683c commit 3cb4fc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -6383,9 +6383,13 @@ static int ipr_queuecommand(struct Scsi_Host *shost,
(!ipr_is_gscsi(res) || scsi_cmd->cmnd[0] == IPR_QUERY_RSRC_STATE)) {
ioarcb->cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
}
if (res->raw_mode && ipr_is_af_dasd_device(res))
if (res->raw_mode && ipr_is_af_dasd_device(res)) {
ioarcb->cmd_pkt.request_type = IPR_RQTYPE_PIPE;

if (scsi_cmd->underflow == 0)
ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_ULEN_CHK;
}

if (ioa_cfg->sis64)
rc = ipr_build_ioadl64(ioa_cfg, ipr_cmd);
else
Expand Down

0 comments on commit 3cb4fc1

Please sign in to comment.