Skip to contentSkip to conversation

fcoe: fix reset of fip selection time.

PATCH Applied Usha Ketineni 3 participants 3 messages Feb 29, 2016 – Mar 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fcoe: fix reset of fip selection time.

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.

---
 drivers/scsi/fcoe/fcoe_ctlr.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/fcoe/fcoe_ctlr.c +2 -1
index d68d572..0c85ef6 100644
@@ -1079,7 +1079,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) ||
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines · Usha Ketineni

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.

---
 drivers/scsi/fcoe/fcoe_ctlr.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/fcoe/fcoe_ctlr.c +2 -1
index d68d572..0c85ef6 100644
@@ -1079,7 +1079,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) ||
Quoted 5 lines

_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

#2 lore raw
In reply to Usha Ketineni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Usha" == Usha Ketineni <[email protected]> writes:

Usha> Do not reset fip selection time for every advertisement in Usha> fcoe_ctlr_recv_adv() but set it only once for the first validated Usha> FCF. Otherwise FCF selection won't happen when the advertisements Usha> consistently arrive with sub FCOE_CTLR_START_DELAY periodicity.

Applied to 4.6/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering