[ofa-general] [PATCH] mlx4_core: add module parameter to enable/disable QoS support. (for 2.6.27)
Jack Morgenstein
jackm at dev.mellanox.co.il
Tue Jul 15 07:45:52 PDT 2008
From 01d8c13b6dd314b239a5b0b76e57320aeaa5c338 Mon Sep 17 00:00:00 2001
From: Jack Morgenstein <jackm at dev.mellanox.co.il>
Date: Tue, 15 Jul 2008 17:19:41 +0300
Subject: [PATCH] mlx4_core: add module parameter to enable/disable QoS support.
Add a module parameter "enable_qos" to mlx4_core. If this param
is > 0, support for QoS is enabled in the HCA (INIT_HCA command).
By default, the parameter is set to 0 (disabled).
Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>
---
drivers/net/mlx4/fw.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index 2b5006b..2b60525 100644
--- a/drivers/net/mlx4/fw.c
+++ b/drivers/net/mlx4/fw.c
@@ -46,6 +46,10 @@ enum {
extern void __buggy_use_of_MLX4_GET(void);
extern void __buggy_use_of_MLX4_PUT(void);
+static int mlx4_core_enable_qos;
+module_param_named(enable_qos, mlx4_core_enable_qos, int, 0444);
+MODULE_PARM_DESC(enable_qos, "Enable Quality of Service support in the HCA if > 0, (default 0)");
+
#define MLX4_GET(dest, source, offset) \
do { \
void *__p = (char *) (source) + (offset); \
@@ -737,6 +741,10 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
if (dev->caps.flags & MLX4_DEV_CAP_FLAG_IPOIB_CSUM)
*(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 3);
+ /* Enable QoS support if module parameter set */
+ if (mlx4_core_enable_qos)
+ *(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 2);
+
/* QPC/EEC/CQC/EQC/RDMARC attributes */
MLX4_PUT(inbox, param->qpc_base, INIT_HCA_QPC_BASE_OFFSET);
--
1.5.1.6
More information about the general
mailing list