summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/ib/ibtl/ibtl_impl.c4
-rw-r--r--usr/src/uts/common/sys/ib/ibtl/ibti_common.h14
2 files changed, 16 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/ib/ibtl/ibtl_impl.c b/usr/src/uts/common/io/ib/ibtl/ibtl_impl.c
index 9d3a8fea42..ae5b2f3a25 100644
--- a/usr/src/uts/common/io/ib/ibtl/ibtl_impl.c
+++ b/usr/src/uts/common/io/ib/ibtl/ibtl_impl.c
@@ -251,14 +251,14 @@ ibt_attach(ibt_clnt_modinfo_t *mod_infop, dev_info_t *arg, void *clnt_private,
* we expect 'arg' to be Not NULL and point to client driver's
* device info struct.
*/
- if ((!IBT_CLNT_MGMT_CLASS(mod_infop->mi_clnt_class)) &&
+ if ((!IBT_MISCMOD_CLIENTS(mod_infop->mi_clnt_class)) &&
(arg == NULL)) {
IBTF_DPRINTF_L1(ibtf, "ibt_attach: "
"arg not set with driver's dip.");
return (IBT_INVALID_PARAM);
}
- if (!IBT_CLNT_MGMT_CLASS(mod_infop->mi_clnt_class)) {
+ if (!IBT_MISCMOD_CLIENTS(mod_infop->mi_clnt_class)) {
pdip = ddi_get_parent(arg);
if (pdip == NULL ||
ibtl_ibnex_valid_hca_parent(pdip) != IBT_SUCCESS) {
diff --git a/usr/src/uts/common/sys/ib/ibtl/ibti_common.h b/usr/src/uts/common/sys/ib/ibtl/ibti_common.h
index 0d21e3943b..442c4103e4 100644
--- a/usr/src/uts/common/sys/ib/ibtl/ibti_common.h
+++ b/usr/src/uts/common/sys/ib/ibtl/ibti_common.h
@@ -81,6 +81,7 @@ typedef enum ibt_clnt_class_e {
IBT_IBMA, /* The IBMA Module */
IBT_CM, /* The CM Module */
IBT_DM, /* The DM Module */
+ IBT_DM_AGENT, /* DM Agent Module */
IBT_CLASS_NUM /* Place holder for class count */
} ibt_clnt_class_t;
@@ -92,12 +93,25 @@ typedef enum ibt_clnt_class_e {
#define IBT_CLNT_GENERAL_CLASS(class) ((class) == IBT_NETWORK || \
(class) == IBT_GENERIC || \
+ (class) == IBT_DM_AGENT || \
+ (class) == IBT_TEST_DEV || \
(class) == IBT_USER)
#define IBT_CLNT_MGMT_CLASS(class) ((class) == IBT_IBMA || \
(class) == IBT_CM || \
+ (class) == IBT_DM)
+
+/*
+ * These are some special client classes which don't have a 'dip' hence have
+ * to be handled specially in ibt_attach, where we bypass the check for a valid
+ * dip if the client belongs to the class below.
+ */
+#define IBT_MISCMOD_CLIENTS(class) ((class) == IBT_IBMA || \
+ (class) == IBT_CM || \
(class) == IBT_DM || \
+ (class) == IBT_DM_AGENT || \
(class) == IBT_TEST_DEV)
+
/*
* Event record & status returns for asynchronous events and errors.
*/