The patch titled revert gregkh-usb-usb-ohci-avoids-root-hub-timer-polling has been added to the -mm tree. Its filename is revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: revert gregkh-usb-usb-ohci-avoids-root-hub-timer-polling From: Andrew Morton <akpm@xxxxxxxx> It makes Rafael's machine lock up on resume. Cc: "Rafael J. Wysocki" <rjw@xxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/usb/host/ohci-at91.c | 2 - drivers/usb/host/ohci-au1xxx.c | 1 drivers/usb/host/ohci-hcd.c | 23 +++++---------- drivers/usb/host/ohci-hub.c | 45 +++++++++--------------------- drivers/usb/host/ohci-lh7a404.c | 1 drivers/usb/host/ohci-omap.c | 1 drivers/usb/host/ohci-pci.c | 1 drivers/usb/host/ohci-ppc-soc.c | 1 drivers/usb/host/ohci-pxa27x.c | 1 drivers/usb/host/ohci-s3c2410.c | 1 drivers/usb/host/ohci-sa1111.c | 1 drivers/usb/host/ohci.h | 2 - 12 files changed, 24 insertions(+), 56 deletions(-) diff -puN drivers/usb/host/ohci-at91.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-at91.c --- devel/drivers/usb/host/ohci-at91.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-at91.c 2006-05-21 05:30:58.000000000 -0700 @@ -230,7 +230,7 @@ static const struct hc_driver ohci_at91_ */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, + #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-au1xxx.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-au1xxx.c --- devel/drivers/usb/host/ohci-au1xxx.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-au1xxx.c 2006-05-21 05:30:58.000000000 -0700 @@ -289,7 +289,6 @@ static const struct hc_driver ohci_au1xx */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci.h~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci.h --- devel/drivers/usb/host/ohci.h~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci.h 2006-05-21 05:30:58.000000000 -0700 @@ -385,7 +385,7 @@ struct ohci_hcd { */ int num_ports; int load [NUM_INTS]; - u32 hc_control; /* copy of hc control reg */ + u32 hc_control; /* copy of hc control reg */ unsigned long next_statechange; /* suspend/resume */ u32 fminterval; /* saved register */ diff -puN drivers/usb/host/ohci-hcd.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-hcd.c --- devel/drivers/usb/host/ohci-hcd.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-hcd.c 2006-05-21 05:30:58.000000000 -0700 @@ -102,7 +102,7 @@ #include "../core/hcd.h" -#define DRIVER_VERSION "2006 May 12" +#define DRIVER_VERSION "2005 April 22" #define DRIVER_AUTHOR "Roman Weissgaerber, David Brownell" #define DRIVER_DESC "USB 1.1 'Open' Host Controller (OHCI) Driver" @@ -111,7 +111,7 @@ #undef OHCI_VERBOSE_DEBUG /* not always helpful */ /* For initializing controller (mask in an HCFS mode too) */ -#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR +#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR #define OHCI_INTR_INIT \ (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | OHCI_INTR_WDH) @@ -447,7 +447,7 @@ static int ohci_init (struct ohci_hcd *o disable (ohci); ohci->regs = hcd->regs; - ohci->next_statechange = jiffies + msecs_to_jiffies (250); + ohci->next_statechange = jiffies; /* REVISIT this BIOS handshake is now moved into PCI "quirks", and * was never needed for most non-PCI systems ... remove the code? @@ -637,12 +637,11 @@ retry: ohci_readl (ohci, &ohci->regs->periodicstart)); return -EOVERFLOW; } - hcd->uses_new_polling = 1; - /* start controller operations */ + /* start controller operations */ ohci->hc_control &= OHCI_CTRL_RWC; - ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; - ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); + ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; + ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); hcd->state = HC_STATE_RUNNING; /* wake on ConnectStatusChange, matching external hubs */ @@ -650,7 +649,7 @@ retry: /* Choose the interrupts we care about now, others later on demand */ mask = OHCI_INTR_INIT; - ohci_writel (ohci, ~0, &ohci->regs->intrstatus); + ohci_writel (ohci, mask, &ohci->regs->intrstatus); ohci_writel (ohci, mask, &ohci->regs->intrenable); /* handle root hub init quirks ... */ @@ -711,13 +710,7 @@ static irqreturn_t ohci_irq (struct usb_ /* interrupt for some other device? */ } else if ((ints &= ohci_readl (ohci, ®s->intrenable)) == 0) { return IRQ_NOTMINE; - } - - if (ints & OHCI_INTR_RHSC) { - ohci_vdbg (ohci, "rhsc\n"); - ohci_writel (ohci, OHCI_INTR_RHSC, ®s->intrstatus); - usb_hcd_poll_rh_status(hcd); - } + } if (ints & OHCI_INTR_UE) { disable (ohci); diff -puN drivers/usb/host/ohci-hub.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-hub.c --- devel/drivers/usb/host/ohci-hub.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-hub.c 2006-05-21 05:30:58.000000000 -0700 @@ -36,14 +36,6 @@ /*-------------------------------------------------------------------------*/ -/* hcd->hub_irq_enable() ? */ -static void ohci_rhsc_enable (struct usb_hcd *hcd) -{ - struct ohci_hcd *ohci = hcd_to_ohci (hcd); - - ohci_writel (ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable); -} - #ifdef CONFIG_PM #define OHCI_SCHED_ENABLES \ @@ -131,9 +123,6 @@ static int ohci_bus_suspend (struct usb_ /* no resumes until devices finish suspending */ ohci->next_statechange = jiffies + msecs_to_jiffies (5); - /* RHSC or RD irq will wakeup; no timer polling */ - hcd->poll_rh = 0; - done: /* external suspend vs self autosuspend ... same effect */ if (status == 0) @@ -360,41 +349,35 @@ ohci_hub_status_data (struct usb_hcd *hc continue; } - - /* can suspend if no ports are enabled; or if all the + /* can suspend if no ports are enabled; or if all all * enabled ports are suspended AND remote wakeup is on. */ if (!(status & RH_PS_CCS)) continue; - if (!(status & RH_PS_PSS)) - can_suspend = 0; + if ((status & RH_PS_PSS) && can_suspend) + continue; + can_suspend = 0; } - done: spin_unlock_irqrestore (&ohci->lock, flags); #ifdef CONFIG_PM - /* save power by suspending idle root hubs and avoiding timer polls; - * INTR_RD or INTR_RHSC wakes us when there's work, and polling is - * used only to defer autosuspend. + /* save power by suspending idle root hubs; + * INTR_RD wakes us when there's work */ if (can_suspend && !changed && !ohci->ed_rm_list && ((OHCI_CTRL_HCFS | OHCI_SCHED_ENABLES) & ohci->hc_control) - == OHCI_USB_OPER) { - /* if we can't yet autosuspend, poll until we can */ - if (time_after (jiffies, ohci->next_statechange) - && usb_trylock_device (hcd->self.root_hub) == 0 - ) { - ohci_vdbg (ohci, "autosuspend\n"); - (void) ohci_bus_suspend (hcd); - usb_unlock_device (hcd->self.root_hub); - } else - hcd->poll_rh = 1; - } else - hcd->poll_rh = 0; + == OHCI_USB_OPER + && time_after (jiffies, ohci->next_statechange) + && usb_trylock_device (hcd->self.root_hub) == 0 + ) { + ohci_vdbg (ohci, "autosuspend\n"); + (void) ohci_bus_suspend (hcd); + usb_unlock_device (hcd->self.root_hub); + } #endif return changed ? length : 0; diff -puN drivers/usb/host/ohci-lh7a404.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-lh7a404.c --- devel/drivers/usb/host/ohci-lh7a404.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-lh7a404.c 2006-05-21 05:30:58.000000000 -0700 @@ -196,7 +196,6 @@ static const struct hc_driver ohci_lh7a4 */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-omap.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-omap.c --- devel/drivers/usb/host/ohci-omap.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-omap.c 2006-05-21 05:30:58.000000000 -0700 @@ -429,7 +429,6 @@ static const struct hc_driver ohci_omap_ */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-pci.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-pci.c --- devel/drivers/usb/host/ohci-pci.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-pci.c 2006-05-21 05:30:58.000000000 -0700 @@ -194,7 +194,6 @@ static const struct hc_driver ohci_pci_h */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-ppc-soc.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-ppc-soc.c --- devel/drivers/usb/host/ohci-ppc-soc.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-ppc-soc.c 2006-05-21 05:30:58.000000000 -0700 @@ -166,7 +166,6 @@ static const struct hc_driver ohci_ppc_s */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-pxa27x.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-pxa27x.c --- devel/drivers/usb/host/ohci-pxa27x.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-pxa27x.c 2006-05-21 05:30:58.000000000 -0700 @@ -285,7 +285,6 @@ static const struct hc_driver ohci_pxa27 */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-s3c2410.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-s3c2410.c --- devel/drivers/usb/host/ohci-s3c2410.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-s3c2410.c 2006-05-21 05:30:58.000000000 -0700 @@ -465,7 +465,6 @@ static const struct hc_driver ohci_s3c24 */ .hub_status_data = ohci_s3c2410_hub_status_data, .hub_control = ohci_s3c2410_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, diff -puN drivers/usb/host/ohci-sa1111.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling drivers/usb/host/ohci-sa1111.c --- devel/drivers/usb/host/ohci-sa1111.c~revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling 2006-05-21 05:30:58.000000000 -0700 +++ devel-akpm/drivers/usb/host/ohci-sa1111.c 2006-05-21 05:30:58.000000000 -0700 @@ -235,7 +235,6 @@ static const struct hc_driver ohci_sa111 */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, - .hub_irq_enable = ohci_rhsc_enable, #ifdef CONFIG_PM .bus_suspend = ohci_bus_suspend, .bus_resume = ohci_bus_resume, _ Patches currently in -mm which might be from akpm@xxxxxxxx are origin.patch forcedeth-fix-multi-irq-issues.patch x86_64-dont-warn-for-overflow-in-nommu-case-when-dma_mask-is-32bit-fix.patch binfmt_flat-dont-check-for-emfile.patch pd6729-section-fix.patch i810-section-fix.patch mpu401-section-fix.patch es18xx-build-fix.patch nm256_audio-section-fix.patch ad1848-section-fix.patch git-acpi.patch acpi-update-asus_acpi-driver-registration-fix.patch catch-notification-of-memory-add-event-of-acpi-via-container-driver-register-start-func-for-memory-device.patch catch-notification-of-memory-add-event-of-acpi-via-container-driveravoid-redundant-call-add_memory.patch acpi-dock-driver-interface-fixups.patch remove-for_each_cpu.patch sony_apci-resume.patch uninorth-agp-warning-fixes.patch alpha-agp-warning-fix.patch git-audit-master-build-fix.patch kauditd_thread-warning-fix.patch audit-build-fix.patch powernow-k8-crash-workaround.patch gregkh-driver-platform_bus-learns-about-modalias-warning-fix.patch gregkh-driver-warn-when-statically-allocated-kobjects-are-used-fix.patch git-dvb.patch scx200_acb-use-pci-i-o-resource-when-appropriate-fix.patch w1-warning-fix.patch git-gfs2.patch git-infiniband.patch via-pmu-add-input-device-tidy.patch git-klibc.patch git-klibc-build-hacks.patch git-klibc-stdint-build-fix.patch git-klibc-stdint-build-fix-2.patch git-hdrcleanup-fixup.patch git-hdrcleanup-vs-git-klibc-on-ia64.patch git-hdrcleanup-vs-git-klibc-on-ia64-2.patch git-hdrinstall-fixup.patch git-libata-all.patch libata-reduce-timeouts.patch sdhci-truncated-pointer-fix.patch git-mtd.patch git-mtd-fixup.patch git-netdev-all.patch smc911x-Kconfig-fix.patch pci-error-recovery-e1000-network-device-driver.patch git-powerpc.patch powerpc-kbuild-warning-fix.patch git-rbtree.patch git-sas.patch gregkh-pci-pci-64-bit-resources-drivers-others-changes-amba-fix.patch kconfigurable-resources-core-changes-i386-fix.patch kconfigurable-resources-core-changes-fix.patch kconfigurable-resources-arch-dependent-changes-arch-a-i-fix.patch typesh-sector_t-and-blkcnt_t-arent-for-userspace.patch kconfigurable-resources-mtd-fixes.patch qla2xxx-lock-ordering-fix-warning-fix.patch areca-raid-linux-scsi-driver-update6-for-2617-rc1-mm3-externs-go-in-headers.patch git-scsi-target-fixup.patch revert-gregkh-usb-usb-ohci-avoids-root-hub-timer-polling.patch gregkh-usb-usb-serial-mos7720-powerpc-wrokaround.patch x86_64-mm-i386-numa-summit-check-fix.patch revert-x86_64-mm-profile-pc-fp.patch xfs-sparc32-build-fix.patch pg_uncached-is-ia64-only.patch pgdat-allocation-for-new-node-add-specify-node-id-powerpc-fix.patch pgdat-allocation-for-new-node-add-specify-node-id-tidy.patch pgdat-allocation-for-new-node-add-specify-node-id-fix-3.patch pgdat-allocation-for-new-node-add-get-node-id-by-acpi-tidy.patch pgdat-allocation-for-new-node-add-generic-alloc-node_data-tidy.patch pgdat-allocation-for-new-node-add-refresh-node_data-fix.patch pgdat-allocation-for-new-node-add-export-kswapd-start-func-tidy.patch catch-valid-mem-range-at-onlining-memory-tidy.patch catch-valid-mem-range-at-onlining-memory-fix.patch mm-introduce-remap_vmalloc_range-fix.patch tracking-dirty-pages-in-shared-mappings-v4-fix2.patch tracking-dirty-pages-in-shared-mappings-v4-fix3.patch throttle-writers-of-shared-mappings-tidy.patch page-migration-simplify-migrate_pages-tweaks.patch acx1xx-wireless-driver.patch tiacx-pci-build-fix.patch x86-kernel-irq-balancer-fix-tidy.patch move-vsyscall-page-out-of-fixmap-into-normal-vma-as-per-mmap-tidy.patch x86-move-vsyscall-page-out-of-fixmap-above-stack-tidy.patch dont-use-flush_tlb_all-in-suspend-time-tidy.patch prune_one_dentry-tweaks.patch mmput-might-sleep.patch jbd-avoid-kfree-null.patch ext3_clear_inode-avoid-kfree-null.patch leds-amstrad-delta-led-support-tidy.patch percpu-counter-data-type-changes-to-suppport-fix.patch connector-exports.patch config_net=n-build-fix.patch jbd-split-checkpoint-lists-tidy.patch mark-address_space_operations-const-fix.patch mark-address_space_operations-const-fix-2.patch allow-for-per-cpu-data-being-in-tdata-and-tbss-sections-fix.patch allow-for-per-cpu-data-being-in-tdata-and-tbss-sections-tidy.patch deprecate-smbfs-in-favour-of-cifs.patch hptiop-highpoint-rocketraid-3xxx-controller-driver-list-locking.patch hptiop-highpoint-rocketraid-3xxx-controller-driver-list-locking-updates.patch hptiop-highpoint-rocketraid-3xxx-controller-driver-list-locking-updates-updates-2.patch ufs-right-block-allocation-fixes.patch ufs-change-block-number-on-the-fly-tweaks.patch sunsu-license-fix.patch msnd-section-fix.patch openpromfs-factorize-out-tidy.patch add-driver-for-arm-amba-pl031-rtc-tidy.patch add-export_unused_symbol-and-export_unused_symbol_gpl-default.patch kernel-sysc-cleanups-fix.patch add-a-sysfs-file-to-determine-if-a-kexec-kernel-is-loaded-tidy.patch cpqarray-section-fix.patch pdflush-handle-resume-wakeups.patch per-task-delay-accounting-proc-export-of-aggregated-block-i-o-delays-warning-fix.patch add-via-hw-rng-driver-fix.patch core-aio-changes-to-support-vectored-aio-fix-2.patch nfs-open-code-the-nfs-direct-write-rescheduler-printk-fix.patch hangcheck-remove-monotomic_clock-on-x86.patch swap-prefetch-fix-lru_cache_add_tail-tidy.patch pi-futex-futex-code-cleanups-fix.patch document-futex-pi-design-fix-fix.patch ecryptfs-vs-streamline-generic_file_-interfaces-and-filemap.patch mark-address_space_operations-const-vs-ecryptfs-mmap-operations.patch ecryptfs-alpha-build-fix.patch namespaces-add-nsproxy-dont-include-compileh.patch namespaces-utsname-switch-to-using-uts-namespaces-alpha-fix.patch namespaces-utsname-implement-utsname-namespaces-export.patch namespaces-utsname-implement-utsname-namespaces-dont-include-compileh.patch reiser4.patch ide_dma_speed-fixes-warning-fix.patch ide_dma_speed-fixes-tidy.patch hpt3xx-rework-rate-filtering-tidy.patch savagefb-add-state-save-and_restore-hooks-tidy.patch kgdb-core-lite-add-reboot-command.patch kgdb-8250-fix.patch nr_blockdev_pages-in_interrupt-warning.patch device-suspend-debug.patch revert-tty-buffering-comment-out-debug-code.patch slab-leaks3-default-y.patch x86-kmap_atomic-debugging.patch profile-likely-unlikely-macros-tidy.patch profile-likely-unlikely-macros-fix.patch profile-likely-unlikely-macros-fix-2.patch git-viro-bird-volatile-fixup.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html