FreeBSD/sys/dev/iser/iser_verbs.c
/**
 * iser_free_device_ib_res - destroy/dealloc/dereg the DMA MR,
 * CQ and PD created with the device associated with the adapator.
 */
destroy/dealloc/dereg the DMA MR,
CQ and PD created with the device associated with the adapator.
destroy / dealloc / dereg the DMA MR CQ and PD created with the device associated with the adapator .
static void
iser_free_device_ib_res(struct iser_device *device)
{
	int i;
	for (i = 0; i < device->comps_used; i++) {
		struct iser_comp *comp = &device->comps[i];
		taskqueue_free(comp->tq);
		ib_destroy_cq(comp->cq);
		comp->cq = NULL;
	}
	(void)ib_unregister_event_handler(&device->event_handler);
	(void)ib_dereg_mr(device->mr);
	(void)ib_dealloc_pd(device->pd);
	free(device->comps, M_ISER_VERBS);
	device->comps = NULL;
	device->mr = NULL;
	device->pd = NULL;
}
static void iser_free_device_ib_res ( struct iser_device * device ) { int i ; for ( i = 0 ; i < device -> comps_used ; i ++ ) { struct iser_comp * comp = & device -> comps [ i ] ; taskqueue_free ( comp -> tq ) ; ib_destroy_cq ( comp -> cq ) ; comp -> cq = NULL ; } ( void ) ib_unregister_event_handler ( & device -> event_handler ) ; ( void ) ib_dereg_mr ( device -> mr ) ; ( void ) ib_dealloc_pd ( device -> pd ) ; free ( device -> comps , M_ISER_VERBS ) ; device -> comps = NULL ; device -> mr = NULL ; device -> pd = NULL ; }
iser_free_device_ib_res - destroy/dealloc/dereg the DMA MR,
 CQ and PD created with the device associated with the adapator.
iser_free_device_ib_res - destroy / dealloc / dereg the DMA MR CQ and PD created with the device associated with the adapator .