Date: Thu, 14 Nov 2019 12:11:49 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Alexander Motin <mav@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r354703 - head/sys/dev/ioat Message-ID: <20191114101149.GA2707@kib.kiev.ua> In-Reply-To: <201911140439.xAE4dngZ032224@repo.freebsd.org> References: <201911140439.xAE4dngZ032224@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 14, 2019 at 04:39:49AM +0000, Alexander Motin wrote: > Author: mav > Date: Thu Nov 14 04:39:48 2019 > New Revision: 354703 > URL: https://svnweb.freebsd.org/changeset/base/354703 > > Log: > Pass more reasonable WAIT flags to bus_dma(9) calls. > > MFC after: 2 weeks > > Modified: > head/sys/dev/ioat/ioat.c > > Modified: head/sys/dev/ioat/ioat.c > ============================================================================== > --- head/sys/dev/ioat/ioat.c Thu Nov 14 04:34:58 2019 (r354702) > +++ head/sys/dev/ioat/ioat.c Thu Nov 14 04:39:48 2019 (r354703) > @@ -555,13 +555,14 @@ ioat3_attach(device_t device) > &ioat->comp_update_tag); > > error = bus_dmamem_alloc(ioat->comp_update_tag, > - (void **)&ioat->comp_update, BUS_DMA_ZERO, &ioat->comp_update_map); > + (void **)&ioat->comp_update, BUS_DMA_ZERO | BUS_DMA_WAITOK, > + &ioat->comp_update_map); For waitok, you need to provide locking function in the tag. > if (ioat->comp_update == NULL) > return (ENOMEM); > > error = bus_dmamap_load(ioat->comp_update_tag, ioat->comp_update_map, > ioat->comp_update, sizeof(uint64_t), ioat_comp_update_map, ioat, > - 0); > + BUS_DMA_NOWAIT); > if (error != 0) > return (error); > > @@ -582,7 +583,7 @@ ioat3_attach(device_t device) > return (error); > > error = bus_dmamap_load(ioat->hw_desc_tag, ioat->hw_desc_map, hw_desc, > - ringsz, ioat_dmamap_cb, &ioat->hw_desc_bus_addr, BUS_DMA_WAITOK); > + ringsz, ioat_dmamap_cb, &ioat->hw_desc_bus_addr, BUS_DMA_NOWAIT); > if (error) > return (error); >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191114101149.GA2707>