]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] libfcoe: Do not sends FDISCs before FLOGI during CVL
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>
Fri, 9 Mar 2012 22:49:53 +0000 (14:49 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 28 Mar 2012 08:03:30 +0000 (09:03 +0100)
When handling CVL with no Vx port descriptors, lports for NPIV ports are reset
before issuing the ctlr_reset. This causes FDISCs to be issued before
successful FLOGI. Fix it by resetting the controller before resetting the
lports.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/fcoe/fcoe_ctlr.c

index e7522dcc296eb8bb9c425da842f2a159d05862f2..a43dad2238d097c0de69b5599ab439611c17c80c 100644 (file)
@@ -1273,11 +1273,6 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
                 * No Vx_Port description. Clear all NPIV ports,
                 * followed by physical port
                 */
-               mutex_lock(&lport->lp_mutex);
-               list_for_each_entry(vn_port, &lport->vports, list)
-                       fc_lport_reset(vn_port);
-               mutex_unlock(&lport->lp_mutex);
-
                mutex_lock(&fip->ctlr_mutex);
                per_cpu_ptr(lport->dev_stats,
                            get_cpu())->VLinkFailureCount++;
@@ -1285,6 +1280,11 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
                fcoe_ctlr_reset(fip);
                mutex_unlock(&fip->ctlr_mutex);
 
+               mutex_lock(&lport->lp_mutex);
+               list_for_each_entry(vn_port, &lport->vports, list)
+                       fc_lport_reset(vn_port);
+               mutex_unlock(&lport->lp_mutex);
+
                fc_lport_reset(fip->lp);
                fcoe_ctlr_solicit(fip, NULL);
        } else {