Date: Sun, 29 Nov 2020 00:57:19 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368136 - head/sys/dev/nvme Message-ID: <202011290057.0AT0vJBa081237@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Nov 29 00:57:19 2020 New Revision: 368136 URL: https://svnweb.freebsd.org/changeset/base/368136 Log: Remove aligment requirements for passthrough buffer. After r368124 vmapbuf() should happily map misaligned maxphys-sized buffers thanks to extra page added to pbuf_zone. Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Sun Nov 29 00:54:13 2020 (r368135) +++ head/sys/dev/nvme/nvme_ctrlr.c Sun Nov 29 00:57:19 2020 (r368136) @@ -1244,20 +1244,8 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr struct mtx *mtx; struct buf *buf = NULL; int ret = 0; - vm_offset_t addr, end; if (pt->len > 0) { - /* - * vmapbuf calls vm_fault_quick_hold_pages which only maps full - * pages. Ensure this request has fewer than maxphys bytes when - * extended to full pages. - */ - addr = (vm_offset_t)pt->buf; - end = round_page(addr + pt->len); - addr = trunc_page(addr); - if (end - addr > maxphys) - return EIO; - if (pt->len > ctrlr->max_xfer_size) { nvme_printf(ctrlr, "pt->len (%d) " "exceeds max_xfer_size (%d)\n", pt->len,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011290057.0AT0vJBa081237>