Yay, the half point mark... Pull in fixes to MTHCA from the trunk. I don't have a way to test InfiniHost III cards, so this is only compile tested.
Signed-off-by: Fab Tillier <[email protected]> diff -dwup3 -X excl.txt -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_data.c .\hw\mthca\kernel\hca_data.c --- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_data.c Thu May 31 11:22:19 2012 +++ .\hw\mthca\kernel\hca_data.c Wed May 23 18:26:48 2012 @@ -173,7 +173,6 @@ mlnx_hobs_remove( { cl_async_proc_t *p_async_proc; - cl_spinlock_acquire( &hob_lock ); hob_p->mark = E_MARK_INVALID; @@ -337,6 +336,9 @@ void ca_event_handler(struct ib_event *e ib_event_rec_t event_rec; LIST_ENTRY *entry; ci_event_handler_t *event_handler; + + if ( hob_p->mark == E_MARK_INVALID ) + return; // prepare parameters event_rec.type = ev->event; diff -dwup3 -X excl.txt -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_pnp.c .\hw\mthca\kernel\hca_pnp.c --- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_pnp.c Fri Aug 03 17:54:45 2012 +++ .\hw\mthca\kernel\hca_pnp.c Wed May 23 15:14:37 2012 @@ -592,7 +592,7 @@ __hca_release_resources( //cl_event_destroy( &p_ext->mutex ); __UnmapHcaMemoryResources( p_dev_obj ); - p_ext->state = HCA_ADDED; + p_ext->state = HCA_SHUTDOWN; HCA_EXIT( HCA_DBG_PNP ); } @@ -621,9 +621,8 @@ hca_release_resources( ("PoSetPowerState: old state %d, new state to %d\n", powerState.DeviceState, p_ext->DevicePowerState )); - /* Clear the PnP state in case we get restarted. */ - p_ext->pnpState = 0; + p_ext->pnpState = PNP_DEVICE_REMOVED; HCA_EXIT( HCA_DBG_PNP ); } @@ -648,6 +647,13 @@ hca_stop( IN IRP* const p_irp, OUT cl_irp_action_t* const p_action ) { + hca_dev_ext_t *p_ext = (hca_dev_ext_t*)p_dev_obj->DeviceExtension; + + if (p_ext->hca.mdev) { // quiet the HCA + struct mthca_dev *mdev = p_ext->hca.mdev; + (void) hca_reset(mdev->ext->cl_ext.p_self_do,(mdev->hca_type == 0/*TAVOR*/)); + } + /* * Must disable everything. Complib framework will * call ReleaseResources handler. diff -dwup3 -X excl.txt -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\mthca_main.c .\hw\mthca\kernel\mthca_main.c --- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\mthca_main.c Thu May 31 11:22:19 2012 +++ .\hw\mthca\kernel\mthca_main.c Wed May 23 18:26:48 2012 @@ -953,6 +953,7 @@ NTSTATUS mthca_init_one(hca_dev_ext_t *e InitializeListHead(&ext->hca.hob.event_list); KeInitializeSpinLock(&ext->hca.hob.event_list_lock); + ext->hca.hob.mark = E_MARK_CA; /* allocate mdev structure */ mdev = kzalloc(sizeof *mdev, GFP_KERNEL);
ndv2.31.patch
Description: ndv2.31.patch
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
