mlx4u: Initialize iboe->lock properly.
authorDan Cross <crossd@gmail.com>
Wed, 5 Apr 2017 19:09:08 +0000 (15:09 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 6 Apr 2017 15:11:30 +0000 (11:11 -0400)
Use the Akaros `spinlock_init` function to initialize iboe->lock,
not Linux's `spin_lock_init` (which is #define'd to Akaros's
`spinlock_init_irqsave`).

Change-Id: If55ecf25fcd59f7d1c2c01b96fc76f69c738f8c5
Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/net/mlx4u/main.c

index fe7d670..a2cb9dc 100644 (file)
@@ -2407,7 +2407,9 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
 
        mlx4_ib_alloc_eqs(dev, ibdev);
 
-       spin_lock_init(&iboe->lock);
+       /* Note: this is an Akaros function, different from Linux's
+        * spin_lock_init. */
+       spinlock_init(&iboe->lock);
 
        if (init_node_data(ibdev))
                goto err_map;