summaryrefslogtreecommitdiffstats
path: root/sys/netatm/atm_device.c
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-06-14 16:59:38 +0000
committerarr <arr@FreeBSD.org>2002-06-14 16:59:38 +0000
commitddf3317becaf1f927336e43f96f900868c8d0a80 (patch)
treef5a02eaff404955298bf324f2af9ffc25b5473bc /sys/netatm/atm_device.c
parent1fa61e7038c01fdffbb282d50c1dd03ea22c4622 (diff)
downloadFreeBSD-src-ddf3317becaf1f927336e43f96f900868c8d0a80.zip
FreeBSD-src-ddf3317becaf1f927336e43f96f900868c8d0a80.tar.gz
- Turn the hea and hfa HARP storage pools into UMA zones and insert
the necesary uma_zcreate() and uma_zdestroy calls into module loading handler and the device attach handling. - Change the related HARP netatm code to use UMA zone functions when dealing with the zones that were formerly the ATM interface (hea, hfa) storage pools. - Have atm_physif_freenifs() now get passed an uma_zone_t so that we can properly free the allocated NIF's back to their zone. This should be the last commit to remove any code that makes use of the netatm storage pool api. I will be removing the api code within the near future. Reviewed by: mdodd
Diffstat (limited to 'sys/netatm/atm_device.c')
-rw-r--r--sys/netatm/atm_device.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netatm/atm_device.c b/sys/netatm/atm_device.c
index 31c9e6a..4834afc 100644
--- a/sys/netatm/atm_device.c
+++ b/sys/netatm/atm_device.c
@@ -170,8 +170,9 @@ atm_dev_inst(ssp, cvcp)
/*
* Allocate a VCC control block
*/
- if ( ( cvp = (Cmn_vcc *)atm_allocate(cup->cu_vcc_pool) ) == NULL )
- return ( ENOMEM );
+ cvp = uma_zalloc(cup->cu_vcc_zone, M_WAITOK);
+ if (cvp == NULL)
+ return (ENOMEM);
cvp->cv_state = CVS_INST;
cvp->cv_toku = (*ssp)->sd_toku;
@@ -183,7 +184,7 @@ atm_dev_inst(ssp, cvcp)
*/
err = (*cup->cu_instvcc)(cup, cvp);
if (err) {
- atm_free((caddr_t)cvp);
+ uma_zfree(cup->cu_vcc_zone, cvp);
return (err);
}
@@ -351,7 +352,7 @@ atm_dev_lower(cmd, tok, arg1, arg2)
/*
* Free VCC resources
*/
- (void) atm_free((caddr_t)cvp);
+ uma_zfree(cup->cu_vcc_zone, cvp);
break;
}
OpenPOWER on IntegriCloud