net/mlx5: Loop over temp list to release delay events
authorHuy Nguyen <huyn@mellanox.com>
Mon, 30 Oct 2017 03:40:56 +0000 (22:40 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 10 Nov 2017 06:39:20 +0000 (15:39 +0900)
list_splice_init initializing waiting_events_list after splicing it to
temp list, therefore we should loop over temp list to fire the events.

Fixes: 4ca637a20a52 ("net/mlx5: Delay events till mlx5 interface's add complete for pci resume")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/dev.c

index fc281712869b2e1c5c3321b46d1e8c5c562fcb74..17b723218b0c0d891a44379e0f69ad804d43c154 100644 (file)
@@ -93,7 +93,7 @@ static void delayed_event_release(struct mlx5_device_context *dev_ctx,
        list_splice_init(&priv->waiting_events_list, &temp);
        if (!dev_ctx->context)
                goto out;
-       list_for_each_entry_safe(de, n, &priv->waiting_events_list, list)
+       list_for_each_entry_safe(de, n, &temp, list)
                dev_ctx->intf->event(dev, dev_ctx->context, de->event, de->param);
 
 out: