]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
scsi: qla2xxx: Use BIT_6 to acquire FAWWPN from switch
authorSawan Chandak <sawan.chandak@cavium.com>
Wed, 23 Aug 2017 22:05:02 +0000 (15:05 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 14:34:56 +0000 (10:34 -0400)
BugLink: http://bugs.launchpad.net/bugs/1720154
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 <sawan.chandak@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/qla2xxx/qla_mbx.c

index 7308dd41bc5dc05eb7349698ecd5cdd3179beca6..1f1a81c6eaa93fdbf58a626e2cbd864c4b99718a 100644 (file)
@@ -3690,7 +3690,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
                                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);