summaryrefslogtreecommitdiff
path: root/src/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/ehci_debug.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c
index c60fbaaaad..5a62999dc3 100644
--- a/src/drivers/usb/ehci_debug.c
+++ b/src/drivers/usb/ehci_debug.c
@@ -96,10 +96,14 @@ static int dbgp_enabled(void);
#define DBGP_MAX_PACKET 8
static struct ehci_debug_info glob_dbg_info CAR_GLOBAL;
+static struct ehci_debug_info * glob_dbg_info_p CAR_GLOBAL;
static inline struct ehci_debug_info *dbgp_ehci_info(void)
{
- return car_get_var_ptr(&glob_dbg_info);
+ if (car_get_var(glob_dbg_info_p) == NULL)
+ car_set_var(glob_dbg_info_p, &glob_dbg_info);
+
+ return car_get_var(glob_dbg_info_p);
}
static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug)
@@ -905,6 +909,7 @@ static void migrate_ehci_debug(void)
return;
memcpy(dbg_info_cbmem, dbg_info, sizeof(*dbg_info));
+ car_set_var(glob_dbg_info_p, dbg_info_cbmem);
}
CAR_MIGRATE(migrate_ehci_debug);
#endif