diff options
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 4 | ||||
-rw-r--r-- | include/scsi/fc/fc_fip.h | 12 | ||||
-rw-r--r-- | include/scsi/libfcoe.h | 1 |
3 files changed, 15 insertions, 2 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; |
diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h index 3d138c1fcf8a..17baa19380f0 100644 --- a/include/scsi/fc/fc_fip.h +++ b/include/scsi/fc/fc_fip.h | |||
@@ -214,11 +214,21 @@ struct fip_vn_desc { | |||
214 | */ | 214 | */ |
215 | struct fip_fka_desc { | 215 | struct fip_fka_desc { |
216 | struct fip_desc fd_desc; | 216 | struct fip_desc fd_desc; |
217 | __u8 fd_resvd[2]; | 217 | __u8 fd_resvd; |
218 | __u8 fd_flags; /* bit0 is fka disable flag */ | ||
218 | __be32 fd_fka_period; /* adv./keep-alive period in mS */ | 219 | __be32 fd_fka_period; /* adv./keep-alive period in mS */ |
219 | } __attribute__((packed)); | 220 | } __attribute__((packed)); |
220 | 221 | ||
221 | /* | 222 | /* |
223 | * flags for fip_fka_desc.fd_flags | ||
224 | */ | ||
225 | enum fip_fka_flags { | ||
226 | FIP_FKA_ADV_D = 0x01, /* no need for FKA from ENode */ | ||
227 | }; | ||
228 | |||
229 | /* FIP_DT_FKA flags */ | ||
230 | |||
231 | /* | ||
222 | * FIP_DT_VENDOR descriptor. | 232 | * FIP_DT_VENDOR descriptor. |
223 | */ | 233 | */ |
224 | struct fip_vendor_desc { | 234 | struct fip_vendor_desc { |
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 3837872f1965..c603f4a7e7fc 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -155,6 +155,7 @@ struct fcoe_fcf { | |||
155 | u8 pri; | 155 | u8 pri; |
156 | u16 flags; | 156 | u16 flags; |
157 | u32 fka_period; | 157 | u32 fka_period; |
158 | u8 fd_flags:1; | ||
158 | }; | 159 | }; |
159 | 160 | ||
160 | /* FIP API functions */ | 161 | /* FIP API functions */ |