During our testing we got a BS in WinVerbs. It happens when we running a VPI 
scenario in which one port is IB and the second port is ETH.  The test bring 
down the ETH link, as a result an event is created and low level driver calls 
to winverbs to handle it.

WinVerbs doesn't create a port object for ETH port, so when trying to access 
the ports object the driver got a BS.

Since the IB always should be the first port, the simple fix is to check that 
port number of the event is less or equal for PortCount this promise that port 
object is exist for the port.

Index: wv_device.c
===================================================================
--- wv_device.c (revision 3010)
+++ wv_device.c              (working copy)
@@ -135,8 +135,10 @@
                                                
WvDeviceCompleteRequests(&dev->pPorts[i], STATUS_SUCCESS, event);
                                }
                } else {
-                              
WvDeviceCompleteRequests(&dev->pPorts[pEvent->port_number - 1],
+                                             if(pEvent->port_number <= 
dev->PortCount) {
+                                                             
WvDeviceCompleteRequests(&dev->pPorts[pEvent->port_number - 1],
                                                                                
                                                 STATUS_SUCCESS, event);
+                                             }
                }
 }

Attachment: wv.patch
Description: wv.patch

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to