diff options
Diffstat (limited to 'drivers/usb/host/ehci-dbg.c')
-rw-r--r-- | drivers/usb/host/ehci-dbg.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 65ac9fef3a7c..23b95b2bfe15 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2001-2002 by David Brownell | 2 | * Copyright (c) 2001-2002 by David Brownell |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
@@ -65,7 +65,7 @@ static void dbg_hcs_params (struct ehci_hcd *ehci, char *label) | |||
65 | for (i = 0; i < HCS_N_PORTS (params); i++) { | 65 | for (i = 0; i < HCS_N_PORTS (params); i++) { |
66 | // FIXME MIPS won't readb() ... | 66 | // FIXME MIPS won't readb() ... |
67 | byte = readb (&ehci->caps->portroute[(i>>1)]); | 67 | byte = readb (&ehci->caps->portroute[(i>>1)]); |
68 | sprintf(tmp, "%d ", | 68 | sprintf(tmp, "%d ", |
69 | ((i & 0x1) ? ((byte)&0xf) : ((byte>>4)&0xf))); | 69 | ((i & 0x1) ? ((byte)&0xf) : ((byte>>4)&0xf))); |
70 | strcat(buf, tmp); | 70 | strcat(buf, tmp); |
71 | } | 71 | } |
@@ -141,12 +141,12 @@ dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | static void __attribute__((__unused__)) | 143 | static void __attribute__((__unused__)) |
144 | dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) | 144 | dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) |
145 | { | 145 | { |
146 | ehci_dbg (ehci, "%s [%d] itd %p, next %08x, urb %p\n", | 146 | ehci_dbg (ehci, "%s [%d] itd %p, next %08x, urb %p\n", |
147 | label, itd->frame, itd, le32_to_cpu(itd->hw_next), itd->urb); | 147 | label, itd->frame, itd, le32_to_cpu(itd->hw_next), itd->urb); |
148 | ehci_dbg (ehci, | 148 | ehci_dbg (ehci, |
149 | " trans: %08x %08x %08x %08x %08x %08x %08x %08x\n", | 149 | " trans: %08x %08x %08x %08x %08x %08x %08x %08x\n", |
150 | le32_to_cpu(itd->hw_transaction[0]), | 150 | le32_to_cpu(itd->hw_transaction[0]), |
151 | le32_to_cpu(itd->hw_transaction[1]), | 151 | le32_to_cpu(itd->hw_transaction[1]), |
152 | le32_to_cpu(itd->hw_transaction[2]), | 152 | le32_to_cpu(itd->hw_transaction[2]), |
@@ -156,7 +156,7 @@ dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) | |||
156 | le32_to_cpu(itd->hw_transaction[6]), | 156 | le32_to_cpu(itd->hw_transaction[6]), |
157 | le32_to_cpu(itd->hw_transaction[7])); | 157 | le32_to_cpu(itd->hw_transaction[7])); |
158 | ehci_dbg (ehci, | 158 | ehci_dbg (ehci, |
159 | " buf: %08x %08x %08x %08x %08x %08x %08x\n", | 159 | " buf: %08x %08x %08x %08x %08x %08x %08x\n", |
160 | le32_to_cpu(itd->hw_bufp[0]), | 160 | le32_to_cpu(itd->hw_bufp[0]), |
161 | le32_to_cpu(itd->hw_bufp[1]), | 161 | le32_to_cpu(itd->hw_bufp[1]), |
162 | le32_to_cpu(itd->hw_bufp[2]), | 162 | le32_to_cpu(itd->hw_bufp[2]), |
@@ -171,12 +171,12 @@ dbg_itd (const char *label, struct ehci_hcd *ehci, struct ehci_itd *itd) | |||
171 | } | 171 | } |
172 | 172 | ||
173 | static void __attribute__((__unused__)) | 173 | static void __attribute__((__unused__)) |
174 | dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd) | 174 | dbg_sitd (const char *label, struct ehci_hcd *ehci, struct ehci_sitd *sitd) |
175 | { | 175 | { |
176 | ehci_dbg (ehci, "%s [%d] sitd %p, next %08x, urb %p\n", | 176 | ehci_dbg (ehci, "%s [%d] sitd %p, next %08x, urb %p\n", |
177 | label, sitd->frame, sitd, le32_to_cpu(sitd->hw_next), sitd->urb); | 177 | label, sitd->frame, sitd, le32_to_cpu(sitd->hw_next), sitd->urb); |
178 | ehci_dbg (ehci, | 178 | ehci_dbg (ehci, |
179 | " addr %08x sched %04x result %08x buf %08x %08x\n", | 179 | " addr %08x sched %04x result %08x buf %08x %08x\n", |
180 | le32_to_cpu(sitd->hw_fullspeed_ep), | 180 | le32_to_cpu(sitd->hw_fullspeed_ep), |
181 | le32_to_cpu(sitd->hw_uframe), | 181 | le32_to_cpu(sitd->hw_uframe), |
182 | le32_to_cpu(sitd->hw_results), | 182 | le32_to_cpu(sitd->hw_results), |
@@ -451,7 +451,7 @@ show_async (struct class_device *class_dev, char *buf) | |||
451 | *buf = 0; | 451 | *buf = 0; |
452 | 452 | ||
453 | bus = class_get_devdata(class_dev); | 453 | bus = class_get_devdata(class_dev); |
454 | hcd = bus->hcpriv; | 454 | hcd = bus_to_hcd(bus); |
455 | ehci = hcd_to_ehci (hcd); | 455 | ehci = hcd_to_ehci (hcd); |
456 | next = buf; | 456 | next = buf; |
457 | size = PAGE_SIZE; | 457 | size = PAGE_SIZE; |
@@ -497,7 +497,7 @@ show_periodic (struct class_device *class_dev, char *buf) | |||
497 | seen_count = 0; | 497 | seen_count = 0; |
498 | 498 | ||
499 | bus = class_get_devdata(class_dev); | 499 | bus = class_get_devdata(class_dev); |
500 | hcd = bus->hcpriv; | 500 | hcd = bus_to_hcd(bus); |
501 | ehci = hcd_to_ehci (hcd); | 501 | ehci = hcd_to_ehci (hcd); |
502 | next = buf; | 502 | next = buf; |
503 | size = PAGE_SIZE; | 503 | size = PAGE_SIZE; |
@@ -634,7 +634,7 @@ show_registers (struct class_device *class_dev, char *buf) | |||
634 | static char label [] = ""; | 634 | static char label [] = ""; |
635 | 635 | ||
636 | bus = class_get_devdata(class_dev); | 636 | bus = class_get_devdata(class_dev); |
637 | hcd = bus->hcpriv; | 637 | hcd = bus_to_hcd(bus); |
638 | ehci = hcd_to_ehci (hcd); | 638 | ehci = hcd_to_ehci (hcd); |
639 | next = buf; | 639 | next = buf; |
640 | size = PAGE_SIZE; | 640 | size = PAGE_SIZE; |
@@ -754,9 +754,7 @@ show_registers (struct class_device *class_dev, char *buf) | |||
754 | } | 754 | } |
755 | 755 | ||
756 | if (ehci->reclaim) { | 756 | if (ehci->reclaim) { |
757 | temp = scnprintf (next, size, "reclaim qh %p%s\n", | 757 | temp = scnprintf (next, size, "reclaim qh %p\n", ehci->reclaim); |
758 | ehci->reclaim, | ||
759 | ehci->reclaim_ready ? " ready" : ""); | ||
760 | size -= temp; | 758 | size -= temp; |
761 | next += temp; | 759 | next += temp; |
762 | } | 760 | } |
@@ -785,10 +783,11 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); | |||
785 | static inline void create_debug_files (struct ehci_hcd *ehci) | 783 | static inline void create_debug_files (struct ehci_hcd *ehci) |
786 | { | 784 | { |
787 | struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev; | 785 | struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev; |
786 | int retval; | ||
788 | 787 | ||
789 | class_device_create_file(cldev, &class_device_attr_async); | 788 | retval = class_device_create_file(cldev, &class_device_attr_async); |
790 | class_device_create_file(cldev, &class_device_attr_periodic); | 789 | retval = class_device_create_file(cldev, &class_device_attr_periodic); |
791 | class_device_create_file(cldev, &class_device_attr_registers); | 790 | retval = class_device_create_file(cldev, &class_device_attr_registers); |
792 | } | 791 | } |
793 | 792 | ||
794 | static inline void remove_debug_files (struct ehci_hcd *ehci) | 793 | static inline void remove_debug_files (struct ehci_hcd *ehci) |