Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[pandora-kernel.git] / drivers / scsi / qla2xxx / qla_os.c
index a2f9992..c9c56a8 100644 (file)
@@ -3577,9 +3577,25 @@ void qla2x00_relogin(struct scsi_qla_host *vha)
                                                continue;
                                        /* Attempt a retry. */
                                        status = 1;
-                               } else
+                               } else {
                                        status = qla2x00_fabric_login(vha,
                                            fcport, &next_loopid);
+                                       if (status ==  QLA_SUCCESS) {
+                                               int status2;
+                                               uint8_t opts;
+
+                                               opts = 0;
+                                               if (fcport->flags &
+                                                   FCF_FCP2_DEVICE)
+                                                       opts |= BIT_1;
+                                                       status2 =
+                                                           qla2x00_get_port_database(
+                                                               vha, fcport,
+                                                               opts);
+                                               if (status2 != QLA_SUCCESS)
+                                                       status = 1;
+                                       }
+                               }
                        } else
                                status = qla2x00_local_device_login(vha,
                                                                fcport);
@@ -4106,8 +4122,7 @@ qla2x00_release_firmware(void)
 
        mutex_lock(&qla_fw_lock);
        for (idx = 0; idx < FW_BLOBS; idx++)
-               if (qla_fw_blobs[idx].fw)
-                       release_firmware(qla_fw_blobs[idx].fw);
+               release_firmware(qla_fw_blobs[idx].fw);
        mutex_unlock(&qla_fw_lock);
 }