diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2013-06-13 10:59:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-17 16:45:47 -0400 |
commit | cc9e6c495b0a37cc4f7003e470bcbb15ea760377 (patch) | |
tree | 620189fb514e382806ac61237b2812476c9abe07 /drivers/usb/chipidea/debug.c | |
parent | 20a677fd63c57edd5b0c463baa44f133b2f2d4a0 (diff) |
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 <m.grzeschik@pengutronix.de>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/debug.c')
-rw-r--r-- | drivers/usb/chipidea/debug.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 36a7063a6cba..64b8c32d4f33 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c | |||
@@ -162,6 +162,7 @@ static int ci_requests_show(struct seq_file *s, void *data) | |||
162 | unsigned long flags; | 162 | unsigned long flags; |
163 | struct list_head *ptr = NULL; | 163 | struct list_head *ptr = NULL; |
164 | struct ci13xxx_req *req = NULL; | 164 | struct ci13xxx_req *req = NULL; |
165 | struct td_node *node, *tmpnode; | ||
165 | unsigned i, j, qsize = sizeof(struct ci13xxx_td)/sizeof(u32); | 166 | unsigned i, j, qsize = sizeof(struct ci13xxx_td)/sizeof(u32); |
166 | 167 | ||
167 | if (ci->role != CI_ROLE_GADGET) { | 168 | if (ci->role != CI_ROLE_GADGET) { |
@@ -174,13 +175,17 @@ static int ci_requests_show(struct seq_file *s, void *data) | |||
174 | list_for_each(ptr, &ci->ci13xxx_ep[i].qh.queue) { | 175 | list_for_each(ptr, &ci->ci13xxx_ep[i].qh.queue) { |
175 | req = list_entry(ptr, struct ci13xxx_req, queue); | 176 | req = list_entry(ptr, struct ci13xxx_req, queue); |
176 | 177 | ||
177 | seq_printf(s, "EP=%02i: TD=%08X %s\n", | 178 | list_for_each_entry_safe(node, tmpnode, &req->tds, td) { |
178 | i % (ci->hw_ep_max / 2), (u32)req->dma, | 179 | seq_printf(s, "EP=%02i: TD=%08X %s\n", |
179 | ((i < ci->hw_ep_max/2) ? "RX" : "TX")); | 180 | i % (ci->hw_ep_max / 2), |
180 | 181 | (u32)node->dma, | |
181 | for (j = 0; j < qsize; j++) | 182 | ((i < ci->hw_ep_max/2) ? |
182 | seq_printf(s, " %04X: %08X\n", j, | 183 | "RX" : "TX")); |
183 | *((u32 *)req->ptr + j)); | 184 | |
185 | for (j = 0; j < qsize; j++) | ||
186 | seq_printf(s, " %04X: %08X\n", j, | ||
187 | *((u32 *)node->ptr + j)); | ||
188 | } | ||
184 | } | 189 | } |
185 | spin_unlock_irqrestore(&ci->lock, flags); | 190 | spin_unlock_irqrestore(&ci->lock, flags); |
186 | 191 | ||