[ofw] [PATCH 2/4] mlx4/mthca: define a common vendor mgmt class
Sean Hefty
sean.hefty at intel.com
Fri May 8 11:20:25 PDT 2009
Replace the separate MLX4 and MTHCA vendor MAD classes with common
MLX vendor classes. This more easily allows us to determine if a vendor
defined management class should be routed to the HCA driver or dispatched
to a MAD client.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
--- trunk\inc\iba/ib_types.h 2009-05-05 23:05:51.060250000 -0700
+++ branches\winverbs\inc\iba/ib_types.h 2009-05-07 15:31:55.012120700 -0700
@@ -534,6 +534,9 @@ extern "C"
#define IB_MCLASS_VENDOR_LOW_RANGE_MAX 0x0f
/**********/
+#define IB_MLX_VENDOR_CLASS1 0x9
+#define IB_MLX_VENDOR_CLASS2 0xA
+
/****d* IBA Base: Constants/IB_MCLASS_DEV_ADM
* NAME
* IB_MCLASS_DEV_ADM
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' trunk\hw/mlx4/kernel/bus/ib/mad.c
branches\winverbs\hw/mlx4/kernel/bus/ib/mad.c
--- trunk\hw/mlx4/kernel/bus/ib/mad.c 2008-10-29 11:24:00.953125000 -0700
+++ branches\winverbs\hw/mlx4/kernel/bus/ib/mad.c 2009-05-07 15:58:30.266837100 -0700
@@ -44,11 +44,6 @@
#endif
-enum {
- MLX4_IB_VENDOR_CLASS1 = 0x9,
- MLX4_IB_VENDOR_CLASS2 = 0xa
-};
-
int mlx4_MAD_IFC(struct mlx4_ib_dev *dev, int ignore_mkey, int ignore_bkey,
int port, ib_wc_t *in_wc, struct ib_grh *in_grh,
void *in_mad, void *response_mad)
@@ -240,8 +235,8 @@ int mlx4_ib_process_mad(struct ib_device
IB_SMP_ATTR_VENDOR_MASK))
return IB_MAD_RESULT_SUCCESS;
} else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT ||
- in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS1 ||
- in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS2) {
+ in_mad->mad_hdr.mgmt_class == IB_MLX_VENDOR_CLASS1 ||
+ in_mad->mad_hdr.mgmt_class == IB_MLX_VENDOR_CLASS2) {
if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET &&
in_mad->mad_hdr.method != IB_MGMT_METHOD_SET)
return IB_MAD_RESULT_SUCCESS;
diff -up -r -X \mshefty\scm\winof\trunk\docs\dontdiff.txt -I '\$Id:' trunk\hw/mthca/kernel/mthca_mad.c
branches\winverbs\hw/mthca/kernel/mthca_mad.c
--- trunk\hw/mthca/kernel/mthca_mad.c 2008-07-16 08:54:03.234750000 -0700
+++ branches\winverbs\hw/mthca/kernel/mthca_mad.c 2009-05-07 15:58:51.313442700 -0700
@@ -45,11 +45,6 @@
#endif
#include "mthca_cmd.h"
-enum {
- MTHCA_VENDOR_CLASS1 = 0x9,
- MTHCA_VENDOR_CLASS2 = 0xa
-};
-
struct mthca_trap_mad {
struct scatterlist sg;
};
@@ -231,8 +226,8 @@ int mthca_process_mad(struct ib_device *
}
else {
if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT ||
- in_mad->mad_hdr.mgmt_class == MTHCA_VENDOR_CLASS1 ||
- in_mad->mad_hdr.mgmt_class == MTHCA_VENDOR_CLASS2) {
+ in_mad->mad_hdr.mgmt_class == IB_MLX_VENDOR_CLASS1 ||
+ in_mad->mad_hdr.mgmt_class == IB_MLX_VENDOR_CLASS2) {
if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET &&
in_mad->mad_hdr.method != IB_MGMT_METHOD_SET) {
More information about the ofw
mailing list