svn commit: r367955 - head/sys/dev/nvme

Michal Meloun mmel at FreeBSD.org
Mon Nov 23 14:30:23 UTC 2020


Author: mmel
Date: Mon Nov 23 14:30:22 2020
New Revision: 367955
URL: https://svnweb.freebsd.org/changeset/base/367955

Log:
  Ensure that the buffer is in nvme_single_map() mapped to single segment.
  Not a functional change.
  
  MFC after:	1 week

Modified:
  head/sys/dev/nvme/nvme_private.h

Modified: head/sys/dev/nvme/nvme_private.h
==============================================================================
--- head/sys/dev/nvme/nvme_private.h	Mon Nov 23 14:26:59 2020	(r367954)
+++ head/sys/dev/nvme/nvme_private.h	Mon Nov 23 14:30:22 2020	(r367955)
@@ -478,6 +478,7 @@ nvme_single_map(void *arg, bus_dma_segment_t *seg, int
 {
 	uint64_t *bus_addr = (uint64_t *)arg;
 
+	KASSERT(nseg == 1, ("number of segments (%d) is not 1", nseg));
 	if (error != 0)
 		printf("nvme_single_map err %d\n", error);
 	*bus_addr = seg[0].ds_addr;


More information about the svn-src-all mailing list