diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-10-19 18:35:46 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-10-19 18:41:50 +0100 |
commit | b0e434280e03f83a611b8f710513b13dc0da00cf (patch) | |
tree | fa30590d9f66084a504c3462513e613fd216d792 /src/net/fcels.c | |
parent | 4995ffa438d3bc9cd85a7622d0e2433efeb5b03f (diff) | |
download | ipxe-b0e434280e03f83a611b8f710513b13dc0da00cf.tar.gz |
[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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/fcels.c b/src/net/fcels.c index 150491646..0ed682e3d 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 ); |