Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2593cbe authored by Bhanu Prakash Gollapudi's avatar Bhanu Prakash Gollapudi Committed by Robert Love
Browse files

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: default avatarBhanu Prakash Gollapudi <bprakash@broadcom.com>
Reviewed-by: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
parent 94aa743a
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -1291,8 +1291,16 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,


	LIBFCOE_FIP_DBG(fip, "Clear Virtual Link received\n");
	LIBFCOE_FIP_DBG(fip, "Clear Virtual Link received\n");


	if (!fcf || !lport->port_id)
	if (!fcf || !lport->port_id) {
		/*
		 * We are yet to select best FCF, but we got CVL in the
		 * meantime. reset the ctlr and let it rediscover the FCF
		 */
		mutex_lock(&fip->ctlr_mutex);
		fcoe_ctlr_reset(fip);
		mutex_unlock(&fip->ctlr_mutex);
		return;
		return;
	}


	/*
	/*
	 * mask of required descriptors.  Validating each one clears its bit.
	 * mask of required descriptors.  Validating each one clears its bit.