From: Joe Eykholt Date: Tue, 3 Nov 2009 19:48:32 +0000 (-0800) Subject: [SCSI] libfcoe: don't send ELS in FIP mode if no FCF selected X-Git-Tag: v2.6.33-rc1~344^2~90 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f31f2a1c3215e96fbff2152486d0fb590f72634e;p=karo-tx-linux.git [SCSI] libfcoe: don't send ELS in FIP mode if no FCF selected 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 4d857c2aef6c..2aab97221c6c 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: