From patchwork Tue Aug 25 06:43:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257858 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0213C433E3 for ; Tue, 25 Aug 2020 06:44:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD5BD2071E for ; Tue, 25 Aug 2020 06:44:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="b35IFPV1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729076AbgHYGoq (ORCPT ); Tue, 25 Aug 2020 02:44:46 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:45914 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729137AbgHYGoo (ORCPT ); Tue, 25 Aug 2020 02:44:44 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07P6Utop031823 for ; Mon, 24 Aug 2020 23:44:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=+5QyD6UCD7Dr3XqQw3z+Fl6NEiZv3z/ZToe9msndXD4=; b=b35IFPV12gy1OU4kEFCtMmlP/5eTp6GJ/LkuMST/XJ5/hUDiF1HDtczI7EU7ov4G78tf cwYP1LKFTANx7XpGuxb5xKS36vHysTcEbP7Ap7jzyAqpCdVfzfFGWswV6+DdbD8e/kf+ Ao8bTSamEgWqFVqow9J4+RL96DMWcE2JagQ3ARI3AUPcKzSTr+jR/pQ+SsRLRE+L09Jg YIN1UHyvchsrMiO/6a2kieJ5PPtmslloVsrr+bFeTu01DhkL5SeoIIQRsLk7PAeplojc ncixoNg6J4sfw0yCHWgM4Efuo6BqFOqd7U0z249sPTzGsqTiTLa4v9Zaogaku4t/VW9d Rg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3330qpjuap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 24 Aug 2020 23:44:43 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 24 Aug 2020 23:44:42 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 24 Aug 2020 23:44:42 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 991EE3F703F; Mon, 24 Aug 2020 23:44:42 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 07P6igQa016410; Mon, 24 Aug 2020 23:44:42 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 07P6igOl016407; Mon, 24 Aug 2020 23:44:42 -0700 From: Javed Hasan To: CC: , , Subject: [PATCH 1/8] qedf: Changed the debug parameter permission from read to read & write. Date: Mon, 24 Aug 2020 23:43:47 -0700 Message-ID: <20200825064354.16361-2-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200825064354.16361-1-jhasan@marvell.com> References: <20200825064354.16361-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-24_12:2020-08-24,2020-08-24 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org -Changed the debug parameter permission from read to read & write. Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 86b9479..5770692 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -40,7 +40,7 @@ "remote ports (default 60)"); uint qedf_debug = QEDF_LOG_INFO; -module_param_named(debug, qedf_debug, uint, S_IRUGO); +module_param_named(debug, qedf_debug, uint, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(debug, " Debug mask. Pass '1' to enable default debugging" " mask"); From patchwork Tue Aug 25 06:43:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C978DC433DF for ; Tue, 25 Aug 2020 06:45:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9564B20706 for ; Tue, 25 Aug 2020 06:45:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="DXNgMBS1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729131AbgHYGpf (ORCPT ); Tue, 25 Aug 2020 02:45:35 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:22668 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729076AbgHYGpe (ORCPT ); Tue, 25 Aug 2020 02:45:34 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07P6TfCT009550 for ; Mon, 24 Aug 2020 23:45:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pfpt0220; bh=63k3ejpFQnAlsgYeZlo52UqDaF6ekilM3sUvF++VAzo=; b=DXNgMBS1EcKwUX8Z2OYoaBYJ3fnqap0epu0/+KtuChlKAjhnKeVebvcPsuyF9wIoueKq mZW1+PDmSV5A1cnw5/0sCRu/fvCX2t6ugaKF7rjkov7uVy8vWX/U0FAABROBmm3Gdg5x fs8IVH5Wn0cKDZLz4xH1hvxBsV0ggLrSINuY81CkkumGXagqrI20IxtjwM/ICgdQHbQo O30AnCKIkxm+vHy42G9lMZvZMYJ8jUrOFsbzEcJnvEi29cNrsiMwV6rONLt9VFree0SM zx2u+5NhCnBCh6rETzDNi345SrTlhEUnCzQfwNbJZEHhfChLmDJ31zcqoS4FbUwdO/V5 Mw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3332vmtc0t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 24 Aug 2020 23:45:33 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 24 Aug 2020 23:45:32 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 24 Aug 2020 23:45:31 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 24 Aug 2020 23:45:31 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id D18113F703F; Mon, 24 Aug 2020 23:45:30 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 07P6jUMc016426; Mon, 24 Aug 2020 23:45:30 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 07P6jUGH016417; Mon, 24 Aug 2020 23:45:30 -0700 From: Javed Hasan To: CC: , , Subject: =?utf-8?q?=5BPATCH_3/8=5D_qedf=3A_Fix_for_the_session=E2=80=99s_?= =?utf-8?q?E=5FD=5FTOV_value=2E?= Date: Mon, 24 Aug 2020 23:43:49 -0700 Message-ID: <20200825064354.16361-4-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200825064354.16361-1-jhasan@marvell.com> References: <20200825064354.16361-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-24_12:2020-08-24,2020-08-24 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org -FW expects E_D_TOV field in connection offload parameters as “msec”. -Earlier incorrect value(100ms), was leading to abort from driver in the case when data frames for read take more than 100ms from target side, resulting in FW reporting E_D_TOV expiration. Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 5770692..ccf6a99 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -1311,7 +1311,7 @@ static int qedf_offload_connection(struct qedf_ctx *qedf, ether_addr_copy(conn_info.dst_mac, qedf->ctlr.dest_addr); conn_info.tx_max_fc_pay_len = fcport->rdata->maxframe_size; - conn_info.e_d_tov_timer_val = qedf->lport->e_d_tov / 20; + conn_info.e_d_tov_timer_val = qedf->lport->e_d_tov; conn_info.rec_tov_timer_val = 3; /* I think this is what E3 was */ conn_info.rx_max_fc_pay_len = fcport->rdata->maxframe_size; From patchwork Tue Aug 25 06:43:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257856 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79CF2C433DF for ; Tue, 25 Aug 2020 06:46:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4230D2076C for ; Tue, 25 Aug 2020 06:46:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="ZqdBHpMN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729111AbgHYGqX (ORCPT ); Tue, 25 Aug 2020 02:46:23 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:30138 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729076AbgHYGqW (ORCPT ); Tue, 25 Aug 2020 02:46:22 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07P6Tf2x009543 for ; Mon, 24 Aug 2020 23:46:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=9Y7Wv+xeqa2nfgu1J5GLuS0mWA8JsRJdCUugvFul97U=; b=ZqdBHpMNOwqaR0ghqULrWf62yi9817pb5HahsaEhOmczezkUvqfcSK3YxA042T0m8hH+ OORqRxrBY9VLotMAKtYTayWnwIx9mMWBdCOnPVsRIktdXLxjprSx7wDV3rmnG+df49vg Rqj/7ZP9oBi/75FEX99pBha9+hLE9BIIIp7RCDvJxMGeJtrcxFUG8NFuD773jWo88CW1 Y4gL+JTvvOPKXSmRQHbW+ZpmLJlACAX2KooORMczaZCxRR3OStFUIEnqDKmg23bMrvfS 7OFvC6Sjo8qcXGXCsSD5iw1bhXYk8/vQzSE0MAxWJO4ekeeY0pwzO5+vLgqnIJl32bA+ gA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 3332vmtc3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 24 Aug 2020 23:46:20 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 24 Aug 2020 23:46:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 24 Aug 2020 23:46:19 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 1DDF03F703F; Mon, 24 Aug 2020 23:46:19 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 07P6kIFq016442; Mon, 24 Aug 2020 23:46:18 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 07P6kIcT016433; Mon, 24 Aug 2020 23:46:18 -0700 From: Javed Hasan To: CC: , , Subject: [PATCH 5/8] qedf: Return SUCCESS if stale rport in encounteredon eh_abort. Date: Mon, 24 Aug 2020 23:43:51 -0700 Message-ID: <20200825064354.16361-6-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200825064354.16361-1-jhasan@marvell.com> References: <20200825064354.16361-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-24_12:2020-08-24,2020-08-24 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap -If SUCCESS is not return, it can get escalated. Hence, return SUCCESS similar to other conditions. Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index bf1b755..50af70a 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -704,7 +704,7 @@ static int qedf_eh_abort(struct scsi_cmnd *sc_cmd) rdata = fcport->rdata; if (!rdata || !kref_get_unless_zero(&rdata->kref)) { QEDF_ERR(&qedf->dbg_ctx, "stale rport, sc_cmd=%p\n", sc_cmd); - rc = 1; + rc = SUCCESS; goto out; } From patchwork Tue Aug 25 06:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5F76C433E1 for ; Tue, 25 Aug 2020 06:47:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FA522076C for ; Tue, 25 Aug 2020 06:47:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="SCNi4Hf8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgHYGrM (ORCPT ); Tue, 25 Aug 2020 02:47:12 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:18648 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729076AbgHYGrK (ORCPT ); Tue, 25 Aug 2020 02:47:10 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07P6Tssr009624 for ; Mon, 24 Aug 2020 23:47:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=N08kTSTpe6UPbMBwLn2rVY/IaBQ77YYttqAyukfrC/4=; b=SCNi4Hf8/6tNE/6W9EvZhSyruqTAkIz+IQMbTKekP7Yc+bOOGREvAwPf8aaBBJf2HEmG L2vlbq6aQQLDfgmnuOkE2R3caISTtkhiN7055ZSFI35ovflEcLcEseQgvjfp0vayUtyK ZFZ913gNsj4S2C43QMWwld1utFZZJPQda1ixXmXDvhhpkD3TU2iv6RxQRoxV8b1VgOJC dpUMvslhbt6p9KdhfkVhS+gmVIK+URaMGaUHVFMMnsmsjn5Xd/fMjocg6aJuponkMvMa 0b2LllOiX2OTs7oW8Ep6Z2kHj4c850z+yZC4iqPX9gAA8XrUtwSHKEXCM+P1C6uSNTRz qQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 3332vmtc64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 24 Aug 2020 23:47:09 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 24 Aug 2020 23:47:07 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 24 Aug 2020 23:47:07 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 5B38D3F7045; Mon, 24 Aug 2020 23:47:07 -0700 (PDT) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 07P6l7UH016450; Mon, 24 Aug 2020 23:47:07 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 07P6l76Q016449; Mon, 24 Aug 2020 23:47:07 -0700 From: Javed Hasan To: CC: , , Subject: [PATCH 7/8] qedf: Retry qed->probe during recovery. Date: Mon, 24 Aug 2020 23:43:53 -0700 Message-ID: <20200825064354.16361-8-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200825064354.16361-1-jhasan@marvell.com> References: <20200825064354.16361-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-24_12:2020-08-24,2020-08-24 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap During recovery due to fcoe fn ramrod failure, we wait for 2 sec and then call qed->probe, if probe fails then re-try max 10 times. Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 3a45ca7..091cf86 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3245,11 +3245,16 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) void *task_start, *task_end; struct qed_slowpath_params slowpath_params; struct qed_probe_params qed_params; + u16 retry_cnt = 10; /* * When doing error recovery we didn't reap the lport so don't try * to reallocate it. */ +retry_probe: + if (mode == QEDF_MODE_RECOVERY) + msleep(2000); + if (mode != QEDF_MODE_RECOVERY) { lport = libfc_host_alloc(&qedf_host_template, sizeof(struct qedf_ctx)); @@ -3336,6 +3341,12 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) qed_params.is_vf = is_vf; qedf->cdev = qed_ops->common->probe(pdev, &qed_params); if (!qedf->cdev) { + if ((mode == QEDF_MODE_RECOVERY) && retry_cnt) { + QEDF_ERR(&qedf->dbg_ctx, + "Retry %d initialize hardware\n", retry_cnt); + retry_cnt--; + goto retry_probe; + } QEDF_ERR(&qedf->dbg_ctx, "common probe failed.\n"); rc = -ENODEV; goto err1;