aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fusbh200.h
diff options
context:
space:
mode:
authorChris Rorvick <chris@rorvick.com>2014-11-04 20:18:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-07 12:02:37 -0500
commit895baf2404ebc2f875fad39d2d81f98a38a8f9cc (patch)
tree200509a35abdbe5da9a9e5c217e99b27135bfc7e /drivers/usb/host/fusbh200.h
parentb9ec1c9da64f0c1d130beb125a916d0725363ec9 (diff)
fusbh200: Make Xen notificaiton consistent with EHCI
If CONFIG_XEN_DOM0 is enabled, the ehci-dbgp driver notifies Xen of controller reset events via xen_dbgp_reset_prep() and xen_dbgp_external_startup() (via calls to xen_dbgp_op().) Otherwise <linux/usb/ehci_def.h> defines them as no-ops to disable this logic. The fusbh200 driver copies much of the dbgp code from ehci_def.h, but it unconditionally defines the Xen hooks as no-ops, effectively disabling these notifications when CONFIG_EARLY_PRINTK_DBGP is disabled. When enabled, though, notifying Xen is dependent on CONFIG_XEN_DOM0 due to fusbh200 leveraging the ehci-dbgp driver. The following table compares the implementations of xen_dbgp_reset_prep() and xen_dbgp_external_startup() in the ehci-dbgp and fusbh200 drivers under the relevant configurations: EARLY_PRINTK_DBGP? XEN_DOM0? ehci-dbgp fusbh200 ------------------ --------- ------------- ------------- n n no-op no-op n y xen_dbgp_op() no-op y n no-op no-op y y xen_dbgp_op() xen_dbgp_op() This suggests that fusbh200 is, at best, indifferent to whether Xen is notified of these events. Make fusbh200 consistent with ehci-dbgp as a step towards consolidating this code duplication. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fusbh200.h')
-rw-r--r--drivers/usb/host/fusbh200.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/fusbh200.h b/drivers/usb/host/fusbh200.h
index 6b719e066c3f..6e7b8c1cb877 100644
--- a/drivers/usb/host/fusbh200.h
+++ b/drivers/usb/host/fusbh200.h
@@ -318,6 +318,10 @@ extern struct console early_dbgp_console;
318 318
319struct usb_hcd; 319struct usb_hcd;
320 320
321#ifdef CONFIG_XEN_DOM0
322extern int xen_dbgp_reset_prep(struct usb_hcd *);
323extern int xen_dbgp_external_startup(struct usb_hcd *);
324#else
321static inline int xen_dbgp_reset_prep(struct usb_hcd *hcd) 325static inline int xen_dbgp_reset_prep(struct usb_hcd *hcd)
322{ 326{
323 return 1; /* Shouldn't this be 0? */ 327 return 1; /* Shouldn't this be 0? */
@@ -327,6 +331,7 @@ static inline int xen_dbgp_external_startup(struct usb_hcd *hcd)
327{ 331{
328 return -1; 332 return -1;
329} 333}
334#endif
330 335
331#ifdef CONFIG_EARLY_PRINTK_DBGP 336#ifdef CONFIG_EARLY_PRINTK_DBGP
332/* Call backs from fusbh200 host driver to fusbh200 debug driver */ 337/* Call backs from fusbh200 host driver to fusbh200 debug driver */