libfcoe: Fix Conflicting FCFs issue in the fabric
authorKrishna Mohan <krmohan@cisco.com>
Fri, 1 Mar 2013 11:35:31 +0000 (11:35 +0000)
committerRobert Love <robert.w.love@intel.com>
Fri, 10 May 2013 17:19:19 +0000 (10:19 -0700)
commite6c10b7c5e0e7c6ecf7d60f502c7eeaf3361b48f
tree16930a7bcdff2a234cf52ad07a8c1cf1c22d2230
parentc1be5a5b1b355d40e6cf79cc979eb66dafa24ad1
libfcoe: Fix Conflicting FCFs issue in the fabric

When multiple FCFs in use, and first FIP Advertisement received is
with "Available for Login" i.e A bit set to 0, FCF selection will fail.
The fix is to remove the assumption in the code that first FCF is only
allowed selectable FCF.
Consider the scenario fip->fcfs contains FCF1(fabricname X, marked A=0)
FCF2(fabricname Y, marked A=1). list_first_entry(first) points to FCF1
and 1st iteration we ignore the FCF and on 2nd iteration we compare
FCF1 & FCF2 fabric name and we fails to perform FCF selection.

Signed-off-by: Krishna Mohan <krmohan@cisco.com>
Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
drivers/scsi/fcoe/fcoe_ctlr.c