[ofa-general] IB/madeye - Fix the port number when registering the module

Ralph Campbell ralph.campbell at qlogic.com
Fri Jun 29 14:50:25 PDT 2007


The loop for registering the madeye module with ib_mad
passes the wrong IB port number and fails to register.

Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>

diff -r 55227cf7a002 drivers/infiniband/util/madeye.c
--- a/drivers/infiniband/util/madeye.c	Fri Jun 29 14:37:00 2007 -0700
+++ b/drivers/infiniband/util/madeye.c	Fri Jun 29 14:39:03 2007 -0700
@@ -534,13 +534,13 @@ static void madeye_add_one(struct ib_dev
 
 	reg_flags = IB_MAD_SNOOP_SEND_COMPLETIONS | IB_MAD_SNOOP_RECVS;
 	for (i = 0; i <= e - s; i++) {
-		port[i].smi_agent = ib_register_mad_snoop(device, i,
+		port[i].smi_agent = ib_register_mad_snoop(device, i + s,
 							  IB_QPT_SMI,
 							  reg_flags,
 							  snoop_smi_handler,
 							  recv_smi_handler,
 							  &port[i]);
-		port[i].gsi_agent = ib_register_mad_snoop(device, i,
+		port[i].gsi_agent = ib_register_mad_snoop(device, i + s,
 							  IB_QPT_GSI,
 							  reg_flags,
 							  snoop_gsi_handler,





More information about the general mailing list