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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to