mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Do not pass whole descriptor block size as align to fwdma_malloc_multiseg
Do not pass wrong alignment value to fwdma_malloc_multiseg and ultimately to contigalloc. In addition to being wrong, this causes insta-panic in certain cases due to safety assertion - the alignment is required to be the power of two and the value we calculate here seldom is. MFC after: 1 month
This commit is contained in:
parent
23667f089d
commit
1ade5ec79a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272215
@ -1253,7 +1253,7 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
|
||||
}
|
||||
|
||||
#define DB_SIZE(x) (sizeof(struct fwohcidb) * (x)->ndesc)
|
||||
dbch->am = fwdma_malloc_multiseg(&sc->fc, DB_SIZE(dbch),
|
||||
dbch->am = fwdma_malloc_multiseg(&sc->fc, sizeof(struct fwohcidb),
|
||||
DB_SIZE(dbch), dbch->ndb, BUS_DMA_WAITOK);
|
||||
if (dbch->am == NULL) {
|
||||
printf("fwohci_db_init: fwdma_malloc_multiseg failed\n");
|
||||
|
Loading…
Reference in New Issue
Block a user