public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.13-rc4-mm1
@ 2005-07-31  9:05 Andrew Morton
  2005-07-31 10:04 ` 2.6.13-rc4-mm1 Felipe Alfaro Solana
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Andrew Morton @ 2005-07-31  9:05 UTC (permalink / raw)
  To: linux-kernel


ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc4/2.6.13-rc4-mm1/


- Dropped areca-raid-linux-scsi-driver.patch and iteraid.patch.  People who
  need these can get them from 2.6.13-rc3-mm3.

- Dropped the CKRM patches.  I don't think they were doing much in -mm and
  we didn't find many problems with them anyway.

- Dropped the connector patches: turns out that we no longer have a netlink
  slot available for them anyway.



Changes since 2.6.13-rc3-mm3:


 linus.patch
 git-cryptodev.patch
 git-drm.patch
 git-audit.patch
 git-jfs.patch
 git-kbuild.patch
 git-libata-adma-mwi.patch
 git-libata-chs-support.patch
 git-libata-passthru.patch
 git-libata-promise-sata-pata.patch
 git-net.patch
 git-net-gregkh-i2c-w1-netlink-callbacks-fix.patch
 git-netdev-chelsio.patch
 git-netdev-e100.patch
 git-netdev-smc91x-eeprom.patch
 git-netdev-ieee80211-wifi.patch
 git-ocfs2.patch
 git-serial.patch
 git-scsi-block.patch
 git-scsi-misc.patch
 git-scsi-rc-fixes.patch

 Subsystem trees

-bio_clone-fix.patch
-pcmcia-ide-cs-id_table-update.patch
-pcmcia-fix-comment.patch
-pcmcia-remove-duplicates-in-orinoco_cs.patch
-pcmcia-update-au1000-to-work-with-recent-changes.patch
-pcmcia-avoid-duble-iounmap-of-one-address.patch
-pcmcia-fix-many-device-ids.patch
-pcmcia-update-documentation.patch
-pcmcia-fix-sharing-irqs-and-request_irq-without-irq_handle_present.patch
-yenta-free_irq-on-suspend.patch
-pcmcia-disable-read-prefetch-write-burst-on-old-o2micro-bridges.patch
-cciss-per-disk-queue.patch
-fix-incorrect-asus-k7m-irq-router-detection.patch
-x86_64-always-ack-ipis-even-on-errors.patch
-x86_64-update-defconfig.patch
-x86_64-use-for_each_cpu_mask-for-clustered-ipi-flush.patch
-x86_64-i386-x86_64-remove-prototypes-for-not-existing.patch
-x86_64-move-cpu_present-possible_map-parsing-earlier.patch
-x86_64-minor-clean-up-to-cpu-setup-use-smp_processor_id-instead-of-custom-hack.patch
-x86_64-clarify-booting-processor-message.patch
-x86_64-some-cleanup-in-setup64c.patch
-x86_64-remove-unused-variable-in-delayc.patch
-x86_64-improve-config_gart_iommu-description-and-make-it-default-y.patch
-x86_64-some-updates-for-boot-optionstxt.patch
-x86_64-fix-some-comments-in-tlbflushh.patch
-x86_64-remove-obsolete-eat_key-prototype.patch
-x86_64-fix-some-typos-in-systemh-comments.patch
-x86_64-fix-incorrectly-defined-msr_k8_syscfg.patch
-x86_64-fix-overflow-in-numa-hash-function-setup.patch
-x86_64-print-a-boot-message-for-hotplug-memory-zones.patch
-x86_64-create-per-cpu-machine-check-sysfs-directories.patch
-x86_64-remove-ia32_-build-tools-in-makefile.patch
-x86_64-remove-the-broadcast-options-that-were-added-for.patch
-x86_64-support-more-than-8-cores-on-amd-systems.patch
-x86_64-icecream-has-no-way-of-detecting-assembler-level.patch
-x86_64-turn-bug-data-into-valid-instruction.patch
-x86_64-when-running-cpuid4-need-to-run-on-the-correct.patch
-x86_64-remove-unnecessary-include-in-faultc.patch
-x86_64-small-assembly-improvements.patch
-x86_64-switch-to-the-interrupt-stack-when-running-a.patch
-x86_64-fix-srat-handling-on-non-dual-core-systems.patch
-x86_64-fix-gcc-4-warning-in-sched_find_first_bit.patch
-x86_64-use-msleep-in-smpbootc.patch
-x86_64-remove-unused-variable-in-k8-busc.patch
-x86_64-fix-cpu_to_node-setup-for-sparse-apic_ids.patch
-cs89x0-collect-tx_bytes-statistics.patch
-ppc32-inotify-syscalls.patch
-ppc64-inotify-syscalls.patch
-selinux-default-labeling-of-mls-field.patch
-e1000-no-need-for-reboot-notifier.patch
-pcdp-if-pcdp-contains-parity-information-use-it.patch
-qla2xxx-mark-dependency-on-fw_loader.patch
-alpha-fix-statement-with-no-effect-warnings.patch
-mm-ensure-proper-alignment-for-node_remap_start_pfn.patch
-acpi-disable-c2-c3-for-_all_-ibm-r40e-laptops-bug-3549.patch
-acpi-re-enable-c2-c3-cpu-states-for-systems-without.patch
-agp-restore-apbase-after-setting-apsize.patch
-gregkh-driver-stable_api_nonsense.txt-fixes.patch
-gregkh-i2c-i2c-max6875-simplify.patch
-gregkh-i2c-i2c-max6875-fix-build-error.patch
-gregkh-i2c-i2c-ds1337-12-24-mode-fix.patch
-gregkh-i2c-i2c-missing-space.patch
-gregkh-i2c-w1-kconfig.patch
-gregkh-pci-pci-smbus-quirk.patch
-gregkh-pci-pci-adjust-pci-rom-code-to-handle-more-broken-roms.patch
-gregkh-pci-pci-remove-pci_bridge_ctl_vga-handling-from-setup-busc.patch
-gregkh-pci-pci-dma-build-fix.patch
-gregkh-pci-pci-remove-pretty-names-fix.patch
-git-scsi-misc-drivers-scsi-chc-remove-devfs-stuff.patch
-gregkh-usb-usb-ftdi_sio-new-devices.patch
-gregkh-usb-usb-ftdi_sio-rts-dtr.patch
-gregkh-usb-usb-ftdi_sio-timeout-fix.patch
-gregkh-usb-usb-usbfs-dont-leak-data.patch
-gregkh-usb-usb-usbnet-remove-unused-vars.patch
-gregkh-usb-usb-dont-delete-unregistered-interfaces.patch
-usb-hidinput_hid_event-oops-fix.patch
-option-card-driver-update-maintainer-entry-fixes.patch
-fix-something-in-scsi.patch
-usb-storage-rearrange-stuff.patch
-fix-something-in-usb.patch
-sk98lin-basic-suspend-resume-support.patch
-x86-avoid-wasting-irqs-patch-update.patch
-x86_64-avoid-wasting-irqs-patch-update.patch
-add-cmos-attribute-to-floppy-driver.patch
-add-cmos-attribute-to-floppy-driver-tidy.patch
-intel8x0-free-irq-in-suspend.patch
-serial-add-mmio-support-to-8250_pnp.patch
-device-mapper-fix-deadlocks-in-core-prep.patch
-device-mapper-fix-deadlocks-in-core.patch
-device-mapper-fix-md-lock-deadlocks-in-core.patch

 Merged

+i2c-mpc-revert-duplicate-patch.patch

 Fix doublly-applied patch

+skge-build-fix.patch

 Fix net driver build

+disable-address-space-randomization-on-transmeta-cpus.patch

 Make /proc/sys/kernel/randomize_va_space default to off on Transmeta CPUs,
because it can make them run slowly.

+v4l-miscellaneous-fixes.patch
+v4l-cx88-card-support-and-documentation-finishing.patch

 v4l fixes

+maintainers-record-man-pages.patch
+maintainers-record-man-pages-fix.patch

 Mention the manpage guy in MAINTAINERS

+ppc64-fix-config_altivec-not-set.patch

 ppc64 fix

+display-name-of-fbdev-device.patch

 fbdev featurette

-git-acpi.patch

 I dropped this - not sure why.

+acpi_register_gsi-change-acpi_register_gsi-interface.patch
+acpi_register_gsi-change-acpi-pci-code.patch
+acpi_register_gsi-change-hpet-driver.patch
+acpi_register_gsi-change-phpacpi-driver.patch
+acpi_register_gsi-change-acpi-based-8250-driver.patch
+acpi_register_gsi-change-ia64-iosapic-code.patch

 ACPI feature work

+enable-acpi_hotplug_cpu-automatically-if-hotplug_cpu=y.patch

 Kconfig fix

+gregkh-driver-floppy-cmos-attribute.patch
+gregkh-driver-floppy-cmos-attribute-tidy.patch

 Additions to Greg's driver tree

+gregkh-i2c-i2c-max6875-documentation-cleanup.patch
+gregkh-i2c-i2c-hwmon-soften-lm75.patch
+gregkh-i2c-i2c-hwmon-lm78-j.patch
+gregkh-i2c-i2c-hwmon-document-w83627ehg.patch
+gregkh-i2c-i2c-w83792d-01.patch
+gregkh-i2c-i2c-w83792d-02.patch
+gregkh-i2c-i2c-w83792d-03.patch
+gregkh-i2c-i2c-refactor-message.patch
+gregkh-i2c-i2c-hwmon-tag-superio-functions-__init.patch

 Additions to Greg's i2c tree

+input-quirk-for-the-fn-key-on-powerbooks-with-an-usb.patch

 Input driver fix

+git-net.patch

 Bring this back - it was innocent

+git-net-gregkh-i2c-w1-netlink-callbacks-fix.patch

 Fix it for changes in Greg's tree

+drivers-net-wireless-hostap-hostapc-export_symtab-does-nothing.patch

 Wireless driver cleanup

+gregkh-pci-pci-remove-pretty-names-02.patch
+gregkh-pci-pci-cleanup-pci.h.patch

 Additions to Greg's PCI tree

+gregkh-usb-usb-cypress_m8-whitespace-fixes.patch
+gregkh-usb-usb-option-card-driver-coding-style-tweaks.patch
+gregkh-usb-usb-gadget-centrialize-numbers.patch
+gregkh-usb-usb-storage-rearrange-stuff.patch
+gregkh-usb-usb-storage-fix-something.patch

 Additions to Greg's USB tree

+usb-ehci-microframe-handling-fix.patch

 USB fix

+page-fault-patches-optional-page_lock-acquisition-in-fix.patch
+page-fault-patches-optional-page_lock-acquisition-in-fix-2.patch
+page-fault-patches-fix-highpte-in-do_anon_page.patch

 Fix the pagefault scalability patches

+x86-ptep-clear-optimization.patch
+x86-ptep-clear-optimization-fix.patch

 x86 pte handling speedup

+mm-slabc-prefetchw-the-start-of-new-allocated-objects.patch

 slab microoptimisation

+forcedeth-write-back-the-misordered-mac-address.patch

 Fix forcedeth driver

+r8169-pci-id-for-the-linksys-eg1032.patch

 r8169 device support

+ppc32-add-missing-4xx-emac-sysfs-nodes.patch
+arch-ppc-kernel-ppc_ksymsc-remove-unused-define-export_symtab_strops.patch
+8xx-convert-fec-driver-to-use-work_struct.patch
+8xx-using-dma_alloc_coherent-instead-consistent_alloc.patch
+8xx-fec-fix-interrupt-handler-prototypes.patch

 ppc32 stuff

+vm86-honor-tf-bit-when-emulating-an-instruction.patch

 x86 vm86 fix

+kdump-save-parameter-segment-in-protected-mode-x86.patch

 kdump enhamcement

+i386-clean-up-vdso-alignment-padding.patch
+x86-automatically-enable-bigsmp-when-we-have-more-than-8-cpus.patch
+i386-inline-asm-cleanup.patch
+i386-inline-asm-cleanup-kexec-fix.patch
+i386-arch-cleanup-seralize-msr.patch
+i386-arch-cleanup-seralize-msr-fix.patch
+i386-inline-assembler-cleanup-encapsulate-descriptor-and-task-register-management.patch
+i386-inline-assembler-cleanup-encapsulate-descriptor-and-task-register-management-fix.patch
+i386-generate-better-code-around-descriptor-update-and-access-functions.patch
+i386-load_tls-fix.patch
+i386-use-set_pte-macros-in-a-couple-places-where-they-were-missing.patch

 Various x86 cleanups.  Mainly: move all the open-coded asm statements into
 nice wrapper functions.  Partly because it makes things easier for
 virtualisation patches, partly because it cleans things up and people
 occasionally get these things wrong.

+x86_64-remove-duplicated-sys_time64.patch
+x86_64-fix-off-by-one-in-e820_mapped.patch
+x86_64-prefetchw-can-fall-back-to-prefetch-if-3dnow.patch

 x86_64 fixes

-swsusp-process-freezing-remove-smp-races.patch
-swsusp-process-freezing-remove-smp-races-msp3400-fix.patch

 Dropped - it's planned to do this differently.

+remove-busywait-in-refrigerator.patch
+swsusp-fix-remaining-u32-vs-pm_message_t-confusion-2.patch

 swsusp fixes

+swsusp-simpler-calculation-of-number-of-pages-in-pbe-list.patch

 swsusp simplification

+swsusup-with-dm-crypt-mini-howto.patch

 swsusp documentation

+uml-rename-kconfig-files-to-be-like-the-other-arches.patch
+uml-workaround-gdb-problems-on-debugging.patch
+uml-fix-sigwinch-handler-race-while-waiting-for-signals.patch

 UML updates

+s390-use-klist-in-qeth-driver.patch

 s390 driver cleanup

-areca-raid-linux-scsi-driver.patch

 Dropped

-aio-fix-races-in-callback-path.patch

 Dropped - believed to be incorrect.

+kconfig-trivial-cleanup.patch

 Kconfig cleanup

+fix-sound-arm-makefile-for-locality-of-reference.patch

 Make ARM makefile more maintainable

+remove-special-hpet_emulate_rtc-config-option.patch

 make RTC emulation non-optional in the HPET driver

+schedule-obsolete-oss-drivers-for-removal-version-2.patch

 Add some OSS drivers to death row.

+disk-quotas-fail-when-etc-mtab-is-symlinked-to-proc-mounts.patch
+disk-quotas-fail-when-etc-mtab-is-symlinked-to-proc-mounts-tidy.patch

 Better support for /etc/mtab symlinked to /proc/mounts

+add-init=-warning-to-init-mainc.patch

 Print a warning when the target of `init=' cannot be executed.

+remove-a-dead-extern-in-memc.patch

 Cleanup

+remove-misleading-comment-above-sys_brk.patch

 Fix comment

+move-m68k-rtc-drivers-over-to-initcalls.patch
+move-68360serialc-over-use-initcalls.patch

 Cleanups

+remove-pipe-definitions.patch

 Remove dead macros

+sd-initialize-sd-cards.patch
+sd-read-only-switch.patch
+sd-scr-register.patch
+sd-scr-in-sysfs.patch
+sd-4-bit-bus.patch
+sd-copyright-notice.patch

 Secure digital card drivers

+corgi-keyboard-fix-a-couple-of-compile-errors.patch
+corgi-keyboard-add-some-power-management-code.patch
+corgi-keyboard-code-tidying.patch
+corgi-touchscreen-allow-the-driver-to-share-the-pmu.patch
+corgi-touchscreen-code-cleanup--fixes.patch
+w100fb-rewrite-for-platform-independence.patch
+w100fb-update-corgi-platform-code-to-match-new-driver.patch
+input-add-a-new-switch-event-type.patch

 Corgi driver updates

-ckrm-core-ckrm-event-callbacks.patch
-ckrm-processor-delay-accounting.patch
-ckrm-processor-delay-accounting-warning-fixes.patch
-ckrm-core-infrastructure.patch
-ckrm-resource-control-file-system-rcfs.patch
-ckrm-classtype-definitions-for-task-class.patch
-ckrm-classtype-definitions-for-socket-class.patch
-ckrm-numtasks-controller.patch
-ckrm-documentation.patch
-ckrm-add-missing-read_unlock.patch
-ckrm-move-callbacks-from-listenaq-to-socketclass.patch
-ckrm-change-ipaddr_port-syntax.patch
-ckrm-check-to-see-if-my-guarantee-is-set-to-dontcare.patch
-ckrm-minor-cosmetic-cleanups-in-numtasks-controller.patch
-ckrm-undo-removal-of-check-in-numtasks_put_ref_local.patch
-ckrm-rule-based-classification-engine-stub-rcfs-support.patch
-ckrm-rule-based-classification-engine-basic-rcfs-support.patch
-ckrm-rule-based-classification-engine-bitvector-support-for-classification-info.patch
-ckrm-rule-based-classification-engine-full-ce.patch
-ckrm-rule-based-classification-engine-full-ce-fix.patch
-ckrm-rule-based-classification-engine-more-advanced-classification-engine.patch
-#ckrm-rule-based-classification-engine-more-advanced-classification-engine-netlink-fix.patch
-ckrm-clean-up-typo-in-printk-message.patch
-ckrm-fix-for-compiler-warnings.patch
-ckrm-fix-share-calculation.patch
-ckrm-fix-edge-cases-with-empty-lists-and-rule-deletion.patch
-ckrm-add-numtasks-controller-config-file-write-support.patch
-ckrm-add-fork-rate-control-to-the-numtasks-controller.patch
-ckrm-classification-engines-rbce-and-crbce-are-mutually-exclusive.patch
-ckrm-make-get_class-global.patch
-ckrm-cleanups-to-ckrm-initialization.patch
-ckrm-replace-target-file-interface-with-a-writable-members-file.patch
-ckrm-use-sizeof-instead-of-define-for-the-array-size-in-taskclass.patch
-ckrm-fix-a-bug-in-the-use-of-classtype.patch
-ckrm-include-taskdelaysh-in-crbceh.patch
-ckrm-send-timestamps-to-userspace-in-msecs-instead-of-jiffies.patch
-ckrm-fix-compile-warnings-and-delete-dead-code.patch
-ckrm-fix-a-null-dereference-bug.patch
-ckrm-classification-engine-configuration-support-cleanup.patch
-ckrm-use-sizeof-instead-of-define-for-the-array-size-in-rbce.patch
-ckrm-delete-target-file-from-tc_magicc.patch

 Dropped

-connector.patch
-connector-exit-notifier.patch
-connector-add-a-fork-connector.patch

 Dropped

-iteraid.patch

 Dropped

+sched-better-wake-balancing-3.patch

 CPU scheduler tweak

+video_bt848-remove-not-required-part-of-the-help-text.patch

 v4l fixlet

-files-fix-rcu-initializers.patch
-files-rcuref-apis.patch
-files-break-up-files-struct.patch
-files-sparc64-fix-2.patch
-files-files-struct-with-rcu.patch
-files-lock-free-fd-look-up.patch
-files-files-locking-doc.patch

 Dropped these for now: we have one report that they break swsusp resume. 
 Whcih is odd.

-reiser4-swsusp-process-freezing-remove-smp-races-fix.patch
-reiser4-swsusp-process-freezing-remove-smp-races-fix-2.patch

 No longer needed

+reiser4-wundef-fix.patch
+reiser4-wundef-fix-2.patch

 reiser4 warning fixes

+v9fs-documentation-makefiles-configuration-add-fd-based-transport-to-makefile-docs.patch
+v9fs-vfs-superblock-operations-and-glue-add-fd-based-transport-to-mount-options.patch
+v9fs-transport-modules-add-fd-based-transport-module.patch

 v9fs updates

+fbsysfs-remove-casts-from-void.patch

 fbdev cleanup

+fuse-device-functions-document-mount-options-documentation-update.patch
+fuse-device-functions-request-counter-overflow-fix.patch
+fuse-device-functions-module-alias.patch
+fuse-stricter-mount-option-checking.patch
+fuse-dont-update-file-times.patch

 FUSE updates

+include-linux-blkdevh-extern-inline-static-inline.patch

 Cleanup


All 601 patches:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc4/2.6.13-rc4-mm1/patch-list



^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: [linux-usb-devel] Re: 2.6.13-rc4-mm1
@ 2005-08-01 17:50 Aleksey Gorelov
  2005-08-01 18:17 ` david-b
  0 siblings, 1 reply; 24+ messages in thread
From: Aleksey Gorelov @ 2005-08-01 17:50 UTC (permalink / raw)
  To: david-b, greg; +Cc: linux-usb-devel, linux-kernel, iogl64nx, akpm

>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org 
>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
>david-b@pacbell.net
>Sent: Sunday, July 31, 2005 7:02 PM
>To: greg@kroah.com
>Cc: linux-usb-devel@lists.sourceforge.net; 
>linux-kernel@vger.kernel.org; iogl64nx@gmail.com; akpm@osdl.org
>Subject: Re: [linux-usb-devel] Re: 2.6.13-rc4-mm1
>
>> Date: Sun, 31 Jul 2005 16:02:44 -0700
>> From: Greg KH <greg@kroah.com>
>>
>> On Sun, Jul 31, 2005 at 11:25:10AM -0700, david-b@pacbell.net wrote:
>> > I think that "continuing" codepath came from someone at 
>Phoenix, FWIW;

That was me.

>> > the problem is that I see the PCI quirks code has evolved 
>even farther
>> > from the main copy of the init code in the USB tree.  Sigh.
>>
>> I don't like that either, but can't think of a way to make 
>it easier to
>> keep them in sync.  Can you?

Major problem here is that handoff may be necessary even if whole 
USB support is disabled in config. I was thinking of integrating them
into
USB code somehow, but did not have enough time for it, sorry :(

>
>Sure.  The problem as I see it is that there are two copies, and one
>of them isn't in the USB part of the tree.  So just move it, and cope
>with the consequences during the 2.6.14 cycle:
>
>  (a) Move the USB quirks out of the generic PCI drivers directory
>      into the USB HCD directory (see the attached patch);
>
>  (b) foreach HCD in (ehci ohci uhci) do:
>  
>      (1) Merge the two different routines:  HCD internal init/reset
>          and the PCI quirk code are identical in intent, but they
>	  each address different sets of quirks.
>
>      (2) Then the HCD reset() and PCI quirk() code will call those
>          single shared routine. 
>

Agree, but at least:
 - drivers/Makefile & drivers/usb/Makefile have to be modified as well
to include
quirks on CONFIG_PCI
 - Constants like EHCI_USBCMD_RUN should probably be replaced with
'native' usb code ones.

Thanks,
Aleks.

>
>At OLS, Vojtech mentioned wanting to make "usb-handoff" be the default.
>That's seem plausible (USB has more than its fair share of 
>BIOS issues!)
>but should only kick in sometime after we merge the two different sets
>of quirk handling logic.
>
>- Dave
>
>
>
>This moves the PCI quirk handling for USB host controllers from the
>PCI directory to the USB directory.
>
>Follow-on patches will need to remove code duplication, and probably
>make "usb-handoff" be the system default.
>
>Compile-tested only so far.
>
>Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
>--- g26.orig/drivers/usb/host/Makefile	2005-06-28 
>19:23:13.000000000 -0700
>+++ g26/drivers/usb/host/Makefile	2005-07-31 
>18:41:35.000000000 -0700
>@@ -1,8 +1,9 @@
> #
>-# Makefile for USB Host Controller Driver
>-# framework and drivers
>+# Makefile for USB Host Controller Drivers
> #
> 
>+obj-$(CONFIG_PCI)		+= pci-quirks.o
>+
> obj-$(CONFIG_USB_EHCI_HCD)	+= ehci-hcd.o
> obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
> obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
>--- /dev/null	1970-01-01 00:00:00.000000000 +0000
>+++ g26/drivers/usb/host/pci-quirks.c	2005-07-31 
>17:33:38.000000000 -0700
>@@ -0,0 +1,279 @@
>+/*
>+ * This file contains work-arounds for many known PCI 
>hardware and BIOS
>+ * quirks relating to USB host controllers.
>+ *
>+ * There are a lot of those, especially on hardware that needs to work
>+ * with USB mice and keyboard for booting.  And this code 
>needs to fire
>+ * early; before the input subsystem gets initialized, and while BIOS
>+ * (or SMI) code has few problems running.
>+ *
>+ * They're collected here since USB host controller drivers 
>need to use
>+ * the same code as part of hardware initialization.
>+ *
>+ *  Copyright (c) 1999 Martin Mares <mj@ucw.cz>
>+ *  (and others)
>+ */
>+
>+#include <linux/config.h>
>+#include <linux/types.h>
>+#include <linux/kernel.h>
>+#include <linux/pci.h>
>+#include <linux/init.h>
>+#include <linux/delay.h>
>+#include <linux/acpi.h>
>+
>+// #include "pci.h"
>+
>+/*
>+ * PIIX3 USB: We have to disable USB interrupts that are
>+ * hardwired to PIRQD# and may be shared with an
>+ * external device.
>+ *
>+ * Legacy Support Register (LEGSUP):
>+ *     bit13:  USB PIRQ Enable (USBPIRQDEN),
>+ *     bit4:   Trap/SMI On IRQ Enable (USBSMIEN).
>+ *
>+ * We mask out all r/wc bits, too.
>+ */
>+static void __devinit quirk_piix3_usb(struct pci_dev *dev)
>+{
>+	u16 legsup;
>+
>+	pci_read_config_word(dev, 0xc0, &legsup);
>+	legsup &= 0x50ef;
>+	pci_write_config_word(dev, 0xc0, legsup);
>+}
>+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	
>PCI_DEVICE_ID_INTEL_82371SB_2,	quirk_piix3_usb );
>+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	
>PCI_DEVICE_ID_INTEL_82371AB_2,	quirk_piix3_usb );
>+
>+
>+/* FIXME this should be the same code that the USB controllers use...
>+ * the hcd->reset() method basically does this.
>+ */
>+
>+#define UHCI_USBLEGSUP		0xc0		/* 
>legacy support */
>+#define UHCI_USBCMD		0		/* command register */
>+#define UHCI_USBSTS		2		/* status register */
>+#define UHCI_USBINTR		4		/* interrupt register */
>+#define UHCI_USBLEGSUP_DEFAULT	0x2000		/* only 
>PIRQ enable set */
>+#define UHCI_USBCMD_RUN		(1 << 0)	/* 
>RUN/STOP bit */
>+#define UHCI_USBCMD_GRESET	(1 << 2)	/* Global reset */
>+#define UHCI_USBCMD_CONFIGURE	(1 << 6)	/* config semaphore */
>+#define UHCI_USBSTS_HALTED	(1 << 5)	/* HCHalted bit */
>+
>+#define OHCI_CONTROL		0x04
>+#define OHCI_CMDSTATUS		0x08
>+#define OHCI_INTRSTATUS		0x0c
>+#define OHCI_INTRENABLE		0x10
>+#define OHCI_INTRDISABLE	0x14
>+#define OHCI_OCR		(1 << 3)	/* ownership 
>change request */
>+#define OHCI_CTRL_IR		(1 << 8)	/* interrupt routing */
>+#define OHCI_INTR_OC		(1 << 30)	/* ownership change */
>+
>+#define EHCI_HCC_PARAMS		0x08		/* 
>extended capabilities */
>+#define EHCI_USBCMD		0		/* command register */
>+#define EHCI_USBCMD_RUN		(1 << 0)	/* 
>RUN/STOP bit */
>+#define EHCI_USBSTS		4		/* status register */
>+#define EHCI_USBSTS_HALTED	(1 << 12)	/* HCHalted bit */
>+#define EHCI_USBINTR		8		/* interrupt register */
>+#define EHCI_USBLEGSUP		0		/* 
>legacy support register */
>+#define EHCI_USBLEGSUP_BIOS	(1 << 16)	/* BIOS semaphore */
>+#define EHCI_USBLEGSUP_OS	(1 << 24)	/* OS semaphore */
>+#define EHCI_USBLEGCTLSTS	4		/* legacy 
>control/status */
>+#define EHCI_USBLEGCTLSTS_SOOE	(1 << 13)	/* SMI 
>on ownership change */
>+
>+int usb_early_handoff __devinitdata = 0;
>+static int __init usb_handoff_early(char *str)
>+{
>+	usb_early_handoff = 1;
>+	return 0;
>+}
>+__setup("usb-handoff", usb_handoff_early);
>+
>+static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
>+{
>+	unsigned long base = 0;
>+	int wait_time, delta;
>+	u16 val, sts;
>+	int i;
>+
>+	for (i = 0; i < PCI_ROM_RESOURCE; i++)
>+		if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
>+			base = pci_resource_start(pdev, i);
>+			break;
>+		}
>+
>+	if (!base)
>+		return;
>+
>+	/*
>+	 * stop controller
>+	 */
>+	sts = inw(base + UHCI_USBSTS);
>+	val = inw(base + UHCI_USBCMD);
>+	val &= ~(u16)(UHCI_USBCMD_RUN | UHCI_USBCMD_CONFIGURE);
>+	outw(val, base + UHCI_USBCMD);
>+
>+	/*
>+	 * wait while it stops if it was running
>+	 */
>+	if ((sts & UHCI_USBSTS_HALTED) == 0)
>+	{
>+		wait_time = 1000;
>+		delta = 100;
>+
>+		do {
>+			outw(0x1f, base + UHCI_USBSTS);
>+			udelay(delta);
>+			wait_time -= delta;
>+			val = inw(base + UHCI_USBSTS);
>+			if (val & UHCI_USBSTS_HALTED)
>+				break;
>+		} while (wait_time > 0);
>+	}
>+
>+	/*
>+	 * disable interrupts & legacy support
>+	 */
>+	outw(0, base + UHCI_USBINTR);
>+	outw(0x1f, base + UHCI_USBSTS);
>+	pci_read_config_word(pdev, UHCI_USBLEGSUP, &val);
>+	if (val & 0xbf) 
>+		pci_write_config_word(pdev, UHCI_USBLEGSUP, 
>UHCI_USBLEGSUP_DEFAULT);
>+		
>+}
>+
>+static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
>+{
>+	void __iomem *base;
>+	int wait_time;
>+
>+	base = ioremap_nocache(pci_resource_start(pdev, 0),
>+				     pci_resource_len(pdev, 0));
>+	if (base == NULL) return;
>+
>+	if (readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
>+		wait_time = 500; /* 0.5 seconds */
>+		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
>+		writel(OHCI_OCR, base + OHCI_CMDSTATUS);
>+		while (wait_time > 0 && 
>+				readl(base + OHCI_CONTROL) & 
>OHCI_CTRL_IR) {
>+			wait_time -= 10;
>+			msleep(10);
>+		}
>+	}
>+
>+	/*
>+	 * disable interrupts
>+	 */
>+	writel(~(u32)0, base + OHCI_INTRDISABLE);
>+	writel(~(u32)0, base + OHCI_INTRSTATUS);
>+
>+	iounmap(base);
>+}
>+
>+static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
>+{
>+	int wait_time, delta;
>+	void __iomem *base, *op_reg_base;
>+	u32 hcc_params, val, temp;
>+	u8 cap_length;
>+
>+	base = ioremap_nocache(pci_resource_start(pdev, 0),
>+				pci_resource_len(pdev, 0));
>+	if (base == NULL) return;
>+
>+	cap_length = readb(base);
>+	op_reg_base = base + cap_length;
>+	hcc_params = readl(base + EHCI_HCC_PARAMS);
>+	hcc_params = (hcc_params >> 8) & 0xff;
>+	if (hcc_params) {
>+		pci_read_config_dword(pdev, 
>+					hcc_params + EHCI_USBLEGSUP,
>+					&val);
>+		if (((val & 0xff) == 1) && (val & 
>EHCI_USBLEGSUP_BIOS)) {
>+			/*
>+			 * Ok, BIOS is in smm mode, try to hand off...
>+			 */
>+			pci_read_config_dword(pdev,
>+						hcc_params + 
>EHCI_USBLEGCTLSTS,
>+						&temp);
>+			pci_write_config_dword(pdev,
>+						hcc_params + 
>EHCI_USBLEGCTLSTS,
>+						temp | 
>EHCI_USBLEGCTLSTS_SOOE);
>+			val |= EHCI_USBLEGSUP_OS;
>+			pci_write_config_dword(pdev, 
>+						hcc_params + 
>EHCI_USBLEGSUP, 
>+						val);
>+
>+			wait_time = 500;
>+			do {
>+				msleep(10);
>+				wait_time -= 10;
>+				pci_read_config_dword(pdev,
>+						hcc_params + 
>EHCI_USBLEGSUP,
>+						&val);
>+			} while (wait_time && (val & 
>EHCI_USBLEGSUP_BIOS));
>+			if (!wait_time) {
>+				/*
>+				 * well, possibly buggy BIOS...
>+				 */
>+				printk(KERN_WARNING "EHCI early 
>BIOS handoff "
>+						"failed (BIOS 
>bug ?)\n");
>+				pci_write_config_dword(pdev,
>+						hcc_params + 
>EHCI_USBLEGSUP,
>+						EHCI_USBLEGSUP_OS);
>+				pci_write_config_dword(pdev,
>+						hcc_params + 
>EHCI_USBLEGCTLSTS,
>+						0);
>+			}
>+		}
>+	}
>+
>+	/*
>+	 * halt EHCI & disable its interrupts in any case
>+	 */
>+	val = readl(op_reg_base + EHCI_USBSTS);
>+	if ((val & EHCI_USBSTS_HALTED) == 0) {
>+		val = readl(op_reg_base + EHCI_USBCMD);
>+		val &= ~EHCI_USBCMD_RUN;
>+		writel(val, op_reg_base + EHCI_USBCMD);
>+
>+		wait_time = 2000;
>+		delta = 100;
>+		do {
>+			writel(0x3f, op_reg_base + EHCI_USBSTS);
>+			udelay(delta);
>+			wait_time -= delta;
>+			val = readl(op_reg_base + EHCI_USBSTS);
>+			if ((val == ~(u32)0) || (val & 
>EHCI_USBSTS_HALTED)) {
>+				break;
>+			}
>+		} while (wait_time > 0);
>+	}
>+	writel(0, op_reg_base + EHCI_USBINTR);
>+	writel(0x3f, op_reg_base + EHCI_USBSTS);
>+
>+	iounmap(base);
>+
>+	return;
>+}
>+
>+
>+
>+static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
>+{
>+	if (!usb_early_handoff)
>+		return;
>+
>+	if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 
>0x00)) { /* UHCI */
>+		quirk_usb_handoff_uhci(pdev);
>+	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) 
>| 0x10)) { /* OHCI */
>+		quirk_usb_handoff_ohci(pdev);
>+	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) 
>| 0x20)) { /* EHCI */
>+		quirk_usb_disable_ehci(pdev);
>+	}
>+
>+	return;
>+}
>+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, 
>quirk_usb_early_handoff);
>--- g26.orig/drivers/pci/quirks.c	2005-07-12 
>05:38:23.000000000 -0700
>+++ g26/drivers/pci/quirks.c	2005-07-31 17:26:11.000000000 -0700
>@@ -7,6 +7,9 @@
>  *
>  *  Copyright (c) 1999 Martin Mares <mj@ucw.cz>
>  *
>+ *  Quirks for USB host controllers should be handled in the USB
>+ *  quirks file; that code is reused by host controller drivers.
>+ *
>  *  The bridge optimization stuff has been removed. If you really
>  *  have a silly BIOS which is unable to set your host bridge right,
>  *  use the PowerTweak utility (see 
>http://powertweak.sourceforge.net).
>@@ -513,28 +516,6 @@ static void quirk_via_irq(struct pci_dev
> DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, 
>quirk_via_irq);
> 
> /*
>- * PIIX3 USB: We have to disable USB interrupts that are
>- * hardwired to PIRQD# and may be shared with an
>- * external device.
>- *
>- * Legacy Support Register (LEGSUP):
>- *     bit13:  USB PIRQ Enable (USBPIRQDEN),
>- *     bit4:   Trap/SMI On IRQ Enable (USBSMIEN).
>- *
>- * We mask out all r/wc bits, too.
>- */
>-static void __devinit quirk_piix3_usb(struct pci_dev *dev)
>-{
>-	u16 legsup;
>-
>-	pci_read_config_word(dev, 0xc0, &legsup);
>-	legsup &= 0x50ef;
>-	pci_write_config_word(dev, 0xc0, legsup);
>-}
>-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	
>PCI_DEVICE_ID_INTEL_82371SB_2,	quirk_piix3_usb );
>-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	
>PCI_DEVICE_ID_INTEL_82371AB_2,	quirk_piix3_usb );
>-
>-/*
>  * VIA VT82C598 has its device ID settable and many BIOSes
>  * set it to the ID of VT82C597 for backward compatibility.
>  * We need to switch it off to be able to recognize the real
>@@ -871,234 +852,6 @@ static void __init quirk_sis_96x_smbus(s
> 	pci_read_config_byte(dev, 0x77, &val);
> }
> 
>-
>-#define UHCI_USBLEGSUP		0xc0		/* 
>legacy support */
>-#define UHCI_USBCMD		0		/* command register */
>-#define UHCI_USBSTS		2		/* status register */
>-#define UHCI_USBINTR		4		/* interrupt register */
>-#define UHCI_USBLEGSUP_DEFAULT	0x2000		/* only 
>PIRQ enable set */
>-#define UHCI_USBCMD_RUN		(1 << 0)	/* 
>RUN/STOP bit */
>-#define UHCI_USBCMD_GRESET	(1 << 2)	/* Global reset */
>-#define UHCI_USBCMD_CONFIGURE	(1 << 6)	/* config semaphore */
>-#define UHCI_USBSTS_HALTED	(1 << 5)	/* HCHalted bit */
>-
>-#define OHCI_CONTROL		0x04
>-#define OHCI_CMDSTATUS		0x08
>-#define OHCI_INTRSTATUS		0x0c
>-#define OHCI_INTRENABLE		0x10
>-#define OHCI_INTRDISABLE	0x14
>-#define OHCI_OCR		(1 << 3)	/* ownership 
>change request */
>-#define OHCI_CTRL_IR		(1 << 8)	/* interrupt routing */
>-#define OHCI_INTR_OC		(1 << 30)	/* ownership change */
>-
>-#define EHCI_HCC_PARAMS		0x08		/* 
>extended capabilities */
>-#define EHCI_USBCMD		0		/* command register */
>-#define EHCI_USBCMD_RUN		(1 << 0)	/* 
>RUN/STOP bit */
>-#define EHCI_USBSTS		4		/* status register */
>-#define EHCI_USBSTS_HALTED	(1 << 12)	/* HCHalted bit */
>-#define EHCI_USBINTR		8		/* interrupt register */
>-#define EHCI_USBLEGSUP		0		/* 
>legacy support register */
>-#define EHCI_USBLEGSUP_BIOS	(1 << 16)	/* BIOS semaphore */
>-#define EHCI_USBLEGSUP_OS	(1 << 24)	/* OS semaphore */
>-#define EHCI_USBLEGCTLSTS	4		/* legacy 
>control/status */
>-#define EHCI_USBLEGCTLSTS_SOOE	(1 << 13)	/* SMI 
>on ownership change */
>-
>-int usb_early_handoff __devinitdata = 0;
>-static int __init usb_handoff_early(char *str)
>-{
>-	usb_early_handoff = 1;
>-	return 0;
>-}
>-__setup("usb-handoff", usb_handoff_early);
>-
>-static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
>-{
>-	unsigned long base = 0;
>-	int wait_time, delta;
>-	u16 val, sts;
>-	int i;
>-
>-	for (i = 0; i < PCI_ROM_RESOURCE; i++)
>-		if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
>-			base = pci_resource_start(pdev, i);
>-			break;
>-		}
>-
>-	if (!base)
>-		return;
>-
>-	/*
>-	 * stop controller
>-	 */
>-	sts = inw(base + UHCI_USBSTS);
>-	val = inw(base + UHCI_USBCMD);
>-	val &= ~(u16)(UHCI_USBCMD_RUN | UHCI_USBCMD_CONFIGURE);
>-	outw(val, base + UHCI_USBCMD);
>-
>-	/*
>-	 * wait while it stops if it was running
>-	 */
>-	if ((sts & UHCI_USBSTS_HALTED) == 0)
>-	{
>-		wait_time = 1000;
>-		delta = 100;
>-
>-		do {
>-			outw(0x1f, base + UHCI_USBSTS);
>-			udelay(delta);
>-			wait_time -= delta;
>-			val = inw(base + UHCI_USBSTS);
>-			if (val & UHCI_USBSTS_HALTED)
>-				break;
>-		} while (wait_time > 0);
>-	}
>-
>-	/*
>-	 * disable interrupts & legacy support
>-	 */
>-	outw(0, base + UHCI_USBINTR);
>-	outw(0x1f, base + UHCI_USBSTS);
>-	pci_read_config_word(pdev, UHCI_USBLEGSUP, &val);
>-	if (val & 0xbf) 
>-		pci_write_config_word(pdev, UHCI_USBLEGSUP, 
>UHCI_USBLEGSUP_DEFAULT);
>-		
>-}
>-
>-static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
>-{
>-	void __iomem *base;
>-	int wait_time;
>-
>-	base = ioremap_nocache(pci_resource_start(pdev, 0),
>-				     pci_resource_len(pdev, 0));
>-	if (base == NULL) return;
>-
>-	if (readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
>-		wait_time = 500; /* 0.5 seconds */
>-		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
>-		writel(OHCI_OCR, base + OHCI_CMDSTATUS);
>-		while (wait_time > 0 && 
>-				readl(base + OHCI_CONTROL) & 
>OHCI_CTRL_IR) {
>-			wait_time -= 10;
>-			msleep(10);
>-		}
>-	}
>-
>-	/*
>-	 * disable interrupts
>-	 */
>-	writel(~(u32)0, base + OHCI_INTRDISABLE);
>-	writel(~(u32)0, base + OHCI_INTRSTATUS);
>-
>-	iounmap(base);
>-}
>-
>-static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
>-{
>-	int wait_time, delta;
>-	void __iomem *base, *op_reg_base;
>-	u32 hcc_params, val, temp;
>-	u8 cap_length;
>-
>-	base = ioremap_nocache(pci_resource_start(pdev, 0),
>-				pci_resource_len(pdev, 0));
>-	if (base == NULL) return;
>-
>-	cap_length = readb(base);
>-	op_reg_base = base + cap_length;
>-	hcc_params = readl(base + EHCI_HCC_PARAMS);
>-	hcc_params = (hcc_params >> 8) & 0xff;
>-	if (hcc_params) {
>-		pci_read_config_dword(pdev, 
>-					hcc_params + EHCI_USBLEGSUP,
>-					&val);
>-		if (((val & 0xff) == 1) && (val & 
>EHCI_USBLEGSUP_BIOS)) {
>-			/*
>-			 * Ok, BIOS is in smm mode, try to hand off...
>-			 */
>-			pci_read_config_dword(pdev,
>-						hcc_params + 
>EHCI_USBLEGCTLSTS,
>-						&temp);
>-			pci_write_config_dword(pdev,
>-						hcc_params + 
>EHCI_USBLEGCTLSTS,
>-						temp | 
>EHCI_USBLEGCTLSTS_SOOE);
>-			val |= EHCI_USBLEGSUP_OS;
>-			pci_write_config_dword(pdev, 
>-						hcc_params + 
>EHCI_USBLEGSUP, 
>-						val);
>-
>-			wait_time = 500;
>-			do {
>-				msleep(10);
>-				wait_time -= 10;
>-				pci_read_config_dword(pdev,
>-						hcc_params + 
>EHCI_USBLEGSUP,
>-						&val);
>-			} while (wait_time && (val & 
>EHCI_USBLEGSUP_BIOS));
>-			if (!wait_time) {
>-				/*
>-				 * well, possibly buggy BIOS...
>-				 */
>-				printk(KERN_WARNING "EHCI early 
>BIOS handoff "
>-						"failed (BIOS 
>bug ?)\n");
>-				pci_write_config_dword(pdev,
>-						hcc_params + 
>EHCI_USBLEGSUP,
>-						EHCI_USBLEGSUP_OS);
>-				pci_write_config_dword(pdev,
>-						hcc_params + 
>EHCI_USBLEGCTLSTS,
>-						0);
>-			}
>-		}
>-	}
>-
>-	/*
>-	 * halt EHCI & disable its interrupts in any case
>-	 */
>-	val = readl(op_reg_base + EHCI_USBSTS);
>-	if ((val & EHCI_USBSTS_HALTED) == 0) {
>-		val = readl(op_reg_base + EHCI_USBCMD);
>-		val &= ~EHCI_USBCMD_RUN;
>-		writel(val, op_reg_base + EHCI_USBCMD);
>-
>-		wait_time = 2000;
>-		delta = 100;
>-		do {
>-			writel(0x3f, op_reg_base + EHCI_USBSTS);
>-			udelay(delta);
>-			wait_time -= delta;
>-			val = readl(op_reg_base + EHCI_USBSTS);
>-			if ((val == ~(u32)0) || (val & 
>EHCI_USBSTS_HALTED)) {
>-				break;
>-			}
>-		} while (wait_time > 0);
>-	}
>-	writel(0, op_reg_base + EHCI_USBINTR);
>-	writel(0x3f, op_reg_base + EHCI_USBSTS);
>-
>-	iounmap(base);
>-
>-	return;
>-}
>-
>-
>-
>-static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
>-{
>-	if (!usb_early_handoff)
>-		return;
>-
>-	if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 
>0x00)) { /* UHCI */
>-		quirk_usb_handoff_uhci(pdev);
>-	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) 
>| 0x10)) { /* OHCI */
>-		quirk_usb_handoff_ohci(pdev);
>-	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) 
>| 0x20)) { /* EHCI */
>-		quirk_usb_disable_ehci(pdev);
>-	}
>-
>-	return;
>-}
>-DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, 
>quirk_usb_early_handoff);
>-
> /*
>  * ... This is further complicated by the fact that some SiS96x south
>  * bridges pretend to be 85C503/5513 instead.  In that case see if we
>-
>To unsubscribe from this list: send the line "unsubscribe 
>linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [linux-usb-devel] Re: 2.6.13-rc4-mm1
@ 2005-08-05 14:17 david-b
  0 siblings, 0 replies; 24+ messages in thread
From: david-b @ 2005-08-05 14:17 UTC (permalink / raw)
  To: greg; +Cc: linux-usb-devel, linux-kernel, iogl64nx, akpm

> Date: Sun, 31 Jul 2005 19:02:09 -0700
> From: david-b@pacbell.net
>
> > Date: Sun, 31 Jul 2005 16:02:44 -0700
> > From: Greg KH <greg@kroah.com>
> >
> > On Sun, Jul 31, 2005 at 11:25:10AM -0700, david-b@pacbell.net wrote:
> > > I think that "continuing" codepath came from someone at Phoenix, FWIW;
> > > the problem is that I see the PCI quirks code has evolved even farther
> > > from the main copy of the init code in the USB tree.  Sigh.
> >
> > I don't like that either, but can't think of a way to make it easier to
> > keep them in sync.  Can you?
>
> Sure.  The problem as I see it is that there are two copies, and one
> of them isn't in the USB part of the tree.  So just move it, and cope
> with the consequences during the 2.6.14 cycle:
>
>   (a) Move the USB quirks out of the generic PCI drivers directory
>       into the USB HCD directory (see the attached patch);
>
>   (b) foreach HCD in (ehci ohci uhci) do:
>   
>       (1) Merge the two different routines:  HCD internal init/reset
>           and the PCI quirk code are identical in intent, but they
> 	  each address different sets of quirks.
>
>       (2) Then the HCD reset() and PCI quirk() code will call those
>           single shared routine. 

Attached, find a patch addressing the additional Makefile issue ...


> At OLS, Vojtech mentioned wanting to make "usb-handoff" be the default.
> That's seem plausible (USB has more than its fair share of BIOS issues!)
> but should only kick in sometime after we merge the two different sets
> of quirk handling logic.

... but conflicting with a patch Vojtech just submitted for "-mm";
which, as I said, should IMO kick in only after we merge the two
different sets of quirk logic.

- Dave



This moves the PCI quirk handling for USB host controllers from the
PCI directory to the USB directory.

Follow-on patches will need to:

 - Merge the two copies that exist ... so EHCI, OHCI, and UHCI
   each have only one copy of this PCI-specific init logic, and
   it agrees with more recent code that's aware of _different_
   sets of quirks.

 - We should probably make "usb-handoff" be the default.  The
   late handoff seems to confuse some BIOS versions, and then
   the input subsystem.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

Index: g26/drivers/usb/host/Makefile
===================================================================
--- g26.orig/drivers/usb/host/Makefile	2005-08-02 06:59:22.000000000 -0700
+++ g26/drivers/usb/host/Makefile	2005-08-02 07:58:44.000000000 -0700
@@ -1,8 +1,9 @@
 #
-# Makefile for USB Host Controller Driver
-# framework and drivers
+# Makefile for USB Host Controller Drivers
 #
 
+obj-$(CONFIG_PCI)		+= pci-quirks.o
+
 obj-$(CONFIG_USB_EHCI_HCD)	+= ehci-hcd.o
 obj-$(CONFIG_USB_ISP116X_HCD)	+= isp116x-hcd.o
 obj-$(CONFIG_USB_OHCI_HCD)	+= ohci-hcd.o
Index: g26/drivers/usb/Makefile
===================================================================
--- g26.orig/drivers/usb/Makefile	2005-08-02 06:59:22.000000000 -0700
+++ g26/drivers/usb/Makefile	2005-08-02 07:58:44.000000000 -0700
@@ -8,6 +8,7 @@ obj-$(CONFIG_USB)		+= core/
 
 obj-$(CONFIG_USB_MON)		+= mon/
 
+obj-$(CONFIG_PCI)		+= host/
 obj-$(CONFIG_USB_EHCI_HCD)	+= host/
 obj-$(CONFIG_USB_ISP116X_HCD)	+= host/
 obj-$(CONFIG_USB_OHCI_HCD)	+= host/
Index: g26/drivers/Makefile
===================================================================
--- g26.orig/drivers/Makefile	2005-08-02 06:59:22.000000000 -0700
+++ g26/drivers/Makefile	2005-08-02 07:58:44.000000000 -0700
@@ -5,7 +5,7 @@
 # Rewritten to use lists instead of if-statements.
 #
 
-obj-$(CONFIG_PCI)		+= pci/
+obj-$(CONFIG_PCI)		+= pci/ usb/host/
 obj-$(CONFIG_PARISC)		+= parisc/
 obj-y				+= video/
 obj-$(CONFIG_ACPI_BOOT)		+= acpi/
Index: g26/drivers/usb/host/pci-quirks.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ g26/drivers/usb/host/pci-quirks.c	2005-08-02 07:58:44.000000000 -0700
@@ -0,0 +1,279 @@
+/*
+ * This file contains work-arounds for many known PCI hardware and BIOS
+ * quirks relating to USB host controllers.
+ *
+ * There are a lot of those, especially on hardware that needs to work
+ * with USB mice and keyboard for booting.  And this code needs to fire
+ * early; before the input subsystem gets initialized, and while BIOS
+ * (or SMI) code has few problems running.
+ *
+ * They're collected here since USB host controller drivers need to use
+ * the same code as part of hardware initialization.
+ *
+ *  Copyright (c) 1999 Martin Mares <mj@ucw.cz>
+ *  (and others)
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/acpi.h>
+
+// #include "pci.h"
+
+/*
+ * PIIX3 USB: We have to disable USB interrupts that are
+ * hardwired to PIRQD# and may be shared with an
+ * external device.
+ *
+ * Legacy Support Register (LEGSUP):
+ *     bit13:  USB PIRQ Enable (USBPIRQDEN),
+ *     bit4:   Trap/SMI On IRQ Enable (USBSMIEN).
+ *
+ * We mask out all r/wc bits, too.
+ */
+static void __devinit quirk_piix3_usb(struct pci_dev *dev)
+{
+	u16 legsup;
+
+	pci_read_config_word(dev, 0xc0, &legsup);
+	legsup &= 0x50ef;
+	pci_write_config_word(dev, 0xc0, legsup);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371SB_2,	quirk_piix3_usb );
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_2,	quirk_piix3_usb );
+
+
+/* FIXME this should be the same code that the USB controllers use...
+ * the hcd->reset() method basically does this.
+ */
+
+#define UHCI_USBLEGSUP		0xc0		/* legacy support */
+#define UHCI_USBCMD		0		/* command register */
+#define UHCI_USBSTS		2		/* status register */
+#define UHCI_USBINTR		4		/* interrupt register */
+#define UHCI_USBLEGSUP_DEFAULT	0x2000		/* only PIRQ enable set */
+#define UHCI_USBCMD_RUN		(1 << 0)	/* RUN/STOP bit */
+#define UHCI_USBCMD_GRESET	(1 << 2)	/* Global reset */
+#define UHCI_USBCMD_CONFIGURE	(1 << 6)	/* config semaphore */
+#define UHCI_USBSTS_HALTED	(1 << 5)	/* HCHalted bit */
+
+#define OHCI_CONTROL		0x04
+#define OHCI_CMDSTATUS		0x08
+#define OHCI_INTRSTATUS		0x0c
+#define OHCI_INTRENABLE		0x10
+#define OHCI_INTRDISABLE	0x14
+#define OHCI_OCR		(1 << 3)	/* ownership change request */
+#define OHCI_CTRL_IR		(1 << 8)	/* interrupt routing */
+#define OHCI_INTR_OC		(1 << 30)	/* ownership change */
+
+#define EHCI_HCC_PARAMS		0x08		/* extended capabilities */
+#define EHCI_USBCMD		0		/* command register */
+#define EHCI_USBCMD_RUN		(1 << 0)	/* RUN/STOP bit */
+#define EHCI_USBSTS		4		/* status register */
+#define EHCI_USBSTS_HALTED	(1 << 12)	/* HCHalted bit */
+#define EHCI_USBINTR		8		/* interrupt register */
+#define EHCI_USBLEGSUP		0		/* legacy support register */
+#define EHCI_USBLEGSUP_BIOS	(1 << 16)	/* BIOS semaphore */
+#define EHCI_USBLEGSUP_OS	(1 << 24)	/* OS semaphore */
+#define EHCI_USBLEGCTLSTS	4		/* legacy control/status */
+#define EHCI_USBLEGCTLSTS_SOOE	(1 << 13)	/* SMI on ownership change */
+
+int usb_early_handoff __devinitdata = 0;
+static int __init usb_handoff_early(char *str)
+{
+	usb_early_handoff = 1;
+	return 0;
+}
+__setup("usb-handoff", usb_handoff_early);
+
+static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
+{
+	unsigned long base = 0;
+	int wait_time, delta;
+	u16 val, sts;
+	int i;
+
+	for (i = 0; i < PCI_ROM_RESOURCE; i++)
+		if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
+			base = pci_resource_start(pdev, i);
+			break;
+		}
+
+	if (!base)
+		return;
+
+	/*
+	 * stop controller
+	 */
+	sts = inw(base + UHCI_USBSTS);
+	val = inw(base + UHCI_USBCMD);
+	val &= ~(u16)(UHCI_USBCMD_RUN | UHCI_USBCMD_CONFIGURE);
+	outw(val, base + UHCI_USBCMD);
+
+	/*
+	 * wait while it stops if it was running
+	 */
+	if ((sts & UHCI_USBSTS_HALTED) == 0)
+	{
+		wait_time = 1000;
+		delta = 100;
+
+		do {
+			outw(0x1f, base + UHCI_USBSTS);
+			udelay(delta);
+			wait_time -= delta;
+			val = inw(base + UHCI_USBSTS);
+			if (val & UHCI_USBSTS_HALTED)
+				break;
+		} while (wait_time > 0);
+	}
+
+	/*
+	 * disable interrupts & legacy support
+	 */
+	outw(0, base + UHCI_USBINTR);
+	outw(0x1f, base + UHCI_USBSTS);
+	pci_read_config_word(pdev, UHCI_USBLEGSUP, &val);
+	if (val & 0xbf) 
+		pci_write_config_word(pdev, UHCI_USBLEGSUP, UHCI_USBLEGSUP_DEFAULT);
+		
+}
+
+static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
+{
+	void __iomem *base;
+	int wait_time;
+
+	base = ioremap_nocache(pci_resource_start(pdev, 0),
+				     pci_resource_len(pdev, 0));
+	if (base == NULL) return;
+
+	if (readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
+		wait_time = 500; /* 0.5 seconds */
+		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
+		writel(OHCI_OCR, base + OHCI_CMDSTATUS);
+		while (wait_time > 0 && 
+				readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
+			wait_time -= 10;
+			msleep(10);
+		}
+	}
+
+	/*
+	 * disable interrupts
+	 */
+	writel(~(u32)0, base + OHCI_INTRDISABLE);
+	writel(~(u32)0, base + OHCI_INTRSTATUS);
+
+	iounmap(base);
+}
+
+static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
+{
+	int wait_time, delta;
+	void __iomem *base, *op_reg_base;
+	u32 hcc_params, val, temp;
+	u8 cap_length;
+
+	base = ioremap_nocache(pci_resource_start(pdev, 0),
+				pci_resource_len(pdev, 0));
+	if (base == NULL) return;
+
+	cap_length = readb(base);
+	op_reg_base = base + cap_length;
+	hcc_params = readl(base + EHCI_HCC_PARAMS);
+	hcc_params = (hcc_params >> 8) & 0xff;
+	if (hcc_params) {
+		pci_read_config_dword(pdev, 
+					hcc_params + EHCI_USBLEGSUP,
+					&val);
+		if (((val & 0xff) == 1) && (val & EHCI_USBLEGSUP_BIOS)) {
+			/*
+			 * Ok, BIOS is in smm mode, try to hand off...
+			 */
+			pci_read_config_dword(pdev,
+						hcc_params + EHCI_USBLEGCTLSTS,
+						&temp);
+			pci_write_config_dword(pdev,
+						hcc_params + EHCI_USBLEGCTLSTS,
+						temp | EHCI_USBLEGCTLSTS_SOOE);
+			val |= EHCI_USBLEGSUP_OS;
+			pci_write_config_dword(pdev, 
+						hcc_params + EHCI_USBLEGSUP, 
+						val);
+
+			wait_time = 500;
+			do {
+				msleep(10);
+				wait_time -= 10;
+				pci_read_config_dword(pdev,
+						hcc_params + EHCI_USBLEGSUP,
+						&val);
+			} while (wait_time && (val & EHCI_USBLEGSUP_BIOS));
+			if (!wait_time) {
+				/*
+				 * well, possibly buggy BIOS...
+				 */
+				printk(KERN_WARNING "EHCI early BIOS handoff "
+						"failed (BIOS bug ?)\n");
+				pci_write_config_dword(pdev,
+						hcc_params + EHCI_USBLEGSUP,
+						EHCI_USBLEGSUP_OS);
+				pci_write_config_dword(pdev,
+						hcc_params + EHCI_USBLEGCTLSTS,
+						0);
+			}
+		}
+	}
+
+	/*
+	 * halt EHCI & disable its interrupts in any case
+	 */
+	val = readl(op_reg_base + EHCI_USBSTS);
+	if ((val & EHCI_USBSTS_HALTED) == 0) {
+		val = readl(op_reg_base + EHCI_USBCMD);
+		val &= ~EHCI_USBCMD_RUN;
+		writel(val, op_reg_base + EHCI_USBCMD);
+
+		wait_time = 2000;
+		delta = 100;
+		do {
+			writel(0x3f, op_reg_base + EHCI_USBSTS);
+			udelay(delta);
+			wait_time -= delta;
+			val = readl(op_reg_base + EHCI_USBSTS);
+			if ((val == ~(u32)0) || (val & EHCI_USBSTS_HALTED)) {
+				break;
+			}
+		} while (wait_time > 0);
+	}
+	writel(0, op_reg_base + EHCI_USBINTR);
+	writel(0x3f, op_reg_base + EHCI_USBSTS);
+
+	iounmap(base);
+
+	return;
+}
+
+
+
+static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
+{
+	if (!usb_early_handoff)
+		return;
+
+	if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x00)) { /* UHCI */
+		quirk_usb_handoff_uhci(pdev);
+	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10)) { /* OHCI */
+		quirk_usb_handoff_ohci(pdev);
+	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x20)) { /* EHCI */
+		quirk_usb_disable_ehci(pdev);
+	}
+
+	return;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
Index: g26/drivers/pci/quirks.c
===================================================================
--- g26.orig/drivers/pci/quirks.c	2005-08-02 07:06:10.000000000 -0700
+++ g26/drivers/pci/quirks.c	2005-08-02 07:58:44.000000000 -0700
@@ -7,6 +7,9 @@
  *
  *  Copyright (c) 1999 Martin Mares <mj@ucw.cz>
  *
+ *  Quirks for USB host controllers should be handled in the USB
+ *  quirks file; that code is reused by host controller drivers.
+ *
  *  The bridge optimization stuff has been removed. If you really
  *  have a silly BIOS which is unable to set your host bridge right,
  *  use the PowerTweak utility (see http://powertweak.sourceforge.net).
@@ -513,28 +516,6 @@ static void quirk_via_irq(struct pci_dev
 DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
 
 /*
- * PIIX3 USB: We have to disable USB interrupts that are
- * hardwired to PIRQD# and may be shared with an
- * external device.
- *
- * Legacy Support Register (LEGSUP):
- *     bit13:  USB PIRQ Enable (USBPIRQDEN),
- *     bit4:   Trap/SMI On IRQ Enable (USBSMIEN).
- *
- * We mask out all r/wc bits, too.
- */
-static void __devinit quirk_piix3_usb(struct pci_dev *dev)
-{
-	u16 legsup;
-
-	pci_read_config_word(dev, 0xc0, &legsup);
-	legsup &= 0x50ef;
-	pci_write_config_word(dev, 0xc0, legsup);
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371SB_2,	quirk_piix3_usb );
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_2,	quirk_piix3_usb );
-
-/*
  * VIA VT82C598 has its device ID settable and many BIOSes
  * set it to the ID of VT82C597 for backward compatibility.
  * We need to switch it off to be able to recognize the real
@@ -876,234 +857,6 @@ static void __init quirk_sis_96x_smbus(s
 	pci_read_config_byte(dev, 0x77, &val);
 }
 
-
-#define UHCI_USBLEGSUP		0xc0		/* legacy support */
-#define UHCI_USBCMD		0		/* command register */
-#define UHCI_USBSTS		2		/* status register */
-#define UHCI_USBINTR		4		/* interrupt register */
-#define UHCI_USBLEGSUP_DEFAULT	0x2000		/* only PIRQ enable set */
-#define UHCI_USBCMD_RUN		(1 << 0)	/* RUN/STOP bit */
-#define UHCI_USBCMD_GRESET	(1 << 2)	/* Global reset */
-#define UHCI_USBCMD_CONFIGURE	(1 << 6)	/* config semaphore */
-#define UHCI_USBSTS_HALTED	(1 << 5)	/* HCHalted bit */
-
-#define OHCI_CONTROL		0x04
-#define OHCI_CMDSTATUS		0x08
-#define OHCI_INTRSTATUS		0x0c
-#define OHCI_INTRENABLE		0x10
-#define OHCI_INTRDISABLE	0x14
-#define OHCI_OCR		(1 << 3)	/* ownership change request */
-#define OHCI_CTRL_IR		(1 << 8)	/* interrupt routing */
-#define OHCI_INTR_OC		(1 << 30)	/* ownership change */
-
-#define EHCI_HCC_PARAMS		0x08		/* extended capabilities */
-#define EHCI_USBCMD		0		/* command register */
-#define EHCI_USBCMD_RUN		(1 << 0)	/* RUN/STOP bit */
-#define EHCI_USBSTS		4		/* status register */
-#define EHCI_USBSTS_HALTED	(1 << 12)	/* HCHalted bit */
-#define EHCI_USBINTR		8		/* interrupt register */
-#define EHCI_USBLEGSUP		0		/* legacy support register */
-#define EHCI_USBLEGSUP_BIOS	(1 << 16)	/* BIOS semaphore */
-#define EHCI_USBLEGSUP_OS	(1 << 24)	/* OS semaphore */
-#define EHCI_USBLEGCTLSTS	4		/* legacy control/status */
-#define EHCI_USBLEGCTLSTS_SOOE	(1 << 13)	/* SMI on ownership change */
-
-int usb_early_handoff __devinitdata = 0;
-static int __init usb_handoff_early(char *str)
-{
-	usb_early_handoff = 1;
-	return 0;
-}
-__setup("usb-handoff", usb_handoff_early);
-
-static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
-{
-	unsigned long base = 0;
-	int wait_time, delta;
-	u16 val, sts;
-	int i;
-
-	for (i = 0; i < PCI_ROM_RESOURCE; i++)
-		if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
-			base = pci_resource_start(pdev, i);
-			break;
-		}
-
-	if (!base)
-		return;
-
-	/*
-	 * stop controller
-	 */
-	sts = inw(base + UHCI_USBSTS);
-	val = inw(base + UHCI_USBCMD);
-	val &= ~(u16)(UHCI_USBCMD_RUN | UHCI_USBCMD_CONFIGURE);
-	outw(val, base + UHCI_USBCMD);
-
-	/*
-	 * wait while it stops if it was running
-	 */
-	if ((sts & UHCI_USBSTS_HALTED) == 0)
-	{
-		wait_time = 1000;
-		delta = 100;
-
-		do {
-			outw(0x1f, base + UHCI_USBSTS);
-			udelay(delta);
-			wait_time -= delta;
-			val = inw(base + UHCI_USBSTS);
-			if (val & UHCI_USBSTS_HALTED)
-				break;
-		} while (wait_time > 0);
-	}
-
-	/*
-	 * disable interrupts & legacy support
-	 */
-	outw(0, base + UHCI_USBINTR);
-	outw(0x1f, base + UHCI_USBSTS);
-	pci_read_config_word(pdev, UHCI_USBLEGSUP, &val);
-	if (val & 0xbf) 
-		pci_write_config_word(pdev, UHCI_USBLEGSUP, UHCI_USBLEGSUP_DEFAULT);
-		
-}
-
-static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
-{
-	void __iomem *base;
-	int wait_time;
-
-	base = ioremap_nocache(pci_resource_start(pdev, 0),
-				     pci_resource_len(pdev, 0));
-	if (base == NULL) return;
-
-	if (readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
-		wait_time = 500; /* 0.5 seconds */
-		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
-		writel(OHCI_OCR, base + OHCI_CMDSTATUS);
-		while (wait_time > 0 && 
-				readl(base + OHCI_CONTROL) & OHCI_CTRL_IR) {
-			wait_time -= 10;
-			msleep(10);
-		}
-	}
-
-	/*
-	 * disable interrupts
-	 */
-	writel(~(u32)0, base + OHCI_INTRDISABLE);
-	writel(~(u32)0, base + OHCI_INTRSTATUS);
-
-	iounmap(base);
-}
-
-static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
-{
-	int wait_time, delta;
-	void __iomem *base, *op_reg_base;
-	u32 hcc_params, val, temp;
-	u8 cap_length;
-
-	base = ioremap_nocache(pci_resource_start(pdev, 0),
-				pci_resource_len(pdev, 0));
-	if (base == NULL) return;
-
-	cap_length = readb(base);
-	op_reg_base = base + cap_length;
-	hcc_params = readl(base + EHCI_HCC_PARAMS);
-	hcc_params = (hcc_params >> 8) & 0xff;
-	if (hcc_params) {
-		pci_read_config_dword(pdev, 
-					hcc_params + EHCI_USBLEGSUP,
-					&val);
-		if (((val & 0xff) == 1) && (val & EHCI_USBLEGSUP_BIOS)) {
-			/*
-			 * Ok, BIOS is in smm mode, try to hand off...
-			 */
-			pci_read_config_dword(pdev,
-						hcc_params + EHCI_USBLEGCTLSTS,
-						&temp);
-			pci_write_config_dword(pdev,
-						hcc_params + EHCI_USBLEGCTLSTS,
-						temp | EHCI_USBLEGCTLSTS_SOOE);
-			val |= EHCI_USBLEGSUP_OS;
-			pci_write_config_dword(pdev, 
-						hcc_params + EHCI_USBLEGSUP, 
-						val);
-
-			wait_time = 500;
-			do {
-				msleep(10);
-				wait_time -= 10;
-				pci_read_config_dword(pdev,
-						hcc_params + EHCI_USBLEGSUP,
-						&val);
-			} while (wait_time && (val & EHCI_USBLEGSUP_BIOS));
-			if (!wait_time) {
-				/*
-				 * well, possibly buggy BIOS...
-				 */
-				printk(KERN_WARNING "EHCI early BIOS handoff "
-						"failed (BIOS bug ?)\n");
-				pci_write_config_dword(pdev,
-						hcc_params + EHCI_USBLEGSUP,
-						EHCI_USBLEGSUP_OS);
-				pci_write_config_dword(pdev,
-						hcc_params + EHCI_USBLEGCTLSTS,
-						0);
-			}
-		}
-	}
-
-	/*
-	 * halt EHCI & disable its interrupts in any case
-	 */
-	val = readl(op_reg_base + EHCI_USBSTS);
-	if ((val & EHCI_USBSTS_HALTED) == 0) {
-		val = readl(op_reg_base + EHCI_USBCMD);
-		val &= ~EHCI_USBCMD_RUN;
-		writel(val, op_reg_base + EHCI_USBCMD);
-
-		wait_time = 2000;
-		delta = 100;
-		do {
-			writel(0x3f, op_reg_base + EHCI_USBSTS);
-			udelay(delta);
-			wait_time -= delta;
-			val = readl(op_reg_base + EHCI_USBSTS);
-			if ((val == ~(u32)0) || (val & EHCI_USBSTS_HALTED)) {
-				break;
-			}
-		} while (wait_time > 0);
-	}
-	writel(0, op_reg_base + EHCI_USBINTR);
-	writel(0x3f, op_reg_base + EHCI_USBSTS);
-
-	iounmap(base);
-
-	return;
-}
-
-
-
-static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
-{
-	if (!usb_early_handoff)
-		return;
-
-	if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x00)) { /* UHCI */
-		quirk_usb_handoff_uhci(pdev);
-	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10)) { /* OHCI */
-		quirk_usb_handoff_ohci(pdev);
-	} else if (pdev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x20)) { /* EHCI */
-		quirk_usb_disable_ehci(pdev);
-	}
-
-	return;
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
-
 /*
  * ... This is further complicated by the fact that some SiS96x south
  * bridges pretend to be 85C503/5513 instead.  In that case see if we

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-08-05 14:17 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-31  9:05 2.6.13-rc4-mm1 Andrew Morton
2005-07-31 10:04 ` 2.6.13-rc4-mm1 Felipe Alfaro Solana
2005-07-31 10:19   ` 2.6.13-rc4-mm1 Adrian Bunk
2005-07-31 12:37     ` 2.6.13-rc4-mm1 James Courtier-Dutton
2005-07-31 12:50       ` 2.6.13-rc4-mm1 Adrian Bunk
2005-07-31 14:41   ` 2.6.13-rc4-mm1 Michael Thonke
2005-07-31 13:55     ` 2.6.13-rc4-mm1 Felipe Alfaro Solana
2005-07-31 11:51 ` 2.6.13-rc4-mm1 Rafael J. Wysocki
2005-07-31 13:35 ` 2.6.13-rc4-mm1 Andreas Steinmetz
2005-07-31 17:47   ` 2.6.13-rc4-mm1 Andrew Morton
2005-07-31 18:49     ` 2.6.13-rc4-mm1 Andreas Steinmetz
2005-07-31 15:11 ` 2.6.13-rc4-mm1 Michael Thonke
2005-07-31 17:42   ` 2.6.13-rc4-mm1 Andrew Morton
2005-07-31 18:25     ` [linux-usb-devel] 2.6.13-rc4-mm1 david-b
2005-07-31 23:02       ` Greg KH
2005-08-01  2:02         ` david-b
2005-07-31 16:44 ` 2.6.13-rc4-mm1 Randy.Dunlap
2005-08-01  0:38 ` 2.6.13-rc4-mm1 Jesus Delgado
2005-08-01  0:49   ` 2.6.13-rc4-mm1 Andrew Morton
2005-08-01  5:52 ` 2.6.13-rc4-mm1 Alexandre Buisse
2005-08-01  7:03   ` 2.6.13-rc4-mm1 David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2005-08-01 17:50 [linux-usb-devel] 2.6.13-rc4-mm1 Aleksey Gorelov
2005-08-01 18:17 ` david-b
2005-08-05 14:17 david-b

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox