aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2013-08-05 09:05:32 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-05 14:04:12 -0400
commit7d46daba8dd5df1aa45724518a041ef7163d3ad5 (patch)
tree454447c532d408a00a24d0c6729b10b9964945d7
parent1512747820367c8b3b8b72035f0f78c62f2bf1e9 (diff)
mlx5: remove health handler plugin
Remove this code, per Dave Miller's request, since it is not being used anywhere in the kernel. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/health.c29
-rw-r--r--include/linux/mlx5/driver.h3
2 files changed, 1 insertions, 31 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 748f10a155c4..3e6670c4a7cd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -55,33 +55,9 @@ enum {
55}; 55};
56 56
57static DEFINE_SPINLOCK(health_lock); 57static DEFINE_SPINLOCK(health_lock);
58
59static LIST_HEAD(health_list); 58static LIST_HEAD(health_list);
60static struct work_struct health_work; 59static struct work_struct health_work;
61 60
62static health_handler_t reg_handler;
63int mlx5_register_health_report_handler(health_handler_t handler)
64{
65 spin_lock_irq(&health_lock);
66 if (reg_handler) {
67 spin_unlock_irq(&health_lock);
68 return -EEXIST;
69 }
70 reg_handler = handler;
71 spin_unlock_irq(&health_lock);
72
73 return 0;
74}
75EXPORT_SYMBOL(mlx5_register_health_report_handler);
76
77void mlx5_unregister_health_report_handler(void)
78{
79 spin_lock_irq(&health_lock);
80 reg_handler = NULL;
81 spin_unlock_irq(&health_lock);
82}
83EXPORT_SYMBOL(mlx5_unregister_health_report_handler);
84
85static void health_care(struct work_struct *work) 61static void health_care(struct work_struct *work)
86{ 62{
87 struct mlx5_core_health *health, *n; 63 struct mlx5_core_health *health, *n;
@@ -98,11 +74,8 @@ static void health_care(struct work_struct *work)
98 priv = container_of(health, struct mlx5_priv, health); 74 priv = container_of(health, struct mlx5_priv, health);
99 dev = container_of(priv, struct mlx5_core_dev, priv); 75 dev = container_of(priv, struct mlx5_core_dev, priv);
100 mlx5_core_warn(dev, "handling bad device here\n"); 76 mlx5_core_warn(dev, "handling bad device here\n");
77 /* nothing yet */
101 spin_lock_irq(&health_lock); 78 spin_lock_irq(&health_lock);
102 if (reg_handler)
103 reg_handler(dev->pdev, health->health,
104 sizeof(health->health));
105
106 list_del_init(&health->list); 79 list_del_init(&health->list);
107 spin_unlock_irq(&health_lock); 80 spin_unlock_irq(&health_lock);
108 } 81 }
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 2aa258b0ced1..611e65e76b00 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -731,9 +731,6 @@ void mlx5_cq_debugfs_cleanup(struct mlx5_core_dev *dev);
731int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db); 731int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db);
732void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db); 732void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db);
733 733
734typedef void (*health_handler_t)(struct pci_dev *pdev, struct health_buffer __iomem *buf, int size);
735int mlx5_register_health_report_handler(health_handler_t handler);
736void mlx5_unregister_health_report_handler(void);
737const char *mlx5_command_str(int command); 734const char *mlx5_command_str(int command);
738int mlx5_cmdif_debugfs_init(struct mlx5_core_dev *dev); 735int mlx5_cmdif_debugfs_init(struct mlx5_core_dev *dev);
739void mlx5_cmdif_debugfs_cleanup(struct mlx5_core_dev *dev); 736void mlx5_cmdif_debugfs_cleanup(struct mlx5_core_dev *dev);