diff options
Diffstat (limited to 'drivers/usb/early/ehci-dbgp.c')
-rw-r--r-- | drivers/usb/early/ehci-dbgp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c index 89dcf155d57e..e426ad626d74 100644 --- a/drivers/usb/early/ehci-dbgp.c +++ b/drivers/usb/early/ehci-dbgp.c | |||
@@ -491,7 +491,7 @@ static int ehci_wait_for_port(int port); | |||
491 | * Return -ENODEV for any general failure | 491 | * Return -ENODEV for any general failure |
492 | * Return -EIO if wait for port fails | 492 | * Return -EIO if wait for port fails |
493 | */ | 493 | */ |
494 | int dbgp_external_startup(void) | 494 | static int _dbgp_external_startup(void) |
495 | { | 495 | { |
496 | int devnum; | 496 | int devnum; |
497 | struct usb_debug_descriptor dbgp_desc; | 497 | struct usb_debug_descriptor dbgp_desc; |
@@ -613,6 +613,11 @@ err: | |||
613 | goto try_again; | 613 | goto try_again; |
614 | return -ENODEV; | 614 | return -ENODEV; |
615 | } | 615 | } |
616 | |||
617 | int dbgp_external_startup(struct usb_hcd *hcd) | ||
618 | { | ||
619 | return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup(); | ||
620 | } | ||
616 | EXPORT_SYMBOL_GPL(dbgp_external_startup); | 621 | EXPORT_SYMBOL_GPL(dbgp_external_startup); |
617 | 622 | ||
618 | static int ehci_reset_port(int port) | 623 | static int ehci_reset_port(int port) |
@@ -804,7 +809,7 @@ try_next_port: | |||
804 | dbgp_ehci_status("ehci skip - already configured"); | 809 | dbgp_ehci_status("ehci skip - already configured"); |
805 | } | 810 | } |
806 | 811 | ||
807 | ret = dbgp_external_startup(); | 812 | ret = _dbgp_external_startup(); |
808 | if (ret == -EIO) | 813 | if (ret == -EIO) |
809 | goto next_debug_port; | 814 | goto next_debug_port; |
810 | 815 | ||
@@ -934,7 +939,7 @@ static void early_dbgp_write(struct console *con, const char *str, u32 n) | |||
934 | ctrl = readl(&ehci_debug->control); | 939 | ctrl = readl(&ehci_debug->control); |
935 | if (!(ctrl & DBGP_ENABLED)) { | 940 | if (!(ctrl & DBGP_ENABLED)) { |
936 | dbgp_not_safe = 1; | 941 | dbgp_not_safe = 1; |
937 | dbgp_external_startup(); | 942 | _dbgp_external_startup(); |
938 | } else { | 943 | } else { |
939 | cmd |= CMD_RUN; | 944 | cmd |= CMD_RUN; |
940 | writel(cmd, &ehci_regs->command); | 945 | writel(cmd, &ehci_regs->command); |
@@ -974,10 +979,14 @@ struct console early_dbgp_console = { | |||
974 | .index = -1, | 979 | .index = -1, |
975 | }; | 980 | }; |
976 | 981 | ||
977 | int dbgp_reset_prep(void) | 982 | int dbgp_reset_prep(struct usb_hcd *hcd) |
978 | { | 983 | { |
984 | int ret = xen_dbgp_reset_prep(hcd); | ||
979 | u32 ctrl; | 985 | u32 ctrl; |
980 | 986 | ||
987 | if (ret) | ||
988 | return ret; | ||
989 | |||
981 | dbgp_not_safe = 1; | 990 | dbgp_not_safe = 1; |
982 | if (!ehci_debug) | 991 | if (!ehci_debug) |
983 | return 0; | 992 | return 0; |