[openib-general] [PATCH] ib_smi: Trim methods needed to Get, Set, and TrapRepress
Hal Rosenstock
halr at voltaire.com
Thu Oct 7 11:46:18 PDT 2004
ib_smi: Trim methods needed to Get, Set, and TrapRepress
Also, eliminate some compiler warnings
Index: ib_smi.c
===================================================================
--- ib_smi.c (revision 947)
+++ ib_smi.c (working copy)
@@ -319,7 +319,7 @@
}
spin_unlock_irqrestore(&ib_smi_port_list_lock, flags);
if (!port_priv) {
- printk(KERN_ERR "smp_send: no matching MAD agent 0x%x\n", mad_agent);
+ printk(KERN_ERR "smp_send: no matching MAD agent 0x%x\n", (unsigned
int)mad_agent);
return;
}
@@ -451,7 +451,7 @@
/* Hold lock longer !!! */
spin_unlock_irqrestore(&ib_smi_port_list_lock, flags);
if (!port_priv) {
- printk(KERN_ERR "smi_send_handler: no matching MAD agent 0x%x\n",
mad_agent);
+ printk(KERN_ERR "smi_send_handler: no matching MAD agent 0x%x\n",
(unsigned int)mad_agent);
return;
}
@@ -537,9 +537,13 @@
reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE;
reg_req.mgmt_class_version = 1;
- /* All methods for now even though only some are used BY SMA !!! */
- bitmap_fill(®_req.method_mask, IB_MGMT_MAX_METHODS);
+ /* SMA needs to receive Get, Set, and TrapRepress methods */
+ bitmap_zero((unsigned long *)®_req.method_mask,
IB_MGMT_MAX_METHODS);
+ set_bit(IB_MGMT_METHOD_GET, (unsigned long *)®_req.method_mask);
+ set_bit(IB_MGMT_METHOD_SET, (unsigned long *)®_req.method_mask);
+ set_bit(IB_MGMT_METHOD_TRAP_REPRESS, (unsigned long
*)®_req.method_mask);
+
port_priv->mad_agent = ib_register_mad_agent(device, port_num,
IB_QPT_SMI,
®_req, 0,
More information about the general
mailing list