netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mlx5-next] net/mlx5: Continue driver initialization despite debugfs failure
@ 2018-12-13 11:15 Leon Romanovsky
  2018-12-17 22:39 ` Saeed Mahameed
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2018-12-13 11:15 UTC (permalink / raw)
  To: Saeed Mahameed, David Miller
  Cc: Leon Romanovsky, RDMA mailing list, linux-netdev

From: Leon Romanovsky <leonro@mellanox.com>

The failure to create debugfs entry is unpleasant event, but not enough
to abort drier initialization. Align the mlx5_core code to debugfs design
and continue execution whenever debugfs_create_dir() successes or not.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
It goes to -next and not to -rc, because this issue was forever.
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 778995573812..93fa48a7eabb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -661,11 +661,9 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct mlx5_priv *priv)

 	priv->numa_node = dev_to_node(&dev->pdev->dev);

-	priv->dbg_root = debugfs_create_dir(dev_name(&pdev->dev), mlx5_debugfs_root);
-	if (!priv->dbg_root) {
-		dev_err(&pdev->dev, "Cannot create debugfs dir, aborting\n");
-		return -ENOMEM;
-	}
+	if (mlx5_debugfs_root)
+		priv->dbg_root =
+			debugfs_create_dir(pci_name(pdev), mlx5_debugfs_root);

 	err = mlx5_pci_enable_device(dev);
 	if (err) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH mlx5-next] net/mlx5: Continue driver initialization despite debugfs failure
  2018-12-13 11:15 [PATCH mlx5-next] net/mlx5: Continue driver initialization despite debugfs failure Leon Romanovsky
@ 2018-12-17 22:39 ` Saeed Mahameed
  0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2018-12-17 22:39 UTC (permalink / raw)
  To: davem@davemloft.net, leon@kernel.org
  Cc: netdev@vger.kernel.org, Leon Romanovsky,
	linux-rdma@vger.kernel.org

On Thu, 2018-12-13 at 13:15 +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> The failure to create debugfs entry is unpleasant event, but not
> enough
> to abort drier initialization. Align the mlx5_core code to debugfs
> design
> and continue execution whenever debugfs_create_dir() successes or
> not.
> 
> Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB
> adapters")
> Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> 

Applied to mlx5-next.

Thanks.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-17 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13 11:15 [PATCH mlx5-next] net/mlx5: Continue driver initialization despite debugfs failure Leon Romanovsky
2018-12-17 22:39 ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).