Remove aligment requirements for passthrough buffer.
After r368124 vmapbuf() should happily map misaligned maxphys-sized buffers thanks to extra page added to pbuf_zone.
This commit is contained in:
parent
9093e27cc1
commit
1770bae5f8
@ -1244,20 +1244,8 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctrlr,
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user