From patchwork Wed Aug 19 14:47:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 7037611 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A7F8B9F373 for ; Wed, 19 Aug 2015 14:47:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E69F0207AE for ; Wed, 19 Aug 2015 14:47:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97E9620798 for ; Wed, 19 Aug 2015 14:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918AbbHSOra (ORCPT ); Wed, 19 Aug 2015 10:47:30 -0400 Received: from e24smtp03.br.ibm.com ([32.104.18.24]:33410 "EHLO e24smtp03.br.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753474AbbHSOra (ORCPT ); Wed, 19 Aug 2015 10:47:30 -0400 Received: from /spool/local by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 19 Aug 2015 11:47:25 -0300 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 19 Aug 2015 11:47:24 -0300 X-Helo: d24dlp01.br.ibm.com X-MailFrom: krisman@linux.vnet.ibm.com X-RcptTo: linux-scsi@vger.kernel.org Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id E8EEE3520078 for ; Wed, 19 Aug 2015 10:46:16 -0400 (EDT) Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay01.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7JElkxD4345962 for ; Wed, 19 Aug 2015 11:47:47 -0300 Received: from d24av04.br.ibm.com (localhost [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t7JElLOh021274 for ; Wed, 19 Aug 2015 11:47:21 -0300 Received: from localhost ([9.78.149.206]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t7JElKpO021221; Wed, 19 Aug 2015 11:47:21 -0300 From: Gabriel Krisman Bertazi To: brking@linux.vnet.ibm.com Cc: linux-scsi@vger.kernel.org, Gabriel Krisman Bertazi Subject: [PATCH 1/2] ipr: Inhibit underlength data check for AFDASD in raw mode. Date: Wed, 19 Aug 2015 11:47:05 -0300 Message-Id: <1439995626-16202-1-git-send-email-krisman@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15081914-0025-0000-0000-00000497C19C Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Brian King Reviewed-by: Wen Xiong --- drivers/scsi/ipr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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