1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-11 14:10:34 +00:00

- 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.
This commit is contained in:
Andrew R. Reiter 2002-04-19 17:43:11 +00:00
parent 56ca2b35a4
commit cfaf7ad37a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95062
4 changed files with 12 additions and 16 deletions

View File

@ -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;

View File

@ -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,

View File

@ -489,7 +489,7 @@ eni_output ( cup, cvp, m )
*/
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 {
/*

View File

@ -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 );
}