Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1338917pxa; Sun, 2 Aug 2020 04:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0p9Fy2o4BUKIX6+DaAmH37X2CZZCbPaSUWRMdntz8KBlmksu0XxRAd4wmmsAzn3tAtVBb X-Received: by 2002:a05:6402:1841:: with SMTP id v1mr11375051edy.198.1596367068471; Sun, 02 Aug 2020 04:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596367068; cv=none; d=google.com; s=arc-20160816; b=Pk/FdTxjbM+by671U1R9UGrZylUBeSWN35r3X/w0oEsh2PcqM613J0XWvUrBBf4LvH VFTu8HIzO7C6thLqYbTT4r5upUrGkweWg5OE6EJUW119LHj31HxYGO2hj1KQH/w8uSOK 5JZPTUFlhJf8KHAISlnImeVWjEDvUFSHJTOAWn6+7KnhaP+W0Psxk5K1utWw/nf0HDrs sDeth+yfJe4phhIMOxsds+zyHnv6itY+SZ6UkOpD/0B2qGA/Xlv+QyjeDxmY8fMYzqcV GsNi1hSsfWcAX2SgApmqThoPkX5yy8Y/kcpabIMnekWOTm2OPVUH1p7vmWE013H3mHgp JsSQ== 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; bh=Ij5J7HDPJ5bA3lRACAAiJ1hQ9uSnb/dvh+DwoaV6JTU=; b=QvSZo/diIpF5s+n3TUuv3lST/o52V+d/qS8Q89box9k53xYB+oN3LiM8URGbLnrJzZ rjz/1EEvbbdJ1GHHq62gIo0PlhvqAJVa0r4//ifHNfweV3bEQ4VQRfynC2HI/1XB9m+/ Ts0vYSuhNqi9q0t4WhulYvMaGOvoxJrLiD6QdhtLNeGo+7SQSYvxtS5p62mMroVoQgOx YX8Itrj2fTNkniN2JuWeXsqbINyu8oeog4ACjqwvLG0d4Jq+rxoTbvLlwRAntAy6avx6 PVqrLqTgJKPQIDzQJ92kQpl1GAoo7bbg2Odz7lVHsemBKn5UxjL2lxxqR0NFqTYyW/OH zuKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b17si9101417edy.99.2020.08.02.04.17.26; Sun, 02 Aug 2020 04:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727790AbgHBLPd (ORCPT + 99 others); Sun, 2 Aug 2020 07:15:33 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:59415 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbgHBLPc (ORCPT ); Sun, 2 Aug 2020 07:15:32 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U4TpvX4_1596366929; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U4TpvX4_1596366929) by smtp.aliyun-inc.com(127.0.0.1); Sun, 02 Aug 2020 19:15:29 +0800 From: Tianjia Zhang To: njavali@marvell.com, jejb@linux.ibm.com, martin.petersen@oracle.com, himanshu.madhani@cavium.com, quinn.tran@cavium.com Cc: GR-QLogic-Storage-Upstream@marvell.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com Subject: [PATCH] scsi: qla2xxx: Fix wrong return value in qlt_chk_unresolv_exchg() Date: Sun, 2 Aug 2020 19:15:28 +0800 Message-Id: <20200802111528.4974-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the case of a failed retry, a positive value EIO is returned here. I think this is a typo error. It is necessary to return an error value. Fixes: 0691094ff3f2c ("scsi: qla2xxx: Add logic to detect ABTS hang and response completion") Cc: Quinn Tran Signed-off-by: Tianjia Zhang --- drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index c2c0e6049da4..f2bb841c2059 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5668,7 +5668,7 @@ static int qlt_chk_unresolv_exchg(struct scsi_qla_host *vha, /* found existing exchange */ qpair->retry_term_cnt++; if (qpair->retry_term_cnt >= 5) { - rc = EIO; + rc = -EIO; qpair->retry_term_cnt = 0; ql_log(ql_log_warn, vha, 0xffff, "Unable to send ABTS Respond. Dumping firmware.\n"); -- 2.26.2