summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-04-19 17:43:11 +0000
committerarr <arr@FreeBSD.org>2002-04-19 17:43:11 +0000
commit1482903ceafd6c259928760686a1a308932b4d7c (patch)
treefa3c5e71044a167ec12068a413ebbdf7f295cbf8
parentf8344a0fde63f55dca7542891be03ed0181062f7 (diff)
downloadFreeBSD-src-1482903ceafd6c259928760686a1a308932b4d7c.zip
FreeBSD-src-1482903ceafd6c259928760686a1a308932b4d7c.tar.gz
- Remove KM_ macro calls and replace with the real function we're calling.
As a note, this driver needs the same updating as the hfa driver was just given; removing these macros since I will be nuking them from netatm.
-rw-r--r--sys/dev/hea/eni.c2
-rw-r--r--sys/dev/hea/eni_buffer.c22
-rw-r--r--sys/dev/hea/eni_transmit.c2
-rw-r--r--sys/dev/hea/eni_vcm.c2
4 files changed, 12 insertions, 16 deletions
diff --git a/sys/dev/hea/eni.c b/sys/dev/hea/eni.c
index c433e92..804eca3 100644
--- a/sys/dev/hea/eni.c
+++ b/sys/dev/hea/eni.c
@@ -477,7 +477,7 @@ eni_pci_attach ( pcici_t config_id, int unit )
/*
* Copy MAC address to PIF and config structures
*/
- KM_COPY ( (caddr_t)&eup->eu_seeprom[SEPROM_MAC_OFF],
+ bcopy ( (caddr_t)&eup->eu_seeprom[SEPROM_MAC_OFF],
(caddr_t)&eup->eu_pif.pif_macaddr, sizeof(struct mac_addr) );
eup->eu_config.ac_macaddr = eup->eu_pif.pif_macaddr;
diff --git a/sys/dev/hea/eni_buffer.c b/sys/dev/hea/eni_buffer.c
index 89aa901..d1946f0 100644
--- a/sys/dev/hea/eni_buffer.c
+++ b/sys/dev/hea/eni_buffer.c
@@ -121,7 +121,7 @@ eni_test_memory ( eup )
* This makes sure we don't leave anything funny in the
* queues.
*/
- KM_ZERO ( (uintptr_t)eup->eu_ram, ram_size );
+ bzero ( (uintptr_t)eup->eu_ram, ram_size );
/*
* If we'd like to claim to have less memory, here's where
@@ -162,12 +162,9 @@ eni_init_memory ( eup )
/*
* Allocate initial element which will hold all of memory
*/
- if ( ( eup->eu_memmap = (Mbd *)KM_ALLOC(sizeof(Mbd), M_DEVBUF,
- M_NOWAIT ) ) == NULL )
- {
- /* Memory allocation error */
- return -1;
- }
+ eup->eu_memmap = malloc(sizeof(Mbd), M_DEVBUF, M_NOWAIT);
+ if (eup->eu_memmap == NULL)
+ return (-1);
/*
* Test and size memory
@@ -272,9 +269,8 @@ eni_allocate_buffer ( eup, size )
Mbd *etmp;
/* Yep - create a new segment */
- etmp = (Mbd *)KM_ALLOC(sizeof(Mbd), M_DEVBUF,
- M_NOWAIT );
- if ( etmp == (Mbd *)NULL ) {
+ etmp = malloc(sizeof(Mbd), M_DEVBUF, M_NOWAIT);
+ if (etmp == NULL) {
/*
* Couldn't allocate a new descriptor. Indicate
* failure and exit now or we'll start losing
@@ -282,7 +278,7 @@ eni_allocate_buffer ( eup, size )
*/
eup->eu_stats.eni_st_drv.drv_mm_nodesc++;
*size = 0;
- return ( (caddr_t)NULL );
+ return (NULL);
}
/* Place it in the list */
etmp->next = eptr->next;
@@ -437,7 +433,7 @@ eni_free_buffer ( eup, base )
/* Reset to where we want to be */
eptr = eptr->prev;
/* and free this element */
- (void)KM_FREE(etmp, etmp->size, M_DEVBUF);
+ free(etmp, M_DEVBUF);
}
/* with next */
if ( eptr->next )
@@ -453,7 +449,7 @@ eni_free_buffer ( eup, base )
/* skip next block */
eptr->next = etmp->next;
/* and free next element */
- (void)KM_FREE(etmp, etmp->size, M_DEVBUF);
+ free(etmp, M_DEVBUF);
}
/*
* We've freed the buffer and done any compaction,
diff --git a/sys/dev/hea/eni_transmit.c b/sys/dev/hea/eni_transmit.c
index 13ea896..fc34a76 100644
--- a/sys/dev/hea/eni_transmit.c
+++ b/sys/dev/hea/eni_transmit.c
@@ -489,7 +489,7 @@ retry:
*/
eup->eu_stats.eni_st_drv.drv_xm_segnoal++;
bfr = cp - align;
- KM_COPY ( cp, bfr, KB_LEN ( m ) );
+ bcopy ( cp, bfr, KB_LEN ( m ) );
KB_HEADMOVE ( m, -align );
} else {
/*
diff --git a/sys/dev/hea/eni_vcm.c b/sys/dev/hea/eni_vcm.c
index 4e6f743..c406c70 100644
--- a/sys/dev/hea/eni_vcm.c
+++ b/sys/dev/hea/eni_vcm.c
@@ -286,7 +286,7 @@ eni_closevcc ( cup, cvp )
/*
* Reset everything
*/
- KM_ZERO ( (uintptr_t)vct, sizeof(VCI_Table) );
+ bzero ( (uintptr_t)vct, sizeof(VCI_Table) );
return ( err );
}
OpenPOWER on IntegriCloud