From e529a7e5cf5740cd0dfd419d5726eeb4d100c574 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Gollapudi Date: Mon, 4 Feb 2013 23:00:20 -0800 Subject: [PATCH] --- yaml --- r: 360295 b: refs/heads/master c: b2593cbe18c4f50c9acacd88860b051f567654d7 h: refs/heads/master i: 360293: 336dc27c164ec79e93e71b900d9b9a16792fc05d 360291: fe37f3f20d09536447534a8098b2b795c60b2f17 360287: eb03cc033b224c9a3cc399cfa21b80f3847a2fd4 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/fcoe/fcoe_ctlr.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index da91529fc0a0..054f1d03da2f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 94aa743a2af455ee3bd9fc3410dff82f6abf4522 +refs/heads/master: b2593cbe18c4f50c9acacd88860b051f567654d7 diff --git a/trunk/drivers/scsi/fcoe/fcoe_ctlr.c b/trunk/drivers/scsi/fcoe/fcoe_ctlr.c index 75834255bf07..aff3c44a1cdc 100644 --- a/trunk/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/trunk/drivers/scsi/fcoe/fcoe_ctlr.c @@ -1291,8 +1291,16 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, 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; + } /* * mask of required descriptors. Validating each one clears its bit.