[ofw] ibbus filter driver patch 1/18 - bus_driver.c
Smith, Stan
stan.smith at intel.com
Mon Aug 18 14:42:53 PDT 2008
Ibbus as a class upper filter driver for mthca (InfiniHost) and/or mlx5 (ConnectX) HCA drivers.
Places the ibbus driver in the same device stack as the HCA; stepwise refinement towards removing IBAL PNP handling in favor of Windows PNP management.
The HCA driver .inx/f file instantiates the 'InfiniBandController' class, with ibbus as a class upper filter driver. Eliminates ibbus co-installer and usage of ib_bus.inf files.
IOU items from ib_bus.inf have migrated to core\iou\ib_iou.inx
Files in SVN\gen1\branches\winverbs\core\bus\kernel
Signed-off by: Stan Smith (stan.smith at intel.com)
Having problems with Intel mailer, hence formatting of patch is incorrect, see attached patch file.
diff -Naur --exclude-from=./SKIP kernel-svn/bus_driver.c kernel/bus_driver.c
--- kernel-svn/bus_driver.c 2008-07-08 12:01:36.000000000 -0700
+++ kernel/bus_driver.c 2008-08-18 09:57:41.713101100 -0700
@@ -27,7 +27,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
- * $Id: bus_driver.c 1294 2008-06-21 00:27:03Z stansmith $
+ * $Id: bus_driver.c 1453 2008-08-02 00:43:15Z stansmith $
*/
@@ -65,6 +65,7 @@
BUS_DBG_ERROR,
TRUE,
NULL,
+ NULL,
NULL
};
@@ -191,7 +192,8 @@
* output: pkey_array
* return: uint16_t number of pkey(s) found
*************************************************************************************/
-static uint16_t __prepare_pKey_array(IN const UNICODE_STRING *str, OUT uint16_t *pkey_array)
+static uint16_t
+__prepare_pKey_array(IN const UNICODE_STRING *str, OUT uint16_t *pkey_array)
{
uint16_t i, num_pKeys, cur_pkey_length;
NTSTATUS status;
@@ -320,6 +322,7 @@
BUS_EXIT( BUS_DBG_DRV );
return num_pKeys;
}
+
static NTSTATUS
__read_registry(
IN UNICODE_STRING* const p_registry_path )
@@ -440,6 +443,8 @@
#if DBG
if( g_al_dbg_flags & AL_DBG_ERR )
g_al_dbg_flags |= CL_DBG_ERROR;
+
+ bus_globals.dbg_lvl |= BUS_DBG_DRV | BUS_DBG_PNP;
#endif
BUS_TRACE(BUS_DBG_DRV ,
@@ -667,7 +672,7 @@
IN DRIVER_OBJECT *p_driver_obj,
IN UNICODE_STRING *p_registry_path )
{
- NTSTATUS status;
+ NTSTATUS status;
BUS_ENTER( BUS_DBG_DRV );
@@ -707,6 +712,15 @@
p_driver_obj->DriverUnload = bus_drv_unload;
p_driver_obj->DriverExtension->AddDevice = bus_add_device;
+ // Mutex to synchronize multiple threads creating & deleting
+ // control deviceobjects.
+
+ ExInitializeFastMutex(&ControlMutex);
+ bfi_InstanceCount = 0;
+ memset( __out_bcount(sizeof(bus_filters)) (void*)bus_filters, 0,
+ sizeof(bus_filters) );
+
BUS_EXIT( BUS_DBG_DRV );
return STATUS_SUCCESS;
}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bus_driver.c.pat
Type: application/octet-stream
Size: 1978 bytes
Desc: bus_driver.c.pat
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080818/5159acef/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bus_driver.c
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080818/5159acef/attachment.c>
More information about the ofw
mailing list