diff options
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 34800af808e1..9823291395ad 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -562,14 +562,28 @@ EXPORT_SYMBOL(fcoe_ctlr_els_send); | |||
562 | * times its keep-alive period including fuzz. | 562 | * times its keep-alive period including fuzz. |
563 | * | 563 | * |
564 | * In addition, determine the time when an FCF selection can occur. | 564 | * In addition, determine the time when an FCF selection can occur. |
565 | * | ||
566 | * Also, increment the MissDiscAdvCount when no advertisement is received | ||
567 | * for the corresponding FCF for 1.5 * FKA_ADV_PERIOD (FC-BB-5 LESB). | ||
565 | */ | 568 | */ |
566 | static void fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) | 569 | static void fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) |
567 | { | 570 | { |
568 | struct fcoe_fcf *fcf; | 571 | struct fcoe_fcf *fcf; |
569 | struct fcoe_fcf *next; | 572 | struct fcoe_fcf *next; |
570 | unsigned long sel_time = 0; | 573 | unsigned long sel_time = 0; |
574 | unsigned long mda_time = 0; | ||
571 | 575 | ||
572 | list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { | 576 | list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { |
577 | mda_time = fcf->fka_period + (fcf->fka_period >> 1); | ||
578 | if ((fip->sel_fcf == fcf) && | ||
579 | (time_after(jiffies, fcf->time + mda_time))) { | ||
580 | mod_timer(&fip->timer, jiffies + mda_time); | ||
581 | fc_lport_get_stats(fip->lp)->MissDiscAdvCount++; | ||
582 | printk(KERN_INFO "libfcoe: host%d: Missing Discovery " | ||
583 | "Advertisement for fab %llx count %lld\n", | ||
584 | fip->lp->host->host_no, fcf->fabric_name, | ||
585 | fc_lport_get_stats(fip->lp)->MissDiscAdvCount); | ||
586 | } | ||
573 | if (time_after(jiffies, fcf->time + fcf->fka_period * 3 + | 587 | if (time_after(jiffies, fcf->time + fcf->fka_period * 3 + |
574 | msecs_to_jiffies(FIP_FCF_FUZZ * 3))) { | 588 | msecs_to_jiffies(FIP_FCF_FUZZ * 3))) { |
575 | if (fip->sel_fcf == fcf) | 589 | if (fip->sel_fcf == fcf) |