* [PATCH] usbfront: fix compile error and disable PM feature
@ 2009-10-08 6:59 Noboru Iwamatsu
2009-10-08 7:30 ` Noboru Iwamatsu
0 siblings, 1 reply; 2+ messages in thread
From: Noboru Iwamatsu @ 2009-10-08 6:59 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 167 bytes --]
Hi,
Attached patch fixes the compilation error of the update of
usbfront that I've posted.
And, bus suspend/resume feature is disabled by default.
Regards,
Noboru
[-- Attachment #2: usbfront-v2-fix.patch --]
[-- Type: text/x-patch, Size: 2961 bytes --]
diff -r ccfd8d171c1b -r ba13757d92ce drivers/xen/Kconfig
--- a/drivers/xen/Kconfig Thu Oct 08 14:16:43 2009 +0900
+++ b/drivers/xen/Kconfig Thu Oct 08 15:37:22 2009 +0900
@@ -248,6 +248,13 @@
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 ccfd8d171c1b -r ba13757d92ce drivers/xen/usbfront/Makefile
--- a/drivers/xen/usbfront/Makefile Thu Oct 08 14:16:43 2009 +0900
+++ b/drivers/xen/usbfront/Makefile Thu Oct 08 15:37:22 2009 +0900
@@ -5,3 +5,7 @@
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 ccfd8d171c1b -r ba13757d92ce drivers/xen/usbfront/usbfront-hcd.c
--- a/drivers/xen/usbfront/usbfront-hcd.c Thu Oct 08 14:16:43 2009 +0900
+++ b/drivers/xen/usbfront/usbfront-hcd.c Thu Oct 08 15:37:22 2009 +0900
@@ -195,10 +195,12 @@
/* 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
};
struct hc_driver xen_usb11_hc_driver = {
@@ -220,8 +222,10 @@
/* 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 ccfd8d171c1b -r ba13757d92ce drivers/xen/usbfront/usbfront-hub.c
--- a/drivers/xen/usbfront/usbfront-hub.c Thu Oct 08 14:16:43 2009 +0900
+++ b/drivers/xen/usbfront/usbfront-hub.c Thu Oct 08 15:37:22 2009 +0900
@@ -207,6 +207,7 @@
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 @@
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 @@
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);
@@ -252,6 +253,7 @@
return ret;
}
#endif
+#endif
static void xenhcd_hub_descriptor(struct usbfront_info *info,
struct usb_hub_descriptor *desc)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usbfront: fix compile error and disable PM feature
2009-10-08 6:59 [PATCH] usbfront: fix compile error and disable PM feature Noboru Iwamatsu
@ 2009-10-08 7:30 ` Noboru Iwamatsu
0 siblings, 0 replies; 2+ messages in thread
From: Noboru Iwamatsu @ 2009-10-08 7:30 UTC (permalink / raw)
To: xen-devel
Ah, I missed.
for the previous patch:
Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-08 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 6:59 [PATCH] usbfront: fix compile error and disable PM feature Noboru Iwamatsu
2009-10-08 7:30 ` Noboru Iwamatsu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.