Discussion:
[ofw] [Patch 45/62] Reference implementation of NDv2
Fab Tillier
2013-02-21 02:35:34 UTC
Permalink
Support IBAT interface in mlx4_bus PDOs

This patch adds support for querying the IBAT interface from PDOs of mlx4_bus (i.e. the Eth device). It also changes how the PCI bus interface is queried to use the WDF framework's ability to forward requests to the parent stack by using the SendQueryToParentStack parameter of the WDF_QUERY_INTERFACE_CONFIG structure.

Signed-off-by: Fab Tillier <***@microsoft.com>

diff -dwup3 -X excl.txt -r \dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\kernel\bus\drv\pdo.c .\hw\mlx4\kernel\bus\drv\pdo.c
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\kernel\bus\drv\pdo.c Thu Mar 29 00:15:29 2012
+++ .\hw\mlx4\kernel\bus\drv\pdo.c Wed Aug 15 20:07:01 2012
@@ -1,6 +1,7 @@
#include "precomp.h"
#include <initguid.h>
#include <wdmguid.h>
+#include "iba\ibat_ifc.h"

#include "workerThread.h"

@@ -750,16 +751,22 @@ Return Value:
//
// Expose also PCI.SYS interface for MLX4_HCA
//
- WDF_QUERY_INTERFACE_CONFIG_INIT( &p_pdo->qiPciBus,
- (PINTERFACE) &p_fdo->pci_dev.bus_pci_ifc,
- &GUID_BUS_INTERFACE_STANDARD, NULL);
+ WDF_QUERY_INTERFACE_CONFIG_INIT( &qiConfig, NULL, &GUID_BUS_INTERFACE_STANDARD, NULL);
+ qiConfig.SendQueryToParentStack = TRUE;

// TODO: Soft Reset - how tobar getting interface during RESET_IN_PROGRESS
// maybe - using EvtDeviceProcessQueryInterfaceRequest
- status = WdfDeviceAddQueryInterface( hChild, &p_pdo->qiPciBus );
+ status = WdfDeviceAddQueryInterface( hChild, &qiConfig );
if (!NT_SUCCESS(status))
goto Cleanup;

+ WDF_QUERY_INTERFACE_CONFIG_INIT( &qiConfig, NULL, &GUID_IBAT_INTERFACE, NULL );
+ qiConfig.SendQueryToParentStack = TRUE;
+
+ status = WdfDeviceAddQueryInterface( hChild, &qiConfig );
+ if (!NT_SUCCESS(status)) {
+ goto Cleanup;
+ }

//
// Create a custom interface so that other drivers can

Loading...