be2iscsi: Fix destroy MCC-CQ before MCC-EQ is destroyed
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Tue, 6 May 2014 01:41:29 +0000 (21:41 -0400)
committerChristoph Hellwig <hch@lst.de>
Wed, 28 May 2014 16:13:16 +0000 (18:13 +0200)
 EQ teardown should happen only after all CQ are destroyed.
 In some FW config, adapter goes into a freeze state. This
 fix moves teardown of MCC-Q before the EQ teardown happens.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/be2iscsi/be_main.c

index e202ab32d13e5788ba3e1cf488ed8b580cc7c73e..554349029628417d03b163cb066b94b6b0552c05 100644 (file)
@@ -3685,7 +3685,7 @@ static void hwi_cleanup(struct beiscsi_hba *phba)
        struct hwi_controller *phwi_ctrlr;
        struct hwi_context_memory *phwi_context;
        struct hwi_async_pdu_context *pasync_ctx;
-       int i, eq_num, ulp_num;
+       int i, eq_for_mcc, ulp_num;
 
        phwi_ctrlr = phba->phwi_ctrlr;
        phwi_context = phwi_ctrlr->phwi_ctxt;
@@ -3722,16 +3722,17 @@ static void hwi_cleanup(struct beiscsi_hba *phba)
                if (q->created)
                        beiscsi_cmd_q_destroy(ctrl, q, QTYPE_CQ);
        }
+
+       be_mcc_queues_destroy(phba);
        if (phba->msix_enabled)
-               eq_num = 1;
+               eq_for_mcc = 1;
        else
-               eq_num = 0;
-       for (i = 0; i < (phba->num_cpus + eq_num); i++) {
+               eq_for_mcc = 0;
+       for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
                q = &phwi_context->be_eq[i].q;
                if (q->created)
                        beiscsi_cmd_q_destroy(ctrl, q, QTYPE_EQ);
        }
-       be_mcc_queues_destroy(phba);
        be_cmd_fw_uninit(ctrl);
 }
 
This page took 0.02696 seconds and 5 git commands to generate.