summaryrefslogtreecommitdiffstats
path: root/src/net/fcels.c
diff options
context:
space:
mode:
authorMichael Brown2010-10-19 19:35:46 +0200
committerMichael Brown2010-10-19 19:41:50 +0200
commitb0e434280e03f83a611b8f710513b13dc0da00cf (patch)
treefa30590d9f66084a504c3462513e613fd216d792 /src/net/fcels.c
parent[hci] Use http://ipxe.org/<errno> instead of raw error numbers (diff)
downloadipxe-b0e434280e03f83a611b8f710513b13dc0da00cf.tar.gz
ipxe-b0e434280e03f83a611b8f710513b13dc0da00cf.tar.xz
ipxe-b0e434280e03f83a611b8f710513b13dc0da00cf.zip
[fc] Do not use the command reference number in FCP_CMND IUs
The FCP command reference number is intended to be used for controlling precise delivery of FCP commands, rather than being an essentially arbitrary tag field (as with iSCSI and SRP). Use the Fibre Channel local exchange ID as the tag for FCP commands, instead of the FCP command reference. The local exchange ID does not appear within the FCP IU itself, but does appear within the FC frame header; debug traces can therefore still be correlated with packet captures. Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/fcels.c')
-rw-r--r--src/net/fcels.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/fcels.c b/src/net/fcels.c
index 15049164..0ed682e3 100644
--- a/src/net/fcels.c
+++ b/src/net/fcels.c
@@ -265,6 +265,7 @@ static struct interface_descriptor fc_els_job_desc =
static void fc_els_step ( struct process *process ) {
struct fc_els *els =
container_of ( process, struct fc_els, process );
+ int xchg_id;
int rc;
/* Sanity check */
@@ -274,9 +275,10 @@ static void fc_els_step ( struct process *process ) {
process_del ( &els->process );
/* Create exchange */
- if ( ( rc = fc_xchg_originate ( &els->xchg, els->port,
- &els->peer_port_id,
- FC_TYPE_ELS ) ) != 0 ) {
+ if ( ( xchg_id = fc_xchg_originate ( &els->xchg, els->port,
+ &els->peer_port_id,
+ FC_TYPE_ELS ) ) < 0 ) {
+ rc = xchg_id;
DBGC ( els, FCELS_FMT " could not create exchange: %s\n",
FCELS_ARGS ( els ), strerror ( rc ) );
fc_els_close ( els, rc );