aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2013-02-05 02:00:20 -0500
committerRobert Love <robert.w.love@intel.com>2013-02-11 20:38:35 -0500
commitb2593cbe18c4f50c9acacd88860b051f567654d7 (patch)
treeacd48e0b939a8d170e5beee00056c5cb4a430209 /drivers
parent94aa743a2af455ee3bd9fc3410dff82f6abf4522 (diff)
libfcoe: Handle CVL while waiting to select an FCF
When a CVL is received while we wait to select best FCF, we drop it without handling it. This causes initiator and the switch to go out-of-sync. Initiator proceeds selecting one of the FCFs and tries to send FIP FLOGI. However the switch may reject the FLOGI, as it has cleared its internal state, and expects the initiator to start FIP discovery protocol. Fix this condition by resetting the fcoe controller. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Reviewed-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 75834255bf07..aff3c44a1cdc 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -1291,8 +1291,16 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
1291 1291
1292 LIBFCOE_FIP_DBG(fip, "Clear Virtual Link received\n"); 1292 LIBFCOE_FIP_DBG(fip, "Clear Virtual Link received\n");
1293 1293
1294 if (!fcf || !lport->port_id) 1294 if (!fcf || !lport->port_id) {
1295 /*
1296 * We are yet to select best FCF, but we got CVL in the
1297 * meantime. reset the ctlr and let it rediscover the FCF
1298 */
1299 mutex_lock(&fip->ctlr_mutex);
1300 fcoe_ctlr_reset(fip);
1301 mutex_unlock(&fip->ctlr_mutex);
1295 return; 1302 return;
1303 }
1296 1304
1297 /* 1305 /*
1298 * mask of required descriptors. Validating each one clears its bit. 1306 * mask of required descriptors. Validating each one clears its bit.