Procházet zdrojové kódy

[fc] Maintain port, peer and ULP lists in order of creation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown před 13 roky
rodič
revize
24efbaefe7
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3
    3
      src/net/fc.c

+ 3
- 3
src/net/fc.c Zobrazit soubor

@@ -1094,7 +1094,7 @@ int fc_port_open ( struct interface *transport, const struct fc_name *node_wwn,
1094 1094
 	intf_init ( &port->transport, &fc_port_transport_desc, &port->refcnt );
1095 1095
 	fc_link_init ( &port->link, fc_port_examine, &port->refcnt );
1096 1096
 	intf_init ( &port->flogi, &fc_port_flogi_desc, &port->refcnt );
1097
-	list_add ( &port->list, &fc_ports );
1097
+	list_add_tail ( &port->list, &fc_ports );
1098 1098
 	INIT_LIST_HEAD ( &port->xchgs );
1099 1099
 	memcpy ( &port->node_wwn, node_wwn, sizeof ( port->node_wwn ) );
1100 1100
 	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 ) {
1371 1371
 	ref_init ( &peer->refcnt, NULL );
1372 1372
 	fc_link_init ( &peer->link, fc_peer_examine, &peer->refcnt );
1373 1373
 	intf_init ( &peer->plogi, &fc_peer_plogi_desc, &peer->refcnt );
1374
-	list_add ( &peer->list, &fc_peers );
1374
+	list_add_tail ( &peer->list, &fc_peers );
1375 1375
 	memcpy ( &peer->node_wwn, node_wwn, sizeof ( peer->node_wwn ) );
1376 1376
 	INIT_LIST_HEAD ( &peer->ulps );
1377 1377
 
@@ -1666,7 +1666,7 @@ static struct fc_ulp * fc_ulp_create ( struct fc_peer *peer,
1666 1666
 	fc_link_init ( &ulp->link, fc_ulp_examine, &ulp->refcnt );
1667 1667
 	intf_init ( &ulp->prli, &fc_ulp_prli_desc, &ulp->refcnt );
1668 1668
 	ulp->peer = fc_peer_get ( peer );
1669
-	list_add ( &ulp->list, &peer->ulps );
1669
+	list_add_tail ( &ulp->list, &peer->ulps );
1670 1670
 	ulp->type = type;
1671 1671
 
1672 1672
 	/* Start link state monitor */

Načítá se…
Zrušit
Uložit