aboutsummaryrefslogtreecommitdiff
path: root/sys/netatm/atm_device.c
diff options
context:
space:
mode:
authorAndrew R. Reiter <arr@FreeBSD.org>2002-06-14 16:59:38 +0000
committerAndrew R. Reiter <arr@FreeBSD.org>2002-06-14 16:59:38 +0000
commitb6037a7953ff02b242158f574e73ba1422542199 (patch)
treef5a02eaff404955298bf324f2af9ffc25b5473bc /sys/netatm/atm_device.c
parentdc20d4b9d4f25076d08807c41c61aa7ca0904786 (diff)
downloadsrc-b6037a7953ff02b242158f574e73ba1422542199.tar.gz
src-b6037a7953ff02b242158f574e73ba1422542199.zip
- 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
Notes
Notes: svn path=/head/; revision=98223
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 31c9e6a38333..4834afcb124b 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;
}