From patchwork Fri Oct 30 16:49:06 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: 7528241 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 6DE459F2F7 for ; Fri, 30 Oct 2015 16:49:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D48220773 for ; Fri, 30 Oct 2015 16:49:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6B3A20776 for ; Fri, 30 Oct 2015 16:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758082AbbJ3Qtg (ORCPT ); Fri, 30 Oct 2015 12:49:36 -0400 Received: from e24smtp02.br.ibm.com ([32.104.18.86]:53564 "EHLO e24smtp02.br.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753246AbbJ3Qtd (ORCPT ); Fri, 30 Oct 2015 12:49:33 -0400 Received: from /spool/local by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 30 Oct 2015 14:49:30 -0200 Received: from d24dlp01.br.ibm.com (9.18.248.204) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 30 Oct 2015 14:49:27 -0200 X-Helo: d24dlp01.br.ibm.com X-MailFrom: krisman@linux.vnet.ibm.com X-RcptTo: linux-scsi@vger.kernel.org Received: from d24relay03.br.ibm.com (d24relay03.br.ibm.com [9.13.184.25]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id B74BE352007C for ; Fri, 30 Oct 2015 12:48:16 -0400 (EDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.8.31.93]) by d24relay03.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t9UGlbTi15598070 for ; Fri, 30 Oct 2015 14:47:38 -0200 Received: from d24av02.br.ibm.com (localhost [127.0.0.1]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t9UGnPjp000838 for ; Fri, 30 Oct 2015 14:49:25 -0200 Received: from localhost ([9.78.136.123]) by d24av02.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t9UGnPQs000835; Fri, 30 Oct 2015 14:49:25 -0200 From: Gabriel Krisman Bertazi To: linux-scsi@vger.kernel.org Cc: brking@linux.vnet.ibm.com, wenxiong@linux.vnet.ibm.com, Gabriel Krisman Bertazi Subject: [PATCH 2/5] ipr: Clear NO_ULEN_CHK bit when resource is a vset. Date: Fri, 30 Oct 2015 14:49:06 -0200 Message-Id: <1446223749-17416-2-git-send-email-krisman@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446223749-17416-1-git-send-email-krisman@linux.vnet.ibm.com> References: <1446223749-17416-1-git-send-email-krisman@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15103016-0021-0000-0000-000003F7ADD5 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.9 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 According to the IPR specification, Inhibit Underlength Checking bit must be disabled when sending commands to vsets. Enabling this bit for vset might cause SCSI commands to fail with an Illegal Request. Signed-off-by: Gabriel Krisman Bertazi --- drivers/scsi/ipr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 4034cd3..da957b3 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -6364,7 +6364,7 @@ static int ipr_queuecommand(struct Scsi_Host *shost, ipr_cmd->done = ipr_scsi_eh_done; if (ipr_is_gscsi(res) || ipr_is_vset_device(res)) { - if (scsi_cmd->underflow == 0) + if (scsi_cmd->underflow == 0 && !ipr_is_vset_device(res)) ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_ULEN_CHK; ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_LINK_DESC;