From patchwork Thu May 21 17:55:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 6458031 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DBEE3C0020 for ; Thu, 21 May 2015 17:55:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD1BF2051D for ; Thu, 21 May 2015 17:55:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C873D20522 for ; Thu, 21 May 2015 17:55:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964808AbbEURzh (ORCPT ); Thu, 21 May 2015 13:55:37 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:33421 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932217AbbEURzc (ORCPT ); Thu, 21 May 2015 13:55:32 -0400 Received: by qkgv12 with SMTP id v12so61626550qkg.0 for ; Thu, 21 May 2015 10:55:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=j21F5wOwgdT5gBAkXxeNL3NeYQ5fAJdfk6MwV2cToGQ=; b=DSOBSaWOK6rexHlgerzy8Vudau3PA0+8zqESk5BSk3E7moeV1UBCxNATEyCWFQ9Rp7 hqDZPQCHXfPpS7AGhLw4rT106JSE+SE5h3BjVpj+WqnUs7a814un3JGwL0qmqo3yAccj 73QsB/hP9tU5De5FB09CKGmhOgRaEBuWTZKWHp2gKz/aNECu1gtD19Hlw4R0qO0oanYr kkKs+iZdgv6edIpZ0T/WQ1dzK3V/Yh+YT8WdTjSRpLzW8G0zgCqX7pMi8GOiz2d541LX B5HztN5IbV/hywiA+q3OAONygmkM/C5qRpQ3KjdwW9bmrEuaif9wo1Fp65DvTH89gD+s s5Xw== X-Gm-Message-State: ALoCoQnmhlaktwSn/zN01gcGUSUd2bWJH7eitKrs9kk3rMTLjnR5jIQU1Y/YD5bQC/RL3Y0lXFRI X-Received: by 10.140.151.209 with SMTP id 200mr5701610qhx.71.1432230931580; Thu, 21 May 2015 10:55:31 -0700 (PDT) Received: from myfc17 (c-75-67-235-135.hsd1.nh.comcast.net. [75.67.235.135]) by mx.google.com with ESMTPSA id 139sm13603349qhb.26.2015.05.21.10.55.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 21 May 2015 10:55:31 -0700 (PDT) Date: Thu, 21 May 2015 13:55:27 -0400 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH v2 11/15] lpfc: Correct loss of RSCNs during array takeaway/giveback testing. Message-ID: <555e1c0f.U9cjP6tJsuPqwu0U%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Correct loss of RSCNs during array takeaway/giveback testing. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index b490ef5..4d3d931 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1514,7 +1514,7 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp, struct fc_rport *rport; struct serv_parm *sp; uint8_t name[sizeof(struct lpfc_name)]; - uint32_t rc, keepDID = 0; + uint32_t rc, keepDID = 0, keep_nlp_flag = 0; int put_node; int put_rport; unsigned long *active_rrqs_xri_bitmap = NULL; @@ -1603,9 +1603,9 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp, ndlp->active_rrqs_xri_bitmap, phba->cfg_rrq_xri_bitmap_sz); - if (ndlp->nlp_flag & NLP_NPR_2B_DISC) - new_ndlp->nlp_flag |= NLP_NPR_2B_DISC; - ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; + keep_nlp_flag = new_ndlp->nlp_flag; + new_ndlp->nlp_flag = ndlp->nlp_flag; + ndlp->nlp_flag = keep_nlp_flag; /* Set state will put new_ndlp on to node list if not already done */ lpfc_nlp_set_state(vport, new_ndlp, ndlp->nlp_state); @@ -1648,7 +1648,9 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp, memcpy(ndlp->active_rrqs_xri_bitmap, active_rrqs_xri_bitmap, phba->cfg_rrq_xri_bitmap_sz); - lpfc_drop_node(vport, ndlp); + + if (!NLP_CHK_NODE_ACT(ndlp)) + lpfc_drop_node(vport, ndlp); } else { lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,