diff options
Diffstat (limited to 'drivers/usb/host/ohci-dbg.c')
-rw-r--r-- | drivers/usb/host/ohci-dbg.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index d7d34492934a..5179fcd73d8a 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c | |||
@@ -127,6 +127,19 @@ static char *hcfs2string (int state) | |||
127 | return "?"; | 127 | return "?"; |
128 | } | 128 | } |
129 | 129 | ||
130 | static const char *rh_state_string(struct ohci_hcd *ohci) | ||
131 | { | ||
132 | switch (ohci->rh_state) { | ||
133 | case OHCI_RH_HALTED: | ||
134 | return "halted"; | ||
135 | case OHCI_RH_SUSPENDED: | ||
136 | return "suspended"; | ||
137 | case OHCI_RH_RUNNING: | ||
138 | return "running"; | ||
139 | } | ||
140 | return "?"; | ||
141 | } | ||
142 | |||
130 | // dump control and status registers | 143 | // dump control and status registers |
131 | static void | 144 | static void |
132 | ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size) | 145 | ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size) |
@@ -136,9 +149,10 @@ ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size) | |||
136 | 149 | ||
137 | temp = ohci_readl (controller, ®s->revision) & 0xff; | 150 | temp = ohci_readl (controller, ®s->revision) & 0xff; |
138 | ohci_dbg_sw (controller, next, size, | 151 | ohci_dbg_sw (controller, next, size, |
139 | "OHCI %d.%d, %s legacy support registers\n", | 152 | "OHCI %d.%d, %s legacy support registers, rh state %s\n", |
140 | 0x03 & (temp >> 4), (temp & 0x0f), | 153 | 0x03 & (temp >> 4), (temp & 0x0f), |
141 | (temp & 0x0100) ? "with" : "NO"); | 154 | (temp & 0x0100) ? "with" : "NO", |
155 | rh_state_string(controller)); | ||
142 | 156 | ||
143 | temp = ohci_readl (controller, ®s->control); | 157 | temp = ohci_readl (controller, ®s->control); |
144 | ohci_dbg_sw (controller, next, size, | 158 | ohci_dbg_sw (controller, next, size, |