Author: kib
Date: Mon Dec  2 14:22:55 2019
New Revision: 355288
URL: https://svnweb.freebsd.org/changeset/base/355288

Log:
  mlx5: Do not try to enable fwdumps if scan space did not responded.
  
  Sponsored by: Mellanox Technologies
  MFC after:    1 week

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c   Mon Dec  2 14:21:40 2019        
(r355287)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c   Mon Dec  2 14:22:55 2019        
(r355288)
@@ -111,6 +111,10 @@ mlx5_fwdump_prep(struct mlx5_core_dev *mdev)
                        sz++;
                addr = next_addr;
        }
+       if (sz == 1) {
+               mlx5_core_warn(mdev, "no output from scan space\n");
+               goto unlock_vsc;
+       }
        mdev->dump_rege = malloc(sz * sizeof(struct mlx5_crspace_regmap),
            M_MLX5_DUMP, M_WAITOK | M_ZERO);
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to