Skip to contentSkip to conversation

ipr: Inhibit underlength data check for AFDASD in raw mode.

PATCH In review Gabriel Krisman Bertazi 3 participants 6 messages Aug 19, 2015 – Aug 28, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/scsi/ipr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/scsi/ipr.c +5 -1
index a9aa389..db0c2cf 100644
@@ -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
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 ipr: Enable SIS pipe commands for SIS-32 devices.

Remove unnecessary check that disabled SIS pipe commands for SIS-32 devices. This change was sufficient to enable raw mode and send SIS pipe commands for a 57B3 device.

Fixes f8ee25d7d239 ("ipr: AF DASD raw mode implementation in ipr driver")
---
 drivers/scsi/ipr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ipr.c +1 -1
index db0c2cf..b19719f 100644
@@ -4554,7 +4554,7 @@ static ssize_t ipr_store_raw_mode(struct device *dev,
 	spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
 	res = (struct ipr_resource_entry *)sdev->hostdata;
 	if (res) {
-		if (ioa_cfg->sis64 && ipr_is_af_dasd_device(res)) {
+		if (ipr_is_af_dasd_device(res)) {
 			res->raw_mode = simple_strtoul(buf, NULL, 10);
 			len = strlen(buf);
 			if (res->sdev)
Signature · 1 line
2.1.0
Acked-by on v1 1/2
#4 lore raw
In reply to Gabriel Krisman Bertazi
Quoted 8 lines · Gabriel Krisman Bertazi

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.

---

Looks good. Thanks!

Signature · 3 lines
Brian King
Power Linux I/O
IBM Linux Technology Center
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ipr: Enable SIS pipe commands for SIS-32 devices.

In reply to Gabriel Krisman Bertazi
Quoted 7 lines · Gabriel Krisman Bertazi

Remove unnecessary check that disabled SIS pipe commands for SIS-32 devices. This change was sufficient to enable raw mode and send SIS pipe commands for a 57B3 device.

Fixes f8ee25d7d239 ("ipr: AF DASD raw mode implementation in ipr driver")

---

Thanks!

Signature · 3 lines
Brian King
Power Linux I/O
IBM Linux Technology Center
Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] ipr: Enable SIS pipe commands for SIS-32 devices.

In reply to Gabriel Krisman Bertazi
Quoted 5 lines · Gabriel Krisman Bertazi <krisman <at> linux.vnet.ibm.com> writes:

Remove unnecessary check that disabled SIS pipe commands for SIS-32 devices. This change was sufficient to enable raw mode and send SIS pipe commands for a 57B3 device.

Thanks,

Wendy

Reviewed-by on v1 1/2
#5 lore raw
In reply to Gabriel Krisman Bertazi
Quoted 8 lines · 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>