1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

The aac driver needs 256K of contiguous physical memory in order to

attach.  If it can't get that (highly likely if loaded as a module on
a system that's been up for a while), give a more descriptive error
message.
Also clean up some nearby style nits.

MFC after:	2 days
This commit is contained in:
Scott Long 2002-08-30 05:02:07 +00:00
parent 447b3772dc
commit eb3025b3ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102602

View File

@ -1115,8 +1115,9 @@ aac_alloc_commands(struct aac_softc *sc)
/* allocate the FIBs in DMAable memory and load them */
if (bus_dmamem_alloc(sc->aac_fib_dmat, (void **)&sc->aac_fibs,
BUS_DMA_NOWAIT, &sc->aac_fibmap)) {
return(ENOMEM);
BUS_DMA_NOWAIT, &sc->aac_fibmap)) {
printf("Not enough contiguous memory available.\n");
return (ENOMEM);
}
bus_dmamap_load(sc->aac_fib_dmat, sc->aac_fibmap, sc->aac_fibs,
AAC_FIB_COUNT * sizeof(struct aac_fib),
@ -1132,7 +1133,7 @@ aac_alloc_commands(struct aac_softc *sc)
if (!bus_dmamap_create(sc->aac_buffer_dmat, 0, &cm->cm_datamap))
aac_release_command(cm);
}
return(0);
return (0);
}
/*