summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-06-12 03:44:20 +0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 21:01:48 +0400
commitc600fea2d813e8734748202970722c3b6a76b9a1 (patch)
treeaf04fbcfa7c37afda99ee1ff4cf7df187969e7e0 /drivers/scsi
parentd99ee45b7cb89803b79745dc3014ba64bfd02b7d (diff)
downloadlinux-c600fea2d813e8734748202970722c3b6a76b9a1.tar.xz
[SCSI] libfcoe: update FIP FCF D flag from advertisments
Allow the D flag (indicating that keep-alives are not needed) to be updated dynamically from received FIP advertisements. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 4893098b3d3f..27c21ca802b2 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -769,18 +769,21 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
list_add(&fcf->list, &fip->fcfs);
} else {
/*
- * Flags in advertisements are ignored once the FCF is
- * selected. Flags in unsolicited advertisements are
- * ignored after a usable solicited advertisement
- * has been received.
+ * Update the FCF's keep-alive descriptor flags.
+ * Other flag changes from new advertisements are
+ * ignored after a solicited advertisement is
+ * received and the FCF is selectable (usable).
*/
+ fcf->fd_flags = new.fd_flags;
+ if (!fcoe_ctlr_fcf_usable(fcf))
+ fcf->flags = new.flags;
+
if (fcf == fip->sel_fcf && !fcf->fd_flags) {
fip->ctlr_ka_time -= fcf->fka_period;
fip->ctlr_ka_time += new.fka_period;
if (time_before(fip->ctlr_ka_time, fip->timer.expires))
mod_timer(&fip->timer, fip->ctlr_ka_time);
- } else if (!fcoe_ctlr_fcf_usable(fcf))
- fcf->flags = new.flags;
+ }
fcf->fka_period = new.fka_period;
memcpy(fcf->fcf_mac, new.fcf_mac, ETH_ALEN);
}