[Open-FCoE] [RFC PATCH 5/5] libfc: stop sending KA if port is not logged in

Vasu Dev vasu.dev at intel.com
Fri Jan 14 20:13:50 UTC 2011


Reported-by: Frank Zhang <frank_1.Zhang at intel.com>
Signed-off-by: Vasu Dev <vasu.dev at intel.com>
---

 drivers/scsi/fcoe/libfcoe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 625c6be..c04e208 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -464,7 +464,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip,
 
 	fcf = fip->sel_fcf;
 	lp = fip->lp;
-	if (!fcf || (ports && !lp->port_id))
+	if (!fcf || (lport && !lp->port_id))
 		return;
 
 	len = sizeof(*kal) + ports * sizeof(*vn);
@@ -1649,7 +1649,7 @@ static void fcoe_ctlr_timer_work(struct work_struct *work)
 	}
 
 	if (send_ctlr_ka)
-		fcoe_ctlr_send_keep_alive(fip, NULL, 0, fip->ctl_src_addr);
+		fcoe_ctlr_send_keep_alive(fip, fip->lp, 0, fip->ctl_src_addr);
 
 	if (send_port_ka) {
 		mutex_lock(&fip->lp->lp_mutex);




More information about the devel mailing list