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
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
/* 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 = {
/* 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
};
info->ports[port].timeout = jiffies + msecs_to_jiffies(10);
}
+#ifdef XENHCD_PM
#ifdef CONFIG_PM
static int xenhcd_bus_suspend(struct usb_hcd *hcd)
{
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);
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);
return ret;
}
#endif
+#endif
static void xenhcd_hub_descriptor(struct usbfront_info *info,
struct usb_hub_descriptor *desc)