NTB: Make the transport list in order of discovery
authorDave Jiang <dave.jiang@intel.com>
Mon, 13 Jul 2015 12:07:19 +0000 (08:07 -0400)
committerJon Mason <jdmason@kudzu.us>
Mon, 7 Sep 2015 19:17:08 +0000 (15:17 -0400)
The list should be added from the bottom and not the top in order to
ensure the transport is provided in the same order to clients as ntb
devices are discovered.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb_transport.c

index 0d851d684523705e5c1dc978b1858e55162067d8..29553fb7fb8e787c10c3e9fd09f5c9f6e54efe03 100644 (file)
@@ -297,7 +297,7 @@ static LIST_HEAD(ntb_transport_list);
 
 static int ntb_bus_init(struct ntb_transport_ctx *nt)
 {
-       list_add(&nt->entry, &ntb_transport_list);
+       list_add_tail(&nt->entry, &ntb_transport_list);
        return 0;
 }