Hi,

On Fri, Mar 11, 2016 at 6:54 AM, Felipe Balbi
<[email protected]> wrote:
> 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.

Do we want to increase the same for event ring buffers as
while, which is allocated by dma_alloc_coherent(), which
is also at PAGE_SIZE chunks, right?

Regards,
-Bin.

>
> Signed-off-by: Felipe Balbi <[email protected]>
> ---
>  drivers/usb/dwc3/core.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index e4f8b90d9627..bf05cca96941 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -435,7 +435,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)
>
>  /**
> --
> 2.7.0.GIT
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to