From patchwork Wed Jul 6 15:14:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 9216591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 82FC860752 for ; Wed, 6 Jul 2016 15:59:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73A6926E81 for ; Wed, 6 Jul 2016 15:59:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 681162715B; Wed, 6 Jul 2016 15:59:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FAF826E81 for ; Wed, 6 Jul 2016 15:59:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754650AbcGFP72 (ORCPT ); Wed, 6 Jul 2016 11:59:28 -0400 Received: from mx0b-0016ce01.pphosted.com ([67.231.156.153]:37583 "EHLO mx0b-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754547AbcGFP7V (ORCPT ); Wed, 6 Jul 2016 11:59:21 -0400 Received: from pps.filterd (m0085408.ppops.net [127.0.0.1]) by mx0b-0016ce01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u66FvlBD014172; Wed, 6 Jul 2016 08:59:17 -0700 Received: from avcashub1.qlogic.com ([198.186.0.116]) by mx0b-0016ce01.pphosted.com with ESMTP id 23xckp8s33-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 06 Jul 2016 08:59:17 -0700 Received: from dut6217.mv.qlogic.com (172.29.56.217) by qlc.com (10.1.4.191) with Microsoft SMTP Server id 14.3.235.1; Wed, 6 Jul 2016 08:59:15 -0700 Received: by dut6217.mv.qlogic.com (Postfix, from userid 0) id CD9BE522158; Wed, 6 Jul 2016 11:14:35 -0400 (EDT) From: Himanshu Madhani To: , CC: , , Subject: [PATCH 04/19] qla2xxx: Set FLOGI retry in additional firmware options for P2P (N2N) mode. Date: Wed, 6 Jul 2016 11:14:20 -0400 Message-ID: <1467818075-15246-5-git-send-email-himanshu.madhani@qlogic.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1467818075-15246-1-git-send-email-himanshu.madhani@qlogic.com> References: <1467818075-15246-1-git-send-email-himanshu.madhani@qlogic.com> MIME-Version: 1.0 disclaimer: bypass X-Proofpoint-Virus-Version: vendor=nai engine=5800 definitions=8218 signatures=670665 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607060138 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Giridhar Malavali When VP decoupling enabled, there could be a window where, FLOGI from initiators can be dropped before VP0 is enabled, causing link level recovery. Retry FLOGI to avoid link level recovery. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 0671f07..907a7ac 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -16,7 +16,7 @@ * | | | 0x016e-0x0170 | * | Mailbox commands | 0x1192 | | * | | | | - * | Device Discovery | 0x2016 | 0x2020-0x2022, | + * | Device Discovery | 0x2003 | 0x2016 | * | | | 0x2011-0x2012, | * | | | 0x2099-0x20a4 | * | Queue Command and IO tracing | 0x3074 | 0x300b | diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index c56cdb3..a3685b6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2053,6 +2053,14 @@ qla2x00_update_fw_options(scsi_qla_host_t *vha) if (IS_QLA6312(ha)) ha->fw_options[2] |= BIT_13; + /* Set Retry FLOGI in case of P2P connection */ + if (ha->operating_mode == P2P) { + ha->fw_options[2] |= BIT_3; + ql_dbg(ql_dbg_disc, vha, 0x2100, + "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n", + __func__, ha->fw_options[2]); + } + /* Update firmware options. */ qla2x00_set_fw_options(vha, ha->fw_options); } @@ -2070,6 +2078,14 @@ qla24xx_update_fw_options(scsi_qla_host_t *vha) if (ql2xfwholdabts) ha->fw_options[3] |= BIT_12; + /* Set Retry FLOGI in case of P2P connection */ + if (ha->operating_mode == P2P) { + ha->fw_options[2] |= BIT_3; + ql_dbg(ql_dbg_disc, vha, 0x2101, + "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n", + __func__, ha->fw_options[2]); + } + /* Update Serial Link options. */ if ((le16_to_cpu(ha->fw_seriallink_options24[0]) & BIT_0) == 0) return; @@ -6513,6 +6529,14 @@ qla81xx_update_fw_options(scsi_qla_host_t *vha) if (ql2xfwholdabts) ha->fw_options[3] |= BIT_12; + /* Set Retry FLOGI in case of P2P connection */ + if (ha->operating_mode == P2P) { + ha->fw_options[2] |= BIT_3; + ql_dbg(ql_dbg_disc, vha, 0x2103, + "(%s): Setting FLOGI retry BIT in fw_options[2]: 0x%x\n", + __func__, ha->fw_options[2]); + } + if (!ql2xetsenable) goto out;