From eac00c8aa8a5e1dacaaa8ecc1d604a735851287d Mon Sep 17 00:00:00 2001 From: Usha Ketineni Date: Mon, 29 Feb 2016 03:36:52 -0800 Subject: [PATCH] fcoe: fix reset of fip selection time. Do not reset fip selection time for every advertisement in fcoe_ctlr_recv_adv() but set it only once for the first validated FCF. Otherwise FCF selection won't happen when the advertisements consistently arrive with sub FCOE_CTLR_START_DELAY periodicity. Tested-by: Narendra K Acked-by: Neil Horman Reviewed-by: Johannes Thumshirn Acked-by: Vasu Dev Signed-off-by: Usha Ketineni Signed-off-by: Martin K. Petersen --- drivers/scsi/fcoe/fcoe_ctlr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index 34a1b1f333b4..3e83d485f743 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c @@ -1118,7 +1118,8 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb) * If this is the first validated FCF, note the time and * set a timer to trigger selection. */ - if (mtu_valid && !fip->sel_fcf && fcoe_ctlr_fcf_usable(fcf)) { + if (mtu_valid && !fip->sel_fcf && !fip->sel_time && + fcoe_ctlr_fcf_usable(fcf)) { fip->sel_time = jiffies + msecs_to_jiffies(FCOE_CTLR_START_DELAY); if (!timer_pending(&fip->timer) || -- 2.39.5