]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
NVME: Multiple busdma related fixes.
authormmel <mmel@FreeBSD.org>
Wed, 2 Dec 2020 16:54:24 +0000 (16:54 +0000)
committermmel <mmel@FreeBSD.org>
Wed, 2 Dec 2020 16:54:24 +0000 (16:54 +0000)
commit970d081572a66b5c9c28042c000f0722ddde1aff
treea21fcec70993c4b393570e669c63cbf99c85c771
parent438aeb48d03ff63b0841b2ad65b708c35892cb38
NVME: Multiple busdma related fixes.
- in nvme_qpair_process_completions() do dma sync before completion buffer
  is used.
- in nvme_qpair_submit_tracker(), don't do explicit wmb() also for arm
  and arm64. Bus_dmamap_sync() on these architectures is sufficient to ensure
  that all CPU stores are visible to external (including DMA) observers.
- Allocate completion buffer as BUS_DMA_COHERENT. On not-DMA coherent systems,
  buffers continuously owned (and accessed) by DMA must be allocated with this
  flag. Note that BUS_DMA_COHERENT flag is no-op on DMA coherent systems
  (or coherent buses in mixed systems).

MFC after: 4 weeks
Reviewed by: mav, imp
Differential Revision: https://reviews.freebsd.org/D27446
sys/dev/nvme/nvme_qpair.c