From: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] usbfront: fix compile error and disable PM feature
Date: Thu, 08 Oct 2009 15:59:31 +0900 [thread overview]
Message-ID: <4ACD8DD3.1030909@jp.fujitsu.com> (raw)
[-- 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
next reply other threads:[~2009-10-08 6:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 6:59 Noboru Iwamatsu [this message]
2009-10-08 7:30 ` [PATCH] usbfront: fix compile error and disable PM feature Noboru Iwamatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ACD8DD3.1030909@jp.fujitsu.com \
--to=n_iwamatsu@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.