8 #include <linux/module.h>
9 #include <linux/kernel.h>
10 #include <linux/slab.h>
11 #include <linux/device.h>
25 static const size_t pool_max[HCD_BUFFER_POOLS] = {
56 if (!hcd->self.controller->dma_mask &&
57 !(hcd->driver->flags & HCD_LOCAL_MEM))
60 for (i = 0; i < HCD_BUFFER_POOLS; i++) {
64 snprintf(name,
sizeof name,
"buffer-%d", size);
87 for (i = 0; i < HCD_BUFFER_POOLS; i++) {
108 struct usb_hcd *hcd = bus_to_hcd(bus);
112 if (!bus->controller->dma_mask &&
113 !(hcd->driver->flags & HCD_LOCAL_MEM)) {
115 return kmalloc(size, mem_flags);
118 for (i = 0; i < HCD_BUFFER_POOLS; i++) {
119 if (size <= pool_max[i])
132 struct usb_hcd *hcd = bus_to_hcd(bus);
138 if (!bus->controller->dma_mask &&
139 !(hcd->driver->flags & HCD_LOCAL_MEM)) {
144 for (i = 0; i < HCD_BUFFER_POOLS; i++) {
145 if (size <= pool_max[i]) {