FreeBSD/sys/netinet/toecore.c
/*
 * Remove the TOE device from the global list of active TOE devices.  It is the
 * caller's responsibility to ensure that the TOE device is quiesced prior to
 * this call.
 */
Remove the TOE device from the global list of active TOE devices.  It is the
caller's responsibility to ensure that the TOE device is quiesced prior to
this call.
Remove the TOE device from the global list of active TOE devices . It is the caller ' s responsibility to ensure that the TOE device is quiesced prior to this call .
int
unregister_toedev(struct toedev *tod)
{
	struct toedev *t, *t2;
	int rc = ENODEV;
	mtx_lock(&toedev_lock);
	TAILQ_FOREACH_SAFE(t, &toedev_list, link, t2) {
		if (t == tod) {
			TAILQ_REMOVE(&toedev_list, tod, link);
			registered_toedevs--;
			rc = 0;
			break;
		}
	}
	KASSERT(registered_toedevs >= 0,
	    ("%s: registered_toedevs (%d) < 0", __func__, registered_toedevs));
	mtx_unlock(&toedev_lock);
	return (rc);
}
int unregister_toedev ( struct toedev * tod ) { struct toedev * t , * t2 ; int rc = ENODEV ; mtx_lock ( & toedev_lock ) ; TAILQ_FOREACH_SAFE ( t , & toedev_list , link , t2 ) { if ( t == tod ) { TAILQ_REMOVE ( & toedev_list , tod , link ) ; registered_toedevs -- ; rc = 0 ; break ; } } KASSERT ( registered_toedevs >= 0 , ( " " , __func__ , registered_toedevs ) ) ; mtx_unlock ( & toedev_lock ) ; return ( rc ) ; }
Remove the TOE device from the global list of active TOE devices.
Remove the TOE device from the global list of active TOE devices .