[ofw] branches\mlx4_full now working for InfiniHost HCAs
Smith, Stan
stan.smith at intel.com
Wed Nov 2 16:42:06 PDT 2011
Hello Leo,
InfiniHost HCAs are now working with the branches\mlx4_full\ bus driver modifications.
MLX4_BUS_NOTIFY_INTERFACE was assumed to always be available.
The following simple patches provide a path where MLX4_BUS_NOTIFY_INTERFACE is 'not' always assumed to be available.
There are still some rough edges in the HCA power-down path, outside of that, DAPL tests, ipoib tests are all working correctly.
Stan.
--- branches/mlx4_full/core/bus/kernel/bus_driver.h Mon Oct 24 17:05:11 2011
+++ branches/mlx4_full/core/bus/kernel/bus_driver.h Wed Nov 02 16:23:26 2011
@@ -128,6 +128,7 @@
/* notify interface */
MLX4_BUS_NOTIFY_INTERFACE notify_ifc;
boolean_t notify_ifc_taken;
+ boolean_t has_notify_ifc;
struct _bus_filter_instance *bus_filter;
--- branches/mlx4_full/core/bus/kernel/bus_pnp.c Mon Oct 24 17:05:11 2011
+++ branches/mlx4_full/core/bus/kernel/bus_pnp.c Wed Nov 02 16:28:48 2011
@@ -593,8 +593,16 @@
/* get mlx4_bus notification interface */
status = __get_ifc( p_dev_obj, &MLX4_BUS_NOTIFY_GUID,
- sizeof(MLX4_BUS_NOTIFY_INTERFACE), 1, p_ext, (PINTERFACE)&p_ext->notify_ifc );
- if( !NT_SUCCESS( status ) )
+ sizeof(MLX4_BUS_NOTIFY_INTERFACE), 1, p_ext,
+ (PINTERFACE)&p_ext->notify_ifc );
+
+ if ( status == STATUS_NOT_SUPPORTED )
+ {
+ p_ext->has_notify_ifc = FALSE;
+ p_ext->notify_ifc_taken = FALSE;
+ status = STATUS_SUCCESS;
+ }
+ else if( !NT_SUCCESS( status ) )
{
BUS_TRACE_EXIT(BUS_DBG_PNP,
("Getting MLX4_BUS_NOTIFY_GUID interface failed: status=0x%x\n", status));
@@ -603,12 +611,15 @@
else
{
BUS_TRACE_EXIT(BUS_DBG_POWER, ("Taken MLX4_BUS_NOTIFY_GUID interface.\n") );
+ p_ext->has_notify_ifc = TRUE;
+ p_ext->notify_ifc_taken = TRUE;
}
- p_ext->notify_ifc_taken = TRUE;
/* report the own arrival to mlx_bus */
- p_ext->notify_ifc.notify( p_ext->notify_ifc.i.Context,
- 0, p_dev_obj, "fdo_start: IBAL has started!\n" );
+
+ if (p_ext->notify_ifc_taken)
+ p_ext->notify_ifc.notify( p_ext->notify_ifc.i.Context,
+ 0, p_dev_obj, "fdo_start: IBAL has started!\n" );
/* if 1st Bus Filter Instance, then create device names for user ioctl */
lock_control_event();
@@ -1528,15 +1539,19 @@
}
/* get mlx4_bus notification interface */
- status = __get_ifc( p_dev_obj, &MLX4_BUS_NOTIFY_GUID,
- sizeof(MLX4_BUS_NOTIFY_INTERFACE), 1, p_ext, (PINTERFACE)&p_ext->notify_ifc );
- if( !NT_SUCCESS( status ) )
- {
- BUS_TRACE_EXIT(BUS_DBG_PNP,
- ("Getting MLX4_BUS_NOTIFY_GUID interface failed: status=0x%x\n", status));
+ if (p_ext->has_notify_ifc) {
+ status = __get_ifc( p_dev_obj, &MLX4_BUS_NOTIFY_GUID,
+ sizeof(MLX4_BUS_NOTIFY_INTERFACE), 1, p_ext,
+ (PINTERFACE)&p_ext->notify_ifc );
+ if( !NT_SUCCESS( status ) )
+ {
+ BUS_TRACE_EXIT(BUS_DBG_PNP,
+ ("Getting MLX4_BUS_NOTIFY_GUID interface failed: status=0x%x\n",
+ status));
+ }
+ else
+ p_ext->notify_ifc_taken = TRUE;
}
- else
- p_ext->notify_ifc_taken = TRUE;
p_ext->device_power_state = p_io_stack->Parameters.Power.State.DeviceState;
power_state = PoSetPowerState( p_dev_obj, DevicePowerState,
More information about the ofw
mailing list