aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/firewire
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2014-09-27 16:50:24 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2014-09-27 16:50:24 +0000
commit1ade5ec79a236dcacd5a828dd8feae5b903c16fb (patch)
tree7ac0c1315402f4781f2cc36827b575b4470d85a0 /sys/dev/firewire
parent23667f089d0aaf2c46f7d80ef5648cfa60f30cd0 (diff)
downloadsrc-1ade5ec79a236dcacd5a828dd8feae5b903c16fb.tar.gz
src-1ade5ec79a236dcacd5a828dd8feae5b903c16fb.zip
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
Notes
Notes: svn path=/head/; revision=272215
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r--sys/dev/firewire/fwohci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c
index e0d638d53153..00a54e28da6d 100644
--- a/sys/dev/firewire/fwohci.c
+++ b/sys/dev/firewire/fwohci.c
@@ -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");