From 03bdae2d321d8f812347f253938ca56071313a5c Mon Sep 17 00:00:00 2001 From: hselasky Date: Wed, 5 Feb 2014 08:02:52 +0000 Subject: [PATCH] Fix a regression issue. Contiguous single segment allocations above PAGE_SIZE bytes should only use one USB page structure. Fixes a problem with some external drivers. MFC after: 2 days --- sys/dev/usb/usb_busdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c index 83b47cb76064..1c3628888ba8 100644 --- a/sys/dev/usb/usb_busdma.c +++ b/sys/dev/usb/usb_busdma.c @@ -452,7 +452,7 @@ usb_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs, goto done; } #endif - while (1) { + while (pc->ismultiseg) { off += USB_PAGE_SIZE; if (off >= (segs->ds_len + rem)) { /* page crossing */