diff mbox

[1/2] ipr: Inhibit underlength data check for AFDASD in raw mode.

Message ID 1439995626-16202-1-git-send-email-krisman@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gabriel Krisman Bertazi Aug. 19, 2015, 2:47 p.m. UTC
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>
---
 drivers/scsi/ipr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Brian King Aug. 20, 2015, 8:27 p.m. UTC | #1
On 08/19/2015 09:47 AM, Gabriel Krisman Bertazi wrote:
> 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>
> ---

Looks good. Thanks!

Acked-by: Brian King <brking@linux.vnet.ibm.com>
wenxiong@linux.vnet.ibm.com Aug. 28, 2015, 1:39 p.m. UTC | #2
Gabriel Krisman Bertazi <krisman <at> linux.vnet.ibm.com> writes:

> 
> 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 <at> linux.vnet.ibm.com>

Reviewed-by: Wen Xiong<wenxiong@linux.vnet.ibm.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index a9aa389..db0c2cf 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -6382,9 +6382,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