aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-11-20 17:54:57 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:55 -0500
commit8cdffdccd948ea4872b7b65280bc04f2fa93fc96 (patch)
tree7713d23f0a066e15b0f9c148bda62fd8db4fec53 /drivers
parent6580bbd0afe6ba1be5d53b331e92a7690046c923 (diff)
[SCSI] libfcoe: add checking disable flag in FIP_FKA_ADV
When the D bit is set if the FKA_ADV_Period of the FIP Discovery Advertisement, the ENode should not transmit period ENode FIP Keep Alive and VN_Port FIP Keep Alive (FC-BB-5 Rev2, 7.8.3.13). Note that fcf->flags is taken directly from the fip_header, I am claiming one bit for the purpose of the FIP_FKA_Period D bit as FIP_FL_FK_ADV_B, and use FIP_HEADER_FLAGS as bitmask for bits used in fip_header. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 3c501d4973e3..9961fd7310b7 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -665,6 +665,8 @@ static int fcoe_ctlr_parse_adv(struct fcoe_ctlr *fip,
665 if (dlen != sizeof(struct fip_fka_desc)) 665 if (dlen != sizeof(struct fip_fka_desc))
666 goto len_err; 666 goto len_err;
667 fka = (struct fip_fka_desc *)desc; 667 fka = (struct fip_fka_desc *)desc;
668 if (fka->fd_flags & FIP_FKA_ADV_D)
669 fcf->fd_flags = 1;
668 t = ntohl(fka->fd_fka_period); 670 t = ntohl(fka->fd_fka_period);
669 if (t >= FCOE_CTLR_MIN_FKA) 671 if (t >= FCOE_CTLR_MIN_FKA)
670 fcf->fka_period = msecs_to_jiffies(t); 672 fcf->fka_period = msecs_to_jiffies(t);
@@ -1160,7 +1162,7 @@ static void fcoe_ctlr_timeout(unsigned long arg)
1160 } 1162 }
1161 } 1163 }
1162 1164
1163 if (sel) { 1165 if (sel && !sel->fd_flags) {
1164 if (time_after_eq(jiffies, fip->ctlr_ka_time)) { 1166 if (time_after_eq(jiffies, fip->ctlr_ka_time)) {
1165 fip->ctlr_ka_time = jiffies + sel->fka_period; 1167 fip->ctlr_ka_time = jiffies + sel->fka_period;
1166 fip->send_ctlr_ka = 1; 1168 fip->send_ctlr_ka = 1;