summaryrefslogtreecommitdiffstats
path: root/src/net/fc.c
diff options
context:
space:
mode:
authorMichael Brown2010-09-18 14:23:58 +0200
committerMichael Brown2010-09-18 14:23:58 +0200
commit24efbaefe7da42f621583cf7cd0c9bf4cd71a313 (patch)
tree3cbb6438f99fb8b04529b48c7eba928931176595 /src/net/fc.c
parent[arbel] Allocate only as much memory as is needed for firmware and ICM (diff)
downloadipxe-24efbaefe7da42f621583cf7cd0c9bf4cd71a313.tar.gz
ipxe-24efbaefe7da42f621583cf7cd0c9bf4cd71a313.tar.xz
ipxe-24efbaefe7da42f621583cf7cd0c9bf4cd71a313.zip
[fc] Maintain port, peer and ULP lists in order of creation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/fc.c')
-rw-r--r--src/net/fc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/fc.c b/src/net/fc.c
index 1b55a843..63df3dad 100644
--- a/src/net/fc.c
+++ b/src/net/fc.c
@@ -1094,7 +1094,7 @@ int fc_port_open ( struct interface *transport, const struct fc_name *node_wwn,
intf_init ( &port->transport, &fc_port_transport_desc, &port->refcnt );
fc_link_init ( &port->link, fc_port_examine, &port->refcnt );
intf_init ( &port->flogi, &fc_port_flogi_desc, &port->refcnt );
- list_add ( &port->list, &fc_ports );
+ list_add_tail ( &port->list, &fc_ports );
INIT_LIST_HEAD ( &port->xchgs );
memcpy ( &port->node_wwn, node_wwn, sizeof ( port->node_wwn ) );
memcpy ( &port->port_wwn, port_wwn, sizeof ( port->port_wwn ) );
@@ -1371,7 +1371,7 @@ static struct fc_peer * fc_peer_create ( const struct fc_name *node_wwn ) {
ref_init ( &peer->refcnt, NULL );
fc_link_init ( &peer->link, fc_peer_examine, &peer->refcnt );
intf_init ( &peer->plogi, &fc_peer_plogi_desc, &peer->refcnt );
- list_add ( &peer->list, &fc_peers );
+ list_add_tail ( &peer->list, &fc_peers );
memcpy ( &peer->node_wwn, node_wwn, sizeof ( peer->node_wwn ) );
INIT_LIST_HEAD ( &peer->ulps );
@@ -1666,7 +1666,7 @@ static struct fc_ulp * fc_ulp_create ( struct fc_peer *peer,
fc_link_init ( &ulp->link, fc_ulp_examine, &ulp->refcnt );
intf_init ( &ulp->prli, &fc_ulp_prli_desc, &ulp->refcnt );
ulp->peer = fc_peer_get ( peer );
- list_add ( &ulp->list, &peer->ulps );
+ list_add_tail ( &ulp->list, &peer->ulps );
ulp->type = type;
/* Start link state monitor */