diff options
| author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-27 22:03:52 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 22:03:52 -0400 |
| commit | 716b43303df605510399d6da0d0dd4e2ea376e7c (patch) | |
| tree | 57412aaf516b7a10b4b81064aeda318514fec168 /drivers/usb/host/uhci-debug.c | |
| parent | 5696c1944a33b4434a9a1ebb6383b906afd43a10 (diff) | |
| parent | c7b645f934e52a54af58142d91fb51f881f8ce26 (diff) | |
Merge upstream ieee80211.h with us (us == branch 'ieee80211' of netdev-2.6)
Diffstat (limited to 'drivers/usb/host/uhci-debug.c')
| -rw-r--r-- | drivers/usb/host/uhci-debug.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 24c73c5a3435..4538a98b6f9d 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c | |||
| @@ -237,6 +237,37 @@ static int uhci_show_sc(int port, unsigned short status, char *buf, int len) | |||
| 237 | return out - buf; | 237 | return out - buf; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | static int uhci_show_root_hub_state(struct uhci_hcd *uhci, char *buf, int len) | ||
| 241 | { | ||
| 242 | char *out = buf; | ||
| 243 | char *rh_state; | ||
| 244 | |||
| 245 | /* Try to make sure there's enough memory */ | ||
| 246 | if (len < 60) | ||
| 247 | return 0; | ||
| 248 | |||
| 249 | switch (uhci->rh_state) { | ||
| 250 | case UHCI_RH_RESET: | ||
| 251 | rh_state = "reset"; break; | ||
| 252 | case UHCI_RH_SUSPENDED: | ||
| 253 | rh_state = "suspended"; break; | ||
| 254 | case UHCI_RH_AUTO_STOPPED: | ||
| 255 | rh_state = "auto-stopped"; break; | ||
| 256 | case UHCI_RH_RESUMING: | ||
| 257 | rh_state = "resuming"; break; | ||
| 258 | case UHCI_RH_SUSPENDING: | ||
| 259 | rh_state = "suspending"; break; | ||
| 260 | case UHCI_RH_RUNNING: | ||
| 261 | rh_state = "running"; break; | ||
| 262 | case UHCI_RH_RUNNING_NODEVS: | ||
| 263 | rh_state = "running, no devs"; break; | ||
| 264 | default: | ||
| 265 | rh_state = "?"; break; | ||
| 266 | } | ||
| 267 | out += sprintf(out, "Root-hub state: %s\n", rh_state); | ||
| 268 | return out - buf; | ||
| 269 | } | ||
| 270 | |||
| 240 | static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) | 271 | static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) |
| 241 | { | 272 | { |
| 242 | char *out = buf; | 273 | char *out = buf; |
| @@ -408,6 +439,7 @@ static int uhci_sprint_schedule(struct uhci_hcd *uhci, char *buf, int len) | |||
| 408 | 439 | ||
| 409 | spin_lock_irqsave(&uhci->lock, flags); | 440 | spin_lock_irqsave(&uhci->lock, flags); |
| 410 | 441 | ||
| 442 | out += uhci_show_root_hub_state(uhci, out, len - (out - buf)); | ||
| 411 | out += sprintf(out, "HC status\n"); | 443 | out += sprintf(out, "HC status\n"); |
| 412 | out += uhci_show_status(uhci, out, len - (out - buf)); | 444 | out += uhci_show_status(uhci, out, len - (out - buf)); |
| 413 | 445 | ||
