[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] usbfront: fix compile error and disable PM feature



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1254988416 -3600
# Node ID 18a673a634b2b415336029d1dfba0097c22c28b7
# Parent  498ac445a2a9bb3e8e01f1bca46fc22e49ad23cb
usbfront: fix compile error and disable PM feature

Fix the compilation error of usbfront, and disable bus suspend/resume
by default.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@xxxxxxxxxxxxxx>
---
 drivers/xen/Kconfig                 |    7 +++++++
 drivers/xen/usbfront/Makefile       |    4 ++++
 drivers/xen/usbfront/usbfront-hcd.c |    4 ++++
 drivers/xen/usbfront/usbfront-hub.c |   10 ++++++----
 4 files changed, 21 insertions(+), 4 deletions(-)

diff -r 498ac445a2a9 -r 18a673a634b2 drivers/xen/Kconfig
--- a/drivers/xen/Kconfig       Wed Oct 07 08:42:00 2009 +0100
+++ b/drivers/xen/Kconfig       Thu Oct 08 08:53:36 2009 +0100
@@ -248,6 +248,13 @@ config XEN_USB_FRONTEND_HCD_STATS
        help
          Count the transferred urb status and the RING_FULL occurrence.
 
+config XEN_USB_FRONTEND_HCD_PM
+       bool "HCD suspend/resume support (DO NOT USE)"
+       depends on XEN_USB_FRONTEND
+       default n
+       help
+         Experimental bus suspend/resume feature support.
+
 config XEN_GRANT_DEV
        tristate "User-space granted page access driver"
        default XEN_PRIVILEGED_GUEST
diff -r 498ac445a2a9 -r 18a673a634b2 drivers/xen/usbfront/Makefile
--- a/drivers/xen/usbfront/Makefile     Wed Oct 07 08:42:00 2009 +0100
+++ b/drivers/xen/usbfront/Makefile     Thu Oct 08 08:53:36 2009 +0100
@@ -5,3 +5,7 @@ ifeq ($(CONFIG_XEN_USB_FRONTEND_HCD_STAT
 ifeq ($(CONFIG_XEN_USB_FRONTEND_HCD_STATS),y)
 EXTRA_CFLAGS += -DXENHCD_STATS
 endif
+
+ifeq ($(CONFIG_XEN_USB_FRONTEND_HCD_PM),y)
+EXTRA_CFLAGS += -DXENHCD_PM
+endif
diff -r 498ac445a2a9 -r 18a673a634b2 drivers/xen/usbfront/usbfront-hcd.c
--- a/drivers/xen/usbfront/usbfront-hcd.c       Wed Oct 07 08:42:00 2009 +0100
+++ b/drivers/xen/usbfront/usbfront-hcd.c       Thu Oct 08 08:53:36 2009 +0100
@@ -195,9 +195,11 @@ struct hc_driver xen_usb20_hc_driver = {
        /* root hub operations */
        .hub_status_data = xenhcd_hub_status_data,
        .hub_control = xenhcd_hub_control,
+#ifdef XENHCD_PM
 #ifdef CONFIG_PM
        .bus_suspend = xenhcd_bus_suspend,
        .bus_resume = xenhcd_bus_resume,
+#endif
 #endif
 };
 
@@ -220,8 +222,10 @@ struct hc_driver xen_usb11_hc_driver = {
        /* root hub operations */
        .hub_status_data = xenhcd_hub_status_data,
        .hub_control = xenhcd_hub_control,
+#ifdef XENHCD_PM
 #ifdef CONFIG_PM
        .bus_suspend = xenhcd_bus_suspend,
        .bus_resume = xenhcd_bus_resume,
 #endif
+#endif
 };
diff -r 498ac445a2a9 -r 18a673a634b2 drivers/xen/usbfront/usbfront-hub.c
--- a/drivers/xen/usbfront/usbfront-hub.c       Wed Oct 07 08:42:00 2009 +0100
+++ b/drivers/xen/usbfront/usbfront-hub.c       Thu Oct 08 08:53:36 2009 +0100
@@ -207,6 +207,7 @@ void rhport_reset(struct usbfront_info *
        info->ports[port].timeout = jiffies + msecs_to_jiffies(10);
 }
 
+#ifdef XENHCD_PM
 #ifdef CONFIG_PM
 static int xenhcd_bus_suspend(struct usb_hcd *hcd)
 {
@@ -217,9 +218,9 @@ static int xenhcd_bus_suspend(struct usb
        ports = info->rh_numports;
 
        spin_lock_irq(&info->lock);
-       if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &info->flags))
+       if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
                ret = -ESHUTDOWN;
-       else if (!info->dead) {
+       else {
                /* suspend any active ports*/
                for (i = 1; i <= ports; i++)
                        rhport_suspend(info, i);
@@ -240,9 +241,9 @@ static int xenhcd_bus_resume(struct usb_
        ports = info->rh_numports;
 
        spin_lock_irq(&info->lock);
-       if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &info->flags))
+       if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
                ret = -ESHUTDOWN;
-       else if (!info->dead) {
+       else {
                /* resume any suspended ports*/
                for (i = 1; i <= ports; i++)
                        rhport_resume(info, i);
@@ -251,6 +252,7 @@ static int xenhcd_bus_resume(struct usb_
 
        return ret;
 }
+#endif
 #endif
 
 static void xenhcd_hub_descriptor(struct usbfront_info *info,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.