From cc9e6c495b0a37cc4f7003e470bcbb15ea760377 Mon Sep 17 00:00:00 2001 From: Michael Grzeschik Date: Thu, 13 Jun 2013 17:59:53 +0300 Subject: usb: chipidea: udc: manage dynamic amount of tds with a linked list Instead of having a limited number of usable tds in the udc we use a linked list to support dynamic amount of needed tds for all special gadget types. This improves throughput. Signed-off-by: Michael Grzeschik Reviewed-by: Felipe Balbi Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/udc.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/usb/chipidea/udc.h') diff --git a/drivers/usb/chipidea/udc.h b/drivers/usb/chipidea/udc.h index a75724a19e1a..0ecc0ad4f513 100644 --- a/drivers/usb/chipidea/udc.h +++ b/drivers/usb/chipidea/udc.h @@ -60,6 +60,12 @@ struct ci13xxx_qh { struct usb_ctrlrequest setup; } __attribute__ ((packed, aligned(4))); +struct td_node { + struct list_head td; + dma_addr_t dma; + struct ci13xxx_td *ptr; +}; + /** * struct ci13xxx_req - usb request representation * @req: request structure for gadget drivers @@ -72,10 +78,7 @@ struct ci13xxx_qh { struct ci13xxx_req { struct usb_request req; struct list_head queue; - struct ci13xxx_td *ptr; - dma_addr_t dma; - struct ci13xxx_td *zptr; - dma_addr_t zdma; + struct list_head tds; }; #ifdef CONFIG_USB_CHIPIDEA_UDC -- cgit v1.2.1