From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Love Subject: [PATCH 34/54] libfcoe: don't send ELS in FIP mode if no FCF selected Date: Tue, 03 Nov 2009 11:48:32 -0800 Message-ID: <20091103194832.4085.6133.stgit@localhost.localdomain> References: <20091103194530.4085.37963.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com ([134.134.136.20]:16646 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755063AbZKCTsj (ORCPT ); Tue, 3 Nov 2009 14:48:39 -0500 In-Reply-To: <20091103194530.4085.37963.stgit@localhost.localdomain> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org Cc: Joe Eykholt , Robert Love From: Joe Eykholt If link is up, but no FCF is selected, don't send any ELS frames. This came up when an fnic received a multicast advertisement but no solitited advertisments, so no FCF was selected. It tried to send FLOGIs anyway. Signed-off-by: Joe Eykholt Signed-off-by: Robert Love --- drivers/scsi/fcoe/libfcoe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 4d857c2..2aab972 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -500,6 +500,8 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport, if (fip->state == FIP_ST_NON_FIP) return 0; + if (!fip->sel_fcf) + goto drop; switch (op) { case ELS_FLOGI: