From: Felipe Balbi Date: Thu, 10 Mar 2016 12:40:31 +0000 (+0200) Subject: usb: dwc3: increase maximum number of TRBs per endpoint X-Git-Tag: v4.14-rc1~3184^2~37^2~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8495036e986bdc7e82523d47097e7833d2782ff9;p=platform%2Fkernel%2Flinux-rpi.git usb: dwc3: increase maximum number of TRBs per endpoint previously we were using a maximum of 32 TRBs per endpoint. With each TRB being 16 bytes long, we were using 512 bytes of memory for each endpoint. However, SLAB/SLUB will always allocate PAGE_SIZE chunks. In order to better utilize the memory we allocate and to allow deeper queues for gadgets which would benefit from it (g_ether comes to mind), let's increase the maximum to 256 TRBs which rounds up to 4096 bytes for each endpoint. Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 7cbe9e9..5e17c02 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -438,7 +438,7 @@ struct dwc3_event_buffer { #define DWC3_EP_DIRECTION_TX true #define DWC3_EP_DIRECTION_RX false -#define DWC3_TRB_NUM 32 +#define DWC3_TRB_NUM 256 #define DWC3_TRB_MASK (DWC3_TRB_NUM - 1) /**