]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Properly check for current state after the fabric-login request.
authorSaurav Kashyap <saurav.kashyap@qlogic.com>
Wed, 4 Apr 2012 21:39:54 +0000 (14:39 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 23 Jul 2012 08:02:44 +0000 (01:02 -0700)
JIRA Key: V2632FC-185

drivers/scsi/qla2xxx/qla_os.c

index 664d927abef6355c0226e3f3fd3b0118149e1a8b..9c884a7506dee489a22172812b153575c38bb863 100644 (file)
@@ -3593,9 +3593,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);