Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Sep 2014 16:50:25 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272215 - head/sys/dev/firewire
Message-ID:  <201409271650.s8RGoPuP053606@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Sat Sep 27 16:50:24 2014
New Revision: 272215
URL: http://svnweb.freebsd.org/changeset/base/272215

Log:
  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

Modified:
  head/sys/dev/firewire/fwohci.c

Modified: head/sys/dev/firewire/fwohci.c
==============================================================================
--- head/sys/dev/firewire/fwohci.c	Sat Sep 27 16:50:21 2014	(r272214)
+++ head/sys/dev/firewire/fwohci.c	Sat Sep 27 16:50:24 2014	(r272215)
@@ -1253,7 +1253,7 @@ fwohci_db_init(struct fwohci_softc *sc, 
 	}
 
 #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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409271650.s8RGoPuP053606>