Received: by 10.213.65.68 with SMTP id h4csp2568870imn; Mon, 9 Apr 2018 05:46:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx48qsXw+OhfbXRIJS04K+cU0pj844IOxkEjfiTR2D56xZvQ1yrYfh0TJ0xzCBQWxV4NNJs3E X-Received: by 2002:a17:902:71cc:: with SMTP id t12-v6mr31480353plm.247.1523277977337; Mon, 09 Apr 2018 05:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523277977; cv=none; d=google.com; s=arc-20160816; b=pyOguGQl/uu5vInqEA0hsQfobDFHtrDh48kkKzYrTotLQWqOguBZKggHcco57JvFPa cQd/utmv1dAJeKUyWOMMDXxzU6gTpgiP4WPOfPELsiARG5G2LVbCA59dMuRmKtx1eru6 D3PIk2q2GumkeOGPw6t/aVrepjkM75mno/145NkvUZVUMO2+W2JQrIr5+1oaBM9PhOLW v0PPOJJWbtWSACtoCPZDDVX1PtthQnIudkjs2/wJN4sxEp/ATGVtXkqNzAXl5w0biTNk bLMtwq6XsoEay9gSjT+TWehweA3sbStmC+6gnsya3fQKkbcJCC616I0Bgfi5AaaTL6q+ qgKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=igH7UEpTqpf+vRwNaTpOfQE1aASkmamoZIZwoB0Aj1A=; b=K/084rojTfj4W+Gvh9ROZ3rcZYLidPVDejU8hxSti7mVUAIhHwDKDdqBhNornK6IDY PVvkSOU/j/PXl1+/o7hY8DdJBIkea8I8A3TGTlDzJuI3amsn1dLG620CSZMbczA8ADOo t+1jelS2Lgwwl2CHLg9YExoC7nWOcRG6ArTTeKj4K+hBe6YkIT/aEHpJfVa7Qw7DFTQu jrg/knxawpJzX3wMhMzLuNvvkSn8k05hx8t1zfWjCXUL2ifFLaVymwLOciODRDlTc4+V GoGPreBQCfNoIMsaYHhbOWiWGurEIKjK2+ToBdqMvGBPqQ160Jyf+3nEv2SxF+KNLcyV MI1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si203403ple.584.2018.04.09.05.45.40; Mon, 09 Apr 2018 05:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752078AbeDIMlx (ORCPT + 99 others); Mon, 9 Apr 2018 08:41:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:39933 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbeDIMlw (ORCPT ); Mon, 9 Apr 2018 08:41:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 91F45ADFA; Mon, 9 Apr 2018 12:41:50 +0000 (UTC) From: Johannes Thumshirn To: "Martin K . Petersen" Cc: Linux Kernel Mailinglist , Linux SCSI Mailinglist , Bart Van Assche , Hannes Reinecke , Johannes Thumshirn , Himanshu Madhani Subject: [PATCH] scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION Date: Mon, 9 Apr 2018 14:39:22 +0200 Message-Id: <20180409123922.854-1-jthumshirn@suse.de> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bart reports that in qla_isr.c's qla2x00_handle_dif_error we're wrongly shifting the SAM_STAT_CHECK_CONDITION by one instead of directly ORing it onto the SCSI command's result. Signed-off-by: Johannes Thumshirn Reported-by: Bart Van Assche Cc: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 49d67e1d571f..ed6cdfea00b4 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2195,7 +2195,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) 0x10, 0x1); set_driver_byte(cmd, DRIVER_SENSE); set_host_byte(cmd, DID_ABORT); - cmd->result |= SAM_STAT_CHECK_CONDITION << 1; + cmd->result |= SAM_STAT_CHECK_CONDITION; return 1; } @@ -2205,7 +2205,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) 0x10, 0x3); set_driver_byte(cmd, DRIVER_SENSE); set_host_byte(cmd, DID_ABORT); - cmd->result |= SAM_STAT_CHECK_CONDITION << 1; + cmd->result |= SAM_STAT_CHECK_CONDITION; return 1; } @@ -2215,7 +2215,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) 0x10, 0x2); set_driver_byte(cmd, DRIVER_SENSE); set_host_byte(cmd, DID_ABORT); - cmd->result |= SAM_STAT_CHECK_CONDITION << 1; + cmd->result |= SAM_STAT_CHECK_CONDITION; return 1; } -- 2.16.2