This is a note to let you know that I've just added the patch titled Subject: [PATCH 3/6] usbcore: remove usb_suspend_root_hub
to my gregkh-2.6 tree. Its filename is usbcore-remove-usb_suspend_root_hub.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ >From [EMAIL PROTECTED] Wed Aug 30 12:47:21 2006 Date: Wed, 30 Aug 2006 15:47:11 -0400 (EDT) From: Alan Stern <[EMAIL PROTECTED]> To: Greg KH <[EMAIL PROTECTED]> cc: USB development list <linux-usb-devel@lists.sourceforge.net> Subject: [PATCH 3/6] usbcore: remove usb_suspend_root_hub Message-ID: <[EMAIL PROTECTED]> This patch (as740) removes the existing support for autosuspend of root hubs. That support fit in rather awkwardly with the rest of usbcore and it was used only by ohci-hcd. It won't be needed any more since the hub driver will take care of autosuspending all hubs, root or external. Signed-off-by: Alan Stern <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/usb/core/hcd.c | 44 -------------------------------------------- drivers/usb/core/hcd.h | 6 ------ drivers/usb/core/hub.c | 18 +----------------- drivers/usb/core/usb.h | 1 - drivers/usb/host/ohci-hub.c | 3 --- 5 files changed, 1 insertion(+), 71 deletions(-) --- gregkh-2.6.orig/drivers/usb/core/hcd.c +++ gregkh-2.6/drivers/usb/core/hcd.c @@ -1431,50 +1431,6 @@ int hcd_bus_resume (struct usb_bus *bus) return status; } -/* - * usb_hcd_suspend_root_hub - HCD autosuspends downstream ports - * @hcd: host controller for this root hub - * - * This call arranges that usb_hcd_resume_root_hub() is safe to call later; - * that the HCD's root hub polling is deactivated; and that the root's hub - * driver is suspended. HCDs may call this to autosuspend when their root - * hub's downstream ports are all inactive: unpowered, disconnected, - * disabled, or suspended. - * - * The HCD will autoresume on device connect change detection (using SRP - * or a D+/D- pullup). The HCD also autoresumes on remote wakeup signaling - * from any ports that are suspended (if that is enabled). In most cases, - * overcurrent signaling (on powered ports) will also start autoresume. - * - * Always called with IRQs blocked. - */ -void usb_hcd_suspend_root_hub (struct usb_hcd *hcd) -{ - struct urb *urb; - - spin_lock (&hcd_root_hub_lock); - usb_suspend_root_hub (hcd->self.root_hub); - - /* force status urb to complete/unlink while suspended */ - if (hcd->status_urb) { - urb = hcd->status_urb; - urb->status = -ECONNRESET; - urb->hcpriv = NULL; - urb->actual_length = 0; - - del_timer (&hcd->rh_timer); - hcd->poll_pending = 0; - hcd->status_urb = NULL; - } else - urb = NULL; - spin_unlock (&hcd_root_hub_lock); - hcd->state = HC_STATE_SUSPENDED; - - if (urb) - usb_hcd_giveback_urb (hcd, urb, NULL); -} -EXPORT_SYMBOL_GPL(usb_hcd_suspend_root_hub); - /** * usb_hcd_resume_root_hub - called by HCD to resume its root hub * @hcd: host controller for this root hub --- gregkh-2.6.orig/drivers/usb/core/hcd.h +++ gregkh-2.6/drivers/usb/core/hcd.h @@ -368,17 +368,11 @@ extern int usb_find_interface_driver (st #define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) #ifdef CONFIG_PM -extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd); extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd); extern void usb_root_hub_lost_power (struct usb_device *rhdev); extern int hcd_bus_suspend (struct usb_bus *bus); extern int hcd_bus_resume (struct usb_bus *bus); #else -static inline void usb_hcd_suspend_root_hub(struct usb_hcd *hcd) -{ - return; -} - static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) { return; --- gregkh-2.6.orig/drivers/usb/core/hub.c +++ gregkh-2.6/drivers/usb/core/hub.c @@ -462,18 +462,14 @@ static void hub_power_on(struct usb_hub msleep(max(pgood_delay, (unsigned) 100)); } -static inline void __hub_quiesce(struct usb_hub *hub) +static void hub_quiesce(struct usb_hub *hub) { /* (nonblocking) khubd and related activity won't re-trigger */ hub->quiescing = 1; hub->activating = 0; hub->resume_root_hub = 0; -} -static void hub_quiesce(struct usb_hub *hub) -{ /* (blocking) stop khubd and related activity */ - __hub_quiesce(hub); usb_kill_urb(hub->urb); if (hub->has_indicators) cancel_delayed_work(&hub->leds); @@ -1949,18 +1945,6 @@ static inline int remote_wakeup(struct u #define hub_resume NULL #endif -void usb_suspend_root_hub(struct usb_device *hdev) -{ - struct usb_hub *hub = hdev_to_hub(hdev); - - /* This also makes any led blinker stop retriggering. We're called - * from irq, so the blinker might still be scheduled. Caller promises - * that the root hub status URB will be canceled. - */ - __hub_quiesce(hub); - mark_quiesced(to_usb_interface(hub->intfdev)); -} - void usb_resume_root_hub(struct usb_device *hdev) { struct usb_hub *hub = hdev_to_hub(hdev); --- gregkh-2.6.orig/drivers/usb/core/usb.h +++ gregkh-2.6/drivers/usb/core/usb.h @@ -20,7 +20,6 @@ extern char *usb_cache_string(struct usb extern int usb_set_configuration(struct usb_device *dev, int configuration); extern void usb_kick_khubd(struct usb_device *dev); -extern void usb_suspend_root_hub(struct usb_device *hdev); extern void usb_resume_root_hub(struct usb_device *dev); extern int usb_hub_init(void); --- gregkh-2.6.orig/drivers/usb/host/ohci-hub.c +++ gregkh-2.6/drivers/usb/host/ohci-hub.c @@ -135,9 +135,6 @@ static int ohci_bus_suspend (struct usb_ hcd->poll_rh = 0; done: - /* external suspend vs self autosuspend ... same effect */ - if (status == 0) - usb_hcd_suspend_root_hub(hcd); spin_unlock_irqrestore (&ohci->lock, flags); return status; } Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are usb/usbcore-add-usb_device_driver-definition.patch usb/usbcore-track-whether-interfaces-are-suspended.patch usb/usbcore-add-configuration_string-to-attribute-group.patch usb/usbcore-rename-usb_suspend_device-to-usb_port_suspend.patch usb/usbcore-move-code-among-source-files.patch usb/usb-pl2303-remove-80-columns-limit-violations-in-pl2303-driver.patch usb/usb-usbtouchscreen-version-0.4.patch usb/usbcore-khubd-and-busy-port-handling.patch usb/usbcore-make-hcd_endpoint_disable-wait-for-queue-to-drain.patch usb/usb-skeleton-don-t-submit-urbs-after-disconnection.patch usb/usbcore-fix-up-device-and-power-state-tests.patch usb/usbcore-make-usb_generic-a-usb_device_driver.patch usb/usbcore-resume-device-resume-recursion.patch usb/usbcore-set-device-and-power-states-properly.patch usb/usbcore-split-suspend-resume-for-device-and-interfaces.patch usb/usbcore-suspending-devices-with-no-driver.patch usb/usbfs-detect-device-unregistration.patch usb/usbfs-private-mutex-for-open-release-and-remove.patch usb/hub-driver-improve-use-of-ifdef.patch usb/usb-properly-unregister-reboot-notifier-in-case-of-failure-in-ehci-hcd.patch usb/wusb-hub-recognizes-wusb-ports.patch usb/uhci-increase-resume-detect-off-delay.patch usb/wusb-handle-wusb-device-ep0-speed-settings.patch usb/wusb-pretty-print-new-devices.patch usb/usb-deal-with-broken-config-descriptors.patch usb/usb-hub-driver-perform-autosuspend.patch usb/usb-storage-fix-for-ufi-lun-detection.patch usb/usb-remove-struct-usb_operations.patch usb/usb-usb-hub-driver-improve-use-of-ifdef-fix.patch usb/usbcore-help-drivers-to-change-device-configs.patch usb/usb-replace-kernel_thread-with-kthread_run-in-libusual.c.patch usb/usbcore-add-autosuspend-autoresume-infrastructure.patch usb/usbcore-add-flag-for-whether-a-host-controller-uses-dma.patch usb/usbcore-non-hub-specific-uses-of-autosuspend.patch usb/usbcore-remove-usb_suspend_root_hub.patch usb/usbcore-store-each-usb_device-s-level-in-the-tree.patch usb/usbcore-trim-down-usb_bus-structure.patch usb/usbmon-don-t-call-mon_dmapeek-if-dma-isn-t-being-used.patch usb/ehci-hcd-fix-root-hub-wakeup-support.patch ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel