[openib-general] [PATCH] mthca: fix default static rate returned for Tavor in av

Jack Morgenstein jackm at mellanox.co.il
Mon Aug 28 09:08:53 PDT 2006


When default static rate is returned for Tavor, need to translate it
to an ib rate value.

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>

Index: ofed_1_1/drivers/infiniband/hw/mthca/mthca_av.c
===================================================================
--- ofed_1_1.orig/drivers/infiniband/hw/mthca/mthca_av.c	2006-08-03 14:30:21.000000000 +0300
+++ ofed_1_1/drivers/infiniband/hw/mthca/mthca_av.c	2006-08-23 17:53:01.227220000 +0300
@@ -90,7 +90,7 @@ static enum ib_rate tavor_rate_to_ib(u8 
 	case MTHCA_RATE_TAVOR_1X:     return IB_RATE_2_5_GBPS;
 	case MTHCA_RATE_TAVOR_1X_DDR: return IB_RATE_5_GBPS;
 	case MTHCA_RATE_TAVOR_4X:     return IB_RATE_10_GBPS;
-	default:		      return port_rate;
+	default:		      return mult_to_ib_rate(port_rate);
 	}
 }
 




More information about the general mailing list