diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c index 2fe442d27005..b799897c7f8e 100644 --- a/sys/dev/usb/usb_transfer.c +++ b/sys/dev/usb/usb_transfer.c @@ -217,12 +217,12 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params *parm, * Try multi-allocation chunks to reduce the number of DMA * allocations, hence DMA allocations are slow. */ - if (size >= PAGE_SIZE) { + if (size >= USB_PAGE_SIZE) { n_dma_pc = count; n_obj = 1; } else { /* compute number of objects per page */ - n_obj = (PAGE_SIZE / size); + n_obj = (USB_PAGE_SIZE / size); /* * Compute number of DMA chunks, rounded up * to nearest one: