Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933705AbdIXUo2 (ORCPT ); Sun, 24 Sep 2017 16:44:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:32994 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933258AbdIXUoY (ORCPT ); Sun, 24 Sep 2017 16:44:24 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sawan Chandak , Himanshu Madhani , "Martin K. Petersen" Subject: [PATCH 4.13 070/109] scsi: qla2xxx: Use BIT_6 to acquire FAWWPN from switch Date: Sun, 24 Sep 2017 22:33:31 +0200 Message-Id: <20170924203355.908378650@linuxfoundation.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170924203353.104695385@linuxfoundation.org> References: <20170924203353.104695385@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1206 Lines: 35 4.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sawan Chandak commit fcc5b5cd726c0779cd689362aea82cc9d5a61346 upstream. If FA-WWPN feature disabled on the switch side and enabled for the adapter, then driver would update the port name with switch port name. This patch fixes issue by checking correct BIT flag to validate. Fixes: 41dc529a4602 ("qla2xxx: Improve RSCN handling in driver") Signed-off-by: Sawan Chandak Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -3690,7 +3690,7 @@ qla24xx_report_id_acquisition(scsi_qla_h if (qla_ini_mode_enabled(vha) && ha->flags.fawwpn_enabled && (rptid_entry->u.f1.flags & - VP_FLAGS_NAME_VALID)) { + BIT_6)) { memcpy(vha->port_name, rptid_entry->u.f1.port_name, WWN_SIZE);