Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3002718imm; Sun, 1 Jul 2018 10:05:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeFW+fGkLB6qpigFJaJ/xXzgTFMGD85k26tSC9VREKOzY5m6Ahoa1gCIVXaR6cuHuMWhuoK X-Received: by 2002:a62:ba13:: with SMTP id k19-v6mr22250288pff.245.1530464704045; Sun, 01 Jul 2018 10:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530464704; cv=none; d=google.com; s=arc-20160816; b=dSH3JIsXHmxWF67o4EoI+Ua1EGlZwtIyGW9FQD6OQpHKRMi5Y2IlI3z4s9UR6WQbJw X9kVlD4tz38VOb+krItWtANQ3kLBwI8k2J5XrR5KBeCou1WKR2zi2FUksSfG89R2yKe0 cpS9J32LKvVKKOrc7Q7WA2I1Bu026hfNF1K4PL0/ItAAe3H7vD+LU6raqKYhZngTCUca TjqnMXWNVvJtOWm6kwicGNt0CVjtVHl76cESvZCYfIUVzYMoH4FlkOR3n71jLlejdHCz QBdAKef2hh9K6DGoV4/pkDdLuQd/NdMEMJekDVjTTLysXgU33qACtEdQktpjYd9aM/Tp VZ7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Pvr3NUdXjyh5J2kz3/J79rxudr6BOcrcSSAjCLQFfq8=; b=EnBOPSfJIBhvNkRcLsmdpXFsUO7tB2Og2GFHVFkyh+J0SCa2hvGA+LFu8w2IY06Xng gDTvutM/fsfZuowNu/bPbYI9lqLb1mkuh7lMPgo2qcTsguL04CCowNzMhJWsY5wN49Jq qq8Am3SUEE/W4tOKIJwRfJSxtmoLsttpnR33VTR9ci1XcpmV8ZrYave1EhLM1Qn0X+PL ZU+dOnczPBdnB93nwv3zY54RV8BTVwbJdp/gWrHG9bsEDwE8lo60eCAwbnGRXsB+gk+c nAhVmDoinX2mTl7iGPx1XxN7ocHXUDi//l6Vg3cQcXABmjCRzF8uasw0bRCjEgOtCyqA wegw== 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 a4-v6si14060112plp.219.2018.07.01.10.04.49; Sun, 01 Jul 2018 10:05:04 -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 S1032243AbeGAQmv (ORCPT + 99 others); Sun, 1 Jul 2018 12:42:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37682 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031569AbeGAQmn (ORCPT ); Sun, 1 Jul 2018 12:42:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8C829AA6; Sun, 1 Jul 2018 16:42:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quinn Tran , Himanshu Madhani , "Martin K. Petersen" Subject: [PATCH 4.17 134/220] scsi: qla2xxx: Delete session for nport id change Date: Sun, 1 Jul 2018 18:22:38 +0200 Message-Id: <20180701160913.915354761@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quinn Tran commit 1d317b21231bb2b81a6e0f94f708b8619ec8775b upstream. This patch fixes regression introduced by commit a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery") by scheduling session deletion when Nport ID changes. [mkp: clarified commit] Fixes: a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery") Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_gs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3915,7 +3915,6 @@ void qla24xx_async_gnnft_done(scsi_qla_h if (memcmp(rp->port_name, fcport->port_name, WWN_SIZE)) continue; fcport->scan_state = QLA_FCPORT_FOUND; - fcport->d_id.b24 = rp->id.b24; found = true; /* * If device was not a fabric device before. @@ -3923,7 +3922,10 @@ void qla24xx_async_gnnft_done(scsi_qla_h if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) { qla2x00_clear_loop_id(fcport); fcport->flags |= FCF_FABRIC_DEVICE; + } else if (fcport->d_id.b24 != rp->id.b24) { + qlt_schedule_sess_for_deletion(fcport); } + fcport->d_id.b24 = rp->id.b24; break; }