Exemple #1
0
/*
 * Process module unloading notification
 * 
 * Called whenever the uni module is about to be unloaded.  All signalling
 * instances will have been previously detached.  All uniarp resources 
 * must be freed now.
 *
 * Arguments:
 *	none
 *
 * Returns:
 *	none
 *
 */
void
uniarp_stop()
{
	int	i;

	/* 
	 * Make sure the arp table is empty
	 */
	for (i = 0; i < UNIARP_HASHSIZ; i++) {
		if (uniarp_arptab[i] != NULL)
			panic("uniarp_stop: arp table not empty");
	}

	/*
	 * Cancel timers
	 */
	(void) atm_untimeout(&uniarp_timer);

	/*
	 * De-register ourselves
	 */
	(void) atm_endpoint_deregister(&uniarp_endpt);

	/*
	 * Free our storage pools
	 */
	atm_release_pool(&uniarp_pool);
}
Exemple #2
0
/*
 * Terminate SSCF UNI processing
 *
 * This will be called just prior to unloading the module from memory.  All
 * signalling instances should have been terminated by now, so we just free
 * up all of our resources.
 *
 * Called at splnet.
 *
 * Arguments:
 *	none
 *
 * Returns:
 *	0 	termination was successful
 *	errno	termination failed - reason indicated
 *
 */
int
sscf_uni_stop()
{
    /*
     * Any connections still exist??
     */
    if (sscf_uni_vccnt) {

        /*
         * Yes, can't stop yet
         */
        return (EBUSY);
    }

    /*
     * Deregister the stack service
     */
    (void) atm_stack_deregister(&sscf_uni_service);

    /*
     * Free our storage pools
     */
    atm_release_pool(&sscf_uni_pool);

    return (0);
}
Exemple #3
0
/*
 * Process module unloading notification
 * 
 * Called whenever the spans module is about to be unloaded.  All signalling
 * instances will have been previously detached.  All spansarp resources 
 * must be freed now.
 *
 * Arguments:
 *	none
 *
 * Returns:
 *	none
 *
 */
void
spansarp_stop(void)
{
	int	i;

	/* 
	 * Make sure the arp table is empty
	 */
	for (i = 0; i < SPANSARP_HASHSIZ; i++) {
		if (spansarp_arptab[i] != NULL)
			panic("spansarp_stop: arp table not empty");
	}

	/*
	 * Cancel timers
	 */
	atm_untimeout(&spansarp_timer);
	atm_untimeout(&spansarp_rtimer);

	/*
	 * Free our storage pools
	 */
	atm_release_pool(&spansarp_pool);
}
Exemple #4
0
/*
 * Halt driver processing 
 * 
 * This will be called just prior to unloading the module from memory.
 * Everything we've setup since we've been loaded must be undone here.
 *
 * Arguments:
 *	none
 *
 * Returns:
 *	0 	shutdown was successful 
 *	errno	shutdown failed - reason indicated
 *
 */
static int
fore_stop()
{
	int	err = 0;
	int	s = splimp();
	int	i;

	/*
	 * Stop the watchdog timer
	 */
	(void) atm_untimeout(&fore_timer);

	/*
	 * Clean up each device (if any)
	 */
	for ( i = 0; i < fore_nunits; i++ ) {
		Fore_unit	*fup = fore_units[i];

		if (fup == NULL)
			continue;

		/*
		 * Deregister device from kernel services
		 */
		if (err = atm_physif_deregister((Cmn_unit *)fup)) {
			(void) splx(s);
			return (err);
		}

		/*
		 * Unattach the device from the system
		 */
		fore_unattach(fup);

		/*
		 * Free any Fore-specific device resources
		 */
		fore_interface_free(fup);

		/*
		 * Free the unit structure
		 */
		atm_dev_free(fup);
		fore_units[i] = NULL;
	}

	fore_nunits = 0;

	/*
	 * Now free our global resources
	 */

	/*
	 * Release our storage pools
	 */
	atm_release_pool(&fore_vcc_pool);
	atm_release_pool(&fore_nif_pool);

	/*
	 * Release all DMA mappings
	 */
	DMA_RELEASE();

	fore_inited = 0;

	(void) splx(s);

	return (0);
}