]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fcoe: fix reset of fip selection time.
authorUsha Ketineni <usha.k.ketineni@intel.com>
Mon, 29 Feb 2016 11:36:52 +0000 (03:36 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Mar 2016 02:02:20 +0000 (21:02 -0500)
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 <narendra_k@dell.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Usha Ketineni <usha.k.ketineni@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/fcoe/fcoe_ctlr.c

index 34a1b1f333b4c16881ea3f6a610f29a73fc18a56..3e83d485f7437d859454304f6c4eb8986eed6c67 100644 (file)
@@ -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) ||