diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 11:31:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-02 11:31:09 -0700 |
commit | a84270189e2afc7028b1123415a66d444f460977 (patch) | |
tree | 0f239afe73655167c02b411d1cf84bf3211818af /drivers/usb/chipidea/debug.c | |
parent | bcd7351e83728859833e3c5b8aae9a2816914e4b (diff) | |
parent | 3a0ddc714a1b8fcbff24c135a1332a28b4668d78 (diff) |
Merge tag 'usb-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH:
"Here's the big USB 3.11-rc1 merge request.
Lots of gadget and finally, chipidea driver updates (they were much
needed), along with a new host controller driver, lots of little
serial driver fixes, the removal of the 255 usb-serial device
limitation, and a variety of other minor things.
All of these have been in the linux-next releases for a while"
* tag 'usb-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (254 commits)
usb: musb: omap2430: make it compile again
usb: chipidea: ci_hdrc_imx: access phy via private data
xhci: Add missing unlocks on error paths
USB: option,qcserial: move Novatel Gobi1K IDs to qcserial
ehci-atmel.c: prepare clk before calling enable
USB: ohci-at91: prepare clk before calling enable
USB: HWA: fix device probe failure
wusbcore: add entries in Documentation/ABI for new wusbhc sysfs attributes
wusbcore: add sysfs attribute for retry count
wusbcore: add sysfs attribute for DNTS count and interval
usb: chipidea: drop "13xxx" infix
usb: phy: tegra: remove duplicated include from phy-tegra-usb.c
usb: host: xhci-plat: release mem region while removing module
usbmisc_imx: allow autoloading on according to dt ids
usb: fix build error without CONFIG_USB_PHY
usb: check usb_hub_to_struct_hub() return value
xhci: check for failed dma pool allocation
usb: gadget: f_subset: fix missing unlock on error in geth_alloc()
usb: gadget: f_ncm: fix missing unlock on error in ncm_alloc()
usb: gadget: f_ecm: fix missing unlock on error in ecm_alloc()
...
Diffstat (limited to 'drivers/usb/chipidea/debug.c')
-rw-r--r-- | drivers/usb/chipidea/debug.c | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 36a7063a6cb..96d899aee47 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c @@ -18,7 +18,7 @@ */ static int ci_device_show(struct seq_file *s, void *data) { - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; struct usb_gadget *gadget = &ci->gadget; seq_printf(s, "speed = %d\n", gadget->speed); @@ -58,7 +58,7 @@ static const struct file_operations ci_device_fops = { */ static int ci_port_test_show(struct seq_file *s, void *data) { - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; unsigned long flags; unsigned mode; @@ -78,7 +78,7 @@ static ssize_t ci_port_test_write(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos) { struct seq_file *s = file->private_data; - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; unsigned long flags; unsigned mode; char buf[32]; @@ -115,7 +115,7 @@ static const struct file_operations ci_port_test_fops = { */ static int ci_qheads_show(struct seq_file *s, void *data) { - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; unsigned long flags; unsigned i, j; @@ -126,15 +126,15 @@ static int ci_qheads_show(struct seq_file *s, void *data) spin_lock_irqsave(&ci->lock, flags); for (i = 0; i < ci->hw_ep_max/2; i++) { - struct ci13xxx_ep *mEpRx = &ci->ci13xxx_ep[i]; - struct ci13xxx_ep *mEpTx = - &ci->ci13xxx_ep[i + ci->hw_ep_max/2]; + struct ci_hw_ep *hweprx = &ci->ci_hw_ep[i]; + struct ci_hw_ep *hweptx = + &ci->ci_hw_ep[i + ci->hw_ep_max/2]; seq_printf(s, "EP=%02i: RX=%08X TX=%08X\n", - i, (u32)mEpRx->qh.dma, (u32)mEpTx->qh.dma); - for (j = 0; j < (sizeof(struct ci13xxx_qh)/sizeof(u32)); j++) + i, (u32)hweprx->qh.dma, (u32)hweptx->qh.dma); + for (j = 0; j < (sizeof(struct ci_hw_qh)/sizeof(u32)); j++) seq_printf(s, " %04X: %08X %08X\n", j, - *((u32 *)mEpRx->qh.ptr + j), - *((u32 *)mEpTx->qh.ptr + j)); + *((u32 *)hweprx->qh.ptr + j), + *((u32 *)hweptx->qh.ptr + j)); } spin_unlock_irqrestore(&ci->lock, flags); @@ -158,11 +158,12 @@ static const struct file_operations ci_qheads_fops = { */ static int ci_requests_show(struct seq_file *s, void *data) { - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; unsigned long flags; struct list_head *ptr = NULL; - struct ci13xxx_req *req = NULL; - unsigned i, j, qsize = sizeof(struct ci13xxx_td)/sizeof(u32); + struct ci_hw_req *req = NULL; + struct td_node *node, *tmpnode; + unsigned i, j, qsize = sizeof(struct ci_hw_td)/sizeof(u32); if (ci->role != CI_ROLE_GADGET) { seq_printf(s, "not in gadget mode\n"); @@ -171,16 +172,20 @@ static int ci_requests_show(struct seq_file *s, void *data) spin_lock_irqsave(&ci->lock, flags); for (i = 0; i < ci->hw_ep_max; i++) - list_for_each(ptr, &ci->ci13xxx_ep[i].qh.queue) { - req = list_entry(ptr, struct ci13xxx_req, queue); - - seq_printf(s, "EP=%02i: TD=%08X %s\n", - i % (ci->hw_ep_max / 2), (u32)req->dma, - ((i < ci->hw_ep_max/2) ? "RX" : "TX")); - - for (j = 0; j < qsize; j++) - seq_printf(s, " %04X: %08X\n", j, - *((u32 *)req->ptr + j)); + list_for_each(ptr, &ci->ci_hw_ep[i].qh.queue) { + req = list_entry(ptr, struct ci_hw_req, queue); + + list_for_each_entry_safe(node, tmpnode, &req->tds, td) { + seq_printf(s, "EP=%02i: TD=%08X %s\n", + i % (ci->hw_ep_max / 2), + (u32)node->dma, + ((i < ci->hw_ep_max/2) ? + "RX" : "TX")); + + for (j = 0; j < qsize; j++) + seq_printf(s, " %04X: %08X\n", j, + *((u32 *)node->ptr + j)); + } } spin_unlock_irqrestore(&ci->lock, flags); @@ -201,7 +206,7 @@ static const struct file_operations ci_requests_fops = { static int ci_role_show(struct seq_file *s, void *data) { - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; seq_printf(s, "%s\n", ci_role(ci)->name); @@ -212,7 +217,7 @@ static ssize_t ci_role_write(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos) { struct seq_file *s = file->private_data; - struct ci13xxx *ci = s->private; + struct ci_hdrc *ci = s->private; enum ci_role role; char buf[8]; int ret; @@ -254,7 +259,7 @@ static const struct file_operations ci_role_fops = { * * This function returns an error code */ -int dbg_create_files(struct ci13xxx *ci) +int dbg_create_files(struct ci_hdrc *ci) { struct dentry *dent; @@ -295,7 +300,7 @@ err: * dbg_remove_files: destroys the attribute interface * @ci: device */ -void dbg_remove_files(struct ci13xxx *ci) +void dbg_remove_files(struct ci_hdrc *ci) { debugfs_remove_recursive(ci->debugfs); } |