[ofw] Patch: ipoib should always answer the OID_GEN_LINK_SPEED

Tzachi Dar tzachid at mellanox.co.il
Wed Oct 15 08:12:07 PDT 2008


Applied on 1649, 1650
 
Thanks
Tzachi


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
	Sent: Sunday, October 12, 2008 2:53 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw] Patch: ipoib should always answer the
OID_GEN_LINK_SPEED
	
	
	This patch makes sure that ipoib will not answer with pending
the query of OID_GEN_LINK_SPEED
	 
	Thanks
	Tzachi
	 
	Index: Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_adapter.c
	
===================================================================
	--- Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_adapter.c (revision
3303)
	+++ Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_adapter.c (revision
3304)
	@@ -306,7 +306,7 @@
	  cl_perf_construct( &p_adapter->perf );
	 
	  p_adapter->state = IB_PNP_PORT_ADD;
	- p_adapter->rate = FOUR_X_IN_100BPS;
	+ p_adapter->port_rate = FOUR_X_IN_100BPS;
	 }
	 
	 
	@@ -1065,7 +1065,7 @@
	   rate = 0;
	  }
	 
	- p_adapter->rate = rate;
	+ p_adapter->port_rate = rate;
	  IPOIB_EXIT( IPOIB_DBG_INIT );
	 }
	 
	@@ -1124,8 +1124,8 @@
	    */
	   IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, ("Link
UP!\n") );
	   NdisWriteErrorLogEntry( p_adapter->h_adapter,
	-   EVENT_IPOIB_PORT_UP + (p_adapter->rate/ONE_X_IN_100BPS),
	-   1, p_adapter->rate );
	+   EVENT_IPOIB_PORT_UP +
(p_adapter->port_rate/ONE_X_IN_100BPS),
	+   1, p_adapter->port_rate );
	 
	   if( !p_adapter->reset )
	   {
	Index: Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_adapter.h
	
===================================================================
	--- Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_adapter.h (revision
3303)
	+++ Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_adapter.h (revision
3304)
	@@ -168,7 +168,7 @@
	 
	  struct _ipoib_port  *p_port;
	 
	- uint32_t    rate;
	+ uint32_t    port_rate;
	 
	  ipoib_params_t   params;
	  cl_spinlock_t   recv_stat_lock;
	Index: Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_driver.c
	
===================================================================
	--- Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_driver.c (revision
3303)
	+++ Q:/projinf4/trunk/ulp/ipoib/kernel/ipoib_driver.c (revision
3304)
	@@ -955,31 +955,7 @@
	   IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,
	    ("Port %d received query for OID_GEN_LINK_SPEED\n",
port_num) );
	   cl_obj_lock( &p_adapter->obj );
	-  switch( p_adapter->state )
	-  {
	-  case IB_PNP_PORT_ADD:
	-   /* Mark the adapter as pending an OID */
	-   p_adapter->pending_query = TRUE;
	-
	-   /* Save the request parameters. */
	-   p_adapter->query_oid = oid_info;
	-
	-   IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,
	-    ("Port %d returning NDIS_STATUS_PENDING\n", port_num) );
	-   status = NDIS_STATUS_PENDING;
	-   break;
	-
	-  case IB_PNP_PORT_REMOVE:
	-   IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,
	-    ("Port %d returning NDIS_STATUS_NOT_ACCEPTED\n", port_num)
);
	-   status = NDIS_STATUS_NOT_ACCEPTED;
	-   break;
	-
	-  default:
	-   CL_ASSERT( p_adapter->p_port );
	-   info = p_adapter->rate;
	-   break;
	-  }
	+  info = p_adapter->port_rate;
	   cl_obj_unlock( &p_adapter->obj );
	   break;
	 
	@@ -2016,11 +1992,6 @@
	  {
	   switch( query_oid.oid )
	   {
	-  case OID_GEN_LINK_SPEED:
	-   ipoib_complete_query( p_adapter, &query_oid,
	-    status, &p_adapter->rate, sizeof(p_adapter->rate) );
	-   break;
	-
	   case OID_GEN_MEDIA_CONNECT_STATUS:
	    info = NdisMediaStateConnected;
	    ipoib_complete_query( p_adapter, &query_oid,
	@@ -2028,8 +1999,7 @@
	    break;
	 
	   default:
	-   CL_ASSERT( query_oid.oid == OID_GEN_LINK_SPEED ||
	-    query_oid.oid == OID_GEN_MEDIA_CONNECT_STATUS );
	+   CL_ASSERT( query_oid.oid == OID_GEN_MEDIA_CONNECT_STATUS );
	    break;
	   }
	  }
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081015/e8c751d8/attachment.html>


More information about the ofw mailing list