[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel-xen-2.6/F-7 Makefile.config, 1.1, 1.2 config-debug, 1.1, 1.2 config-generic, 1.1, 1.2 config-i586, 1.1, 1.2 config-i686, 1.1, 1.2 config-i686-PAE, 1.1, 1.2 config-ia64, 1.1, 1.2 config-ia64-generic, 1.1, 1.2 config-nodebug, 1.1, 1.2 config-powerpc-generic, 1.1, 1.2 config-powerpc32-generic, 1.1, 1.2 config-powerpc32-smp, 1.1, 1.2 config-powerpc64, 1.1, 1.2 config-powerpc64-kdump, 1.1, 1.2 config-s390x, 1.1, 1.2 config-sparc, 1.1, 1.2 config-sparc-generic, 1.1, 1.2 config-sparc-smp, 1.1, 1.2 config-sparc64, 1.1, 1.2 config-sparc64-generic, 1.1, 1.2 config-sparc64-smp, 1.1, 1.2 config-x86-generic, 1.1, 1.2 config-x86_64-generic, 1.1, 1.2 config-xen-generic, 1.1, 1.2 config-xen-ia64, 1.1, 1.2 config-xen-x86, 1.1, 1.2 config-xen-x86_64, 1.1, 1.2 drm-mm-git.patch, 1.1, 1.2 gen-patches, 1.1, 1.2 git-wireless-dev.patch, 1.1, 1.2 kernel-2.6.21-i686-xen.config, 1.1, 1.2 kernel-2.6.21-x86_64-xen.config, 1.1, 1.2 kernel.spec, 1.1, 1.2 linux-2.6-2110_scsi-sd-printing.patch, 1.1, 1.2 linux-2.6-2111_sd-start-stop.patch, 1.1, 1.2 linux-2.6-2112_libata-suspend.patch, 1.1, 1.2 linux-2.6-2113_libata-spindown-compat.patch, 1.1, 1.2 linux-2.6-2114_libata-shutdown-warning.patch, 1.1, 1.2 linux-2.6-2115_libata-spindown-status.patch, 1.1, 1.2 linux-2.6-2116_libata-remove-spindown-compat.patch, 1.1, 1.2 linux-2.6-2117_sata-via-suspend.patch, 1.1, 1.2 linux-2.6-2118_scsi-constants.patch, 1.1, 1.2 linux-2.6-acpi-boot-regression.patch, 1.1, 1.2 linux-2.6-acpi-dock-oops.patch, 1.1, 1.2 linux-2.6-acpi-git-ec-init-fixes.patch, 1.1, 1.2 linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch, 1.1, 1.2 linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch, 1.1, 1.2 linux-2.6-acpi-unblacklist-dell-gx240.patch, 1.1, 1.2 linux-2.6-add-mmf_dump_elf_headers.patch, 1.1, 1.2 linux-2.6-add-sys-module-name-notes.patch, 1.1, 1.2 linux-2.6-amd-disabled-svm-detect-msr-1.patch, 1.1, 1.2 linux-2.6-amd-disabled-svm-detect.patch, 1.1, 1.2 linux-2.6-at76.patch, 1.1, 1.2 linux-2.6-ata-call-check-dma-with-qc-prepared.patch, 1.1, 1.2 linux-2.6-ata-quirk.patch, 1.1, 1.2 linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch, 1.1, 1.2 linux-2.6-ath5k.patch, 1.1, 1.2 linux-2.6-bcm43xx-pci-neuter.patch, 1.1, 1.2 linux-2.6-cell-spu-device-tree.patch, 1.1, 1.2 linux-2.6-cell-spufs-fixes.patch, 1.1, 1.2 linux-2.6-clockevents-fix-resume-logic.patch, 1.1, 1.2 linux-2.6-crap-sysfs-workaround.patch, 1.1, 1.2 linux-2.6-debug-acpi-os-write-port.patch, 1.1, 1.2 linux-2.6-debug-extra-warnings.patch, 1.1, 1.2 linux-2.6-debug-nmi-timeout.patch, 1.1, 1.2 linux-2.6-default-mmf_dump_elf_headers.patch, 1.1, 1.2 linux-2.6-defaults-pci_no_msi_mmconf.patch, 1.1, 1.2 linux-2.6-drivers-ssb-debug-revision.patch, 1.1, 1.2 linux-2.6-dvb-spinlock.patch, 1.1, 1.2 linux-2.6-e1000-corrupt-eeprom-checksum.patch, 1.1, 1.2 linux-2.6-execshield-xen.patch, 1.1, 1.2 linux-2.6-firewire-be32-fix.patch, 1.1, 1.2 linux-2.6-firewire-lockdep.patch, 1.1, 1.2 linux-2.6-firewire-multi-lun.patch, 1.1, 1.2 linux-2.6-fix-pmops-1.patch, 1.1, 1.2 linux-2.6-fix-pmops-2.patch, 1.1, 1.2 linux-2.6-fix-pmops-3.patch, 1.1, 1.2 linux-2.6-fix-pmops-4.patch, 1.1, 1.2 linux-2.6-gfs-locking-exports.patch, 1.1, 1.2 linux-2.6-highres-timers.patch, 1.1, 1.2 linux-2.6-i386-vdso-install-unstripped-copies-on-disk.patch, 1.1, 1.2 linux-2.6-i82875-edac-pci-setup.patch, 1.1, 1.2 linux-2.6-i965gm-support.patch, 1.1, 1.2 linux-2.6-iwlwifi-fixes.patch, 1.1, 1.2 linux-2.6-kvm-19.patch, 1.1, 1.2 linux-2.6-kvm-reinit-real-mode-tss.patch, 1.1, 1.2 linux-2.6-libata-acpi-enable.patch, 1.1, 1.2 linux-2.6-libata-ali-atapi-dma.patch, 1.1, 1.2 linux-2.6-libata-atiixp-ids.patch, 1.1, 1.2 linux-2.6-libata-hpa.patch, 1.1, 1.2 linux-2.6-libata-ich8m-add-pciid.patch, 1.1, 1.2 linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch, 1.1, 1.2 linux-2.6-libata-pata-dma-disable-option.patch, 1.1, 1.2 linux-2.6-libata-pata-hpt3x2n-correct-revision-boundary.patch, 1.1, 1.2 linux-2.6-libata-pata-pcmcia-new-ident.patch, 1.1, 1.2 linux-2.6-libata-pata-sis-fix-timing.patch, 1.1, 1.2 linux-2.6-libata-pata_dma-param.patch, 1.1, 1.2 linux-2.6-libata-pata_it821x-partly-fix-dma.patch, 1.1, 1.2 linux-2.6-libata-sata_nv-adma.patch, 1.1, 1.2 linux-2.6-libata-sata_nv-wildcard-removal.patch, 1.1, 1.2 linux-2.6-libata-setxfer.patch, 1.1, 1.2 linux-2.6-libata_ali_max_dma_speed.patch, 1.1, 1.2 linux-2.6-lirc.patch, 1.1, 1.2 linux-2.6-mac80211-extras.patch, 1.1, 1.2 linux-2.6-mac80211-nm-hidden-ssid.patch, 1.1, 1.2 linux-2.6-mm-udf-fixes.patch, 1.1, 1.2 linux-2.6-mpc52xx-fec.patch, 1.1, 1.2 linux-2.6-mpc52xx-sdma.patch, 1.1, 1.2 linux-2.6-net-e1000-no-msi-warning.patch, 1.1, 1.2 linux-2.6-net-silence-noisy-printks.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-01.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-02.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-03.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-04.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-05.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-06.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-07.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-08.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-09.patch, 1.1, 1.2 linux-2.6-netdev-e1000e-10.patch, 1.1, 1.2 linux-2.6-nfs-missing-braces.patch, 1.1, 1.2 linux-2.6-nfs-noreaddirplus.patch, 1.1, 1.2 linux-2.6-ondemand-timer.patch, 1.1, 1.2 linux-2.6-pass-g-to-assembler-under-config_debug_info.patch, 1.1, 1.2 linux-2.6-pmac-zilog.patch, 1.1, 1.2 linux-2.6-pmtrace-time-fix.patch, 1.1, 1.2 linux-2.6-powermac-generic-suspend-1.patch, 1.1, 1.2 linux-2.6-powermac-generic-suspend-2.patch, 1.1, 1.2 linux-2.6-powermac-generic-suspend-3.patch, 1.1, 1.2 linux-2.6-powermac-generic-suspend-4.patch, 1.1, 1.2 linux-2.6-powerpc-generic-suspend-2-remove-adb-sleep-notifier.patch, 1.1, 1.2 linux-2.6-powerpc-generic-suspend-3-remove-dmasound.patch, 1.1, 1.2 linux-2.6-powerpc-generic-suspend-4-kill-pmu-sleep-notifier.patch, 1.1, 1.2 linux-2.6-powerpc-generic-suspend-5-pmu-pm_ops.patch, 1.1, 1.2 linux-2.6-powerpc-lparmap-g.patch, 1.1, 1.2 linux-2.6-powerpc-reserve-initrd-1.patch, 1.1, 1.2 linux-2.6-powerpc-reserve-initrd-2.patch, 1.1, 1.2 linux-2.6-powerpc-slabalign.patch, 1.1, 1.2 linux-2.6-powerpc-spu-vicinity.patch, 1.1, 1.2 linux-2.6-powerpc-vdso-install-unstripped-copies-on-disk.patch, 1.1, 1.2 linux-2.6-ppc-data-exception.patch, 1.1, 1.2 linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch, 1.1, 1.2 linux-2.6-ps3-clear-spu-irq.patch, 1.1, 1.2 linux-2.6-ps3-device-init.patch, 1.1, 1.2 linux-2.6-ps3-ehci-iso.patch, 1.1, 1.2 linux-2.6-ps3-ethernet-autoload.patch, 1.1, 1.2 linux-2.6-ps3-ethernet-modular.patch, 1.1, 1.2 linux-2.6-ps3-gelic-wireless.patch, 1.1, 1.2 linux-2.6-ps3-gelic.patch, 1.1, 1.2 linux-2.6-ps3-kexec.patch, 1.1, 1.2 linux-2.6-ps3-legacy-bootloader-hack.patch, 1.1, 1.2 linux-2.6-ps3-legacy-ioport.patch, 1.1, 1.2 linux-2.6-ps3-memory-probe.patch, 1.1, 1.2 linux-2.6-ps3-smp-boot.patch, 1.1, 1.2 linux-2.6-ps3-sound-autoload.patch, 1.1, 1.2 linux-2.6-ps3-sound.patch, 1.1, 1.2 linux-2.6-ps3-stable-patches.patch, 1.1, 1.2 linux-2.6-ps3-storage-alias.patch, 1.1, 1.2 linux-2.6-ps3-storage.patch, 1.1, 1.2 linux-2.6-ps3-system-bus-rework-2.patch, 1.1, 1.2 linux-2.6-ps3-system-bus-rework.patch, 1.1, 1.2 linux-2.6-ps3-usb-autoload.patch, 1.1, 1.2 linux-2.6-ps3-wrap-spu-runctl.patch, 1.1, 1.2 linux-2.6-ps3av-export-header.patch, 1.1, 1.2 linux-2.6-ps3fb-panic.patch, 1.1, 1.2 linux-2.6-scsi-async-double-add.patch, 1.1, 1.2 linux-2.6-scsi-bounce-isa.patch, 1.1, 1.2 linux-2.6-scsi-mpt-vmware-fix.patch, 1.1, 1.2 linux-2.6-smarter-relatime.patch, 1.1, 1.2 linux-2.6-softirq-printout-irq-trace-events.patch, 1.1, 1.2 linux-2.6-suspend-ordering.patch, 1.1, 1.2 linux-2.6-sysfs-inode-allocator-oops.patch, 1.1, 1.2 linux-2.6-udf-2.6.22-rc2-1-udf_data_corruption.patch, 1.1, 1.2 linux-2.6-udf-2.6.22-rc4-1-udf_block_leak.patch, 1.1, 1.2 linux-2.6-usb-autosuspend-default-disable.patch, 1.1, 1.2 linux-2.6-usb-storage-initialize-huawei-e220-properly.patch, 1.1, 1.2 linux-2.6-usb-suspend-classes.patch, 1.1, 1.2 linux-2.6-utrace-core.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-avr32.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-ia64.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-s390.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-sparc64.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat-xen.patch, 1.1, 1.2 linux-2.6-utrace-ptrace-compat.patch, 1.1, 1.2 linux-2.6-utrace-recalc_sigpending_and_wake.patch, 1.1, 1.2 linux-2.6-utrace-regset-avr32.patch, 1.1, 1.2 linux-2.6-utrace-regset-ia64.patch, 1.1, 1.2 linux-2.6-utrace-regset-s390.patch, 1.1, 1.2 linux-2.6-utrace-regset-sparc64.patch, 1.1, 1.2 linux-2.6-utrace-regset.patch, 1.1, 1.2 linux-2.6-utrace-sig_kernel-macros.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-avr32.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-ia64.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-s390.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-sparc64.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-um.patch, 1.1, 1.2 linux-2.6-utrace-tracehook-xen.patch, 1.1, 1.2 linux-2.6-utrace-tracehook.patch, 1.1, 1.2 linux-2.6-vm-invalidate_mapping_pages-cond-resched.patch, 1.1, 1.2 linux-2.6-wakeups-hdaps.patch, 1.1, 1.2 linux-2.6-wakeups.patch, 1.1, 1.2 linux-2.6-wireless.patch, 1.1, 1.2 linux-2.6-x86-64_pmtrace.patch, 1.1, 1.2 linux-2.6-x86-clean-up-oops-bug-reports.patch, 1.1, 1.2 linux-2.6-x86-debug-boot.patch, 1.1, 1.2 linux-2.6-x86-dell-hpet.patch, 1.1, 1.2 linux-2.6-x86-dont-delete-cpu_devs-data.patch, 1.1, 1.2 linux-2.6-x86-fsc-interrupt-controller-quirk.patch, 1.1, 1.2 linux-2.6-x86_64-ia32-vdso-install-unstripped-copies-on-disk.patch, 1.1, 1.2 linux-2.6-x86_64-silence-up-apic-errors-xen.patch, 1.1, 1.2 linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch, 1.1, 1.2 linux-2.6-xen-irq_vector-uninitialize.patch, 1.1, 1.2 linux-2.6-xfs-optimize-away-dmapi-tests.patch, 1.1, 1.2 linux-2.6-xfs-optimize-away-realtime-tests.patch, 1.1, 1.2 linux-2.6-xfs-refactor-xfs_mountfs.patch, 1.1, 1.2 linux-2.6-xfs-setfattr-32bit-compat.patch, 1.1, 1.2 linux-2.6-zd1211rw-mac80211.patch, 1.1, 1.2 linux-2.6.21.7-xen-3.1.0.patch.bz2, 1.1, 1.2 linux-2.6.21.tar.bz2.sign, 1.1, 1.2 linux-2.6.23.tar.bz2.sign, 1.1, 1.2 mirrors, 1.1, 1.2 nouveau-drm.patch, 1.1, 1.2 patch-2.6.21.7.bz2, 1.1, 1.2 patch-2.6.23-git2.bz2.sign, 1.1, 1.2 patch-2.6.23.1.bz2.sign, 1.1, 1.2 upstream, 1.1, 1.2 upstream-key.gpg, 1.1, 1.2 Config.mk, 1.1, 1.2 Makefile, 1.1, 1.2 config-rhel-generic, 1.1, 1.2 linux-2.6-common-uevent.patch, 1.1, 1.2 linux-2.6-compile-fixes.patch, 1.2, 1.3 linux-2.6-crash-driver-xen.patch, 1.1, 1.2 linux-2.6-crash-driver.patch, 1.1, 1.2 linux-2.6-debug-no-quiet.patch, 1.1, 1.2 linux-2.6-debug-sizeof-structs.patch, 1.1, 1.2 linux-2.6-debug-sysfs-crash-debugging-xen.patch, 1.1, 1.2 linux-2.6-debug-sysfs-crash-debugging.patch, 1.1, 1.2 linux-2.6-debug-taint-vm.patch, 1.2, 1.3 linux-2.6-devmem-xen.patch, 1.1, 1.2 linux-2.6-devmem.patch, 1.2, 1.3 linux-2.6-disable-netback-checksum.patch, 1.1, 1.2 linux-2.6-execshield.patch, 1.2, 1.3 linux-2.6-firewire.patch, 1.1, 1.2 linux-2.6-gfs2-update.patch, 1.1, 1.2 linux-2.6-modsign-core.patch, 1.2, 1.3 linux-2.6-modsign-crypto.patch, 1.2, 1.3 linux-2.6-modsign-include.patch, 1.2, 1.3 linux-2.6-modsign-ksign.patch, 1.2, 1.3 linux-2.6-modsign-mpilib.patch, 1.2, 1.3 linux-2.6-modsign-script.patch, 1.2, 1.3 linux-2.6-silence-noise.patch, 1.2, 1.3 linux-2.6-squashfs.patch, 1.2, 1.3 linux-2.6-xen-backwards-time.patch, 1.1, 1.2 linux-2.6-xen-blkfront-wait-add.patch, 1.1, 1.2 sources, 1.6, 1.7 xen-compile-fix.patch, 1.2, 1.3 xen-version-strings.patch, 1.3, 1.4 xen-vmx-fpu-ts-fix.patch, 1.1, 1.2 xen-vpic-irqbase-mode.patch, 1.1, 1.2 config-olpc-generic, 1.1, NONE git-geode.patch, 1.1, NONE kernel-2.6.20-i586.config, 1.1, NONE kernel-2.6.20-i686-PAE-debug.config, 1.1, NONE kernel-2.6.20-i686-PAE.config, 1.1, NONE kernel-2.6.20-i686-debug.config, 1.1, NONE kernel-2.6.20-i686-xen.config, 1.7, NONE kernel-2.6.20-i686.config, 1.1, NONE kernel-2.6.20-ia64-xen.config, 1.2, NONE kernel-2.6.20-ia64.config, 1.1, NONE kernel-2.6.20-ppc-smp.config, 1.1, NONE kernel-2.6.20-ppc.config, 1.1, NONE kernel-2.6.20-ppc64-kdump.config, 1.1, NONE kernel-2.6.20-ppc64.config, 1.1, NONE kernel-2.6.20-ppc64iseries-kdump.config, 1.1, NONE kernel-2.6.20-ppc64iseries.config, 1.1, NONE kernel-2.6.20-s390.config, 1.1, NONE kernel-2.6.20-s390x.config, 1.1, NONE kernel-2.6.20-x86_64-debug.config, 1.1, NONE kernel-2.6.20-x86_64-kdump.config, 1.1, NONE kernel-2.6.20-x86_64-xen.config, 1.6, NONE kernel-2.6.20-x86_64.config, 1.1, NONE linux-2.6-NFSD-badness.patch, 1.1, NONE linux-2.6-NFSD-ctlbits.patch, 1.1, NONE linux-2.6-build-input-not-embedded.patch, 1.1, NONE linux-2.6-cachefiles.patch, 1.1, NONE linux-2.6-cafe-nand.patch, 1.1, NONE linux-2.6-cell-mambo-drivers.patch, 1.2, NONE linux-2.6-cpufreq-unload-smi.patch, 1.1, NONE linux-2.6-csum-missing-line.patch, 1.3, NONE linux-2.6-debug-Wundef.patch, 1.1, NONE linux-2.6-debug-disable-builtins.patch, 1.1, NONE linux-2.6-debug-sleep-in-irq-warning.patch, 1.1, NONE linux-2.6-debug-verbosify-bug.patch, 1.1, NONE linux-2.6-defaults-disable-split-ptlock.patch, 1.2, NONE linux-2.6-defaults-firmware-loader-timeout.patch, 1.1, NONE linux-2.6-defaults-phys-start.patch, 1.1, NONE linux-2.6-drivers-add-qlogic-firmware.patch, 1.1, NONE linux-2.6-fix-x86_64-vgetcpu.patch, 1.1, NONE linux-2.6-forwarding_of_ip_summed.patch, 1.2, NONE linux-2.6-gfs2-locking-exports.patch, 1.1, NONE linux-2.6-gfs2-tux.patch, 1.1, NONE linux-2.6-hvc-console.patch, 1.1, NONE linux-2.6-ia64-kexec-kdump-xen-conflict.patch, 1.1, NONE linux-2.6-ips-softlockup.patch, 1.1, NONE linux-2.6-kill_skbuff_hack.patch, 1.3, NONE linux-2.6-lockdep-fixes.patch, 1.1, NONE linux-2.6-mac-raid-autorun.patch, 1.1, NONE linux-2.6-marvell-88alp01.patch, 1.1, NONE linux-2.6-marvell-update.patch, 1.1, NONE linux-2.6-mm-prevent-oom-fixes.patch, 1.1, NONE linux-2.6-mpc52xx-ata.patch, 1.1, NONE linux-2.6-mtd-update.patch, 1.1, NONE linux-2.6-net-forcedeth-suspend.patch, 1.1, NONE linux-2.6-obsolete-oss-warning.patch, 1.1, NONE linux-2.6-ohci-multi-init.patch, 1.1, NONE linux-2.6-ohci-platform-bus.patch, 1.1, NONE linux-2.6-olpc-battery.patch, 1.1, NONE linux-2.6-olpc-dcon.patch, 1.1, NONE linux-2.6-power6-no-ci-large-page.patch, 1.1, NONE linux-2.6-ppc-iseries-input-layer.patch, 1.1, NONE linux-2.6-ppc-rtas-check.patch, 1.1, NONE linux-2.6-sata-ahci-suspend.patch, 1.1, NONE linux-2.6-sata-pata-piix3.patch, 1.1, NONE linux-2.6-sata-promise-pata-ports.patch, 1.2, NONE linux-2.6-sata-sg_init_one-oops.patch, 1.1, NONE linux-2.6-serial-tickle-nmi.patch, 1.1, NONE linux-2.6-sleepon.patch, 1.1, NONE linux-2.6-softcursor-persistent-alloc.patch, 1.1, NONE linux-2.6-sysprof-1.0.3.patch, 1.1, NONE linux-2.6-systemsim-work.patch, 1.1, NONE linux-2.6-treat_partial_as_unnecessary.patch, 1.2, NONE linux-2.6-tux.patch, 1.1, NONE linux-2.6-usb-endian-ehci.patch, 1.2, NONE linux-2.6-usb-endian-quirks.patch, 1.1, NONE linux-2.6-usb-endian-toshiba.patch, 1.1, NONE linux-2.6-usb-storage-reboot.patch, 1.1, NONE linux-2.6-use_csum_start_offset_instead.patch, 1.2, NONE linux-2.6-utrace.patch, 1.2, NONE linux-2.6-vm-debug.patch, 1.1, NONE linux-2.6-warn-c-p-a.patch, 1.1, NONE linux-2.6-x86-apic-auto.patch, 1.1, NONE linux-2.6-xen-add-packet_auxdata-cmsg-1.patch, 1.2, NONE linux-2.6-xen-add-packet_auxdata-cmsg-2.patch, 1.2, NONE linux-2.6-xen-af_packet-no-skb_checksum_setup.patch, 1.2, NONE linux-2.6-xen-execshield.patch, 1.4, NONE linux-2.6-xen-iscsi-x86_64-no_iommu_init.patch, 1.2, NONE linux-2.6-xen-tux.patch, 1.1, NONE linux-2.6-xen-utrace.patch, 1.3, NONE linux-2.6-xen-x86_64-silence-up-apic-errors.patch, 1.1, NONE linux-2.6-xfs-umount-fix.patch, 1.1, NONE linux-2.6-xfs_attr2.patch, 1.1, NONE linux-2.6.20.14-xen-3.1.0.patch, 1.1, NONE linux-2.6.20.tar.bz2.sign, 1.1, NONE



Author: ehabkost

Update of /cvs/pkgs/rpms/kernel-xen-2.6/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20157

Modified Files:
	Config.mk Makefile config-rhel-generic 
	linux-2.6-common-uevent.patch linux-2.6-compile-fixes.patch 
	linux-2.6-crash-driver-xen.patch linux-2.6-crash-driver.patch 
	linux-2.6-debug-no-quiet.patch 
	linux-2.6-debug-sizeof-structs.patch 
	linux-2.6-debug-sysfs-crash-debugging-xen.patch 
	linux-2.6-debug-sysfs-crash-debugging.patch 
	linux-2.6-debug-taint-vm.patch linux-2.6-devmem-xen.patch 
	linux-2.6-devmem.patch 
	linux-2.6-disable-netback-checksum.patch 
	linux-2.6-execshield.patch linux-2.6-firewire.patch 
	linux-2.6-gfs2-update.patch linux-2.6-modsign-core.patch 
	linux-2.6-modsign-crypto.patch linux-2.6-modsign-include.patch 
	linux-2.6-modsign-ksign.patch linux-2.6-modsign-mpilib.patch 
	linux-2.6-modsign-script.patch linux-2.6-silence-noise.patch 
	linux-2.6-squashfs.patch linux-2.6-xen-backwards-time.patch 
	linux-2.6-xen-blkfront-wait-add.patch sources 
	xen-compile-fix.patch xen-version-strings.patch 
	xen-vmx-fpu-ts-fix.patch xen-vpic-irqbase-mode.patch 
Added Files:
	Makefile.config config-debug config-generic config-i586 
	config-i686 config-i686-PAE config-ia64 config-ia64-generic 
	config-nodebug config-powerpc-generic config-powerpc32-generic 
	config-powerpc32-smp config-powerpc64 config-powerpc64-kdump 
	config-s390x config-sparc config-sparc-generic 
	config-sparc-smp config-sparc64 config-sparc64-generic 
	config-sparc64-smp config-x86-generic config-x86_64-generic 
	config-xen-generic config-xen-ia64 config-xen-x86 
	config-xen-x86_64 drm-mm-git.patch gen-patches 
	git-wireless-dev.patch kernel-2.6.21-i686-xen.config 
	kernel-2.6.21-x86_64-xen.config kernel.spec 
	linux-2.6-2110_scsi-sd-printing.patch 
	linux-2.6-2111_sd-start-stop.patch 
	linux-2.6-2112_libata-suspend.patch 
	linux-2.6-2113_libata-spindown-compat.patch 
	linux-2.6-2114_libata-shutdown-warning.patch 
	linux-2.6-2115_libata-spindown-status.patch 
	linux-2.6-2116_libata-remove-spindown-compat.patch 
	linux-2.6-2117_sata-via-suspend.patch 
	linux-2.6-2118_scsi-constants.patch 
	linux-2.6-acpi-boot-regression.patch 
	linux-2.6-acpi-dock-oops.patch 
	linux-2.6-acpi-git-ec-init-fixes.patch 
	linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch 
	linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch 
	linux-2.6-acpi-unblacklist-dell-gx240.patch 
	linux-2.6-add-mmf_dump_elf_headers.patch 
	linux-2.6-add-sys-module-name-notes.patch 
	linux-2.6-amd-disabled-svm-detect-msr-1.patch 
	linux-2.6-amd-disabled-svm-detect.patch linux-2.6-at76.patch 
	linux-2.6-ata-call-check-dma-with-qc-prepared.patch 
	linux-2.6-ata-quirk.patch 
	linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch 
	linux-2.6-ath5k.patch linux-2.6-bcm43xx-pci-neuter.patch 
	linux-2.6-cell-spu-device-tree.patch 
	linux-2.6-cell-spufs-fixes.patch 
	linux-2.6-clockevents-fix-resume-logic.patch 
	linux-2.6-crap-sysfs-workaround.patch 
	linux-2.6-debug-acpi-os-write-port.patch 
	linux-2.6-debug-extra-warnings.patch 
	linux-2.6-debug-nmi-timeout.patch 
	linux-2.6-default-mmf_dump_elf_headers.patch 
	linux-2.6-defaults-pci_no_msi_mmconf.patch 
	linux-2.6-drivers-ssb-debug-revision.patch 
	linux-2.6-dvb-spinlock.patch 
	linux-2.6-e1000-corrupt-eeprom-checksum.patch 
	linux-2.6-execshield-xen.patch 
	linux-2.6-firewire-be32-fix.patch 
	linux-2.6-firewire-lockdep.patch 
	linux-2.6-firewire-multi-lun.patch linux-2.6-fix-pmops-1.patch 
	linux-2.6-fix-pmops-2.patch linux-2.6-fix-pmops-3.patch 
	linux-2.6-fix-pmops-4.patch 
	linux-2.6-gfs-locking-exports.patch 
	linux-2.6-highres-timers.patch 
	linux-2.6-i386-vdso-install-unstripped-copies-on-disk.patch 
	linux-2.6-i82875-edac-pci-setup.patch 
	linux-2.6-i965gm-support.patch linux-2.6-iwlwifi-fixes.patch 
	linux-2.6-kvm-19.patch 
	linux-2.6-kvm-reinit-real-mode-tss.patch 
	linux-2.6-libata-acpi-enable.patch 
	linux-2.6-libata-ali-atapi-dma.patch 
	linux-2.6-libata-atiixp-ids.patch linux-2.6-libata-hpa.patch 
	linux-2.6-libata-ich8m-add-pciid.patch 
	linux-2.6-libata-ncq-blacklist-2.6.22-rc7.patch 
	linux-2.6-libata-pata-dma-disable-option.patch 
	linux-2.6-libata-pata-hpt3x2n-correct-revision-boundary.patch 
	linux-2.6-libata-pata-pcmcia-new-ident.patch 
	linux-2.6-libata-pata-sis-fix-timing.patch 
	linux-2.6-libata-pata_dma-param.patch 
	linux-2.6-libata-pata_it821x-partly-fix-dma.patch 
	linux-2.6-libata-sata_nv-adma.patch 
	linux-2.6-libata-sata_nv-wildcard-removal.patch 
	linux-2.6-libata-setxfer.patch 
	linux-2.6-libata_ali_max_dma_speed.patch linux-2.6-lirc.patch 
	linux-2.6-mac80211-extras.patch 
	linux-2.6-mac80211-nm-hidden-ssid.patch 
	linux-2.6-mm-udf-fixes.patch linux-2.6-mpc52xx-fec.patch 
	linux-2.6-mpc52xx-sdma.patch 
	linux-2.6-net-e1000-no-msi-warning.patch 
	linux-2.6-net-silence-noisy-printks.patch 
	linux-2.6-netdev-e1000e-01.patch 
	linux-2.6-netdev-e1000e-02.patch 
	linux-2.6-netdev-e1000e-03.patch 
	linux-2.6-netdev-e1000e-04.patch 
	linux-2.6-netdev-e1000e-05.patch 
	linux-2.6-netdev-e1000e-06.patch 
	linux-2.6-netdev-e1000e-07.patch 
	linux-2.6-netdev-e1000e-08.patch 
	linux-2.6-netdev-e1000e-09.patch 
	linux-2.6-netdev-e1000e-10.patch 
	linux-2.6-nfs-missing-braces.patch 
	linux-2.6-nfs-noreaddirplus.patch 
	linux-2.6-ondemand-timer.patch 
	linux-2.6-pass-g-to-assembler-under-config_debug_info.patch 
	linux-2.6-pmac-zilog.patch linux-2.6-pmtrace-time-fix.patch 
	linux-2.6-powermac-generic-suspend-1.patch 
	linux-2.6-powermac-generic-suspend-2.patch 
	linux-2.6-powermac-generic-suspend-3.patch 
	linux-2.6-powermac-generic-suspend-4.patch 
	linux-2.6-powerpc-generic-suspend-2-remove-adb-sleep-notifier.patch 
	linux-2.6-powerpc-generic-suspend-3-remove-dmasound.patch 
	linux-2.6-powerpc-generic-suspend-4-kill-pmu-sleep-notifier.patch 
	linux-2.6-powerpc-generic-suspend-5-pmu-pm_ops.patch 
	linux-2.6-powerpc-lparmap-g.patch 
	linux-2.6-powerpc-reserve-initrd-1.patch 
	linux-2.6-powerpc-reserve-initrd-2.patch 
	linux-2.6-powerpc-slabalign.patch 
	linux-2.6-powerpc-spu-vicinity.patch 
	linux-2.6-powerpc-vdso-install-unstripped-copies-on-disk.patch 
	linux-2.6-ppc-data-exception.patch 
	linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch 
	linux-2.6-ps3-clear-spu-irq.patch 
	linux-2.6-ps3-device-init.patch linux-2.6-ps3-ehci-iso.patch 
	linux-2.6-ps3-ethernet-autoload.patch 
	linux-2.6-ps3-ethernet-modular.patch 
	linux-2.6-ps3-gelic-wireless.patch linux-2.6-ps3-gelic.patch 
	linux-2.6-ps3-kexec.patch 
	linux-2.6-ps3-legacy-bootloader-hack.patch 
	linux-2.6-ps3-legacy-ioport.patch 
	linux-2.6-ps3-memory-probe.patch linux-2.6-ps3-smp-boot.patch 
	linux-2.6-ps3-sound-autoload.patch linux-2.6-ps3-sound.patch 
	linux-2.6-ps3-stable-patches.patch 
	linux-2.6-ps3-storage-alias.patch linux-2.6-ps3-storage.patch 
	linux-2.6-ps3-system-bus-rework-2.patch 
	linux-2.6-ps3-system-bus-rework.patch 
	linux-2.6-ps3-usb-autoload.patch 
	linux-2.6-ps3-wrap-spu-runctl.patch 
	linux-2.6-ps3av-export-header.patch 
	linux-2.6-ps3fb-panic.patch 
	linux-2.6-scsi-async-double-add.patch 
	linux-2.6-scsi-bounce-isa.patch 
	linux-2.6-scsi-mpt-vmware-fix.patch 
	linux-2.6-smarter-relatime.patch 
	linux-2.6-softirq-printout-irq-trace-events.patch 
	linux-2.6-suspend-ordering.patch 
	linux-2.6-sysfs-inode-allocator-oops.patch 
	linux-2.6-udf-2.6.22-rc2-1-udf_data_corruption.patch 
	linux-2.6-udf-2.6.22-rc4-1-udf_block_leak.patch 
	linux-2.6-usb-autosuspend-default-disable.patch 
	linux-2.6-usb-storage-initialize-huawei-e220-properly.patch 
	linux-2.6-usb-suspend-classes.patch 
	linux-2.6-utrace-core.patch 
	linux-2.6-utrace-ptrace-compat-avr32.patch 
	linux-2.6-utrace-ptrace-compat-ia64.patch 
	linux-2.6-utrace-ptrace-compat-s390.patch 
	linux-2.6-utrace-ptrace-compat-sparc64.patch 
	linux-2.6-utrace-ptrace-compat-xen.patch 
	linux-2.6-utrace-ptrace-compat.patch 
	linux-2.6-utrace-recalc_sigpending_and_wake.patch 
	linux-2.6-utrace-regset-avr32.patch 
	linux-2.6-utrace-regset-ia64.patch 
	linux-2.6-utrace-regset-s390.patch 
	linux-2.6-utrace-regset-sparc64.patch 
	linux-2.6-utrace-regset.patch 
	linux-2.6-utrace-sig_kernel-macros.patch 
	linux-2.6-utrace-tracehook-avr32.patch 
	linux-2.6-utrace-tracehook-ia64.patch 
	linux-2.6-utrace-tracehook-s390.patch 
	linux-2.6-utrace-tracehook-sparc64.patch 
	linux-2.6-utrace-tracehook-um.patch 
	linux-2.6-utrace-tracehook-xen.patch 
	linux-2.6-utrace-tracehook.patch 
	linux-2.6-vm-invalidate_mapping_pages-cond-resched.patch 
	linux-2.6-wakeups-hdaps.patch linux-2.6-wakeups.patch 
	linux-2.6-wireless.patch linux-2.6-x86-64_pmtrace.patch 
	linux-2.6-x86-clean-up-oops-bug-reports.patch 
	linux-2.6-x86-debug-boot.patch linux-2.6-x86-dell-hpet.patch 
	linux-2.6-x86-dont-delete-cpu_devs-data.patch 
	linux-2.6-x86-fsc-interrupt-controller-quirk.patch 
	linux-2.6-x86_64-ia32-vdso-install-unstripped-copies-on-disk.patch 
	linux-2.6-x86_64-silence-up-apic-errors-xen.patch 
	linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch 
	linux-2.6-xen-irq_vector-uninitialize.patch 
	linux-2.6-xfs-optimize-away-dmapi-tests.patch 
	linux-2.6-xfs-optimize-away-realtime-tests.patch 
	linux-2.6-xfs-refactor-xfs_mountfs.patch 
	linux-2.6-xfs-setfattr-32bit-compat.patch 
	linux-2.6-zd1211rw-mac80211.patch 
	linux-2.6.21.7-xen-3.1.0.patch.bz2 linux-2.6.21.tar.bz2.sign 
	linux-2.6.23.tar.bz2.sign mirrors nouveau-drm.patch 
	patch-2.6.21.7.bz2 patch-2.6.23-git2.bz2.sign 
	patch-2.6.23.1.bz2.sign upstream upstream-key.gpg 
Removed Files:
	config-olpc-generic git-geode.patch kernel-2.6.20-i586.config 
	kernel-2.6.20-i686-PAE-debug.config 
	kernel-2.6.20-i686-PAE.config kernel-2.6.20-i686-debug.config 
	kernel-2.6.20-i686-xen.config kernel-2.6.20-i686.config 
	kernel-2.6.20-ia64-xen.config kernel-2.6.20-ia64.config 
	kernel-2.6.20-ppc-smp.config kernel-2.6.20-ppc.config 
	kernel-2.6.20-ppc64-kdump.config kernel-2.6.20-ppc64.config 
	kernel-2.6.20-ppc64iseries-kdump.config 
	kernel-2.6.20-ppc64iseries.config kernel-2.6.20-s390.config 
	kernel-2.6.20-s390x.config kernel-2.6.20-x86_64-debug.config 
	kernel-2.6.20-x86_64-kdump.config 
	kernel-2.6.20-x86_64-xen.config kernel-2.6.20-x86_64.config 
	linux-2.6-NFSD-badness.patch linux-2.6-NFSD-ctlbits.patch 
	linux-2.6-build-input-not-embedded.patch 
	linux-2.6-cachefiles.patch linux-2.6-cafe-nand.patch 
	linux-2.6-cell-mambo-drivers.patch 
	linux-2.6-cpufreq-unload-smi.patch 
	linux-2.6-csum-missing-line.patch linux-2.6-debug-Wundef.patch 
	linux-2.6-debug-disable-builtins.patch 
	linux-2.6-debug-sleep-in-irq-warning.patch 
	linux-2.6-debug-verbosify-bug.patch 
	linux-2.6-defaults-disable-split-ptlock.patch 
	linux-2.6-defaults-firmware-loader-timeout.patch 
	linux-2.6-defaults-phys-start.patch 
	linux-2.6-drivers-add-qlogic-firmware.patch 
	linux-2.6-fix-x86_64-vgetcpu.patch 
	linux-2.6-forwarding_of_ip_summed.patch 
	linux-2.6-gfs2-locking-exports.patch linux-2.6-gfs2-tux.patch 
	linux-2.6-hvc-console.patch 
	linux-2.6-ia64-kexec-kdump-xen-conflict.patch 
	linux-2.6-ips-softlockup.patch 
	linux-2.6-kill_skbuff_hack.patch linux-2.6-lockdep-fixes.patch 
	linux-2.6-mac-raid-autorun.patch 
	linux-2.6-marvell-88alp01.patch linux-2.6-marvell-update.patch 
	linux-2.6-mm-prevent-oom-fixes.patch 
	linux-2.6-mpc52xx-ata.patch linux-2.6-mtd-update.patch 
	linux-2.6-net-forcedeth-suspend.patch 
	linux-2.6-obsolete-oss-warning.patch 
	linux-2.6-ohci-multi-init.patch 
	linux-2.6-ohci-platform-bus.patch linux-2.6-olpc-battery.patch 
	linux-2.6-olpc-dcon.patch 
	linux-2.6-power6-no-ci-large-page.patch 
	linux-2.6-ppc-iseries-input-layer.patch 
	linux-2.6-ppc-rtas-check.patch 
	linux-2.6-sata-ahci-suspend.patch 
	linux-2.6-sata-pata-piix3.patch 
	linux-2.6-sata-promise-pata-ports.patch 
	linux-2.6-sata-sg_init_one-oops.patch 
	linux-2.6-serial-tickle-nmi.patch linux-2.6-sleepon.patch 
	linux-2.6-softcursor-persistent-alloc.patch 
	linux-2.6-sysprof-1.0.3.patch linux-2.6-systemsim-work.patch 
	linux-2.6-treat_partial_as_unnecessary.patch 
	linux-2.6-tux.patch linux-2.6-usb-endian-ehci.patch 
	linux-2.6-usb-endian-quirks.patch 
	linux-2.6-usb-endian-toshiba.patch 
	linux-2.6-usb-storage-reboot.patch 
	linux-2.6-use_csum_start_offset_instead.patch 
	linux-2.6-utrace.patch linux-2.6-vm-debug.patch 
	linux-2.6-warn-c-p-a.patch linux-2.6-x86-apic-auto.patch 
	linux-2.6-xen-add-packet_auxdata-cmsg-1.patch 
	linux-2.6-xen-add-packet_auxdata-cmsg-2.patch 
	linux-2.6-xen-af_packet-no-skb_checksum_setup.patch 
	linux-2.6-xen-execshield.patch 
	linux-2.6-xen-iscsi-x86_64-no_iommu_init.patch 
	linux-2.6-xen-tux.patch linux-2.6-xen-utrace.patch 
	linux-2.6-xen-x86_64-silence-up-apic-errors.patch 
	linux-2.6-xfs-umount-fix.patch linux-2.6-xfs_attr2.patch 
	linux-2.6.20.14-xen-3.1.0.patch linux-2.6.20.tar.bz2.sign 
Log Message:
Merging from private-ehabkost-debuginfo-branch




Index: Makefile.config
===================================================================
RCS file: Makefile.config
diff -N Makefile.config
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Makefile.config	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,137 @@
+# Make rules for configuration files.
+#
+# $Id$
+
+CFG		= kernel-$(VERSION)
+
+CONFIGFILES	= \
+	$(CFG)-i586.config \
+	$(CFG)-i686.config $(CFG)-i686-PAE.config \
+	$(CFG)-i686-debug.config $(CFG)-i686-PAE-debug.config \
+	$(CFG)-x86_64.config $(CFG)-x86_64-debug.config \
+	$(CFG)-s390x.config \
+	$(CFG)-ppc.config $(CFG)-ppc-smp.config \
+	$(CFG)-sparc64.config $(CFG)-sparc64-smp.config \
+	$(CFG)-ppc64.config $(CFG)-ppc64-kdump.config $(CFG)-ia64.config \
+	$(CFG)-i686-xen.config $(CFG)-x86_64-xen.config \
+	$(CFG)-ia64-xen.config
+
+PLATFORMS	= x86 x86_64 powerpc powerpc32 powerpc64 s390x ia64 sparc64 sparc
+TEMPFILES	= $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS)))
+
+configs: $(CONFIGFILES)
+	@rm -f kernel-*-config
+	@rm -f $(TEMPFILES)
+	@rm -f temp-generic temp-*-generic temp-*-generic-tmp
+
+# Augment the clean target to clean up our own cruft
+clean ::
+	@rm -fv $(CONFIGFILES) $(TEMPFILES) temp-generic kernel-$(VERSION)*config
+
+temp-generic: config-generic
+	cat config-generic config-nodebug > temp-generic
+
+temp-debug-generic: config-generic
+	cat config-generic config-debug > temp-debug-generic
+
+temp-x86-generic: config-x86-generic temp-generic
+	perl merge.pl $^  > $@
+
+temp-x86-debug-generic: config-x86-generic temp-debug-generic
+	perl merge.pl $^  > $@
+
+temp-x86_64-generic: config-x86_64-generic temp-generic
+	perl merge.pl $^  > $@
+
+temp-x86_64-debug-generic: config-x86_64-generic temp-debug-generic
+	perl merge.pl $^  > $@
+
+temp-sparc-generic: config-sparc-generic temp-generic
+	perl merge.pl $^  > $@
+
+temp-sparc64-generic: config-sparc64-generic temp-generic
+	perl merge.pl $^  > $@
+
+temp-powerpc-generic: config-powerpc-generic temp-generic
+	perl merge.pl $^  > $@
+
+temp-powerpc32-generic: config-powerpc32-generic temp-powerpc-generic
+	perl merge.pl $^  > $@
+
+temp-s390-generic: config-s390x temp-generic
+	perl merge.pl $^ > $@
+
+temp-ia64-generic: config-ia64-generic temp-generic
+	perl merge.pl $^ > $@
+
+temp-x86-xen-generic-tmp: config-xen-generic temp-x86-generic
+	perl merge.pl $^ > $@
+
+temp-x86-xen-generic: config-xen-x86 temp-x86-xen-generic-tmp
+	perl merge.pl $^ > $@
+
+temp-x86_64-xen-generic-tmp: config-xen-generic temp-x86_64-generic
+	perl merge.pl $^ > $@
+
+temp-x86_64-xen-generic: config-xen-x86_64 temp-x86_64-xen-generic-tmp
+	perl merge.pl $^ > $@
+
+temp-ia64-xen-generic: config-xen-generic temp-ia64-generic
+	perl merge.pl $^ > $@
+
+kernel-$(VERSION)-i686.config: config-i686 temp-x86-generic
+	perl merge.pl $^ i386 > $@
+
+kernel-$(VERSION)-i686-debug.config: config-i686 temp-x86-debug-generic
+	perl merge.pl $^ i386 > $@
+
+kernel-$(VERSION)-i686-PAE.config: config-i686-PAE temp-x86-generic
+	perl merge.pl $^ i386 > $@
+
+kernel-$(VERSION)-i686-PAE-debug.config: config-i686-PAE temp-x86-debug-generic
+	perl merge.pl $^ i386 > $@
+
+kernel-$(VERSION)-i586.config: config-i586 temp-x86-generic
+	perl merge.pl $^ i386 > $@
+
+kernel-$(VERSION)-x86_64.config: /dev/null temp-x86_64-generic
+	perl merge.pl $^ x86_64 > $@
+
+kernel-$(VERSION)-x86_64-debug.config: /dev/null temp-x86_64-debug-generic
+	perl merge.pl $^ x86_64 > $@
+
+kernel-$(VERSION)-sparc64-smp.config: config-sparc64-smp temp-sparc64-generic
+	perl merge.pl $^ sparc64 > $@
+
+kernel-$(VERSION)-sparc64.config: config-sparc64 temp-sparc64-generic
+	perl merge.pl $^ sparc64 > $@
+
+kernel-$(VERSION)-sparc.config: config-sparc temp-sparc-generic
+	perl merge.pl $^ sparc > $@
+
+kernel-$(VERSION)-ppc64.config: config-powerpc64 temp-powerpc-generic
+	perl merge.pl $^ powerpc > $@
+
+kernel-$(VERSION)-ppc64-kdump.config: config-powerpc64-kdump kernel-$(VERSION)-ppc64.config
+	perl merge.pl $^ powerpc > $@
+
+kernel-$(VERSION)-s390x.config: config-s390x temp-s390-generic
+	perl merge.pl $^ s390 > $@
+
+kernel-$(VERSION)-ppc.config: /dev/null temp-powerpc32-generic
+	perl merge.pl $^ powerpc > $@
+
+kernel-$(VERSION)-ppc-smp.config: config-powerpc32-smp temp-powerpc32-generic
+	perl merge.pl $^ powerpc > $@
+
+kernel-$(VERSION)-ia64.config: config-ia64 temp-ia64-generic
+	perl merge.pl $^ ia64 > $@
+
+kernel-$(VERSION)-i686-xen.config: config-i686-PAE temp-x86-xen-generic
+	perl merge.pl $^ i386 > $@
+
+kernel-$(VERSION)-x86_64-xen.config: /dev/null temp-x86_64-xen-generic
+	perl merge.pl $^ x86_64 > $@
+
+kernel-$(VERSION)-ia64-xen.config: config-xen-ia64 temp-ia64-xen-generic
+	perl merge.pl $^ ia64 > $@


Index: config-debug
===================================================================
RCS file: config-debug
diff -N config-debug
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-debug	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,28 @@
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_DEBUG_DETECT=y
+CONFIG_SND_PCM_XRUN_DEBUG=y
+
+CONFIG_DEBUG_IGNORE_QUIET=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_SPINLOCK=y
+
+CONFIG_FAULT_INJECTION=y
+CONFIG_FAILSLAB=y
+CONFIG_FAIL_PAGE_ALLOC=y
+CONFIG_FAIL_MAKE_REQUEST=y
+CONFIG_FAULT_INJECTION_DEBUG_FS=y
+CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
+
+CONFIG_SLUB_DEBUG_ON=y
+
+CONFIG_LOCK_STAT=y
+
+CONFIG_DEBUG_STACK_USAGE=y
+
+CONFIG_ACPI_DEBUG=y
+# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
\ No newline at end of file


View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 config-generic
Index: config-generic
===================================================================
RCS file: config-generic
diff -N config-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,3259 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MMU=y
+CONFIG_SMP=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_LOCALVERSION=""
+# CONFIG_CRASH_DUMP is not set
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+#
+# General setup
+#
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_CFQ=y
+CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+
+CONFIG_SLUB=y
+
+CONFIG_MISC_DEVICES=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_MODULE_SIG=y
+# CONFIG_MODULE_SIG_FORCE is not set
+CONFIG_MODULE_VERIFY_ELF=y
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_DEBUG is not set
+CONFIG_HT_IRQ=y
+CONFIG_PCI_MSI=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_HOTPLUG_PCI_PCIE=m
+CONFIG_HOTPLUG_PCI_FAKE=m
+# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_HOTPLUG=y
+# CONFIG_DEBUG_KOBJECT is not set
+
+#
+# PCMCIA/CardBus support
+#
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_YENTA=y
+CONFIG_CARDBUS=y
+CONFIG_I82092=m
+CONFIG_PD6729=m
+CONFIG_PCMCIA_IOCTL=y
+
+CONFIG_PCCARD=y
+CONFIG_MMC=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_WBSD=m
+CONFIG_MMC_SDHCI=m
+CONFIG_MMC_TIFM_SD=m
+
+CONFIG_INFINIBAND=m
+CONFIG_INFINIBAND_MTHCA=m
+# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
+CONFIG_INFINIBAND_IPOIB=m
+CONFIG_INFINIBAND_IPOIB_DEBUG=y
+CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
+# CONFIG_INFINIBAND_IPOIB_CM is not set
+CONFIG_INFINIBAND_SRP=m
+CONFIG_INFINIBAND_USER_MAD=m
+CONFIG_INFINIBAND_USER_ACCESS=m
+CONFIG_INFINIBAND_IPATH=m
+CONFIG_INFINIBAND_ISER=m
+CONFIG_INFINIBAND_AMSO1100=m
+# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_FW_LOADER=y
+
+# CONFIG_SPI is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=m
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CONCAT=m
+CONFIG_MTD_CMDLINE_PARTS=y
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLOCK=m
+CONFIG_MTD_BLOCK_RO=m
+CONFIG_MTD_BLOCK2MTD=m
+CONFIG_FTL=m
+CONFIG_NFTL=m
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=m
+CONFIG_RFD_FTL=m
+CONFIG_SSFDC=m
+
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+# CONFIG_MTD_UBI_DEBUG is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=m
+CONFIG_MTD_JEDECPROBE=m
+CONFIG_MTD_GEN_PROBE=m
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_CFI_INTELEXT=m
+CONFIG_MTD_CFI_AMDSTD=m
+CONFIG_MTD_CFI_STAA=m
+CONFIG_MTD_RAM=m
+CONFIG_MTD_ROM=m
+CONFIG_MTD_ABSENT=m
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PNC2000 is not set
+CONFIG_MTD_SC520CDP=m
+CONFIG_MTD_NETSC520=m
+# CONFIG_MTD_SBC_GXX is not set
[...2866 lines suppressed...]
+# CONFIG_DEPCA is not set
+CONFIG_NET_ISA=y
+CONFIG_NE2000=m
+# CONFIG_E2100 is not set
+CONFIG_EWRK3=m
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_IBMTR is not set
+# CONFIG_SKISA is not set
+# CONFIG_PROTEON is not set
+# CONFIG_SMCTR is not set
+# CONFIG_WAVELAN is not set
+# CONFIG_HISAX_16_0 is not set
+# CONFIG_HISAX_AVM_A1 is not set
+# CONFIG_HISAX_IX1MICROR2 is not set
+# CONFIG_HISAX_ASUSCOM is not set
+# CONFIG_HISAX_TELEINT is not set
+# CONFIG_HISAX_HFCS is not set
+# CONFIG_HISAX_SPORTSTER is not set
+# CONFIG_HISAX_MIC is not set
+# CONFIG_HISAX_ISURF is not set
+# CONFIG_HISAX_HSTSAPHIR is not set
+# CONFIG_ISDN_DRV_ICN is not set
+# CONFIG_ISDN_DRV_PCBIT is not set
+# CONFIG_ISDN_DRV_SC is not set
+# CONFIG_ISDN_DRV_ACT2000 is not set
+# CONFIG_ISDN_DRV_AVMB1_B1ISA is not set
+# CONFIG_ISDN_DRV_AVMB1_T1ISA is not set
+
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_ATIXL is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+
+# CONFIG_SERIAL_8250_FOURPORT is not set
+# CONFIG_SERIAL_8250_ACCENT is not set
+# CONFIG_SERIAL_8250_BOCA is not set
+# CONFIG_SERIAL_8250_HUB6 is not set
+# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
+
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_WDT is not set
+
+# CONFIG_VIDEO_PMS is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_CADET is not set
+# CONFIG_RADIO_RTRACK is not set
+# CONFIG_RADIO_RTRACK2 is not set
+# CONFIG_RADIO_AZTECH is not set
+# CONFIG_RADIO_GEMTEK is not set
+# CONFIG_RADIO_SF16FMI is not set
+# CONFIG_RADIO_SF16FMR2 is not set
+# CONFIG_RADIO_TERRATEC is not set
+# CONFIG_RADIO_TRUST is not set
+# CONFIG_RADIO_TYPHOON is not set
+# CONFIG_RADIO_ZOLTRIX is not set
+
+# CONFIG_SND_OPL4_LIB is not set
+# CONFIG_SND_AD1848_LIB is not set
+# CONFIG_SND_AD1816A is not set
+# CONFIG_SND_AD1848 is not set
+# CONFIG_SND_CS4231 is not set
+# CONFIG_SND_CS4232 is not set
+CONFIG_SND_CS4231_LIB=m
+CONFIG_SND_CS4236=m
+# CONFIG_SND_ES968 is not set
+# CONFIG_SND_ES1688 is not set
+# CONFIG_SND_ES18XX is not set
+# CONFIG_SND_GUS_SYNTH is not set
+# CONFIG_SND_GUSCLASSIC is not set
+# CONFIG_SND_GUSEXTREME is not set
+# CONFIG_SND_GUSMAX is not set
+# CONFIG_SND_INTERWAVE is not set
+# CONFIG_SND_INTERWAVE_STB is not set
+# CONFIG_SND_OPTI92X_AD1848 is not set
+# CONFIG_SND_OPTI92X_CS4231 is not set
+# CONFIG_SND_OPTI93X is not set
+# CONFIG_SND_SB8 is not set
+CONFIG_SND_SB16=m
+CONFIG_SND_SBAWE=m
+# CONFIG_SND_SB16_CSP is not set
+# CONFIG_SND_ALS100 is not set
+# CONFIG_SND_AZT2320 is not set
+# CONFIG_SND_CMI8330 is not set
+# CONFIG_SND_DT019X is not set
+CONFIG_SND_OPL3SA2=m
+# CONFIG_SND_SGALAXY is not set
+# CONFIG_SND_SSCAPE is not set
+# CONFIG_SND_PDAUDIOCF is not set
+CONFIG_SND_DARLA20=m
+CONFIG_SND_GINA20=m
+CONFIG_SND_LAYLA20=m
+CONFIG_SND_DARLA24=m
+CONFIG_SND_GINA24=m
+CONFIG_SND_LAYLA24=m
+CONFIG_SND_MONA=m
+CONFIG_SND_MIA=m
+CONFIG_SND_ECHO3G=m
+CONFIG_SND_INDIGO=m
+CONFIG_SND_INDIGOIO=m
+CONFIG_SND_INDIGODJ=m
+# CONFIG_SND_SOC is not set
+
+## END of ISA options.
+
+# CONFIG_FORCED_INLINING is not set
+
+CONFIG_MIGRATION=y
+CONFIG_RESOURCES_64BIT=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+# CONFIG_LEDS_CORGI is not set
+# CONFIG_LEDS_LOCOMO is not set
+# CONFIG_LEDS_SPITZ is not set
+# CONFIG_LEDS_IXP4XX is not set
+# CONFIG_LEDS_TOSA is not set
+# CONFIG_LEDS_S3C24XX is not set
+# CONFIG_LEDS_AMS_DELTA is not set
+# CONFIG_LEDS_NET48XX is not set
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+CONFIG_DMA_ENGINE=y
+CONFIG_NET_DMA=y
+CONFIG_INTEL_IOATDMA=m
+
+# CONFIG_UNUSED_SYMBOLS is not set
+
+CONFIG_UTRACE=y
+CONFIG_PTRACE=y
+
+CONFIG_KPROBES=y
+
+# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
+
+CONFIG_HZ_1000=y
+
+CONFIG_TIMER_STATS=y
+
+# Auxillary displays
+CONFIG_KS0108=m
+CONFIG_KS0108_PORT=0x378
+CONFIG_KS0108_DELAY=2
+CONFIG_CFAG12864B=y
+CONFIG_CFAG12864B_RATE=20
+
+# CONFIG_PHANTOM is not set
+# CONFIG_BLINK is not set
+CONFIG_EEPROM_93CX6=m
+
+CONFIG_CPU_IDLE=y
+# CONFIG_CPU_IDLE_GOV_LADDER is not set
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+CONFIG_POWER_SUPPLY=m
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_APM_POWER=m
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_BATTERY_PMU=m
+# CONFIG_PDA_POWER is not set
+
+CONFIG_AUXDISPLAY=y
+
+CONFIG_UIO=m
+CONFIG_UIO_CIF=m
+
+CONFIG_INSTRUMENTATION=y
+# CONFIG_CRC7 is not set
+
+CONFIG_DEFAULT_RELATIME=y
+
+# LIRC
+CONFIG_INPUT_LIRC=y
+CONFIG_LIRC_DEV=m
+CONFIG_LIRC_ATIUSB=m
+CONFIG_LIRC_BT829=m
+CONFIG_LIRC_CMDIR=m
+CONFIG_LIRC_I2C=m
+CONFIG_LIRC_IGORPLUGUSB=m
+CONFIG_LIRC_IMON=m
+CONFIG_LIRC_IT87=m
+CONFIG_LIRC_MCEUSB=m
+CONFIG_LIRC_MCEUSB2=m
+CONFIG_LIRC_PVR150=m
+CONFIG_LIRC_PARALLEL=m
+CONFIG_LIRC_SERIAL=m
+CONFIG_LIRC_SIR=m
+CONFIG_LIRC_STREAMZAP=m
+CONFIG_LIRC_TTUSBIR=m


Index: config-i586
===================================================================
RCS file: config-i586
diff -N config-i586
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-i586	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,7 @@
+CONFIG_M586=y
+
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+
+CONFIG_X86_POWERNOW_K6=m


Index: config-i686
===================================================================
RCS file: config-i686
diff -N config-i686
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-i686	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,8 @@
+CONFIG_M686=y
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+
+CONFIG_CRYPTO_DEV_PADLOCK=m
+CONFIG_CRYPTO_DEV_PADLOCK_AES=m
+CONFIG_CRYPTO_DEV_PADLOCK_SHA=m


Index: config-i686-PAE
===================================================================
RCS file: config-i686-PAE
diff -N config-i686-PAE
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-i686-PAE	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,5 @@
+CONFIG_M686=y
+# CONFIG_NOHIGHMEM is not set
+# CONFIG_HIGHMEM4G is not set
+CONFIG_HIGHMEM64G=y
+


Index: config-ia64
===================================================================
RCS file: config-ia64
diff -N config-ia64
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-ia64	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,3 @@
+CONFIG_CRASH_DUMP=y
+CONFIG_PROC_VMCORE=y
+


Index: config-ia64-generic
===================================================================
RCS file: config-ia64-generic
diff -N config-ia64-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-ia64-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,187 @@
+#
+# Automatically generated make config: don't edit
+#
+
+#
+# Processor type and features
+#
+CONFIG_IA64=y
+CONFIG_64BIT=y
+# CONFIG_XEN is not set
+# CONFIG_ARCH_XEN is not set
+# CONFIG_XEN_PRIVILEGED_GUEST is not set
+# CONFIG_XEN_VT is not set
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_TIME_INTERPOLATION=y
+CONFIG_EFI=y
+# CONFIG_ITANIUM is not set
+CONFIG_MCKINLEY=y
+CONFIG_IA64_GENERIC=y
+# CONFIG_IA64_DIG is not set
+# CONFIG_IA64_HP_ZX1 is not set
+# CONFIG_IA64_SGI_SN2 is not set
+CONFIG_IA64_ESI=y
+CONFIG_MSPEC=y
+# CONFIG_IA64_HP_SIM is not set
+# CONFIG_IA64_PAGE_SIZE_4KB is not set
+# CONFIG_IA64_PAGE_SIZE_8KB is not set
+CONFIG_IA64_PAGE_SIZE_16KB=y
+# CONFIG_IA64_PAGE_SIZE_64KB is not set
+CONFIG_IA64_L1_CACHE_SHIFT=7
+CONFIG_NUMA=y
+# CONFIG_VIRTUAL_MEM_MAP is not set
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_MEMORY_HOTPLUG=y
+CONFIG_IA64_MCA_RECOVERY=m
+CONFIG_IA64_CYCLONE=y
+CONFIG_MMTIMER=y
+CONFIG_IOSAPIC=y
+CONFIG_FORCE_MAX_ZONEORDER=18
+CONFIG_NR_CPUS=1024
+# CONFIG_IA32_SUPPORT is not set
+# CONFIG_COMPAT is not set
+CONFIG_PERFMON=y
+CONFIG_IA64_PALINFO=y
+CONFIG_EFI_VARS=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=16
+CONFIG_EFI_PCDP=y
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_SGIIOC4=y
+
+#
+# Character devices
+#
+
+#
+# Watchdog Cards
+#
+# CONFIG_HW_RANDOM is not set
+# CONFIG_GEN_RTC is not set
+CONFIG_EFI_RTC=y
+
+
+#
+# AGP
+#
+CONFIG_AGP_I460=y
+CONFIG_AGP_HP_ZX1=y
+CONFIG_AGP_SGI_TIOCA=y
+
+#
+# HP Simulator drivers
+#
+# CONFIG_HP_SIMETH is not set
+# CONFIG_HP_SIMSERIAL is not set
+# CONFIG_HP_SIMSCSI is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_IA64_PRINT_HAZARDS is not set
+# CONFIG_DISABLE_VHPT is not set
+# CONFIG_IA64_DEBUG_CMPXCHG is not set
+# CONFIG_IA64_DEBUG_IRQ is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# SGI
+#
+CONFIG_SGI_SNSC=y
+CONFIG_IA64_SGI_SN_XP=y
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_BUSLOGIC is not set
+
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=m
+# CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_BAY=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BLACKLIST_YEAR=0
+CONFIG_ACPI_BUTTON=m
+# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_FAN=y
+CONFIG_ACPI_HOTPLUG_MEMORY=y
+CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_SLEEP=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_VIDEO=m
+# CONFIG_ACPI_PROC_EVENT is not set
+
+CONFIG_SERIAL_SGI_L1_CONSOLE=y
+CONFIG_PM=y
+CONFIG_HOTPLUG_PCI=y
+# CONFIG_HPET is not set
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HOTPLUG_PCI_SGI=m
+CONFIG_PNPACPI=y
+
+CONFIG_SCHED_SMT=y
+CONFIG_SGI_TIOCX=y
+CONFIG_SGI_MBCS=m
+
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_STAT=m
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+
+CONFIG_IA64_ACPI_CPUFREQ=m
+
+# CONFIG_CRASH is not set
+
+CONFIG_SERIAL_SGI_IOC3=m
+CONFIG_SGI_IOC3=m
+CONFIG_SERIAL_SGI_IOC4=m
+CONFIG_SGI_IOC4=y
+
+# CONFIG_PERMIT_BSP_REMOVE is not set
+# CONFIG_FORCE_CPEI_RETARGET is not set
+
+CONFIG_NODES_SHIFT=10
+
+# CONFIG_BCM43XX is not set
+
+CONFIG_HW_RANDOM_INTEL=m
+
+#temporary until ia64 kexec/kdump is fixed (breaks xen)
+CONFIG_CRASH_DUMP=y
+CONFIG_PROC_VMCORE=y
+
+# drivers/media/video/usbvision/usbvision-i2c.c:64:39: error: macro "outb" passed 4 arguments, but takes just 2
+# CONFIG_VIDEO_USBVISION is not set
+
+# CONFIG_IA64_MC_ERR_INJECT is not set
+
+CONFIG_DMIID=y


Index: config-nodebug
===================================================================
RCS file: config-nodebug
diff -N config-nodebug
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-nodebug	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,27 @@
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+CONFIG_SND_DEBUG_DETECT=y
+CONFIG_SND_PCM_XRUN_DEBUG=y
+
+CONFIG_DEBUG_IGNORE_QUIET=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_SPINLOCK=y
+
+CONFIG_FAULT_INJECTION=y
+CONFIG_FAILSLAB=y
+CONFIG_FAIL_PAGE_ALLOC=y
+CONFIG_FAIL_MAKE_REQUEST=y
+CONFIG_FAULT_INJECTION_DEBUG_FS=y
+CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
+
+CONFIG_SLUB_DEBUG_ON=y
+
+CONFIG_LOCK_STAT=y
+
+CONFIG_DEBUG_STACK_USAGE=y
+
+# CONFIG_ACPI_DEBUG is not set


Index: config-powerpc-generic
===================================================================
RCS file: config-powerpc-generic
diff -N config-powerpc-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-powerpc-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,213 @@
+# Most PowerPC kernels we build are SMP
+CONFIG_SMP=y
+CONFIG_IRQ_ALL_CPUS=y
+CONFIG_PPC=y
+CONFIG_WATCHDOG_RTAS=m
+CONFIG_DEBUGGER=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_ALTIVEC=y
+
+CONFIG_TAU=y
+# CONFIG_TAU_INT is not set
+CONFIG_TAU_AVERAGE=y
+
+CONFIG_SECCOMP=y
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEBUG=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_STAT=m
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+
+CONFIG_PM=y
+
+CONFIG_PM_STD_PARTITION=""
+
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION=y
+# CONFIG_RTC is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+CONFIG_BLK_DEV_IDE_PMAC=y
+CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_ELECTRA_IDE=y
+
+CONFIG_ADB=y
+CONFIG_ADB_PMU=y
+CONFIG_WINDFARM=y
+CONFIG_WINDFARM_PM112=y
+CONFIG_I2C_POWERMAC=y
+CONFIG_APPLE_AIRPORT=m
+CONFIG_SERIAL_PMACZILOG=m
+CONFIG_AGP_UNINORTH=y
+CONFIG_FB_OF=y
+# CONFIG_FB_CONTROL is not set
+CONFIG_FB_IBM_GXT4500=y
+CONFIG_FB_RADEON=y
+CONFIG_FB_MATROX=y
+CONFIG_FB_NVIDIA=y
+# CONFIG_FB_VGA16 is not set
+CONFIG_FB_ATY128_BACKLIGHT=y
+CONFIG_FB_ATY_BACKLIGHT=y
+CONFIG_FB_RADEON_BACKLIGHT=y
+CONFIG_FB_RIVA_BACKLIGHT=y
+CONFIG_FB_NVIDIA_BACKLIGHT=y
+
+CONFIG_SND_POWERMAC=m
+CONFIG_SND_POWERMAC_AUTO_DRC=y
+CONFIG_SND_AOA=m
+CONFIG_SND_AOA_SOUNDBUS=m
+CONFIG_SND_AOA_FABRIC_LAYOUT=m
+CONFIG_SND_AOA_ONYX=m
+CONFIG_SND_AOA_TAS=m
+CONFIG_SND_AOA_TOONIE=m
+CONFIG_SND_AOA_SOUNDBUS_I2S=m
+
+CONFIG_XMON=y
+CONFIG_XMON_DEFAULT=y
+CONFIG_XMON_DISASSEMBLY=y
+
+CONFIG_BOOTX_TEXT=y
+CONFIG_MAC_EMUMOUSEBTN=y
+CONFIG_CAPI_EICON=y
+
+CONFIG_NVRAM=y
+
+# CONFIG_PCMCIA_M8XX is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_NI52 is not set
+# CONFIG_NI65 is not set
+# CONFIG_LANCE is not set
+# CONFIG_3C515 is not set
+# CONFIG_ELPLUS is not set
+
+CONFIG_MEMORY_HOTPLUG=y
+
+# Stuff which wants bus_to_virt() or virt_to_bus()
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_ATM_HORIZON is not set
+# CONFIG_ATM_FIRESTREAM is not set
+# CONFIG_ATM_AMBASSADOR is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+
+CONFIG_USB_HIDINPUT_POWERBOOK=y
+
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+# CONFIG_PMAC_BACKLIGHT_LEGACY is not set
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+# FIXME: Should depend on IA64/x86
+# CONFIG_SGI_IOC4 is not set
+
+CONFIG_PPC_EFIKA=y
+CONFIG_PPC_LITE5200=y
+CONFIG_PPC_BESTCOMM=y
+CONFIG_PMAC_RACKMETER=m
+CONFIG_SERIAL_MPC52xx=y
+CONFIG_SERIAL_MPC52xx_CONSOLE=y
+CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
+CONFIG_USB_OHCI_HCD_PPC_SOC=y
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_HCD_PPC_OF=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
+
+CONFIG_SERIAL_UARTLITE=m
+CONFIG_SERIAL_UARTLITE_CONSOLE=y
+
+CONFIG_SENSORS_AMS=m
+CONFIG_SENSORS_AMS_PMU=y
+CONFIG_SENSORS_AMS_I2C=y
+
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_BLK_DEV_IDECS is not set
+CONFIG_BLK_DEV_IDECD=m
+# CONFIG_BLK_DEV_IDETAPE is not set
+CONFIG_BLK_DEV_IDEFLOPPY=m
+# CONFIG_BLK_DEV_IDESCSI is not set
+CONFIG_IDE_TASK_IOCTL=y
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_IDEPNP is not set
+# CONFIG_BLK_DEV_IDEPCI is not set
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+# CONFIG_IDEDMA_ONLYDISK is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+CONFIG_BLK_DEV_IDE_PMAC=y
+CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+# CONFIG_IDE_ARM is not set
+# CONFIG_IDE_CHIPSETS is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_BLK_DEV_HD is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+CONFIG_MTD_PHYSMAP_OF=m
+CONFIG_IDE_PROC_FS=y
+CONFIG_MACINTOSH_DRIVERS=y
+# CONFIG_DEBUG_PAGEALLOC is not set
+
+CONFIG_PPC_PASEMI_MDIO=m
+CONFIG_SPU_FS_64K_LS=y
+CONFIG_PPC_PASEMI_CPUFREQ=y
+CONFIG_PMAC_APM_EMU=m
+CONFIG_HW_RANDOM_PASEMI=m
+
+CONFIG_EDAC=y
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_PASEMI=m
+
+CONFIG_AXON_RAM=m
+CONFIG_OPROFILE_CELL=y
+
+# CONFIG_MPC5200_WDT is not set


Index: config-powerpc32-generic
===================================================================
RCS file: config-powerpc32-generic
diff -N config-powerpc32-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-powerpc32-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,72 @@
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+# CONFIG_PPC64 is not set
+# CONFIG_RTAS_PROC is not set
+# CONFIG_PCMCIA_M8XX is not set
+# CONFIG_HOTPLUG_PCI is not set
+CONFIG_CLASSIC32=y
+CONFIG_CPU_FREQ_PMAC=y
+CONFIG_PPC_MULTIPLATFORM=y
+CONFIG_PPC_CHRP=y
+CONFIG_PPC_PMAC=y
+# CONFIG_PPC_PREP is not set
+
+CONFIG_PMAC_APM_EMU=y
+CONFIG_PMAC_BACKLIGHT=y
+
+CONFIG_HIGHMEM=y
+# CONFIG_HIGHMEM_START_BOOL is not set
+# CONFIG_LOWMEM_SIZE_BOOL is not set
+# CONFIG_TASK_SIZE_BOOL is not set
+# CONFIG_KERNEL_START_BOOL is not set
+# CONFIG_PPC601_SYNC_FIX is not set
+CONFIG_ADVANCED_OPTIONS=y
+CONFIG_SCSI_MESH=m
+CONFIG_SCSI_MESH_SYNC_RATE=5
+CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
+
+CONFIG_SCSI_MAC53C94=m
+CONFIG_ADB_CUDA=y
+CONFIG_ADB_MACIO=y
+CONFIG_INPUT_ADBHID=y
+CONFIG_ADB_PMU_LED=y
+CONFIG_ADB_PMU_LED_IDE=y
+
+CONFIG_PMAC_MEDIABAY=y
+CONFIG_BMAC=m
+CONFIG_MACE=m
+# CONFIG_MACE_AAUI_PORT is not set
+CONFIG_MV643XX_ETH=m
+CONFIG_I2C_HYDRA=m
+CONFIG_I2C_MPC=m
+CONFIG_THERM_WINDTUNNEL=m
+CONFIG_THERM_ADT746X=m
+# CONFIG_ANSLCD is not set
+
+CONFIG_SENSORS_M41T00=m
+CONFIG_FB_PLATINUM=y
+CONFIG_FB_VALKYRIE=y
+CONFIG_FB_CT65550=y
+CONFIG_DMASOUND_PMAC=m
+# CONFIG_BDI_SWITCH is not set
+CONFIG_MAC_FLOPPY=m
+# CONFIG_BLK_DEV_FD is not set
+
+CONFIG_FB_ATY128=y
+CONFIG_FB_ATY=y
+CONFIG_FB_MATROX=y
+# CONFIG_KEXEC is not set
+
+# CONFIG_CRASH is not set
+
+# CONFIG_HVC_RTAS is not set
+# CONFIG_MAMBO is not set
+
+# CONFIG_UDBG_RTAS_CONSOLE is not set
+CONFIG_BRIQ_PANEL=m
+
+CONFIG_PATA_MPC52xx=m
+
+CONFIG_PPC_MPC5200_BUGFIX=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_DEBUG_STACKOVERFLOW=y


Index: config-powerpc32-smp
===================================================================
RCS file: config-powerpc32-smp
diff -N config-powerpc32-smp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-powerpc32-smp	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,4 @@
+CONFIG_SMP=y
+# CONFIG_HOTPLUG_CPU is not set
+CONFIG_NR_CPUS=4
+# CONFIG_BATTERY_PMU is not set


Index: config-powerpc64
===================================================================
RCS file: config-powerpc64
diff -N config-powerpc64
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-powerpc64	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,136 @@
+CONFIG_WINDFARM_PM81=y
+CONFIG_WINDFARM_PM91=y
+CONFIG_PPC_PMAC64=y
+CONFIG_PPC_MAPLE=y
+CONFIG_PPC_SYSTEMSIM=y
+CONFIG_BLK_DEV_SYSTEMSIM=m
+CONFIG_SYSTEMSIM_NET=m
+CONFIG_PPC_CELL=y
+CONFIG_PPC_IBM_CELL_BLADE=y
+CONFIG_PPC_ISERIES=y
+CONFIG_PPC_PSERIES=y
+CONFIG_PPC_PMAC=y
+CONFIG_PPC_PASEMI=y
+CONFIG_PPC_PS3=y
+CONFIG_PPC_CELLEB=y
+CONFIG_PS3_HTAB_SIZE=20
+# CONFIG_PS3_DYNAMIC_DMA is not set
+CONFIG_PS3_USE_LPAR_ADDR=y
+CONFIG_PS3_ADVANCED=y
+CONFIG_PS3_HTAB_SIZE=20
+# CONFIG_PS3_DYNAMIC_DMA is not set
+CONFIG_PS3_USE_LPAR_ADDR=y
+CONFIG_PS3_VUART=y
+CONFIG_PS3_PS3AV=y
+CONFIG_PS3_STORAGE=m
+CONFIG_PS3_STORAGE_EXPECTED_NUM_DRIVES=3
+CONFIG_PS3_STORAGE_MAX_SPINUP_WAIT_TIME=10
+CONFIG_PS3_DISK=m
+CONFIG_PS3_ROM=m
+CONFIG_PS3_FLASH=m
+CONFIG_SND_PS3=m
+CONFIG_SND_PS3_DEFAULT_START_DELAY=1000
+CONFIG_GELIC_NET=m
+CONFIG_GELIC_WIRELESS=y
+CONFIG_CBE_THERM=m
+CONFIG_CBE_CPUFREQ=m
+CONFIG_CBE_CPUFREQ_PMI=m
+CONFIG_PMAC_RACKMETER=m
+CONFIG_IBMEBUS=y
+CONFIG_SPU_FS=m
+CONFIG_RTAS_FLASH=y
+CONFIG_PPC_SPLPAR=y
+CONFIG_SCANLOG=y
+CONFIG_LPARCFG=y
+CONFIG_SERIAL_ICOM=m
+CONFIG_HVCS=m
+CONFIG_HVC_CONSOLE=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_THERM_PM72=y
+CONFIG_IBMVETH=m
+CONFIG_SCSI_IBMVSCSI=m
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HOTPLUG_PCI_RPA=m
+CONFIG_HOTPLUG_PCI_RPA_DLPAR=y
+CONFIG_ADB_PMU_LED=y
+CONFIG_ADB_PMU_LED_IDE=y
+CONFIG_PMAC_SMU=y
+CONFIG_CPU_FREQ_PMAC64=y
+CONFIG_SCSI_IPR=m
+CONFIG_SCSI_IPR_TRACE=y
+CONFIG_SCSI_IPR_DUMP=y
+CONFIG_SPIDER_NET=m
+CONFIG_HVC_RTAS=y
+CONFIG_HVC_ISERIES=y
+CONFIG_MAMBO=y
+CONFIG_MAMBO_DISK=m
+CONFIG_MAMBO_NET=m
+CONFIG_CBE_RAS=y
+
+# iSeries device drivers
+#
+CONFIG_ISERIES_VETH=m
+# CONFIG_VIOCONS is not set
+CONFIG_VIODASD=m
+CONFIG_VIOCD=m
+CONFIG_VIOTAPE=m
+
+# virq_to_hw() requires irq_map[] to be exported. Ick.
+# CONFIG_PASEMI_MAC is not set 
+CONFIG_SERIAL_OF_PLATFORM=m
+
+CONFIG_PPC_PASEMI_IOMMU=y
+CONFIG_SERIAL_TXX9=y
+CONFIG_SERIAL_TXX9_NR_UARTS=6
+CONFIG_SERIAL_TXX9_CONSOLE=y
+
+CONFIG_HVC_BEAT=y
+
+CONFIG_FB_PS3=y
+CONFIG_FB_PS3_DEFAULT_SIZE_M=18
+
+CONFIG_PPC_PMI=m
+CONFIG_PS3_SYS_MANAGER=y
+# CONFIG_BLK_DEV_CELLEB is not set
+
+CONFIG_PATA_SCC=m
+
+CONFIG_APM_EMULATION=m
+
+CONFIG_PPC64=y
+CONFIG_VIRT_CPU_ACCOUNTING=y
+CONFIG_NR_CPUS=128
+# CONFIG_FB_PLATINUM is not set
+# CONFIG_FB_VALKYRIE is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+
+# CONFIG_POWER4_ONLY is not set
+# CONFIG_PPC_PASEMI is not set
+
+CONFIG_RTAS_PROC=y
+CONFIG_IOMMU_VMERGE=y
+CONFIG_NUMA=y
+# CONFIG_PPC_64K_PAGES is not set
+CONFIG_SCHED_SMT=y
+
+# CONFIG_MV643XX_ETH is not set
+CONFIG_IRQSTACKS=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+# CONFIG_CRASH is not set
+# CONFIG_INPUT_PCSPKR is not set
+
+CONFIG_EHEA=m
+CONFIG_INFINIBAND_EHCA=m
+CONFIG_INFINIBAND_EHCA_SCALING=y
+
+CONFIG_HCALL_STATS=y
+
+CONFIG_XMON_DISASSEMBLY=y
+
+CONFIG_SCSI_IBMVSCSIS=m
+
+CONFIG_SECCOMP=y


Index: config-powerpc64-kdump
===================================================================
RCS file: config-powerpc64-kdump
diff -N config-powerpc64-kdump
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-powerpc64-kdump	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,3 @@
+# CONFIG_EMBEDDED is not set
+CONFIG_CRASH_DUMP=y
+CONFIG_PROC_VMCORE=y


Index: config-s390x
===================================================================
RCS file: config-s390x
diff -N config-s390x
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-s390x	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,199 @@
+CONFIG_64BIT=y
+# CONFIG_MARCH_G5 is not set
+CONFIG_MARCH_Z900=y
+# CONFIG_MARCH_Z990 is not set
+CONFIG_NR_CPUS=64
+CONFIG_COMPAT=y
+
+CONFIG_MMU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_NO_IDLE_HZ=y
+CONFIG_NO_IDLE_HZ_INIT=y
+
+CONFIG_SMP=y
+
+#
+# I/O subsystem configuration
+#
+CONFIG_MACHCHK_WARNING=y
+CONFIG_QDIO=m
+# CONFIG_QDIO_DEBUG is not set
+
+#
+# Misc
+#
+CONFIG_IPL=y
+# CONFIG_IPL_TAPE is not set
+CONFIG_IPL_VM=y
+# CONFIG_PROCESS_DEBUG is not set
+CONFIG_PFAULT=y
+# CONFIG_SHARED_KERNEL is not set
+CONFIG_CMM=m
+CONFIG_CMM_PROC=y
+CONFIG_VIRT_TIMER=y
+CONFIG_NETIUCV=m
+CONFIG_SMSGIUCV=m
+
+#
+# SCSI low-level drivers
+#
+CONFIG_ZFCP=m
+CONFIG_ZFCPDUMP=m
+CONFIG_CCW=y
+
+#
+# S/390 block device drivers
+#
+CONFIG_DCSSBLK=m
+CONFIG_BLK_DEV_XPRAM=m
+CONFIG_DASD=m
+CONFIG_DASD_PROFILE=y
+CONFIG_DASD_ECKD=m
+CONFIG_DASD_FBA=m
+CONFIG_DASD_DIAG=m
+CONFIG_DASD_EER=y
+
+#
+# S/390 character device drivers
+#
+CONFIG_TN3270=y
+CONFIG_TN3270_CONSOLE=y
+CONFIG_TN3215=y
+CONFIG_TN3215_CONSOLE=y
+CONFIG_CCW_CONSOLE=y
+CONFIG_SCLP=y
+CONFIG_SCLP_TTY=y
+CONFIG_SCLP_CONSOLE=y
+CONFIG_SCLP_VT220_TTY=y
+CONFIG_SCLP_VT220_CONSOLE=y
+CONFIG_SCLP_CPI=m
+CONFIG_S390_TAPE=m
+CONFIG_S390_TAPE_3590=m
+
+CONFIG_APPLDATA_BASE=y
+CONFIG_APPLDATA_MEM=m
+CONFIG_APPLDATA_OS=m
+CONFIG_APPLDATA_NET_SUM=m
+CONFIG_TN3270_TTY=y
+CONFIG_TN3270_FS=m
+
+
+#
+# S/390 tape interface support
+#
+CONFIG_S390_TAPE_BLOCK=y
+
+#
+# S/390 tape hardware support
+#
+CONFIG_S390_TAPE_34XX=m
+
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Token Ring devices
+#
+CONFIG_TR=y
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=m
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# S/390 network device drivers
+#
+CONFIG_LCS=m
+CONFIG_CTC=m
+CONFIG_IUCV=m
+CONFIG_QETH=m
+CONFIG_QETH_IPV6=y
+CONFIG_QETH_VLAN=y
+CONFIG_CCWGROUP=m
+
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_B44 is not set
+
+# The s390 CPU does not have hardware support for big pages at all.
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_OSF_PARTITION is not set
+CONFIG_IBM_PARTITION=y
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+
+
+#
+# S390 crypto hw
+#
+CONFIG_CRYPTO_SHA1_S390=m
+CONFIG_CRYPTO_SHA256_S390=m
+CONFIG_CRYPTO_DES_S390=m
+CONFIG_CRYPTO_AES_S390=m
+
+#
+# Kernel hacking
+#
+
+#
+# S390 specific stack options; needs gcc 3.5 so off for now
+#
+CONFIG_PACK_STACK=y
+CONFIG_CHECK_STACK=y
+# CONFIG_WARN_STACK is not set
+# CONFIG_SMALL_STACK is not set
+
+CONFIG_ZVM_WATCHDOG=m
+CONFIG_VMLOGRDR=m
+CONFIG_MONREADER=m
+
+CONFIG_VIRT_CPU_ACCOUNTING=y
+
+# CONFIG_CLAW is not set
+
+CONFIG_VMCP=m
+
+# CONFIG_ATMEL is not set
+
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MII is not set
+
+# CONFIG_BOOT_DELAY is not set
+
+CONFIG_STACK_GUARD=256
+CONFIG_CMM_IUCV=y
+
+# CONFIG_DETECT_SOFTLOCKUP is not set
+
+CONFIG_S390_HYPFS_FS=y
+
+CONFIG_MONWRITER=m
+CONFIG_ZCRYPT=m
+CONFIG_ZCRYPT_MONOLITHIC=y
+
+CONFIG_S390_SWITCH_AMODE=y
+CONFIG_S390_EXEC_PROTECT=y
+CONFIG_AFIUCV=m
+CONFIG_S390_PRNG=m
+
+CONFIG_S390_VMUR=m
+


Index: config-sparc
===================================================================
RCS file: config-sparc
diff -N config-sparc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-sparc	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,10 @@
+# CONFIG_SMP is not set
+# CONFIG_DVB_CAPTURE_DRIVERS is not set
+CONFIG_SPARC_LED=y
+# CONFIG_ATM_FORE200E_SBA is not set
+# CONFIG_FB_MODE_HELPERS is not set 
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO_SUN_CLUT224 is not set
+# CONFIG_SND_SUN_DBRI is not set
+CONFIG_UNIX98_PTY_COUNT=256


Index: config-sparc-generic
===================================================================
RCS file: config-sparc-generic
diff -N config-sparc-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-sparc-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,154 @@
+CONFIG_HIGHMEM=y
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_NR_CPUS=32
+CONFIG_SPARC32=y
+CONFIG_SMP=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_SUN_AUXIO=y
+CONFIG_SUN_IO=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_SUN4 is not set
+# CONFIG_PCI is not set
+CONFIG_SUN_PM=y
+CONFIG_SUN_OPENPROMFS=m
+# CONFIG_SUNOS_EMUL is not set
+CONFIG_PARPORT=m
+# CONFIG_PARPORT_PC is not set
+# CONFIG_PARPORT_PC_CML1 is not set
+CONFIG_PARPORT_SERIAL=m
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+CONFIG_PARPORT_SUNBPP=m
+# CONFIG_PARPORT_OTHER is not set
+CONFIG_PARPORT_1284=y
+# CONFIG_GAMEPORT is not set
+CONFIG_PRINTER=m
+CONFIG_FB=y
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_IMSTT is not set
+CONFIG_FB_BW2=y
+CONFIG_FB_CG3=y
+CONFIG_FB_CG6=y
+CONFIG_FB_SBUS=y
+CONFIG_FB_TCX=y
+CONFIG_FB_CG14=y
+CONFIG_FB_P9100=y
+CONFIG_FB_LEO=y
+# CONFIG_FB_PCI is not set
+# CONFIG_FB_IGA is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_PROM_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_PCI_CONSOLE is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_SUN8x16=y
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_MTD is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SERIAL_8250 is not set
+# CONFIG_SERIAL_8250_CONSOLE is not set
+# CONFIG_SERIAL_8250_NR_UARTS is not set
+# CONFIG_SERIAL_8250_EXTENDED is not set
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+# CONFIG_SERIAL_8250_SHARE_IRQ is not set
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set 
+# CONFIG_SERIAL_8250_MULTIPORT is not set
+# CONFIG_SERIAL_8250_RSA is not set
+CONFIG_SERIAL_SUNCORE=y
+CONFIG_SERIAL_SUNZILOG=y
+CONFIG_SERIAL_SUNZILOG_CONSOLE=y
+CONFIG_SERIAL_SUNSU=y
+CONFIG_SERIAL_SUNSU_CONSOLE=y
+CONFIG_SERIAL_SUNSAB=y
+CONFIG_SERIAL_SUNSAB_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_MOSTEK_RTC=y
+# CONFIG_SUN_BPP is not set
+# CONFIG_SUN_VIDEOPIX is not set
+# CONFIG_SUN_AURORA is not set
+CONFIG_TADPOLE_TS102_UCTRL=m
+CONFIG_SUN_JSFLASH=m
+CONFIG_APM_RTC_IS_GMT=y
+CONFIG_RTC=y
+# CONFIG_IDE is not set
+CONFIG_BLK_DEV_FD=y
+# CONFIG_SCSI_CONSTANTS is not set
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_QLOGICPTI=m
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_NSP32 is not set
+CONFIG_SCSI_SUNESP=m
+CONFIG_FC4=m
+CONFIG_FC4_SOC=m
+CONFIG_FC4_SOCAL=m
+CONFIG_SCSI_PLUTO=m
+CONFIG_SCSI_FCAL=m
+CONFIG_SUNLANCE=m
+CONFIG_SUNBMAC=m
+CONFIG_MYRI_SBUS=m
+CONFIG_SUNQE=m
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_SUNKBD=y
+CONFIG_INPUT_SPARCSPKR=m
+# CONFIG_SOUND_PRIME is not set
+CONFIG_SND_SUN_AMD7930=m
+CONFIG_SND_SUN_CS4231=m
+# CONFIG_ISDN_BOOL is not set
+# CONFIG_BT is not set
+# CONFIG_SERIO_I8042 is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_USB is not set
+# CONFIG_USB_GADGET is not set
+# CONFIG_USB_NET2280 is not set
+# CONFIG_USB_ZERO is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_NEC98_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set


Index: config-sparc-smp
===================================================================
RCS file: config-sparc-smp
diff -N config-sparc-smp


Index: config-sparc64
===================================================================
RCS file: config-sparc64
diff -N config-sparc64
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-sparc64	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,2 @@
+# CONFIG_SMP is not set
+


Index: config-sparc64-generic
===================================================================
RCS file: config-sparc64-generic
diff -N config-sparc64-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-sparc64-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,161 @@
+CONFIG_SPARC=y
+CONFIG_SPARC64=y
+CONFIG_SECCOMP=y
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=m
+CONFIG_CPU_FREQ_DEBUG=y
+# CONFIG_CPU_FREQ_STAT is not set
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_US3_FREQ=m
+CONFIG_US2E_FREQ=m
+
+CONFIG_SUN_LDOMS=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+# CONFIG_CRASH is not set
+CONFIG_64BIT=y
+# CONFIG_BBC_I2C is not set
+CONFIG_HUGETLB_PAGE_SIZE_4MB=y
+# CONFIG_HUGETLB_PAGE_SIZE_512K is not set
+# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
+CONFIG_NR_CPUS=32
+CONFIG_US3_FREQ=m
+CONFIG_US2E_FREQ=m
+CONFIG_SUN_OPENPROMFS=m
+CONFIG_SPARC32_COMPAT=y
+CONFIG_COMPAT=y
+CONFIG_UID16=y
+CONFIG_BINFMT_ELF32=y
+CONFIG_BINFMT_AOUT32=y
+CONFIG_SUNOS_EMUL=y
+CONFIG_SOLARIS_EMUL=m
+CONFIG_ENVCTRL=m
+CONFIG_DISPLAY7SEG=m
+CONFIG_WATCHDOG_CP1XXX=m
+CONFIG_WATCHDOG_RIO=m
+# CONFIG_CMDLINE_BOOL is not set
+CONFIG_FB_BW2=y
+CONFIG_FB_CG3=y
+CONFIG_FB_CG6=y
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+CONFIG_FB_ATY=y
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+CONFIG_FB_SBUS=y
+CONFIG_FB_FFB=y
+# CONFIG_FB_TCX is not set
+# CONFIG_FB_CG14 is not set
+CONFIG_FB_PM2=y
+CONFIG_FB_P9100=y
+# CONFIG_FB_LEO is not set
+CONFIG_FB_PCI=y
+CONFIG_FB_XVR500=y
+CONFIG_FB_XVR2500=y
+# CONFIG_MDA_CONSOLE is not set
+# CONFIG_PROM_CONSOLE is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_SUN8x16=y
+CONFIG_FONT_SUN12x22=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_SUNZILOG=y
+CONFIG_SERIAL_SUNZILOG_CONSOLE=y
+CONFIG_SERIAL_SUNSU=y
+CONFIG_SERIAL_SUNSU_CONSOLE=y
+CONFIG_SERIAL_SUNSAB=y
+CONFIG_SERIAL_SUNSAB_CONSOLE=y
+CONFIG_SERIAL_SUNHV=y
+CONFIG_SUN_OPENPROMIO=y
+CONFIG_SUN_MOSTEK_RTC=y
+CONFIG_OBP_FLASH=m
+# CONFIG_SUN_VIDEOPIX is not set
+# CONFIG_SUN_AURORA is not set
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_BLK_DEV_FD=y
+CONFIG_SUNVDC=m
+CONFIG_SUNVNET=m
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+CONFIG_SCSI_QLOGICPTI=m
+CONFIG_SCSI_SUNESP=m
+CONFIG_FC4=m
+CONFIG_FC4_SOC=m
+CONFIG_FC4_SOCAL=m
+CONFIG_SCSI_PLUTO=m
+CONFIG_SCSI_FCAL=m
+CONFIG_SUNLANCE=m
+CONFIG_SUNBMAC=m
+CONFIG_SUNQE=m
+# CONFIG_DM9102 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_R8169 is not set
+CONFIG_ATM_FORE200E_SBA=y
+CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
+# CONFIG_ATM_FORE200E_SBA_FW is not set
+CONFIG_ATM_FORE200E_USE_TASKLET=y
+CONFIG_ATM_FORE200E_DEBUG=0
+CONFIG_ATM_FORE200E_TX_RETRY=16
+CONFIG_DRM_FFB=m
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_SUNKBD=y
+# CONFIG_INPUT_PCSPKR is not set
+CONFIG_INPUT_SPARCSPKR=m
+# CONFIG_SOUND_PRIME is not set
+CONFIG_SND_BIT32_EMUL=m
+CONFIG_SND_SUN_AMD7930=m
+CONFIG_SND_SUN_CS4231=m
+CONFIG_SND_SUN_DBRI=m
+CONFIG_PARPORT_SUNBPP=m
+CONFIG_LOGO_SUN_CLUT224=y
+CONFIG_SUN_BPP=m
+CONFIG_MTD_SUN_UFLASH=m
+CONFIG_MYRI_SBUS=m
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_IEEE1394_SBP2 is not set
+# CONFIG_USB_NET2280 is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_DCFLUSH is not set
+# CONFIG_DEBUG_BOOTMEM is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_STACK_DEBUG is not set
+


Index: config-sparc64-smp
===================================================================
RCS file: config-sparc64-smp
diff -N config-sparc64-smp


Index: config-x86-generic
===================================================================
RCS file: config-x86-generic
diff -N config-x86-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-x86-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,347 @@
+CONFIG_UID16=y
+CONFIG_X86_64_XEN is not set
+#
+# Processor type and features
+#
+#
+# Enable summit and co via the generic arch
+#
+# CONFIG_X86_PC is not set
+CONFIG_X86_GENERICARCH=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+# CONFIG_M686 is not set
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+CONFIG_SMP=y
+CONFIG_NR_CPUS=32
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_HPET=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+# CONFIG_HPET_RTC_IRQ is not set
+# CONFIG_HPET_MMAP is not set
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_TSC=y
+CONFIG_X86_MCE=y
+# CONFIG_X86_MCE_NONFATAL is not set
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+CONFIG_SONY_LAPTOP=m
+CONFIG_SONYPI=m
+CONFIG_SONYPI_COMPAT=y
+CONFIG_MICROCODE=m
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_EDD=m
+# CONFIG_NUMA is not set
+CONFIG_HIGHMEM=y
+CONFIG_HIGHPTE=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+CONFIG_X86_PM_TIMER=y
+
+CONFIG_EFI=y
+CONFIG_EFI_VARS=y
+CONFIG_EFI_PCDP=y
+CONFIG_EFI_RTC=y
+
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GODIRECT is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+CONFIG_PCI_GOANY=y
+
+#
+# x86 specific drivers
+#
+CONFIG_PCMCIA_FDOMAIN=m
+CONFIG_SCSI_FUTURE_DOMAIN=m
+CONFIG_SCSI_ADVANSYS=m
+
+CONFIG_SECCOMP=y
+
+CONFIG_CAPI_EICON=y
+
+CONFIG_I2O=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+CONFIG_I2O_CONFIG=y
+CONFIG_I2O_EXT_ADAPTEC=y
+CONFIG_I2O_EXT_ADAPTEC_DMA64=y
+CONFIG_I2O_CONFIG_OLD_IOCTL=y
+CONFIG_I2O_BUS=m
+
+#
+# APM (Advanced Power Management) BIOS Support
+#
+CONFIG_APM=y
+# CONFIG_APM_IGNORE_USER_SUSPEND is not set
+# CONFIG_APM_DO_ENABLE is not set
+CONFIG_APM_CPU_IDLE=y
+# CONFIG_APM_DISPLAY_BLANK is not set
+# CONFIG_APM_ALLOW_INTS is not set
+# CONFIG_APM_REAL_MODE_POWER_OFF is not set
+
+#
+# Kernel debugging
+#
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=m
+# CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BAY=m
+CONFIG_ACPI_BLACKLIST_YEAR=1999
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_CONTAINER=m
+CONFIG_ACPI_DOCK=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_FAN=y
+CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_SBS=m
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_PROCFS_SLEEP is not set
+CONFIG_ACPI_SYSTEM=y
+CONFIG_ACPI_THERMAL=y
+CONFIG_ACPI_TOSHIBA=m
+CONFIG_ACPI_VIDEO=m
+# Disable in F9.
+CONFIG_ACPI_PROC_EVENT=y
+CONFIG_PNPACPI=y
+
+CONFIG_ASUS_LAPTOP=m
+
+#
+# CPUFreq processor drivers
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEBUG=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_STAT=m
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+
+CONFIG_X86_ACPI_CPUFREQ=m
+# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
+# CONFIG_X86_POWERNOW_K6 is not set
+CONFIG_X86_POWERNOW_K7=y
+CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_POWERNOW_K8_ACPI=y
+# CONFIG_X86_GX_SUSPMOD is not set
+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
+CONFIG_X86_SPEEDSTEP_ICH=y
+CONFIG_X86_SPEEDSTEP_SMI=y
+CONFIG_X86_SPEEDSTEP_LIB=y
+# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
+CONFIG_X86_P4_CLOCKMOD=m
+CONFIG_X86_LONGRUN=y
+# CONFIG_X86_LONGHAUL is not set
+# CONFIG_X86_CPUFREQ_NFORCE2 is not set
+CONFIG_X86_E_POWERSAVER=y
+
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+
+#
+# various x86 specific drivers
+#
+CONFIG_NVRAM=y
+CONFIG_IBM_ASM=m
+CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_TWOFISH_586=m
+# CONFIG_CRYPTO_DEV_PADLOCK is not set
+# CONFIG_CRYPTO_DEV_PADLOCK_AES is not set
+# CONFIG_CRYPTO_DEV_PADLOCK_SHA is not set
+
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_SCHED_SMT=y
+# CONFIG_IRQBALANCE is not set
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION=y
+CONFIG_PM_STD_PARTITION=""
+
+CONFIG_DEBUG_RODATA=y
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+CONFIG_4KSTACKS=y
+CONFIG_DEBUG_NMI_TIMEOUT=5
+
+# CONFIG_DEBUG_PAGEALLOC is not set
+
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_BIOS=y
+
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_COMPAQ=m
+# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
+CONFIG_HOTPLUG_PCI_IBM=m
+
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_PCIE=m
+# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
+# SHPC has half-arsed PCI probing, which makes it load on too many systems
+# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_PM=y
+
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IPW2100=m
+CONFIG_IPW2100_MONITOR=y
+CONFIG_IPW2200=m
+CONFIG_IPW2200_MONITOR=y
+CONFIG_IPW2200_RADIOTAP=y
+CONFIG_IPW2200_PROMISCUOUS=y
+CONFIG_IPW2200_QOS=y
+
+CONFIG_BLK_DEV_AMD74XX=y
+
+CONFIG_I2C_ALI1535=m
+CONFIG_I2C_ALI15X3=m
+CONFIG_I2C_ALI1563=m
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD756_S4882=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+CONFIG_I2C_I810=m
+CONFIG_I2C_ISA=m
+CONFIG_I2C_NFORCE2=m
+CONFIG_I2C_PIIX4=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_I2C_SIS5595=m
+CONFIG_I2C_SIS630=m
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_VOODOO3=m
+
+# CONFIG_X86_REBOOTFIXUPS is not set
+
+CONFIG_DELL_RBU=m
+CONFIG_DCDBAS=m
+
+CONFIG_PC8736x_GPIO=m
+# CONFIG_NSC_GPIO is not set
+CONFIG_CS5535_GPIO=m
+
+CONFIG_EDAC=y
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82975X=m
+CONFIG_EDAC_I3000=m
+CONFIG_EDAC_I5000=m
+CONFIG_EDAC_K8=m
+CONFIG_EDAC_R82600=m
+
+CONFIG_SCHED_MC=y
+
+CONFIG_SND_ES18XX=m
+
+CONFIG_TCG_INFINEON=m
+
+CONFIG_HW_RANDOM_INTEL=m
+CONFIG_HW_RANDOM_AMD=m
+CONFIG_HW_RANDOM_GEODE=m
+CONFIG_HW_RANDOM_VIA=m
+
+CONFIG_USB_HIDINPUT_POWERBOOK=y
+
+# CONFIG_COMPAT_VDSO is not set
+
+# CONFIG_SGI_IOC4 is not set
+CONFIG_MSI_LAPTOP=m
+
+# CONFIG_SMSC37B787_WDT is not set
+CONFIG_W83697HF_WDT=m
+
+CONFIG_PARAVIRT=y
+
+CONFIG_RELOCATABLE=y
+CONFIG_PHYSICAL_ALIGN=0x400000
+CONFIG_PHYSICAL_START=0x1000000
+CONFIG_CRASH_DUMP=y
+CONFIG_PROC_VMCORE=y
+
+CONFIG_CRYPTO_DEV_GEODE=m
+
+CONFIG_VIDEO_CAFE_CCIC=m
+
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+
+CONFIG_MTD_ESB2ROM=m
+CONFIG_MTD_CK804XROM=m
+CONFIG_MTD_NAND_CAFE=m
+
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+
+CONFIG_THINKPAD_ACPI=m
+# CONFIG_THINKPAD_ACPI_DEBUG is not set
+CONFIG_THINKPAD_ACPI_BAY=y
+
+CONFIG_MACINTOSH_DRIVERS=y
+
+CONFIG_DMIID=y
+
+CONFIG_VIRTUALIZATION=y
+CONFIG_VMI=y
+CONFIG_LGUEST=m
+# CONFIG_XEN is not set
+# CONFIG_HVC_XEN is not set


Index: config-x86_64-generic
===================================================================
RCS file: config-x86_64-generic
diff -N config-x86_64-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-x86_64-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,228 @@
+CONFIG_UID16=y
+# CONFIG_X86_64_XEN is not set
+# CONFIG_MK8 is not set
+# CONFIG_MPSC is not set
+CONFIG_GENERIC_CPU=y
+CONFIG_X86_MSR=y
+CONFIG_X86_CPUID=y
+CONFIG_MTRR=y
+CONFIG_NUMA=y
+CONFIG_K8_NUMA=y
+CONFIG_X86_64_ACPI_NUMA=y
+# CONFIG_NUMA_EMU is not set
+CONFIG_NR_CPUS=64
+CONFIG_X86_POWERNOW_K8=y
+CONFIG_IA32_EMULATION=y
+# CONFIG_IA32_AOUT is not set
+# CONFIG_IOMMU_DEBUG is not set
+CONFIG_DEBUG_RODATA=y
+CONFIG_MICROCODE=m
+CONFIG_SWIOTLB=y
+CONFIG_CALGARY_IOMMU=y
+CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_EDD=m
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_MMCONFIG=y
+
+CONFIG_I2O=m
+CONFIG_I2O_BLOCK=m
+CONFIG_I2O_SCSI=m
+CONFIG_I2O_PROC=m
+CONFIG_I2O_CONFIG=y
+CONFIG_I2O_EXT_ADAPTEC=y
+CONFIG_I2O_EXT_ADAPTEC_DMA64=y
+CONFIG_I2O_CONFIG_OLD_IOCTL=y
+CONFIG_I2O_BUS=m
+
+CONFIG_SECCOMP=y
+
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_SCHED_SMT=y
+CONFIG_SUSPEND=y
+CONFIG_HIBERNATION=y
+CONFIG_PM_STD_PARTITION=""
+
+CONFIG_CPU_FREQ=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
+CONFIG_X86_ACPI_CPUFREQ=m
+# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
+CONFIG_CPU_FREQ_STAT=m
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=m
+# CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BAY=m
+CONFIG_ACPI_BLACKLIST_YEAR=0
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_CONTAINER=m
+CONFIG_ACPI_DOCK=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_FAN=y
+CONFIG_ACPI_HOTPLUG_MEMORY=m
+CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_SBS=m
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_PROCFS_SLEEP is not set
+CONFIG_ACPI_THERMAL=y
+CONFIG_ACPI_TOSHIBA=m
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_ACPI_VIDEO=m
+# Disable in F9.
+CONFIG_ACPI_PROC_EVENT=y
+
+CONFIG_ASUS_LAPTOP=m
+CONFIG_MSI_LAPTOP=m
+CONFIG_SONY_LAPTOP=m
+CONFIG_SONYPI_COMPAT=y
+
+CONFIG_THINKPAD_ACPI=m
+# CONFIG_THINKPAD_ACPI_DEBUG is not set
+CONFIG_THINKPAD_ACPI_BAY=y
+
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_COMPAQ=m
+# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
+CONFIG_HOTPLUG_PCI_IBM=m
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_PCIE=m
+# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
+# SHPC has half-arsed PCI probing, which makes it load on too many systems
+CONFIG_HOTPLUG_PCI_SHPC=m
+CONFIG_HPET=y
+# CONFIG_HPET_MMAP is not set
+# CONFIG_HPET_RTC_IRQ is not set
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_PM=y
+
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IPW2100=m
+CONFIG_IPW2100_MONITOR=y
+CONFIG_IPW2200=m
+CONFIG_IPW2200_MONITOR=y
+CONFIG_IPW2200_RADIOTAP=y
+CONFIG_IPW2200_PROMISCUOUS=y
+CONFIG_IPW2200_QOS=y
+
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+
+CONFIG_BLK_DEV_AMD74XX=y
+CONFIG_CRYPTO_DEV_PADLOCK=m
+CONFIG_CRYPTO_DEV_PADLOCK_AES=y
+CONFIG_CRYPTO_AES_X86_64=m
+CONFIG_CRYPTO_TWOFISH_X86_64=m
+
+CONFIG_X86_MCE_INTEL=y
+CONFIG_X86_MCE_AMD=y
+
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+CONFIG_I2C_AMD756=m
+CONFIG_I2C_AMD756_S4882=m
+CONFIG_I2C_AMD8111=m
+CONFIG_I2C_I801=m
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+CONFIG_I2C_SIS96X=m
+CONFIG_I2C_VIA=m
+CONFIG_I2C_VIAPRO=m
+CONFIG_I2C_ISA=m
+
+CONFIG_DELL_RBU=m
+CONFIG_DCDBAS=m
+
+CONFIG_NVRAM=y
+
+CONFIG_EDAC=y
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_I82975X=m
+CONFIG_EDAC_K8=m
+CONFIG_EDAC_R82600=m
+
+CONFIG_SCHED_MC=y
+
+CONFIG_TCG_INFINEON=m
+
+CONFIG_HW_RANDOM_INTEL=m
+CONFIG_HW_RANDOM_AMD=m
+CONFIG_HW_RANDOM_VIA=m
+
+# CONFIG_HW_RANDOM_GEODE is not set
+
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEBUG_NMI_TIMEOUT=5
+
+CONFIG_PC8736x_GPIO=m
+
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_HAVE_MEMORY_PRESENT=y
+CONFIG_SPARSEMEM_EXTREME=y
+
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_RZ1000 is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_CS5535 is not set
+
+CONFIG_CC_STACKPROTECTOR=y
+# CONFIG_CC_STACKPROTECTOR_ALL is not set
+
+CONFIG_SGI_IOC4=m
+# CONFIG_SGI_IOC4 is not set
+
+# CONFIG_SMSC37B787_WDT is not set
+CONFIG_W83697HF_WDT=m
+
+CONFIG_VIDEO_CAFE_CCIC=m
+
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+
+CONFIG_MTD_ESB2ROM=m
+CONFIG_MTD_CK804XROM=m
+
+CONFIG_RELOCATABLE=y
+CONFIG_MACINTOSH_DRIVERS=y
+
+CONFIG_CRASH_DUMP=y
+CONFIG_PHYSICAL_START=0x1000000
+CONFIG_PROC_VMCORE=y
+
+CONFIG_DMIID=y
+
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+
+CONFIG_VIRTUALIZATION=y


Index: config-xen-generic
===================================================================
RCS file: config-xen-generic
diff -N config-xen-generic
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-xen-generic	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,72 @@
+
+CONFIG_XEN_PCIDEV_FRONTEND=y
+# CONFIG_XEN_PCIDEV_FE_DEBUG is not set
+
+
+CONFIG_XEN=y
+CONFIG_XEN_INTERFACE_VERSION=0x00030202
+
+#
+# XEN
+#
+CONFIG_XEN_PRIVILEGED_GUEST=y
+# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_XENBUS_DEV=y
+CONFIG_XEN_BACKEND=y
+CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_BLKDEV_TAP=m
+CONFIG_XEN_NETDEV_BACKEND=m
+# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
+CONFIG_XEN_NETDEV_LOOPBACK=m
+CONFIG_XEN_PCIDEV_BACKEND=m
+CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
+# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
+# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
+# CONFIG_XEN_TPMDEV_BACKEND is not set
+CONFIG_XEN_BLKDEV_FRONTEND=m
+CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XEN_FRAMEBUFFER=y
+CONFIG_XEN_KEYBOARD=y
+CONFIG_XEN_SCRUB_PAGES=y
+# CONFIG_XEN_DISABLE_SERIAL is not set
+CONFIG_XEN_SYSFS=y
+CONFIG_XEN_COMPAT_030002_AND_LATER=y
+# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
+CONFIG_XEN_COMPAT_030002=y
+CONFIG_HAVE_ARCH_ALLOC_SKB=y
+CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
+CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_XEN_UTIL=y
+CONFIG_XEN_BALLOON=y
+CONFIG_XEN_DEVMEM=y
+CONFIG_XEN_SKBUFF=y
+CONFIG_XEN_REBOOT=y
+CONFIG_XEN_SMPBOOT=y
+
+# Microcode needs sys_mlock & sys_munlock that are not exported
+# it needs to be compiled in
+# FIXME: This isn't going to work as of .19, due to firmware loader
+# not being available that early in boot. This will cause long pauses during boot.
+CONFIG_MICROCODE=y
+
+# TPM is not working, somebody have to merge the xen bits
+# CONFIG_TCG_TPM is not set
+
+# frequency scaling really needs to be done in the hypervisor instead
+# CONFIG_CPU_FREQ is not set
+
+# need to set the serial stuff up like this or serial console doesn't
+# work quite right in dom0.  ick.
+CONFIG_SERIAL_8250=m
+# CONFIG_SERIAL_8250_CONSOLE is not set
+
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ_250=y
+
+# xen and kvm conflict
+# CONFIG_KVM is not set
+# CONFIG_KVM_INTEL is not set
+# CONFIG_KVM_AMD is not set
+


Index: config-xen-ia64
===================================================================
RCS file: config-xen-ia64
diff -N config-xen-ia64
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-xen-ia64	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,25 @@
+# CONFIG_IA64_GENERIC is not set
+CONFIG_IA64_DIG=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM_MANUAL=y
+CONFIG_FORCE_MAX_ZONEORDER=11
+
+CONFIG_XEN=y
+CONFIG_XEN_IA64_DOM0_VP=y
+CONFIG_XEN_DISABLE_SERIAL=y
+# CONFIG_XEN_PCIDEV_BACKEND is not set
+# CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
+# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
+# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
+# CONFIG_XEN_TPMDEV_BACKEND is not set
+
+# internal #defines conflict with xen-ia64
+# CONFIG_FB_NEOMAGIC is not set
+
+# don't work, missing symbols
+# CONFIG_KEXEC is not set
+# CONFIG_CRASH_DUMP is not set
+
+# Missing function not exported
+# CONFIG_XEN_BLKDEV_TAP is not set


Index: config-xen-x86
===================================================================
RCS file: config-xen-x86
diff -N config-xen-x86
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-xen-x86	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,4 @@
+
+# CONFIG_X86_PC is not set
+CONFIG_X86_XEN=y
+# CONFIG_X86_GENERICARCH is not set


Index: config-xen-x86_64
===================================================================
RCS file: config-xen-x86_64
diff -N config-xen-x86_64
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config-xen-x86_64	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,8 @@
+# things we want different from i686 xen
+
+CONFIG_X86_64=y
+
+# CONFIG_X86_XEN is not set
+CONFIG_X86_64_XEN=y
+
+CONFIG_GENERIC_CPU=y

drm-mm-git.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 drm-mm-git.patch
Index: drm-mm-git.patch
===================================================================
RCS file: drm-mm-git.patch
diff -N drm-mm-git.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ drm-mm-git.patch	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,12430 @@
+diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h
+index 2d6f2d0..82fb3d0 100644
+--- a/drivers/char/drm/drm.h
++++ b/drivers/char/drm/drm.h
+@@ -63,27 +63,9 @@
+ #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
+ #endif
+ 
+-#define XFREE86_VERSION(major,minor,patch,snap) \
+-		((major << 16) | (minor << 8) | patch)
+-
+-#ifndef CONFIG_XFREE86_VERSION
+-#define CONFIG_XFREE86_VERSION XFREE86_VERSION(4,1,0,0)
+-#endif
+-
+-#if CONFIG_XFREE86_VERSION < XFREE86_VERSION(4,1,0,0)
+-#define DRM_PROC_DEVICES "/proc/devices"
+-#define DRM_PROC_MISC	 "/proc/misc"
+-#define DRM_PROC_DRM	 "/proc/drm"
+-#define DRM_DEV_DRM	 "/dev/drm"
+-#define DRM_DEV_MODE	 (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
+-#define DRM_DEV_UID	 0
+-#define DRM_DEV_GID	 0
+-#endif
+-
+-#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0)
+ #define DRM_MAJOR       226
+ #define DRM_MAX_MINOR   15
+-#endif
++
+ #define DRM_NAME	"drm"	  /**< Name in kernel, /dev, and /proc */
+ #define DRM_MIN_ORDER	5	  /**< At least 2^5 bytes = 32 bytes */
+ #define DRM_MAX_ORDER	22	  /**< Up to 2^22 bytes = 4MB */
+diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
+index 0df87fc..9dd0760 100644
+--- a/drivers/char/drm/drmP.h
++++ b/drivers/char/drm/drmP.h
+@@ -80,6 +80,9 @@
+ #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
+ #define __OS_HAS_MTRR (defined(CONFIG_MTRR))
+ 
++struct drm_file;
++struct drm_device;
++
+ #include "drm_os_linux.h"
+ #include "drm_hashtab.h"
+ 
+@@ -231,12 +234,13 @@
+  * \param dev DRM device.
+  * \param filp file pointer of the caller.
+  */
+-#define LOCK_TEST_WITH_RETURN( dev, filp )				\
++#define LOCK_TEST_WITH_RETURN( dev, file_priv )				\
+ do {									\
+ 	if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) ||		\
+-	     dev->lock.filp != filp ) {				\
+-		DRM_ERROR( "%s called without lock held\n",		\
+-			   __FUNCTION__ );				\
++	     dev->lock.file_priv != file_priv )	{			\
++		DRM_ERROR( "%s called without lock held, held  %d owner %p %p\n",\
++			   __FUNCTION__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\
++			   dev->lock.file_priv, file_priv );		\
+ 		return -EINVAL;						\
+ 	}								\
+ } while (0)
+@@ -257,12 +261,12 @@ do {									\
+  * Ioctl function type.
+  *
+  * \param inode device inode.
+- * \param filp file pointer.
++ * \param file_priv DRM file private pointer.
+  * \param cmd command.
+  * \param arg argument.
+  */
+-typedef int drm_ioctl_t(struct inode *inode, struct file *filp,
+-			unsigned int cmd, unsigned long arg);
++typedef int drm_ioctl_t(struct drm_device *dev, void *data,
++			struct drm_file *file_priv);
+ 
+ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
+ 			       unsigned long arg);
+@@ -271,10 +275,18 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
+ #define	DRM_MASTER	0x2
+ #define DRM_ROOT_ONLY	0x4
+ 
+-typedef struct drm_ioctl_desc {
++struct drm_ioctl_desc {
++	unsigned int cmd;
+ 	drm_ioctl_t *func;
+ 	int flags;
+-} drm_ioctl_desc_t;
++};
++
++/**
++ * Creates a driver or general drm_ioctl_desc array entry for the given
++ * ioctl, for use by drm_ioctl().
++ */
++#define DRM_IOCTL_DEF(ioctl, func, flags) \
++	[DRM_IOCTL_NR(ioctl)] = {ioctl, func, flags}
+ 
+ struct drm_magic_entry {
+ 	struct list_head head;
+@@ -304,7 +316,7 @@ struct drm_buf {
+ 	__volatile__ int waiting;      /**< On kernel DMA queue */
+ 	__volatile__ int pending;      /**< On hardware DMA queue */
+ 	wait_queue_head_t dma_wait;    /**< Processes waiting */
+-	struct file *filp;	       /**< Pointer to holding file descr */
++	struct drm_file *file_priv;    /**< Private of holding file descr */
+ 	int context;		       /**< Kernel queue for this buffer */
+ 	int while_locked;	       /**< Dispatch this buffer while locked */
+ 	enum {
+@@ -377,6 +389,7 @@ struct drm_file {
+ 	int remove_auth_on_close;
+ 	unsigned long lock_count;
+ 	void *driver_priv;
++	struct file *filp;
+ };
+ 
+ /** Wait queue */
+@@ -403,7 +416,7 @@ struct drm_queue {
+  */
+ struct drm_lock_data {
+ 	struct drm_hw_lock *hw_lock;	/**< Hardware lock */
+-	struct file *filp;		/**< File descr of lock holder (0=kernel) */
++	struct drm_file *file_priv;	/**< File descr of lock holder (0=kernel) */
+ 	wait_queue_head_t lock_queue;	/**< Queue of blocked processes */
+ 	unsigned long lock_time;	/**< Time of last lock in jiffies */
+ 	spinlock_t spinlock;
+@@ -552,11 +565,11 @@ struct drm_driver {
+ 	int (*load) (struct drm_device *, unsigned long flags);
+ 	int (*firstopen) (struct drm_device *);
+ 	int (*open) (struct drm_device *, struct drm_file *);
+-	void (*preclose) (struct drm_device *, struct file * filp);
++	void (*preclose) (struct drm_device *, struct drm_file *file_priv);
+ 	void (*postclose) (struct drm_device *, struct drm_file *);
+ 	void (*lastclose) (struct drm_device *);
+ 	int (*unload) (struct drm_device *);
+-	int (*dma_ioctl) (DRM_IOCTL_ARGS);
++	int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
+ 	void (*dma_ready) (struct drm_device *);
+ 	int (*dma_quiescent) (struct drm_device *);
+ 	int (*context_ctor) (struct drm_device *dev, int context);
+@@ -587,11 +600,12 @@ struct drm_driver {
+ 	void (*irq_preinstall) (struct drm_device *dev);
+ 	void (*irq_postinstall) (struct drm_device *dev);
+ 	void (*irq_uninstall) (struct drm_device *dev);
+-	void (*reclaim_buffers) (struct drm_device *dev, struct file * filp);
++	void (*reclaim_buffers) (struct drm_device *dev,
++				 struct drm_file * file_priv);
+ 	void (*reclaim_buffers_locked) (struct drm_device *dev,
+-					struct file *filp);
++					struct drm_file *file_priv);
+ 	void (*reclaim_buffers_idlelocked) (struct drm_device *dev,
+-					struct file * filp);
++					    struct drm_file *file_priv);
+ 	unsigned long (*get_map_ofs) (struct drm_map * map);
+ 	unsigned long (*get_reg_ofs) (struct drm_device *dev);
+ 	void (*set_version) (struct drm_device *dev,
+@@ -606,7 +620,7 @@ struct drm_driver {
+ 
+ 	u32 driver_features;
+ 	int dev_priv_size;
+-	drm_ioctl_desc_t *ioctls;
++	struct drm_ioctl_desc *ioctls;
+ 	int num_ioctls;
+ 	struct file_operations fops;
+ 	struct pci_driver pci_driver;
+@@ -850,70 +864,70 @@ extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
+ extern int drm_unbind_agp(DRM_AGP_MEM * handle);
+ 
+ 				/* Misc. IOCTL support (drm_ioctl.h) */
+-extern int drm_irq_by_busid(struct inode *inode, struct file *filp,
+-			    unsigned int cmd, unsigned long arg);
+-extern int drm_getunique(struct inode *inode, struct file *filp,
+-			 unsigned int cmd, unsigned long arg);
+-extern int drm_setunique(struct inode *inode, struct file *filp,
+-			 unsigned int cmd, unsigned long arg);
+-extern int drm_getmap(struct inode *inode, struct file *filp,
+-		      unsigned int cmd, unsigned long arg);
+-extern int drm_getclient(struct inode *inode, struct file *filp,
+-			 unsigned int cmd, unsigned long arg);
+-extern int drm_getstats(struct inode *inode, struct file *filp,
+-			unsigned int cmd, unsigned long arg);
+-extern int drm_setversion(struct inode *inode, struct file *filp,
+-			  unsigned int cmd, unsigned long arg);
+-extern int drm_noop(struct inode *inode, struct file *filp,
+-		    unsigned int cmd, unsigned long arg);
++extern int drm_irq_by_busid(struct drm_device *dev, void *data,
++			    struct drm_file *file_priv);
++extern int drm_getunique(struct drm_device *dev, void *data,
++			 struct drm_file *file_priv);
++extern int drm_setunique(struct drm_device *dev, void *data,
++			 struct drm_file *file_priv);
[...12037 lines suppressed...]
+-	dev_priv->vram_offset = fb.offset;
++	dev_priv->vram_offset = fb->offset;
+ 
+ 	mutex_unlock(&dev->struct_mutex);
+-	DRM_DEBUG("offset = %u, size = %u", fb.offset, fb.size);
++	DRM_DEBUG("offset = %u, size = %u", fb->offset, fb->size);
+ 
+ 	return 0;
+ 
+@@ -121,80 +115,71 @@ void via_lastclose(struct drm_device *dev)
+ 	mutex_unlock(&dev->struct_mutex);
+ }	
+ 
+-int via_mem_alloc(DRM_IOCTL_ARGS)
++int via_mem_alloc(struct drm_device *dev, void *data,
++		  struct drm_file *file_priv)
+ {
+-	DRM_DEVICE;
+-
+-	drm_via_mem_t mem;
++	drm_via_mem_t *mem = data;
+ 	int retval = 0;
+ 	struct drm_memblock_item *item;
+ 	drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
+ 	unsigned long tmpSize;
+ 
+-	DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t __user *) data,
+-				 sizeof(mem));
+-
+-	if (mem.type > VIA_MEM_AGP) {
++	if (mem->type > VIA_MEM_AGP) {
+ 		DRM_ERROR("Unknown memory type allocation\n");
+-		return DRM_ERR(EINVAL);
++		return -EINVAL;
+ 	}
+ 	mutex_lock(&dev->struct_mutex);
+-	if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized :
++	if (0 == ((mem->type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized :
+ 		      dev_priv->agp_initialized)) {
+ 		DRM_ERROR
+ 		    ("Attempt to allocate from uninitialized memory manager.\n");
+ 		mutex_unlock(&dev->struct_mutex);
+-		return DRM_ERR(EINVAL);
++		return -EINVAL;
+ 	}
+ 
+-	tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT;
+-	item = drm_sman_alloc(&dev_priv->sman, mem.type, tmpSize, 0,
+-			      (unsigned long)priv);
++	tmpSize = (mem->size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT;
++	item = drm_sman_alloc(&dev_priv->sman, mem->type, tmpSize, 0,
++			      (unsigned long)file_priv);
+ 	mutex_unlock(&dev->struct_mutex);
+ 	if (item) {
+-		mem.offset = ((mem.type == VIA_MEM_VIDEO) ?
++		mem->offset = ((mem->type == VIA_MEM_VIDEO) ?
+ 			      dev_priv->vram_offset : dev_priv->agp_offset) +
+ 		    (item->mm->
+ 		     offset(item->mm, item->mm_info) << VIA_MM_ALIGN_SHIFT);
+-		mem.index = item->user_hash.key;
++		mem->index = item->user_hash.key;
+ 	} else {
+-		mem.offset = 0;
+-		mem.size = 0;
+-		mem.index = 0;
++		mem->offset = 0;
++		mem->size = 0;
++		mem->index = 0;
+ 		DRM_DEBUG("Video memory allocation failed\n");
+-		retval = DRM_ERR(ENOMEM);
++		retval = -ENOMEM;
+ 	}
+-	DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem));
+ 
+ 	return retval;
+ }
+ 
+-int via_mem_free(DRM_IOCTL_ARGS)
++int via_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
+ {
+-	DRM_DEVICE;
+ 	drm_via_private_t *dev_priv = dev->dev_private;
+-	drm_via_mem_t mem;
++	drm_via_mem_t *mem = data;
+ 	int ret;
+ 
+-	DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t __user *) data,
+-				 sizeof(mem));
+-
+ 	mutex_lock(&dev->struct_mutex);
+-	ret = drm_sman_free_key(&dev_priv->sman, mem.index);
++	ret = drm_sman_free_key(&dev_priv->sman, mem->index);
+ 	mutex_unlock(&dev->struct_mutex);
+-	DRM_DEBUG("free = 0x%lx\n", mem.index);
++	DRM_DEBUG("free = 0x%lx\n", mem->index);
+ 
+ 	return ret;
+ }
+ 
+ 
+-void via_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
++void via_reclaim_buffers_locked(struct drm_device * dev,
++				struct drm_file *file_priv)
+ {
+ 	drm_via_private_t *dev_priv = dev->dev_private;
+-	struct drm_file *priv = filp->private_data;
+ 
+ 	mutex_lock(&dev->struct_mutex);
+-	if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)priv)) {
++	if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)file_priv)) {
+ 		mutex_unlock(&dev->struct_mutex);
+ 		return;
+ 	}
+@@ -203,7 +188,7 @@ void via_reclaim_buffers_locked(struct drm_device * dev, struct file *filp)
+ 		dev->driver->dma_quiescent(dev);
+ 	}
+ 
+-	drm_sman_owner_cleanup(&dev_priv->sman, (unsigned long)priv);
++	drm_sman_owner_cleanup(&dev_priv->sman, (unsigned long)file_priv);
+ 	mutex_unlock(&dev->struct_mutex);
+ 	return;
+ }
+diff --git a/drivers/char/drm/via_verifier.c b/drivers/char/drm/via_verifier.c
+index 832d483..46a5791 100644
+--- a/drivers/char/drm/via_verifier.c
++++ b/drivers/char/drm/via_verifier.c
+@@ -1026,12 +1026,12 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size,
+ 		case state_error:
+ 		default:
+ 			*hc_state = saved_state;
+-			return DRM_ERR(EINVAL);
++			return -EINVAL;
+ 		}
+ 	}
+ 	if (state == state_error) {
+ 		*hc_state = saved_state;
+-		return DRM_ERR(EINVAL);
++		return -EINVAL;
+ 	}
+ 	return 0;
+ }
+@@ -1082,11 +1082,11 @@ via_parse_command_stream(struct drm_device * dev, const uint32_t * buf,
+ 			break;
+ 		case state_error:
+ 		default:
+-			return DRM_ERR(EINVAL);
++			return -EINVAL;
+ 		}
+ 	}
+ 	if (state == state_error) {
+-		return DRM_ERR(EINVAL);
++		return -EINVAL;
+ 	}
+ 	return 0;
+ }
+diff --git a/drivers/char/drm/via_video.c b/drivers/char/drm/via_video.c
+index 300ac61..c15e75b 100644
+--- a/drivers/char/drm/via_video.c
++++ b/drivers/char/drm/via_video.c
+@@ -65,10 +65,9 @@ void via_release_futex(drm_via_private_t * dev_priv, int context)
+ 	}
+ }
+ 
+-int via_decoder_futex(DRM_IOCTL_ARGS)
++int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_priv)
+ {
+-	DRM_DEVICE;
+-	drm_via_futex_t fx;
++	drm_via_futex_t *fx = data;
+ 	volatile int *lock;
+ 	drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
+ 	drm_via_sarea_t *sAPriv = dev_priv->sarea_priv;
+@@ -76,21 +75,18 @@ int via_decoder_futex(DRM_IOCTL_ARGS)
+ 
+ 	DRM_DEBUG("%s\n", __FUNCTION__);
+ 
+-	DRM_COPY_FROM_USER_IOCTL(fx, (drm_via_futex_t __user *) data,
+-				 sizeof(fx));
+-
+-	if (fx.lock > VIA_NR_XVMC_LOCKS)
++	if (fx->lock > VIA_NR_XVMC_LOCKS)
+ 		return -EFAULT;
+ 
+-	lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx.lock);
++	lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);
+ 
+-	switch (fx.func) {
++	switch (fx->func) {
+ 	case VIA_FUTEX_WAIT:
+-		DRM_WAIT_ON(ret, dev_priv->decoder_queue[fx.lock],
+-			    (fx.ms / 10) * (DRM_HZ / 100), *lock != fx.val);
++		DRM_WAIT_ON(ret, dev_priv->decoder_queue[fx->lock],
++			    (fx->ms / 10) * (DRM_HZ / 100), *lock != fx->val);
+ 		return ret;
+ 	case VIA_FUTEX_WAKE:
+-		DRM_WAKEUP(&(dev_priv->decoder_queue[fx.lock]));
++		DRM_WAKEUP(&(dev_priv->decoder_queue[fx->lock]));
+ 		return 0;
+ 	}
+ 	return 0;


Index: gen-patches
===================================================================
RCS file: gen-patches
diff -N gen-patches
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gen-patches	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,186 @@
+#!/bin/sh
+#
+# This script goes with the Makefile hacks for git/branch builds.
+#
+
+nopatches=1
+if [ "x$1" = "x--fedora" ]; then
+  nopatches=0
+  shift
+  patchcomment="plus Fedora patches"
+else
+  patchcomment="no Fedora patches"
+fi
+
+name=
+if [ "x$1" = "x--name" ]; then
+  shift
+  name="$1"
+  shift
+fi
+
+if [ $# -lt 2 ]; then
+  echo >&2 "Usage: GIT_DIR=REPO $0 [--fedora] [--name NAME]\
+ TARBALL-TAG [PATCH-TAG...] BRANCH..."
+  exit 2
+fi
+
+base=$1
+shift
+base_rev=`git-rev-parse "$base"` || exit
+
+nextpatch=1
+usepatch()
+{
+  patches[$nextpatch]=$1
+  nextpatch=$(($nextpatch + 1))
+}
+
+lasturl=:
+loglines="- Experimental build from git sources ($patchcomment)\\
+"
+log()
+{
+  local logrev=$1
+  local logbranch=$3
+  case $logbranch in
+  refs/remotes/*)
+    logbranch=${logbranch#refs/remotes/}
+    local remote=${logbranch%%/*}
+    logbranch=${logbranch#*/}
+    logbranch=${logbranch//\//-}
+    local url
+    url=`git-config "remote.${remote}.url"` || {
+      echo >&2 "Cannot find URL for remote $remote"
+      exit 2
+    }
+    if [ "$url" != "$lasturl" ]; then
+      lasturl="$url"
+      loglines="${loglines}- $url\\
+"
+    fi
+    logtext="$(printf %12s "remote: ")$logbranch"
+    ;;
+  *)
+    lasturl=:
+    logtext="$(printf %-12s "git $2:")$logbranch"
+    ;;
+  esac
+  loglines="${loglines}- $(printf %-35s "$logtext") ${logrev}\\
+"
+}
+
+patch_headers()
+{
+  p=1
+  while [ $p -lt $nextpatch ]; do
+    echo "Patch$p: ${patches[$p]}\\"
+    p=$(($p + 1))
+  done
+}
+
+patch_apply()
+{
+  p=1
+  while [ $p -lt $nextpatch ]; do
+#    echo "%patch$p -p1\\"
+    echo "ApplyPatch ${patches[$p]}\\"
+    p=$(($p + 1))
+  done
+}
+
+base_rev()
+{
+  local base=$1
+  tag_rev=`git-rev-parse --revs-only --verify $base 2> /dev/null` &&
+  [ "`git-describe --tags $tag_rev`" = "$base" ] && return 0
+  case "$1" in
+  v*-git*)
+    local id=patch-${1#v}.id
+    if [ ! -r $id ]; then
+      make download UPSTREAM_FILES=$id UPSTREAM_CHECKS=-- > /dev/null 2>&1
+    fi
+    [ -r $id ] && tag_rev=`cat $id` && return 0
+    ;;
+  v2*)
+    echo >&2 "Cannot find tag $base"
+    exit 2
+    ;;
+  esac
+  return 1
+}
+
+log $base_rev base $base
+while base_rev $1; do
+  base=$1
+  base_rev=$tag_rev
+  shift
+  usepatch patch-${base#v}.bz2
+  log $tag_rev tag $base
+done
+version=${base#v}
+
+now="`date +'%Y-%m-%d %H:%M %Z'`"
+
+for branch; do
+
+  merge_base=`git-merge-base $base_rev $branch` || {
+    echo >&2 "No common ancestor for $base and $branch"
+    exit 2
+  }
+  branch_rev=`git-rev-parse $branch`
+
+  case "$branch" in
+  refs/remotes/*/master)
+    branch_name=${branch#refs/remotes/}
+    branch_name=${branch_name%/master}
+    ;;
+  refs/remotes/*)
+    branch_name=${branch#refs/remotes/}
+    branch_name=${branch_name//\//-}
+    ;;
+  */*)
+    branch_name=${branch_name//\//-}
+    ;;
+  *)
+    branch_name=$branch
+    ;;
+  esac
+
+  file=linux-${version}-${branch_name}.patch
+  git diff --no-renames -p \
+	   -r "${merge_base}" -r "${branch_rev}" > $file || exit
+  if [ ! -s $file ]; then
+    rm -f $file
+    continue
+  fi
+
+  usepatch $file
+  log $branch_rev branch $branch
+
+  base="$branch"
+  base_rev="$base"
+done
+name=`echo ${name:-${branch}} | sed s/-/_/g`
+
+#upstream_branch=`date -u -d "$now" +${branch}.%Y%m%dT%H%M | sed s/-/_/g`
+upstream_branch=$name
+branch_rev=`git describe $base_rev | sed 's/-g[0-9a-f]*$//;s/-/./g;s/^v//'`
+
+logdate=`date -d "$now" +'%a %b %d %Y'`
+
+sed "/%define nopatches/c\\
+%define nopatches ${nopatches}\\
+%define upstream_branch ${name}\\
+%define upstream_branch_release ${branch_rev}
+/^### BRANCH PATCH/a\\
+`patch_headers`
+###
+/^### BRANCH APPLY/a\\
+`patch_apply`
+###
+/^%changelog/a\\
+* ${logdate} ${GIT_AUTHOR_NAME} <${GIT_AUTHOR_EMAIL}>\\
+$loglines
+
+"

git-wireless-dev.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 git-wireless-dev.patch
Index: git-wireless-dev.patch
===================================================================
RCS file: git-wireless-dev.patch
diff -N git-wireless-dev.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ git-wireless-dev.patch	12 Nov 2007 12:56:58 -0000	1.2
@@ -0,0 +1,91408 @@
+--- linux-2.6.21.noarch/CREDITS.orig	2007-06-14 14:07:08.000000000 -0400
++++ linux-2.6.21.noarch/CREDITS	2007-06-14 14:07:58.000000000 -0400
+@@ -665,6 +665,11 @@ D: Minor updates to SCSI code for the Co
+ S: (ask for current address)
+ S: USA
+ 
++N: Robin Cornelius
++E: robincornelius users sourceforge net
++D: Ralink rt2x00 WLAN driver
++S: Cornwall, U.K.
++
+ N: Mark Corner
+ E: mcorner umich edu
+ W: http://www.eecs.umich.edu/~mcorner/
+@@ -679,6 +684,11 @@ D: Kernel module SMART utilities
+ S: Santa Cruz, California
+ S: USA
+ 
++N: Luis Correia
++E: lfcorreia users sf net
++D: Ralink rt2x00 WLAN driver
++S: Belas, Portugal
++
+ N: Alan Cox
+ W: http://www.linux.org.uk/diary/
+ D: Linux Networking (0.99.10->2.0.29)
+@@ -833,6 +843,12 @@ S: Lancs
+ S: PR4 6AX
+ S: United Kingdom
+ 
++N: Ivo van Doorn
++E: IvDoorn gmail com
++W: http://www.mendiosus.nl
++D: Ralink rt2x00 WLAN driver
++S: Haarlem, The Netherlands
++
+ N: John G Dorsey
+ E: john+ cs cmu edu
+ D: ARM Linux ports to Assabet/Neponset, Spot
+@@ -3516,6 +3532,12 @@ S: Maastrichterweg 63
+ S: 5554 GG Valkenswaard
+ S: The Netherlands
+ 
++N: Mark Wallis
++E: mwallis serialmonkey com
++W: http://mark.serialmonkey.com
++D: Ralink rt2x00 WLAN driver
++S: Newcastle, Australia
++
+ N: Peter Shaobo Wang
+ E: pwang mmdcorp com
+ W: http://www.mmdcorp.com/pw/linux
+@@ -3650,6 +3672,15 @@ S: Alte Regensburger Str. 11a
+ S: 93149 Nittenau
+ S: Germany
+ 
++N: Gertjan van Wingerde
++E: gwingerde home nl
++D: Ralink rt2x00 WLAN driver
++D: Minix V2 file-system
++D: Misc fixes
++S: Geessinkweg 177
++S: 7544 TX Enschede
++S: The Netherlands
++
+ N: Lars Wirzenius
+ E: liw iki fi
+ D: Linux System Administrator's Guide, author, former maintainer
+--- linux-2.6.21.noarch/include/linux/nl80211.h.orig	2007-06-14 14:07:08.000000000 -0400
++++ linux-2.6.21.noarch/include/linux/nl80211.h	2007-06-14 14:07:58.000000000 -0400
+@@ -7,6 +7,217 @@
+  */
+ 
+ /**
++ * enum nl80211_commands - supported nl80211 commands
++ * @NL80211_CMD_UNSPEC: unspecified command to catch errors
++ * @NL80211_CMD_RENAME_WIPHY: rename a wiphy, needs
++ *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME
++ * @NL80211_CMD_WIPHY_NEWNAME: rename notification
++ * @NL80211_CMD_GET_CMDLIST: TO BE DEFINED PROPERLY. currently the code makes
++ *	it depend on the wiphy only but it really should depend on the
++ *	interface type too....
++ * @NL80211_CMD_NEW_CMDLIST: command list result
++ * @NL80211_CMD_ADD_VIRTUAL_INTERFACE: create a virtual interface for the
++ *	wiphy identified by an %NL80211_ATTR_WIPHY attribute with the given
++ *	%NL80211_ATTR_IFTYPE and %NL80211_ATTR_IFNAME.
++ * @NL80211_CMD_DEL_VIRTUAL_INTERFACE: destroy a virtual interface identified
++ *	by %NL80211_ATTR_IFINDEX.
++ * @NL80211_CMD_CHANGE_VIRTUAL_INTERFACE: change type of virtual interface to
++ *	the type given by %NL80211_ATTR_IFTYPE, the interface is identified by
++ *	%NL80211_ATTR_IFINDEX.
++ * @NL80211_CMD_GET_WIPHYS: request a list of all wiphys present in the system
++ * @NL80211_CMD_NEW_WIPHYS: returned list of all wiphys
++ * @NL80211_CMD_GET_INTERFACES: request a list of all interfaces belonging to
++ *	the wiphy identified by %NL80211_ATTR_WIPHY
++ * @NL80211_CMD_NEW_INTERFACES: result for %NL80211_CMD_GET_INTERFACES
++ * @NL80211_CMD_INITIATE_SCAN: initiate a scan with the passed parameters. THe
++ *	parameters may contain %NL80211_ATTR_FLAG_SCAN_ACTIVE,
++ *	%NL80211_ATTR_PHYMODE and a list of channels in an
++ *	%NL80211_ATTR_CHANNEL_LIST attribute (an array of nested attributes)
++ *	containing %NL80211_ATTR_CHANNEL, %NL80211_ATTR_PHYMODE, and possibly
++ *	%NL80211_ATTR_FLAG_SCAN_ACTIVE. The outer %NL80211_ATTR_FLAG_SCAN_ACTIVE
++ *	is ignored when a channel list is present.
++ * @NL80211_CMD_SCAN_RESULT: scan result, contains an array in
++ *	%NL80211_ATTR_BSS_LIST.
++ * @NL80211_CMD_ASSOCIATE: associate with the given parameters
++ *	(%NL80211_ATTR_SSID is mandatory, %NL80211_ATTR_TIMEOUT_TU,
++ *	%NL80211_ATTR_BSSID, %NL80211_ATTR_CHANNEL, %NL80211_ATTR_PHYMODE,
++ *	and %NL80211_ATTR_IE may be given)
++ * @NL80211_CMD_ADD_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
++ * 	%NL80211_ATTR_KEY_ID, %NL80211_ATTR_KEY_TYPE, %NL80211_ATTR_MAC and
++ *	%NL80211_ATTR_KEY_CIPHER attributes.
++ * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_ID,
++ *	%NL80211_ATTR_KEY_TYPE and %NL80211_ATTR_MAC or all keys.
++ * @__NL80211_CMD_AFTER_LAST: internal use
++ */
++enum nl80211_commands {
++/* don't change the order or add anything inbetween, this is ABI! */
++	NL80211_CMD_UNSPEC,
++	/* %input: wiphy, wiphy_name */
++	NL80211_CMD_RENAME_WIPHY,
++	NL80211_CMD_WIPHY_NEWNAME,
++	/* %input: wiphy|ifindex */
++	NL80211_CMD_GET_CMDLIST,
++	NL80211_CMD_NEW_CMDLIST,
++	/* %input: wiphy, ifname, {iftype} */
++	NL80211_CMD_ADD_VIRTUAL_INTERFACE,
++	/* %input: wiphy, ifindex */
++	NL80211_CMD_DEL_VIRTUAL_INTERFACE,
++	/* %input: ifindex, iftype */
++	NL80211_CMD_CHANGE_VIRTUAL_INTERFACE,
++	/* %input: */
++	NL80211_CMD_GET_WIPHYS,
++	NL80211_CMD_NEW_WIPHYS,
++	/* %input: wiphy */
++	NL80211_CMD_GET_INTERFACES,
++	NL80211_CMD_NEW_INTERFACES,
++	NL80211_CMD_INITIATE_SCAN,
++	NL80211_CMD_SCAN_RESULT,
++	NL80211_CMD_GET_ASSOCIATION,
++	NL80211_CMD_ASSOCIATION_CHANGED,
++	NL80211_CMD_ASSOCIATE,
++	NL80211_CMD_DISASSOCIATE,
++	NL80211_CMD_DEAUTH,
++	NL80211_CMD_GET_AUTH_LIST,
++	NL80211_CMD_NEW_AUTH_LIST,
++	NL80211_CMD_AUTHENTICATION_CHANGED,
++	NL80211_CMD_AP_SET_BEACON,
++	NL80211_CMD_AP_ADD_STA,
++	NL80211_CMD_AP_UPDATE_STA,
++	NL80211_CMD_AP_GET_STA_INFO,
++	NL80211_CMD_AP_SET_RATESETS,
++	NL80211_CMD_ADD_KEY,
++	NL80211_CMD_DEL_KEY,
++
++	/* add commands here */
++
++	/* used to define NL80211_CMD_MAX below */
++	__NL80211_CMD_AFTER_LAST
++};
++#define NL80211_CMD_MAX (__NL80211_CMD_AFTER_LAST - 1)
++
++
++/**
++ * enum nl80211_attrs - nl80211 netlink attributes
++ * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors
++ * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
++ * @NL80211_ATTR_IFNAME: network interface name
++ * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
++ *	/sys/class/ieee80211/<phyname>/index
++ * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
++ * @NL80211_ATTR_CMDS: list of u8's identifying commands a device supports
++ * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
++ * @NL80211_ATTR_INTERFACE_LIST: interface array, nested netlink attribute
++ * @NL80211_ATTR_WIPHY_LIST: wiphy array, nested netlink attribute
++ * @NL80211_ATTR_BSSID: BSSID (must be 6 bytes)
++ * @NL80211_ATTR_SSID: SSID (1-32 bytes)
++ * @NL80211_ATTR_CHANNEL: channel number
++ * @NL80211_ATTR_PHYMODE: PHY mode, see &enum nl80211_phymode
++ * @NL80211_ATTR_CHANNEL_LIST: netlink nested attribute array containing scan
++ *	parameters for channels
++ * @NL80211_ATTR_BSS_LIST: nested attribute containing an array
++ * @NL80211_ATTR_BSSTYPE: BSS type, see &enum nl80211_bsstype
++ * @NL80211_ATTR_BEACON_PERIOD: beacon period
++ * @NL80211_ATTR_DTIM_PERIOD: DTIM period
++ * @NL80211_ATTR_TIMESTAMP: 64-bit timestamp of received beacon/probe response
++ * @NL80211_ATTR_IE: information element(s), maximum length %NL80211_MAX_IE_LEN
++ * @NL80211_ATTR_AUTH_ALGORITHM: authentication algorithm
++ * @NL80211_ATTR_TIMEOUT_TU: timeout in TU (TO BE USED)
++ * @NL80211_ATTR_REASON_CODE: 802.11 reason code
++ * @NL80211_ATTR_ASSOCIATION_ID: association ID (u16, 1-2007)
++ * @NL80211_ATTR_DEAUTHENTICATED: TO BE USED
++ * @NL80211_ATTR_RX_SENSITIVITY: receiver sensitivity in dBm
[...91015 lines suppressed...]
++	 * PCI is bonded out, some boards may leave the pins floating. */
++	if (bus->chip_id == 0x4712) {
++		if (bus->chip_package == SSB_CHIPPACK_BCM4712S)
++			return 0;
++		if (bus->chip_package == SSB_CHIPPACK_BCM4712M)
++			return 0;
++	}
++	if (bus->chip_id == 0x5350)
++		return 0;
++
++	return !mips_busprobe(tmp, (u32 *) (bus->mmio + (pc->dev->core_index * SSB_CORE_SIZE)));
++}
++#endif /* CONFIG_SSB_PCICORE_HOSTMODE */
++
++
++/**************************************************
++ * Generic and Clientmode operation code.
++ **************************************************/
++
++static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
++{
++	/* Disable PCI interrupts. */
++	ssb_write32(pc->dev, SSB_INTVEC, 0);
++}
++
++void ssb_pcicore_init(struct ssb_pcicore *pc)
++{
++	struct ssb_device *dev = pc->dev;
++	struct ssb_bus *bus;
++
++	if (!dev)
++		return;
++	bus = dev->bus;
++	if (!ssb_device_is_enabled(dev))
++		ssb_device_enable(dev, 0);
++
++#ifdef CONFIG_SSB_PCICORE_HOSTMODE
++	pc->hostmode = pcicore_is_in_hostmode(pc);
++	if (pc->hostmode)
++		ssb_pcicore_init_hostmode(pc);
++#endif /* CONFIG_SSB_PCICORE_HOSTMODE */
++	if (!pc->hostmode)
++		ssb_pcicore_init_clientmode(pc);
++}
++
++static u32 ssb_pcie_read(struct ssb_pcicore *pc, u32 address)
++{
++	pcicore_write32(pc, 0x130, address);
++	return pcicore_read32(pc, 0x134);
++}
++
++static void ssb_pcie_write(struct ssb_pcicore *pc, u32 address, u32 data)
++{
++	pcicore_write32(pc, 0x130, address);
++	pcicore_write32(pc, 0x134, data);
++}
++
++static void ssb_pcie_mdio_write(struct ssb_pcicore *pc, u8 device,
++				u8 address, u16 data)
++{
++	const u16 mdio_control = 0x128;
++	const u16 mdio_data = 0x12C;
++	u32 v;
++	int i;
++
++	v = 0x80; /* Enable Preamble Sequence */
++	v |= 0x2; /* MDIO Clock Divisor */
++	pcicore_write32(pc, mdio_control, v);
++
++	v = (1 << 30); /* Start of Transaction */
++	v |= (1 << 28); /* Write Transaction */
++	v |= (1 << 17); /* Turnaround */
++	v |= (u32)device << 22;
++	v |= (u32)address << 18;
++	v |= data;
++	pcicore_write32(pc, mdio_data, v);
++	udelay(10);
++	for (i = 0; i < 10; i++) {
++		v = pcicore_read32(pc, mdio_control);
++		if (v & 0x100 /* Trans complete */)
++			break;
++		msleep(1);
++	}
++	pcicore_write32(pc, mdio_control, 0);
++}
++
++static void ssb_broadcast_value(struct ssb_device *dev,
++				u32 address, u32 data)
++{
++	/* This is used for both, PCI and ChipCommon core, so be careful. */
++	BUILD_BUG_ON(SSB_PCICORE_BCAST_ADDR != SSB_CHIPCO_BCAST_ADDR);
++	BUILD_BUG_ON(SSB_PCICORE_BCAST_DATA != SSB_CHIPCO_BCAST_DATA);
++
++	ssb_write32(dev, SSB_PCICORE_BCAST_ADDR, address);
++	ssb_read32(dev, SSB_PCICORE_BCAST_ADDR); /* flush */
++	ssb_write32(dev, SSB_PCICORE_BCAST_DATA, data);
++	ssb_read32(dev, SSB_PCICORE_BCAST_DATA); /* flush */
++}
++
++static void ssb_commit_settings(struct ssb_bus *bus)
++{
++	struct ssb_device *dev;
++
++	dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev;
++	assert(dev);
++	/* This forces an update of the cached registers. */
++	ssb_broadcast_value(dev, 0xFD8, 0);
++}
++
++int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
++				   struct ssb_device *dev)
++{
++	struct ssb_device *pdev = pc->dev;
++	struct ssb_bus *bus;
++	int err = 0;
++	u32 tmp;
++
++	might_sleep();
++
++	if (!pdev)
++		goto out;
++	bus = pdev->bus;
++
++	/* Enable interrupts for this device. */
++	if (bus->host_pci &&
++	    ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) {
++		u32 coremask;
++
++		/* Calculate the "coremask" for the device. */
++		coremask = (1 << dev->core_index);
++
++		err = pci_read_config_dword(bus->host_pci, SSB_PCI_IRQMASK, &tmp);
++		if (err)
++			goto out;
++		tmp |= coremask << 8;
++		err = pci_write_config_dword(bus->host_pci, SSB_PCI_IRQMASK, tmp);
++		if (err)
++			goto out;
++	} else {
++		u32 intvec;
++
++		intvec = ssb_read32(pdev, SSB_INTVEC);
++		tmp = ssb_read32(dev, SSB_TPSFLAG);
++		tmp &= SSB_TPSFLAG_BPFLAG;
++		intvec |= tmp;
++		ssb_write32(pdev, SSB_INTVEC, intvec);
++	}
++
++	/* Setup PCIcore operation. */
++	if (pc->setup_done)
++		goto out;
++	if (pdev->id.coreid == SSB_DEV_PCI) {
++		tmp = pcicore_read32(pc, SSB_PCICORE_SBTOPCI2);
++		tmp |= SSB_PCICORE_SBTOPCI_PREF;
++		tmp |= SSB_PCICORE_SBTOPCI_BURST;
++		pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, tmp);
++
++		if (pdev->id.revision < 5) {
++			tmp = ssb_read32(pdev, SSB_IMCFGLO);
++			tmp &= ~SSB_IMCFGLO_SERTO;
++			tmp |= 2;
++			tmp &= ~SSB_IMCFGLO_REQTO;
++			tmp |= 3 << SSB_IMCFGLO_REQTO_SHIFT;
++			ssb_write32(pdev, SSB_IMCFGLO, tmp);
++			ssb_commit_settings(bus);
++		} else if (pdev->id.revision >= 11) {
++			tmp = pcicore_read32(pc, SSB_PCICORE_SBTOPCI2);
++			tmp |= SSB_PCICORE_SBTOPCI_MRM;
++			pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, tmp);
++		}
++	} else {
++		assert(pdev->id.coreid == SSB_DEV_PCIE);
++		//TODO: Better make defines for all these magic PCIE values.
++		if ((pdev->id.revision == 0) || (pdev->id.revision == 1)) {
++			/* TLP Workaround register. */
++			tmp = ssb_pcie_read(pc, 0x4);
++			tmp |= 0x8;
++			ssb_pcie_write(pc, 0x4, tmp);
++		}
++		if (pdev->id.revision == 0) {
++			const u8 serdes_rx_device = 0x1F;
++
++			ssb_pcie_mdio_write(pc, serdes_rx_device,
++					    2 /* Timer */, 0x8128);
++			ssb_pcie_mdio_write(pc, serdes_rx_device,
++					    6 /* CDR */, 0x0100);
++			ssb_pcie_mdio_write(pc, serdes_rx_device,
++					    7 /* CDR BW */, 0x1466);
++		} else if (pdev->id.revision == 1) {
++			/* DLLP Link Control register. */
++			tmp = ssb_pcie_read(pc, 0x100);
++			tmp |= 0x40;
++			ssb_pcie_write(pc, 0x100, tmp);
++		}
++	}
++	pc->setup_done = 1;
++out:
++	return err;
++}
++EXPORT_SYMBOL(ssb_pcicore_dev_irqvecs_enable);


View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 kernel-2.6.21-i686-xen.config
Index: kernel-2.6.21-i686-xen.config
===================================================================
RCS file: kernel-2.6.21-i686-xen.config
diff -N kernel-2.6.21-i686-xen.config
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kernel-2.6.21-i686-xen.config	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,3503 @@
+# i386
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-prep
+# Mon Jul 23 15:25:09 2007
+#
+CONFIG_X86_32=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_IPC_NS=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_UTS_NS=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+# CONFIG_IKCONFIG is not set
+CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_MODULE_VERIFY_ELF=y
+CONFIG_MODULE_SIG=y
+# CONFIG_MODULE_SIG_FORCE is not set
+CONFIG_MODULE_VERIFY=y
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Process debugging support
+#
+CONFIG_PTRACE=y
+CONFIG_UTRACE=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_LSF=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# Processor type and features
+#
+# CONFIG_TICK_ONESHOT is not set
+CONFIG_SMP=y
+# CONFIG_X86_PC is not set
+CONFIG_X86_XEN=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_PARAVIRT is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_CMPXCHG64=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_NR_CPUS=32
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_VM86=y
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+# CONFIG_X86_REBOOTFIXUPS is not set
+CONFIG_MICROCODE=m
+CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_X86_CPUID=m
+CONFIG_SWIOTLB=y
+
+#
[...3110 lines suppressed...]
+CONFIG_DLM=m
+CONFIG_DLM_TCP=y
+# CONFIG_DLM_SCTP is not set
+CONFIG_DLM_DEBUG=y
+
+#
+# Instrumentation Support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_DEBUG_IGNORE_QUIET is not set
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+CONFIG_HEADERS_CHECK=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_DEBUG_NMI_TIMEOUT=5
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_HIGHMEM=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+CONFIG_DEBUG_LIST=y
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_FORCED_INLINING is not set
+CONFIG_BOOT_DELAY=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEBUG_STACK_USAGE=y
+# CONFIG_DEBUG_PAGEALLOC is not set
+CONFIG_DEBUG_RODATA=y
+CONFIG_4KSTACKS=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+
+#
+# Security options
+#
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_ROOTPLUG is not set
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+CONFIG_SECURITY_SELINUX_AVC_STATS=y
+CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
+# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
+# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+# CONFIG_CRYPTO_TWOFISH_586 is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_AES_586 is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_MPILIB=y
+CONFIG_CRYPTO_SIGNATURE=y
+CONFIG_CRYPTO_SIGNATURE_DSA=y
+
+#
+# Hardware crypto devices
+#
+# CONFIG_CRYPTO_DEV_PADLOCK is not set
+CONFIG_CRYPTO_DEV_GEODE=m
+CONFIG_XEN=y
+CONFIG_XEN_INTERFACE_VERSION=0x00030205
+
+#
+# XEN
+#
+CONFIG_XEN_PRIVILEGED_GUEST=y
+# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_XENBUS_DEV=y
+CONFIG_XEN_BACKEND=y
+CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_BLKDEV_TAP=m
+CONFIG_XEN_NETDEV_BACKEND=m
+# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
+CONFIG_XEN_NETDEV_LOOPBACK=m
+CONFIG_XEN_PCIDEV_BACKEND=m
+CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
+# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
+# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
+# CONFIG_XEN_PCIDEV_BE_DEBUG is not set
+# CONFIG_XEN_TPMDEV_BACKEND is not set
+CONFIG_XEN_BLKDEV_FRONTEND=m
+CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XEN_FRAMEBUFFER=y
+CONFIG_XEN_KEYBOARD=y
+CONFIG_XEN_SCRUB_PAGES=y
+# CONFIG_XEN_DISABLE_SERIAL is not set
+CONFIG_XEN_SYSFS=y
+CONFIG_XEN_COMPAT_030002_AND_LATER=y
+# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
+# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
+CONFIG_XEN_COMPAT=0x030002
+CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_XEN_SMPBOOT=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_AUDIT_GENERIC=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_REED_SOLOMON=m
+CONFIG_REED_SOLOMON_DEC16=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_X86_NO_TSS=y
+CONFIG_X86_NO_IDT=y
+CONFIG_KTIME_SCALAR=y


View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 kernel-2.6.21-x86_64-xen.config
Index: kernel-2.6.21-x86_64-xen.config
===================================================================
RCS file: kernel-2.6.21-x86_64-xen.config
diff -N kernel-2.6.21-x86_64-xen.config
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kernel-2.6.21-x86_64-xen.config	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,3353 @@
+# x86_64
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.21-prep
+# Tue Jul 24 13:48:09 2007
+#
+CONFIG_X86_64=y
+CONFIG_64BIT=y
+CONFIG_X86=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_ZONE_DMA32=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_DMI=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_IPC_NS=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_UTS_NS=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+# CONFIG_IKCONFIG is not set
+CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_MODULE_VERIFY_ELF=y
+CONFIG_MODULE_SIG=y
+# CONFIG_MODULE_SIG_FORCE is not set
+CONFIG_MODULE_VERIFY=y
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Process debugging support
+#
+CONFIG_PTRACE=y
+CONFIG_UTRACE=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_BLK_DEV_IO_TRACE=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# Processor type and features
+#
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
+# CONFIG_MK8 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+CONFIG_GENERIC_CPU=y
+CONFIG_X86_64_XEN=y
+CONFIG_X86_NO_TSS=y
+CONFIG_X86_NO_IDT=y
+CONFIG_X86_L1_CACHE_BYTES=128
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_INTERNODE_CACHE_BYTES=128
+CONFIG_X86_GOOD_APIC=y
+CONFIG_MICROCODE=m
+CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_X86_MSR=y
+CONFIG_X86_CPUID=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_XEN_GENAPIC=y
+CONFIG_X86_LOCAL_APIC=y
+# CONFIG_MTRR is not set
+CONFIG_SMP=y
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT_BKL=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_NR_CPUS=64
+CONFIG_HOTPLUG_CPU=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_CALGARY_IOMMU=y
+CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
+CONFIG_SWIOTLB=y
+# CONFIG_KEXEC is not set
+# CONFIG_CRASH_DUMP is not set
+CONFIG_PHYSICAL_START=0x200000
+# CONFIG_SECCOMP is not set
+CONFIG_CC_STACKPROTECTOR=y
+# CONFIG_CC_STACKPROTECTOR_ALL is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
+CONFIG_REORDER=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_ISA_DMA_API=y
+CONFIG_GENERIC_PENDING_IRQ=y
+
+#
+# Power management options
+#
+
[...2960 lines suppressed...]
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Distributed Lock Manager
+#
+CONFIG_DLM=m
+CONFIG_DLM_TCP=y
+# CONFIG_DLM_SCTP is not set
+CONFIG_DLM_DEBUG=y
+
+#
+# Instrumentation Support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_DEBUG_IGNORE_QUIET is not set
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+CONFIG_HEADERS_CHECK=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_DEBUG_NMI_TIMEOUT=5
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+CONFIG_DEBUG_LIST=y
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_FORCED_INLINING is not set
+CONFIG_BOOT_DELAY=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_RODATA=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+
+#
+# Security options
+#
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_ROOTPLUG is not set
+CONFIG_SECURITY_SELINUX=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+CONFIG_SECURITY_SELINUX_DISABLE=y
+CONFIG_SECURITY_SELINUX_DEVELOP=y
+CONFIG_SECURITY_SELINUX_AVC_STATS=y
+CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
+# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
+# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_TWOFISH_X86_64=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_AES_X86_64=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_MPILIB=y
+CONFIG_CRYPTO_SIGNATURE=y
+CONFIG_CRYPTO_SIGNATURE_DSA=y
+
+#
+# Hardware crypto devices
+#
+CONFIG_XEN=y
+CONFIG_XEN_INTERFACE_VERSION=0x00030205
+
+#
+# XEN
+#
+CONFIG_XEN_PRIVILEGED_GUEST=y
+# CONFIG_XEN_UNPRIVILEGED_GUEST is not set
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_XENBUS_DEV=y
+CONFIG_XEN_BACKEND=m
+CONFIG_XEN_BLKDEV_BACKEND=m
+CONFIG_XEN_BLKDEV_TAP=m
+CONFIG_XEN_NETDEV_BACKEND=m
+# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
+CONFIG_XEN_NETDEV_LOOPBACK=m
+# CONFIG_XEN_PCIDEV_BACKEND is not set
+# CONFIG_XEN_TPMDEV_BACKEND is not set
+CONFIG_XEN_BLKDEV_FRONTEND=m
+CONFIG_XEN_NETDEV_FRONTEND=m
+CONFIG_XEN_FRAMEBUFFER=y
+CONFIG_XEN_KEYBOARD=y
+CONFIG_XEN_SCRUB_PAGES=y
+# CONFIG_XEN_DISABLE_SERIAL is not set
+CONFIG_XEN_SYSFS=y
+CONFIG_XEN_COMPAT_030002_AND_LATER=y
+# CONFIG_XEN_COMPAT_030004_AND_LATER is not set
+# CONFIG_XEN_COMPAT_LATEST_ONLY is not set
+CONFIG_XEN_COMPAT=0x030002
+CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
+CONFIG_NO_IDLE_HZ=y
+CONFIG_XEN_SMPBOOT=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_REED_SOLOMON=m
+CONFIG_REED_SOLOMON_DEC16=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y


View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 kernel.spec
Index: kernel.spec
===================================================================
RCS file: kernel.spec
diff -N kernel.spec
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kernel.spec	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,2270 @@
+# we are kernel-xen-2.6!
+%define xen_package_magic 1
+
+Summary: The Linux kernel (the core of the Linux operating system)
+
+# For a stable, released kernel, released_kernel should be 1. For rawhide
+# and/or a kernel built from an rc or git snapshot, released_kernel should
+# be 0.
+%define released_kernel 1
+
+# Versions of various parts
+
+# Polite request for people who spin their own kernel rpms:
+# please modify the "buildid" define in a way that identifies
+# that the kernel isn't the stock distribution kernel, for example,
+# by setting the define to ".local" or ".bz123456"
+#
+#% define buildid .local
+
+# fedora_build defines which build revision of this kernel version we're
+# building. Rather than incrementing forever, as with the prior versioning
+# setup, the trick below will allow us to use the automatic CVS Revision keyword
+# expansion, without breaking release number ordering.
+#
+# CVS Revision 1.42 was after RPM Release 2925.14. We do some math to
+# increase the Release number starting from 2926
+#
+%define baserevision 2
+%define baserelease 2945
+%define fedora_build %(R="$Revision$"; \
+	# be careful: '%%' becomes '%' below \
+	R="${R%% \$}"; R="${R##: 1.}"; \
+	# keep anything after the first dot, so this won't \
+	# break horribily when using branches \
+	# (e.g. 1.42.1.2.3.4 will become 1.2926.1.2.3.4) \
+	r1="${R%%%%.*}";rest="${R#$r1}"; \
+	# now, the math: \
+	echo `expr '(' $r1 - %{baserevision} ')' + %{baserelease}`$rest)
+
+# base_sublevel is the kernel version we're starting with and patching
+# on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base,
+# which yields a base_sublevel of 21.
+%define base_sublevel 21
+
+## If this is a released kernel ##
+%if 0%{?released_kernel}
+# Do we have a 2.6.21.y update to apply?
+%define stable_update 7
+# Set rpm version accordingly
+#if 0%{?stable_update}
+#define stablerev .%{stable_update}
+#endif
+%define rpmversion 2.6.%{base_sublevel}%{?stablerev}
+
+## The not-released-kernel case ##
+%else
+# The next upstream release sublevel (base_sublevel+1)
+%define upstream_sublevel %(expr %{base_sublevel} + 1)
+# The rc snapshot level
+%define rcrev 0
+# The git snapshot level
+%define gitrev 12
+# Set rpm version accordingly
+%define rpmversion 2.6.%{upstream_sublevel}
+%endif
+# Nb: The above rcrev and gitrev values automagically define Patch00 and Patch01 below.
+
+# What parts do we want to build?  We must build at least one kernel.
+# These are the kernels that are built IF the architecture allows it.
+# All should default to 1 (enabled) and be flipped to 0 (disabled)
+# by later arch-specific checks.
+
+# The following build options are enabled by default.
+# Use either --without <opt> in your rpmbuild command or force values
+# to 0 in here to disable them.
+#
+# standard kernel
+%define with_up        %{?_without_up:        0} %{?!_without_up:        1}
+# kernel-smp (only valid for ppc 32-bit, sparc64)
+%define with_smp       %{?_without_smp:       0} %{?!_without_smp:       1}
+# kernel-PAE (only valid for i686)
+%define with_pae       %{?_without_pae:       0} %{?!_without_pae:       1}
+# kernel-xen
+%define with_xen       %{?_without_xen:       0} %{?!_without_xen:       1}
+# kernel-kdump
+%define with_kdump     %{?_without_kdump:     0} %{?!_without_kdump:     1}
+# kernel-debug
+%define with_debug     %{?_without_debug:     0} %{!?_without_debug:     1}
+# kernel-doc
+%define with_doc       %{?_without_doc:       0} %{?!_without_doc:       1}
+# kernel-headers
+%define with_headers   %{?_without_headers:   0} %{?!_without_headers:   1}
+# kernel-debuginfo
+%define with_debuginfo %{?_without_debuginfo: 0} %{!?_without_debuginfo: 1}
+
+# Additional options for user-friendly one-off kernel building:
+#
+# Only build the base kernel (--with baseonly):
+%define with_baseonly  %{?_with_baseonly:     1} %{?!_with_baseonly:     0}
+# Only build the smp kernel (--with smponly):
+%define with_smponly   %{?_with_smponly:      1} %{?!_with_smponly:      0}
+# Only build the pae kernel (--with paeonly):
+%define with_paeonly   %{?_with_paeonly:      1} %{?!_with_paeonly:      0}
+# Only build the xen kernel (--with xenonly):
+%define with_xenonly   %{?_with_xenonly:      1} %{?!_with_xenonly:      0}
+
+# Whether or not to do C=1 builds with sparse
+%define usesparse 0
+%if "%fedora" >= "7"
+%define usesparse 1
+%endif
+
+# defaults for the non-xen package:
+
+# don't include xen patches
+%define includexen 0
+
+# don't build xen variant
+%define with_xen 0
+
+# Install vdso files
+%define do_vdso_install 1
+
+
+# Magic that will be enabled for the kernel-xen-2.6 Fedora package:
+%if 0%{?xen_package_magic}
+
+# Include the Xen patches
+%define includexen 1
+
+# Enable the xen variant
+%define with_xen 1
+
+# No vdso files
+%define do_vdso_install 0
+
+# Disable all other variants
+%define with_xenonly 1
+
+# No kernel-headers
+%define with_headers 0
+
+
+# We don't build the .config files dynamically, currently
+%define preconfigured 1
+
+# The main package is called kernel-xen-2.6
+%define variant -xen-2.6
+
+# However the -xen variant will be called kernel-xen
+%define variantbase kernel
+
+%endif   # (xen_package_magic)
+
+
+# Set debugbuildsenabled to 1 for production (build separate debug kernels)
+#  and 0 for rawhide (all kernels are debug kernels).
+# See also 'make debug' and 'make release'.
+%define debugbuildsenabled 0
+
+# Want to build a vanilla kernel build without any non-upstream patches?
+# (well, almost none, we need nonintconfig for build purposes). Default to 0 (off).
+%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
+
+# pkg_release is what we'll fill in for the rpm Release: field
+%if 0%{?released_kernel}
+%define pkg_release %{fedora_build}%{?buildid}%{?dist}
+%else
+%if 0%{?rcrev}
+%define rctag .rc%rcrev
+%endif
+%if 0%{?gitrev}
+%define gittag .git%gitrev
+%if !0%{?rcrev}
+%define rctag .rc0
+%endif
+%endif
+%define pkg_release 0.%{fedora_build}%{?rctag}%{?gittag}%{?buildid}%{?dist}
+%endif
+
+%define mainpkgname kernel%{?variant}
+%if !0%{?variantbase:1}
+%define variantbase %{mainpkgname}
+%endif
+
+# The kernel tarball/base version
+%define kversion 2.6.%{base_sublevel}
+
+%define make_target bzImage
+
+%define xen_hv_version 3.1.0-rc7
+%define xen_hv_cset 7041b52471c3
+%define xen_flags verbose=y crash_debug=y
[...1877 lines suppressed...]
+rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h
+rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
+%endif
+
+###
+### clean
+###
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+###
+### scripts
+###
+
+#
+# This macro defines a %%post script for a kernel*-devel package.
+#	%%kernel_devel_post <subpackage>
+#
+%define kernel_devel_post() \
+%{expand:%%post -n %{variantbase}-%{?1:%{1}-}devel}\
+if [ -f /etc/sysconfig/kernel ]\
+then\
+    . /etc/sysconfig/kernel || exit $?\
+fi\
+if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ]\
+then\
+    (cd /usr/src/kernels/%{KVERREL}-%{?1:%{1}-}%{_target_cpu} &&\
+     /usr/bin/find . -type f | while read f; do\
+       hardlink -c /usr/src/kernels/*.fc*-*/$f $f\
+     done)\
+fi\
+%{nil}
+
+#
+# This macro defines a %%post script for a kernel package and its devel package.
+#	%%kernel_variant_post [-v <subpackage>] [-s <s> -r <r>] <mkinitrd-args>
+# More text can follow to go at the end of this variant's %%post.
+#
+%define kernel_variant_post(s:r:v:) \
+%{expand:%%kernel_devel_post %{?-v*}}\
+%{expand:%%post -n %{variantbase}%{?-v:-%{-v*}}}\
+%{-s:\
+if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\
+   [ -f /etc/sysconfig/kernel ]; then\
+  /bin/sed -i -e 's/^DEFAULTKERNEL=%{-s*}$/DEFAULTKERNEL=%{-r*}/' /etc/sysconfig/kernel || exit $?\
+fi}\
+/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --depmod --install %{*} %{KVERREL}%{?-v*} || exit $?\
+#if [ -x /sbin/weak-modules ]\
+#then\
+#    /sbin/weak-modules --add-kernel %{KVERREL}%{?-v*} || exit $?\
+#fi\
+%{nil}
+
+#
+# This macro defines a %%preun script for a kernel package.
+#	%%kernel_variant_preun <subpackage>
+#
+%define kernel_variant_preun() \
+%{expand:%%preun -n %{variantbase}%{?1:-%{1}}}\
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?1} || exit $?\
+#if [ -x /sbin/weak-modules ]\
+#then\
+#    /sbin/weak-modules --remove-kernel %{KVERREL}%{?1} || exit $?\
+#fi\
+%{nil}
+
+%if %{with_up}
+%kernel_variant_preun
+%kernel_variant_post -s kernel-smp -r kernel
+%endif
+
+%if %{with_smp}
+%kernel_variant_preun smp
+%kernel_variant_post -v smp
+%endif
+
+%if %{with_pae}
+%kernel_variant_preun PAE
+%kernel_variant_post -v PAE -s kernel-smp -r kernel-PAE
+%endif
+
+%if %{with_debug}
+%kernel_variant_preun debug
+%kernel_variant_post -v debug
+%endif
+
+%if %{with_pae_debug}
+%kernel_variant_preun PAE-debug
+%kernel_variant_post -v PAE-debug -s kernel-smp -r kernel-PAE-debug
+%endif
+
+%if %{with_xen}
+%kernel_variant_preun xen
+%kernel_variant_post -v xen -s kernel-xen[0U] -r kernel-xen -- `[ -d /proc/xen -a ! -e /proc/xen/xsd_kva ] || echo --multiboot=/%{image_install_path}/xen.gz-%{KVERREL}`
+if [ -x /sbin/ldconfig ]
+then
+    /sbin/ldconfig -X || exit $?
+fi
+%endif
+
+###
+### file lists
+###
+
+%if %{with_headers}
+%files -n %{mainpkgname}-headers
+%defattr(-,root,root)
+/usr/include/*
+%endif
+
+# only some architecture builds need kernel-doc
+%if %{with_doc}
+%files -n %{mainpkgname}-doc
+%defattr(-,root,root)
+%{_datadir}/doc/kernel-doc-%{kversion}/Documentation/*
+%dir %{_datadir}/doc/kernel-doc-%{kversion}/Documentation
+%dir %{_datadir}/doc/kernel-doc-%{kversion}
+%endif
+
+# This is %{image_install_path} on an arch where that includes ELF files,
+# or empty otherwise.
+%define elf_image_install_path %{?kernel_image_elf:%{image_install_path}}
+
+#
+# This macro defines the %%files sections for a kernel package
+# and its devel and debuginfo packages.
+#	%%kernel_variant_files [-k vmlinux] [-a <extra-files-glob>] [-e <extra-nonbinary>] <condition> <subpackage>
+#
+%define kernel_variant_files(a:e:k:) \
+%if %{1}\
+%{expand:%%files -n %{variantbase}%{?2:-%{2}}}\
+%defattr(-,root,root)\
+/%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2}\
+/boot/System.map-%{KVERREL}%{?2}\
+#/boot/symvers-%{KVERREL}%{?2}.gz\
+/boot/config-%{KVERREL}%{?2}\
+%{?-a:%{-a*}}\
+%dir /lib/modules/%{KVERREL}%{?2}\
+/lib/modules/%{KVERREL}%{?2}/kernel\
+/lib/modules/%{KVERREL}%{?2}/build\
+/lib/modules/%{KVERREL}%{?2}/source\
+/lib/modules/%{KVERREL}%{?2}/extra\
+/lib/modules/%{KVERREL}%{?2}/updates\
+/lib/modules/%{KVERREL}%{?2}/weak-updates\
+%if %{do_vdso_install}\
+%ifarch %{vdso_arches}\
+/lib/modules/%{KVERREL}%{?2}/vdso\
+%endif\
+%endif\
+/lib/modules/%{KVERREL}%{?2}/modules.block\
+/lib/modules/%{KVERREL}%{?2}/modules.networking\
+%ghost /boot/initrd-%{KVERREL}%{?2}.img\
+%{?-e:%{-e*}}\
+%{expand:%%files -n %{variantbase}-%{?2:%{2}-}devel}\
+%defattr(-,root,root)\
+%verify(not mtime) /usr/src/kernels/%{KVERREL}%{?2:-%{2}}-%{_target_cpu}\
+/usr/src/kernels/%{KVERREL}%{?2}-%{_target_cpu}\
+%if %{with_debuginfo}\
+%ifnarch noarch\
+%if %{fancy_debuginfo}\
+%{expand:%%files -f debuginfo%{?2}.list -n %{variantbase}-%{?2:%{2}-}debuginfo}\
+%else\
+%{expand:%%files -n %{variantbase}-%{?2:%{2}-}debuginfo}\
+%endif\
+%defattr(-,root,root)\
+%if !%{fancy_debuginfo}\
+%if "%{elf_image_install_path}" != ""\
+%{debuginfodir}/%{elf_image_install_path}/*-%{KVERREL}%{?2}.debug\
+%endif\
+%{debuginfodir}/lib/modules/%{KVERREL}%{?2}\
+%{debuginfodir}/usr/src/kernels/%{KVERREL}%{?2:-%{2}}-%{_target_cpu}\
+%endif\
+%endif\
+%endif\
+%endif\
+%{nil}
+
+
+%kernel_variant_files %{with_up}
+%kernel_variant_files %{with_smp} smp
+%kernel_variant_files %{with_debug} debug
+%kernel_variant_files %{with_pae} PAE
+%kernel_variant_files %{with_pae_debug} PAE-debug
+%kernel_variant_files -k vmlinux %{with_kdump} kdump
+%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
+
+
+%changelog
+* Wed Oct 17 2007 Dave Jones <davej redhat com>
+- 2.6.23-git12
+
+* Mon Oct 15 2007 Dave Jones <davej redhat com>
+- Work around E1000 corrupt EEPROM problem.
+
+* Fri Oct 12 2007 Dave Jones <davej redhat com>
+- 2.6.23-git2
+
+* Fri Oct 12 2007 Dave Jones <davej redhat com>
+- Start F9 branch.

linux-2.6-2110_scsi-sd-printing.patch:

Index: linux-2.6-2110_scsi-sd-printing.patch
===================================================================
RCS file: linux-2.6-2110_scsi-sd-printing.patch
diff -N linux-2.6-2110_scsi-sd-printing.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2110_scsi-sd-printing.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,651 @@
+From e73aec8247032ee730b5f38edf48922c4f72522e Mon Sep 17 00:00:00 2001
+From: Martin K. Petersen <martin petersen oracle com>
+Date: Tue, 27 Feb 2007 22:40:55 -0500
+Subject: [PATCH] [SCSI] sd: make printing use a common prefix
+
+Make SCSI disk printing more consistent:
+
+ - Define sd_printk(), sd_print_sense_hdr() and sd_print_result()
+
+ - Move relevant header bits into sd.h
+
+ - Remove all the legacy disk_name passing and use scsi_disk pointers
+   where possible
+
+ - Switch printk() lines to the new sd_ functions so that output is
+   consistent
+
+Signed-off-by: Martin K. Petersen <martin petersen oracle com>
+Signed-off-by: James Bottomley <James Bottomley SteelEye com>
+---
+ drivers/scsi/sd.c |  253 ++++++++++++++++++++---------------------------------
+ include/scsi/sd.h |   70 +++++++++++++++
+ 2 files changed, 165 insertions(+), 158 deletions(-)
+ create mode 100644 include/scsi/sd.h
+
+diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
+index 5a8f55f..b5562b8 100644
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -58,16 +58,10 @@
+ #include <scsi/scsi_host.h>
+ #include <scsi/scsi_ioctl.h>
+ #include <scsi/scsicam.h>
++#include <scsi/sd.h>
+ 
+ #include "scsi_logging.h"
+ 
+-/*
+- * More than enough for everybody ;)  The huge number of majors
+- * is a leftover from 16bit dev_t days, we don't really need that
+- * much numberspace.
+- */
+-#define SD_MAJORS	16
+-
+ MODULE_AUTHOR("Eric Youngdale");
+ MODULE_DESCRIPTION("SCSI disk (sd) driver");
+ MODULE_LICENSE("GPL");
+@@ -89,45 +83,6 @@ MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK13_MAJOR);
+ MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK14_MAJOR);
+ MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISK15_MAJOR);
+ 
+-/*
+- * This is limited by the naming scheme enforced in sd_probe,
+- * add another character to it if you really need more disks.
+- */
+-#define SD_MAX_DISKS	(((26 * 26) + 26 + 1) * 26)
+-
+-/*
+- * Time out in seconds for disks and Magneto-opticals (which are slower).
+- */
+-#define SD_TIMEOUT		(30 * HZ)
+-#define SD_MOD_TIMEOUT		(75 * HZ)
+-
+-/*
+- * Number of allowed retries
+- */
+-#define SD_MAX_RETRIES		5
+-#define SD_PASSTHROUGH_RETRIES	1
+-
+-/*
+- * Size of the initial data buffer for mode and read capacity data
+- */
+-#define SD_BUF_SIZE		512
+-
+-struct scsi_disk {
+-	struct scsi_driver *driver;	/* always &sd_template */
+-	struct scsi_device *device;
+-	struct class_device cdev;
+-	struct gendisk	*disk;
+-	unsigned int	openers;	/* protected by BKL for now, yuck */
+-	sector_t	capacity;	/* size in 512-byte sectors */
+-	u32		index;
+-	u8		media_present;
+-	u8		write_prot;
+-	unsigned	WCE : 1;	/* state of disk WCE bit */
+-	unsigned	RCD : 1;	/* state of disk RCD bit, unused */
+-	unsigned	DPOFUA : 1;	/* state of disk DPOFUA bit */
+-};
+-#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,cdev)
+-
+ static DEFINE_IDR(sd_index_idr);
+ static DEFINE_SPINLOCK(sd_index_lock);
+ 
+@@ -136,20 +91,6 @@ static DEFINE_SPINLOCK(sd_index_lock);
+  * object after last put) */
+ static DEFINE_MUTEX(sd_ref_mutex);
+ 
+-static int sd_revalidate_disk(struct gendisk *disk);
+-static void sd_rw_intr(struct scsi_cmnd * SCpnt);
+-
+-static int sd_probe(struct device *);
+-static int sd_remove(struct device *);
+-static void sd_shutdown(struct device *dev);
+-static void sd_rescan(struct device *);
+-static int sd_init_command(struct scsi_cmnd *);
+-static int sd_issue_flush(struct device *, sector_t *);
+-static void sd_prepare_flush(request_queue_t *, struct request *);
+-static void sd_read_capacity(struct scsi_disk *sdkp, char *diskname,
+-			     unsigned char *buffer);
+-static void scsi_disk_release(struct class_device *cdev);
+-
+ static const char *sd_cache_types[] = {
+ 	"write through", "none", "write back",
+ 	"write back, no read (daft)"
+@@ -199,7 +140,7 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf,
+ 	if (scsi_mode_select(sdp, 1, sp, 8, buffer_data, len, SD_TIMEOUT,
+ 			     SD_MAX_RETRIES, &data, &sshdr)) {
+ 		if (scsi_sense_valid(&sshdr))
+-			scsi_print_sense_hdr(sdkp->disk->disk_name, &sshdr);
++			sd_print_sense_hdr(sdkp, &sshdr);
+ 		return -EINVAL;
+ 	}
+ 	sd_revalidate_disk(sdkp->disk);
+@@ -407,7 +348,8 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
+ 	 */
+ 	if (sdp->sector_size == 1024) {
+ 		if ((block & 1) || (rq->nr_sectors & 1)) {
+-			printk(KERN_ERR "sd: Bad block number requested");
++			scmd_printk(KERN_ERR, SCpnt,
++				    "Bad block number requested\n");
+ 			return 0;
+ 		} else {
+ 			block = block >> 1;
+@@ -416,7 +358,8 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
+ 	}
+ 	if (sdp->sector_size == 2048) {
+ 		if ((block & 3) || (rq->nr_sectors & 3)) {
+-			printk(KERN_ERR "sd: Bad block number requested");
++			scmd_printk(KERN_ERR, SCpnt,
++				    "Bad block number requested\n");
+ 			return 0;
+ 		} else {
+ 			block = block >> 2;
+@@ -425,7 +368,8 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
+ 	}
+ 	if (sdp->sector_size == 4096) {
+ 		if ((block & 7) || (rq->nr_sectors & 7)) {
+-			printk(KERN_ERR "sd: Bad block number requested");
++			scmd_printk(KERN_ERR, SCpnt,
++				    "Bad block number requested\n");
+ 			return 0;
+ 		} else {
+ 			block = block >> 3;
+@@ -442,7 +386,7 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
+ 		SCpnt->cmnd[0] = READ_6;
+ 		SCpnt->sc_data_direction = DMA_FROM_DEVICE;
+ 	} else {
+-		printk(KERN_ERR "sd: Unknown command %x\n", rq->cmd_flags);
++		scmd_printk(KERN_ERR, SCpnt, "Unknown command %x\n", rq->cmd_flags);
+ 		return 0;
+ 	}
+ 
+@@ -490,7 +434,8 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
+ 			 * during operation and thus turned off
+ 			 * use_10_for_rw.
+ 			 */
+-			printk(KERN_ERR "sd: FUA write on READ/WRITE(6) drive\n");
++			scmd_printk(KERN_ERR, SCpnt,
++				    "FUA write on READ/WRITE(6) drive\n");
+ 			return 0;
+ 		}
+ 
+@@ -786,9 +731,10 @@ not_present:
+ 	return 1;
+ }
+ 
+-static int sd_sync_cache(struct scsi_device *sdp)
++static int sd_sync_cache(struct scsi_disk *sdkp)
+ {
+ 	int retries, res;
++	struct scsi_device *sdp = sdkp->device;
+ 	struct scsi_sense_hdr sshdr;
+ 
+ 	if (!scsi_device_online(sdp))
+@@ -809,12 +755,10 @@ static int sd_sync_cache(struct scsi_device *sdp)
+ 			break;
+ 	}
+ 
+-	if (res) {		printk(KERN_WARNING "FAILED\n  status = %x, message = %02x, "
+-				    "host = %d, driver = %02x\n  ",
+-				    status_byte(res), msg_byte(res),
+-				    host_byte(res), driver_byte(res));
+-			if (driver_byte(res) & DRIVER_SENSE)
+-				scsi_print_sense_hdr("sd", &sshdr);
++	if (res) {
++		sd_print_result(sdkp, res);
++		if (driver_byte(res) & DRIVER_SENSE)
++			sd_print_sense_hdr(sdkp, &sshdr);
+ 	}
+ 
+ 	return res;
+@@ -823,14 +767,13 @@ static int sd_sync_cache(struct scsi_device *sdp)
+ static int sd_issue_flush(struct device *dev, sector_t *error_sector)
+ {
+ 	int ret = 0;
+-	struct scsi_device *sdp = to_scsi_device(dev);
+ 	struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
+ 
+ 	if (!sdkp)
+                return -ENODEV;
+ 
+ 	if (sdkp->WCE)
+-		ret = sd_sync_cache(sdp);
++		ret = sd_sync_cache(sdkp);
+ 	scsi_disk_put(sdkp);
+ 	return ret;
+ }
+@@ -1025,7 +968,7 @@ static int media_not_present(struct scsi_disk *sdkp,
+  * spinup disk - called only in sd_revalidate_disk()
+  */
+ static void
+-sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
++sd_spinup_disk(struct scsi_disk *sdkp)
+ {
+ 	unsigned char cmd[10];
+ 	unsigned long spintime_expire = 0;
+@@ -1069,9 +1012,10 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
+ 		if ((driver_byte(the_result) & DRIVER_SENSE) == 0) {
+ 			/* no sense, TUR either succeeded or failed
+ 			 * with a status error */
+-			if(!spintime && !scsi_status_is_good(the_result))
+-				printk(KERN_NOTICE "%s: Unit Not Ready, "
+-				       "error = 0x%x\n", diskname, the_result);
++			if(!spintime && !scsi_status_is_good(the_result)) {
++				sd_printk(KERN_NOTICE, sdkp, "Unit Not Ready\n");
++				sd_print_result(sdkp, the_result);
++			}
+ 			break;
+ 		}
+ 					
+@@ -1096,8 +1040,7 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
+ 		 */
+ 		} else if (sense_valid && sshdr.sense_key == NOT_READY) {
+ 			if (!spintime) {
+-				printk(KERN_NOTICE "%s: Spinning up disk...",
+-				       diskname);
++				sd_printk(KERN_NOTICE, sdkp, "Spinning up disk...");
+ 				cmd[0] = START_STOP;
+ 				cmd[1] = 1;	/* Return immediately */
+ 				memset((void *) &cmd[2], 0, 8);
+@@ -1130,9 +1073,8 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
+ 			/* we don't understand the sense code, so it's
+ 			 * probably pointless to loop */
+ 			if(!spintime) {
+-				printk(KERN_NOTICE "%s: Unit Not Ready, "
+-					"sense:\n", diskname);
+-				scsi_print_sense_hdr("", &sshdr);
++				sd_printk(KERN_NOTICE, sdkp, "Unit Not Ready\n");
++				sd_print_sense_hdr(sdkp, &sshdr);
+ 			}
+ 			break;
+ 		}
+@@ -1151,8 +1093,7 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
+  * read disk capacity
+  */
+ static void
+-sd_read_capacity(struct scsi_disk *sdkp, char *diskname,
+-		 unsigned char *buffer)
++sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer)
+ {
+ 	unsigned char cmd[16];
+ 	int the_result, retries;
+@@ -1191,18 +1132,12 @@ repeat:
+ 	} while (the_result && retries);
+ 
+ 	if (the_result && !longrc) {
+-		printk(KERN_NOTICE "%s : READ CAPACITY failed.\n"
+-		       "%s : status=%x, message=%02x, host=%d, driver=%02x \n",
+-		       diskname, diskname,
+-		       status_byte(the_result),
+-		       msg_byte(the_result),
+-		       host_byte(the_result),
+-		       driver_byte(the_result));
+-
++		sd_printk(KERN_NOTICE, sdkp, "READ CAPACITY failed\n");
++		sd_print_result(sdkp, the_result);
+ 		if (driver_byte(the_result) & DRIVER_SENSE)
+-			scsi_print_sense_hdr("sd", &sshdr);
++			sd_print_sense_hdr(sdkp, &sshdr);
+ 		else
+-			printk("%s : sense not available. \n", diskname);
++			sd_printk(KERN_NOTICE, sdkp, "Sense not available.\n");
+ 
+ 		/* Set dirty bit for removable devices if not ready -
+ 		 * sometimes drives will not report this properly. */
+@@ -1218,16 +1153,10 @@ repeat:
+ 		return;
+ 	} else if (the_result && longrc) {
+ 		/* READ CAPACITY(16) has been failed */
+-		printk(KERN_NOTICE "%s : READ CAPACITY(16) failed.\n"
+-		       "%s : status=%x, message=%02x, host=%d, driver=%02x \n",
+-		       diskname, diskname,
+-		       status_byte(the_result),
+-		       msg_byte(the_result),
+-		       host_byte(the_result),
+-		       driver_byte(the_result));
+-		printk(KERN_NOTICE "%s : use 0xffffffff as device size\n",
+-		       diskname);
+-		
++		sd_printk(KERN_NOTICE, sdkp, "READ CAPACITY(16) failed\n");
++		sd_print_result(sdkp, the_result);
++		sd_printk(KERN_NOTICE, sdkp, "Use 0xffffffff as device size\n");
++
+ 		sdkp->capacity = 1 + (sector_t) 0xffffffff;		
+ 		goto got_data;
+ 	}	
+@@ -1238,14 +1167,14 @@ repeat:
+ 		if (buffer[0] == 0xff && buffer[1] == 0xff &&
+ 		    buffer[2] == 0xff && buffer[3] == 0xff) {
+ 			if(sizeof(sdkp->capacity) > 4) {
+-				printk(KERN_NOTICE "%s : very big device. try to use"
+-				       " READ CAPACITY(16).\n", diskname);
++				sd_printk(KERN_NOTICE, sdkp, "Very big device. "
++					  "Trying to use READ CAPACITY(16).\n");
+ 				longrc = 1;
+ 				goto repeat;
+ 			}
+-			printk(KERN_ERR "%s: too big for this kernel.  Use a "
+-			       "kernel compiled with support for large block "
+-			       "devices.\n", diskname);
++			sd_printk(KERN_ERR, sdkp, "Too big for this kernel. Use "
++				  "a kernel compiled with support for large "
++				  "block devices.\n");
+ 			sdkp->capacity = 0;
+ 			goto got_data;
+ 		}
+@@ -1284,8 +1213,8 @@ repeat:
+ got_data:
+ 	if (sector_size == 0) {
+ 		sector_size = 512;
+-		printk(KERN_NOTICE "%s : sector size 0 reported, "
+-		       "assuming 512.\n", diskname);
++		sd_printk(KERN_NOTICE, sdkp, "Sector size 0 reported, "
++			  "assuming 512.\n");
+ 	}
+ 
+ 	if (sector_size != 512 &&
+@@ -1293,8 +1222,8 @@ got_data:
+ 	    sector_size != 2048 &&
+ 	    sector_size != 4096 &&
+ 	    sector_size != 256) {
+-		printk(KERN_NOTICE "%s : unsupported sector size "
+-		       "%d.\n", diskname, sector_size);
++		sd_printk(KERN_NOTICE, sdkp, "Unsupported sector size %d.\n",
++			  sector_size);
+ 		/*
+ 		 * The user might want to re-format the drive with
+ 		 * a supported sectorsize.  Once this happens, it
+@@ -1327,10 +1256,10 @@ got_data:
+ 		mb -= sz - 974;
+ 		sector_div(mb, 1950);
+ 
+-		printk(KERN_NOTICE "SCSI device %s: "
+-		       "%llu %d-byte hdwr sectors (%llu MB)\n",
+-		       diskname, (unsigned long long)sdkp->capacity,
+-		       hard_sector, (unsigned long long)mb);
++		sd_printk(KERN_NOTICE, sdkp,
++			  "%llu %d-byte hardware sectors (%llu MB)\n",
++			  (unsigned long long)sdkp->capacity,
++			  hard_sector, (unsigned long long)mb);
+ 	}
+ 
+ 	/* Rescale capacity to 512-byte units */
+@@ -1362,8 +1291,7 @@ sd_do_mode_sense(struct scsi_device *sdp, int dbd, int modepage,
+  * called with buffer of length SD_BUF_SIZE
+  */
+ static void
+-sd_read_write_protect_flag(struct scsi_disk *sdkp, char *diskname,
+-			   unsigned char *buffer)
++sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
+ {
+ 	int res;
+ 	struct scsi_device *sdp = sdkp->device;
+@@ -1371,7 +1299,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, char *diskname,
+ 
+ 	set_disk_ro(sdkp->disk, 0);
+ 	if (sdp->skip_ms_page_3f) {
+-		printk(KERN_NOTICE "%s: assuming Write Enabled\n", diskname);
++		sd_printk(KERN_NOTICE, sdkp, "Assuming Write Enabled\n");
+ 		return;
+ 	}
+ 
+@@ -1403,15 +1331,16 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, char *diskname,
+ 	}
+ 
+ 	if (!scsi_status_is_good(res)) {
+-		printk(KERN_WARNING
+-		       "%s: test WP failed, assume Write Enabled\n", diskname);
++		sd_printk(KERN_WARNING, sdkp,
++			  "Test WP failed, assume Write Enabled\n");
+ 	} else {
+ 		sdkp->write_prot = ((data.device_specific & 0x80) != 0);
+ 		set_disk_ro(sdkp->disk, sdkp->write_prot);
+-		printk(KERN_NOTICE "%s: Write Protect is %s\n", diskname,
+-		       sdkp->write_prot ? "on" : "off");
+-		printk(KERN_DEBUG "%s: Mode Sense: %02x %02x %02x %02x\n",
+-		       diskname, buffer[0], buffer[1], buffer[2], buffer[3]);
++		sd_printk(KERN_NOTICE, sdkp, "Write Protect is %s\n",
++			  sdkp->write_prot ? "on" : "off");
++		sd_printk(KERN_DEBUG, sdkp,
++			  "Mode Sense: %02x %02x %02x %02x\n",
++			  buffer[0], buffer[1], buffer[2], buffer[3]);
+ 	}
+ }
+ 
+@@ -1420,8 +1349,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, char *diskname,
+  * called with buffer of length SD_BUF_SIZE
+  */
+ static void
+-sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
+-		   unsigned char *buffer)
++sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer)
+ {
+ 	int len = 0, res;
+ 	struct scsi_device *sdp = sdkp->device;
+@@ -1450,8 +1378,7 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
+ 
+ 	if (!data.header_length) {
+ 		modepage = 6;
+-		printk(KERN_ERR "%s: missing header in MODE_SENSE response\n",
+-		       diskname);
++		sd_printk(KERN_ERR, sdkp, "Missing header in MODE_SENSE response\n");
+ 	}
+ 
+ 	/* that went OK, now ask for the proper length */
+@@ -1478,13 +1405,12 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
+ 		int offset = data.header_length + data.block_descriptor_length;
+ 
+ 		if (offset >= SD_BUF_SIZE - 2) {
+-			printk(KERN_ERR "%s: malformed MODE SENSE response",
+-				diskname);
++			sd_printk(KERN_ERR, sdkp, "Malformed MODE SENSE response\n");
+ 			goto defaults;
+ 		}
+ 
+ 		if ((buffer[offset] & 0x3f) != modepage) {
+-			printk(KERN_ERR "%s: got wrong page\n", diskname);
++			sd_printk(KERN_ERR, sdkp, "Got wrong page\n");
+ 			goto defaults;
+ 		}
+ 
+@@ -1498,14 +1424,13 @@ sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
+ 
+ 		sdkp->DPOFUA = (data.device_specific & 0x10) != 0;
+ 		if (sdkp->DPOFUA && !sdkp->device->use_10_for_rw) {
+-			printk(KERN_NOTICE "SCSI device %s: uses "
+-			       "READ/WRITE(6), disabling FUA\n", diskname);
++			sd_printk(KERN_NOTICE, sdkp,
++				  "Uses READ/WRITE(6), disabling FUA\n");
+ 			sdkp->DPOFUA = 0;
+ 		}
+ 
+-		printk(KERN_NOTICE "SCSI device %s: "
+-		       "write cache: %s, read cache: %s, %s\n",
+-		       diskname,
++		sd_printk(KERN_NOTICE, sdkp,
++		       "Write cache: %s, read cache: %s, %s\n",
+ 		       sdkp->WCE ? "enabled" : "disabled",
+ 		       sdkp->RCD ? "disabled" : "enabled",
+ 		       sdkp->DPOFUA ? "supports DPO and FUA"
+@@ -1518,15 +1443,13 @@ bad_sense:
+ 	if (scsi_sense_valid(&sshdr) &&
+ 	    sshdr.sense_key == ILLEGAL_REQUEST &&
+ 	    sshdr.asc == 0x24 && sshdr.ascq == 0x0)
+-		printk(KERN_NOTICE "%s: cache data unavailable\n",
+-		       diskname);	/* Invalid field in CDB */
++		/* Invalid field in CDB */
++		sd_printk(KERN_NOTICE, sdkp, "Cache data unavailable\n");
+ 	else
+-		printk(KERN_ERR "%s: asking for cache data failed\n",
+-		       diskname);
++		sd_printk(KERN_ERR, sdkp, "Asking for cache data failed\n");
+ 
+ defaults:
+-	printk(KERN_ERR "%s: assuming drive cache: write through\n",
+-	       diskname);
++	sd_printk(KERN_ERR, sdkp, "Assuming drive cache: write through\n");
+ 	sdkp->WCE = 0;
+ 	sdkp->RCD = 0;
+ 	sdkp->DPOFUA = 0;
+@@ -1555,8 +1478,8 @@ static int sd_revalidate_disk(struct gendisk *disk)
+ 
+ 	buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL | __GFP_DMA);
+ 	if (!buffer) {
+-		printk(KERN_WARNING "(sd_revalidate_disk:) Memory allocation "
+-		       "failure.\n");
++		sd_printk(KERN_WARNING, sdkp, "sd_revalidate_disk: Memory "
++			  "allocation failure.\n");
+ 		goto out;
+ 	}
+ 
+@@ -1568,16 +1491,16 @@ static int sd_revalidate_disk(struct gendisk *disk)
+ 	sdkp->WCE = 0;
+ 	sdkp->RCD = 0;
+ 
+-	sd_spinup_disk(sdkp, disk->disk_name);
++	sd_spinup_disk(sdkp);
+ 
+ 	/*
+ 	 * Without media there is no reason to ask; moreover, some devices
+ 	 * react badly if we do.
+ 	 */
+ 	if (sdkp->media_present) {
+-		sd_read_capacity(sdkp, disk->disk_name, buffer);
+-		sd_read_write_protect_flag(sdkp, disk->disk_name, buffer);
+-		sd_read_cache_type(sdkp, disk->disk_name, buffer);
++		sd_read_capacity(sdkp, buffer);
++		sd_read_write_protect_flag(sdkp, buffer);
++		sd_read_cache_type(sdkp, buffer);
+ 	}
+ 
+ 	/*
+@@ -1709,8 +1632,8 @@ static int sd_probe(struct device *dev)
+ 	dev_set_drvdata(dev, sdkp);
+ 	add_disk(gd);
+ 
+-	sdev_printk(KERN_NOTICE, sdp, "Attached scsi %sdisk %s\n",
+-		    sdp->removable ? "removable " : "", gd->disk_name);
++	sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
++		  sdp->removable ? "removable " : "");
+ 
+ 	return 0;
+ 
+@@ -1781,16 +1704,14 @@ static void scsi_disk_release(struct class_device *cdev)
+  */
+ static void sd_shutdown(struct device *dev)
+ {
+-	struct scsi_device *sdp = to_scsi_device(dev);
+ 	struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
+ 
+ 	if (!sdkp)
+ 		return;         /* this can happen */
+ 
+ 	if (sdkp->WCE) {
+-		printk(KERN_NOTICE "Synchronizing SCSI cache for disk %s: \n",
+-				sdkp->disk->disk_name);
+-		sd_sync_cache(sdp);
++		sd_printk(KERN_NOTICE, sdkp, "Synchronizing SCSI cache\n");
++		sd_sync_cache(sdkp);
+ 	}
+ 	scsi_disk_put(sdkp);
+ }
+@@ -1852,3 +1773,19 @@ static void __exit exit_sd(void)
+ 
+ module_init(init_sd);
+ module_exit(exit_sd);
++
++static void sd_print_sense_hdr(struct scsi_disk *sdkp,
++			       struct scsi_sense_hdr *sshdr)
++{
++	sd_printk(KERN_INFO, sdkp, "");
++	scsi_show_sense_hdr(sshdr);
++	sd_printk(KERN_INFO, sdkp, "");
++	scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
++}
++
++static void sd_print_result(struct scsi_disk *sdkp, int result)
++{
++	sd_printk(KERN_INFO, sdkp, "");
++	scsi_show_result(result);
++}
++
+diff --git a/include/scsi/sd.h b/include/scsi/sd.h
+new file mode 100644
+index 0000000..82e6a84
+--- /dev/null
++++ b/include/scsi/sd.h
+@@ -0,0 +1,70 @@
++#ifndef _SCSI_DISK_H
++#define _SCSI_DISK_H
++
++/*
++ * More than enough for everybody ;)  The huge number of majors
++ * is a leftover from 16bit dev_t days, we don't really need that
++ * much numberspace.
++ */
++#define SD_MAJORS	16
++
++/*
++ * This is limited by the naming scheme enforced in sd_probe,
++ * add another character to it if you really need more disks.
++ */
++#define SD_MAX_DISKS	(((26 * 26) + 26 + 1) * 26)
++
++/*
++ * Time out in seconds for disks and Magneto-opticals (which are slower).
++ */
++#define SD_TIMEOUT		(30 * HZ)
++#define SD_MOD_TIMEOUT		(75 * HZ)
++
++/*
++ * Number of allowed retries
++ */
++#define SD_MAX_RETRIES		5
++#define SD_PASSTHROUGH_RETRIES	1
++
++/*
++ * Size of the initial data buffer for mode and read capacity data
++ */
++#define SD_BUF_SIZE		512
++
++struct scsi_disk {
++	struct scsi_driver *driver;	/* always &sd_template */
++	struct scsi_device *device;
++	struct class_device cdev;
++	struct gendisk	*disk;
++	unsigned int	openers;	/* protected by BKL for now, yuck */
++	sector_t	capacity;	/* size in 512-byte sectors */
++	u32		index;
++	u8		media_present;
++	u8		write_prot;
++	unsigned	WCE : 1;	/* state of disk WCE bit */
++	unsigned	RCD : 1;	/* state of disk RCD bit, unused */
++	unsigned	DPOFUA : 1;	/* state of disk DPOFUA bit */
++};
++#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,cdev)
++
++static int  sd_revalidate_disk(struct gendisk *disk);
++static void sd_rw_intr(struct scsi_cmnd * SCpnt);
++static int  sd_probe(struct device *);
++static int  sd_remove(struct device *);
++static void sd_shutdown(struct device *dev);
++static void sd_rescan(struct device *);
++static int  sd_init_command(struct scsi_cmnd *);
++static int  sd_issue_flush(struct device *, sector_t *);
++static void sd_prepare_flush(request_queue_t *, struct request *);
++static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
++static void scsi_disk_release(struct class_device *cdev);
++static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
++static void sd_print_result(struct scsi_disk *, int);
++
++#define sd_printk(prefix, sdsk, fmt, a...)				\
++        (sdsk)->disk ?							\
++	sdev_printk(prefix, (sdsk)->device, "[%s] " fmt,		\
++		    (sdsk)->disk->disk_name, ##a) :			\
++	sdev_printk(prefix, (sdsk)->device, fmt, ##a)
++
++#endif /* _SCSI_DISK_H */
+-- 
+1.5.1.4
+

linux-2.6-2111_sd-start-stop.patch:

Index: linux-2.6-2111_sd-start-stop.patch
===================================================================
RCS file: linux-2.6-2111_sd-start-stop.patch
diff -N linux-2.6-2111_sd-start-stop.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2111_sd-start-stop.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,273 @@
+From c3c94c5a2fb43a654e777f509d5032b0db8ed09f Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun gmail com>
+Date: Wed, 21 Mar 2007 00:13:59 +0900
+Subject: [PATCH] [SCSI] sd: implement START/STOP management
+
+Implement SBC START/STOP management.  sdev->mange_start_stop is added.
+When it's set to one, sd STOPs the device on suspend and shutdown and
+STARTs it on resume.  sdev->manage_start_stop defaults is in sdev
+instead of scsi_disk cdev to allow ->slave_config() override the
+default configuration but is exported under scsi_disk sysfs node as
+sdev->allow_restart is.
+
+When manage_start_stop is zero (the default value), this patch doesn't
+introduce any behavior change.
+
+Signed-off-by: Tejun Heo <htejun gmail com>
+
+Rejections fixed and
+Signed-off-by: James Bottomley <James Bottomley SteelEye com>
+---
+ drivers/scsi/scsi_sysfs.c  |   31 ++++++++++++--
+ drivers/scsi/sd.c          |  101 ++++++++++++++++++++++++++++++++++++++++++++
+ include/scsi/scsi_device.h |    1 +
+ include/scsi/sd.h          |    2 +
+ 4 files changed, 131 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
+index c275dca..96db51c 100644
+--- a/drivers/scsi/scsi_sysfs.c
++++ b/drivers/scsi/scsi_sysfs.c
+@@ -278,6 +278,7 @@ static int scsi_bus_match(struct device *dev, struct device_driver *gendrv)
+ 
+ static int scsi_bus_suspend(struct device * dev, pm_message_t state)
+ {
++	struct device_driver *drv = dev->driver;
+ 	struct scsi_device *sdev = to_scsi_device(dev);
+ 	struct scsi_host_template *sht = sdev->host->hostt;
+ 	int err;
+@@ -286,23 +287,45 @@ static int scsi_bus_suspend(struct device * dev, pm_message_t state)
+ 	if (err)
+ 		return err;
+ 
+-	if (sht->suspend)
++	/* call HLD suspend first */
++	if (drv && drv->suspend) {
++		err = drv->suspend(dev, state);
++		if (err)
++			return err;
++	}
++
++	/* then, call host suspend */
++	if (sht->suspend) {
+ 		err = sht->suspend(sdev, state);
++		if (err) {
++			if (drv && drv->resume)
++				drv->resume(dev);
++			return err;
++		}
++	}
+ 
+-	return err;
++	return 0;
+ }
+ 
+ static int scsi_bus_resume(struct device * dev)
+ {
++	struct device_driver *drv = dev->driver;
+ 	struct scsi_device *sdev = to_scsi_device(dev);
+ 	struct scsi_host_template *sht = sdev->host->hostt;
+-	int err = 0;
++	int err = 0, err2 = 0;
+ 
++	/* call host resume first */
+ 	if (sht->resume)
+ 		err = sht->resume(sdev);
+ 
++	/* then, call HLD resume */
++	if (drv && drv->resume)
++		err2 = drv->resume(dev);
++
+ 	scsi_device_resume(sdev);
+-	return err;
++
++	/* favor LLD failure */
++	return err ? err : err2;;
+ }
+ 
+ struct bus_type scsi_bus_type = {
+diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
+index 3dda77c..49a94ae 100644
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -147,6 +147,20 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf,
+ 	return count;
+ }
+ 
++static ssize_t sd_store_manage_start_stop(struct class_device *cdev,
++					  const char *buf, size_t count)
++{
++	struct scsi_disk *sdkp = to_scsi_disk(cdev);
++	struct scsi_device *sdp = sdkp->device;
++
++	if (!capable(CAP_SYS_ADMIN))
++		return -EACCES;
++
++	sdp->manage_start_stop = simple_strtoul(buf, NULL, 10);
++
++	return count;
++}
++
+ static ssize_t sd_store_allow_restart(struct class_device *cdev, const char *buf,
+ 				      size_t count)
+ {
+@@ -179,6 +193,14 @@ static ssize_t sd_show_fua(struct class_device *cdev, char *buf)
+ 	return snprintf(buf, 20, "%u\n", sdkp->DPOFUA);
+ }
+ 
++static ssize_t sd_show_manage_start_stop(struct class_device *cdev, char *buf)
++{
++	struct scsi_disk *sdkp = to_scsi_disk(cdev);
++	struct scsi_device *sdp = sdkp->device;
++
++	return snprintf(buf, 20, "%u\n", sdp->manage_start_stop);
++}
++
+ static ssize_t sd_show_allow_restart(struct class_device *cdev, char *buf)
+ {
+ 	struct scsi_disk *sdkp = to_scsi_disk(cdev);
+@@ -192,6 +214,8 @@ static struct class_device_attribute sd_disk_attrs[] = {
+ 	__ATTR(FUA, S_IRUGO, sd_show_fua, NULL),
+ 	__ATTR(allow_restart, S_IRUGO|S_IWUSR, sd_show_allow_restart,
+ 	       sd_store_allow_restart),
++	__ATTR(manage_start_stop, S_IRUGO|S_IWUSR, sd_show_manage_start_stop,
++	       sd_store_manage_start_stop),
+ 	__ATTR_NULL,
+ };
+ 
+@@ -208,6 +232,8 @@ static struct scsi_driver sd_template = {
+ 		.name		= "sd",
+ 		.probe		= sd_probe,
+ 		.remove		= sd_remove,
++		.suspend	= sd_suspend,
++		.resume		= sd_resume,
+ 		.shutdown	= sd_shutdown,
+ 	},
+ 	.rescan			= sd_rescan,
+@@ -1707,6 +1733,32 @@ static void scsi_disk_release(struct class_device *cdev)
+ 	kfree(sdkp);
+ }
+ 
++static int sd_start_stop_device(struct scsi_device *sdp, int start)
++{
++	unsigned char cmd[6] = { START_STOP };	/* START_VALID */
++	struct scsi_sense_hdr sshdr;
++	int res;
++
++	if (start)
++		cmd[4] |= 1;	/* START */
++
++	if (!scsi_device_online(sdp))
++		return -ENODEV;
++
++	res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr,
++			       SD_TIMEOUT, SD_MAX_RETRIES);
++	if (res) {
++		printk(KERN_WARNING "FAILED\n  status = %x, message = %02x, "
++		       "host = %d, driver = %02x\n  ",
++		       status_byte(res), msg_byte(res),
++		       host_byte(res), driver_byte(res));
++		if (driver_byte(res) & DRIVER_SENSE)
++			scsi_print_sense_hdr("sd", &sshdr);
++	}
++
++	return res;
++}
++
+ /*
+  * Send a SYNCHRONIZE CACHE instruction down to the device through
+  * the normal SCSI command structure.  Wait for the command to
+@@ -1714,6 +1766,7 @@ static void scsi_disk_release(struct class_device *cdev)
+  */
+ static void sd_shutdown(struct device *dev)
+ {
++	struct scsi_device *sdp = to_scsi_device(dev);
+ 	struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
+ 
+ 	if (!sdkp)
+@@ -1723,9 +1776,57 @@ static void sd_shutdown(struct device *dev)
+ 		sd_printk(KERN_NOTICE, sdkp, "Synchronizing SCSI cache\n");
+ 		sd_sync_cache(sdkp);
+ 	}
++
++	if (system_state != SYSTEM_RESTART && sdp->manage_start_stop) {
++		printk(KERN_NOTICE "Stopping disk %s: \n",
++		       sdkp->disk->disk_name);
++		sd_start_stop_device(sdp, 0);
++	}
++
+ 	scsi_disk_put(sdkp);
+ }
+ 
++static int sd_suspend(struct device *dev, pm_message_t mesg)
++{
++	struct scsi_device *sdp = to_scsi_device(dev);
++	struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
++	int ret;
++
++	if (!sdkp)
++		return 0;	/* this can happen */
++
++	if (sdkp->WCE) {
++		printk(KERN_NOTICE "Synchronizing SCSI cache for disk %s: \n",
++				sdkp->disk->disk_name);
++		ret = sd_sync_cache(sdkp);
++		if (ret)
++			return ret;
++	}
++
++	if (mesg.event == PM_EVENT_SUSPEND && sdp->manage_start_stop) {
++		printk(KERN_NOTICE "Stopping disk %s: \n",
++		       sdkp->disk->disk_name);
++		ret = sd_start_stop_device(sdp, 0);
++		if (ret)
++			return ret;
++	}
++
++	return 0;
++}
++
++static int sd_resume(struct device *dev)
++{
++	struct scsi_device *sdp = to_scsi_device(dev);
++	struct scsi_disk *sdkp = scsi_disk_get_from_dev(dev);
++
++	if (!sdp->manage_start_stop)
++		return 0;
++
++	printk(KERN_NOTICE "Starting disk %s: \n", sdkp->disk->disk_name);
++
++	return sd_start_stop_device(sdp, 1);
++}
++
+ /**
+  *	init_sd - entry point for this driver (both when built in or when
+  *	a module).
+diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
+index c86e6ce..b05cd3b 100644
+--- a/include/scsi/scsi_device.h
++++ b/include/scsi/scsi_device.h
+@@ -120,6 +120,7 @@ struct scsi_device {
+ 	unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */
+ 	unsigned no_start_on_add:1;	/* do not issue start on add */
+ 	unsigned allow_restart:1; /* issue START_UNIT in error handler */
++	unsigned manage_start_stop:1;	/* Let HLD (sd) manage start/stop */
+ 	unsigned no_uld_attach:1; /* disable connecting to upper level drivers */
+ 	unsigned select_no_atn:1;
+ 	unsigned fix_capacity:1;	/* READ_CAPACITY is too high by 1 */
+diff --git a/include/scsi/sd.h b/include/scsi/sd.h
+index 82e6a84..5261488 100644
+--- a/include/scsi/sd.h
++++ b/include/scsi/sd.h
+@@ -52,6 +52,8 @@ static void sd_rw_intr(struct scsi_cmnd * SCpnt);
+ static int  sd_probe(struct device *);
+ static int  sd_remove(struct device *);
+ static void sd_shutdown(struct device *dev);
++static int sd_suspend(struct device *dev, pm_message_t state);
++static int sd_resume(struct device *dev);
+ static void sd_rescan(struct device *);
+ static int  sd_init_command(struct scsi_cmnd *);
+ static int  sd_issue_flush(struct device *, sector_t *);
+-- 
+1.5.1.4
+

linux-2.6-2112_libata-suspend.patch:

Index: linux-2.6-2112_libata-suspend.patch
===================================================================
RCS file: linux-2.6-2112_libata-suspend.patch
diff -N linux-2.6-2112_libata-suspend.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2112_libata-suspend.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,1281 @@
+From 9666f4009c22f6520ac3fb8a19c9e32ab973e828 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun gmail com>
+Date: Fri, 4 May 2007 21:27:47 +0200
+Subject: [PATCH] libata: reimplement suspend/resume support using sdev->manage_start_stop
+
+Reimplement suspend/resume support using sdev->manage_start_stop.
+
+* Device suspend/resume is now SCSI layer's responsibility and the
+  code is simplified a lot.
+
+* DPM is dropped.  This also simplifies code a lot.  Suspend/resume
+  status is port-wide now.
+
+* ata_scsi_device_suspend/resume() and ata_dev_ready() removed.
+
+* Resume now has to wait for disk to spin up before proceeding.  I
+  couldn't find easy way out as libata is in EH waiting for the
+  disk to be ready and sd is waiting for EH to complete to issue
+  START_STOP.
+
+* sdev->manage_start_stop is set to 1 in ata_scsi_slave_config().
+  This fixes spindown on shutdown and suspend-to-disk.
+
+Signed-off-by: Tejun Heo <htejun gmail com>
+Signed-off-by: Jeff Garzik <jeff garzik org>
+---
+ drivers/ata/ahci.c              |    4 -
+ drivers/ata/ata_generic.c       |    6 +-
+ drivers/ata/ata_piix.c          |    4 -
+ drivers/ata/libata-core.c       |   39 +------
+ drivers/ata/libata-eh.c         |  237 +--------------------------------------
+ drivers/ata/libata-scsi.c       |  129 +---------------------
+ drivers/ata/pata_ali.c          |    4 -
+ drivers/ata/pata_amd.c          |    4 -
+ drivers/ata/pata_atiixp.c       |    4 -
+ drivers/ata/pata_cmd640.c       |    4 -
+ drivers/ata/pata_cmd64x.c       |    4 -
+ drivers/ata/pata_cs5520.c       |    4 -
+ drivers/ata/pata_cs5530.c       |    4 -
+ drivers/ata/pata_cs5535.c       |    4 -
+ drivers/ata/pata_cypress.c      |    4 -
+ drivers/ata/pata_efar.c         |    4 -
+ drivers/ata/pata_hpt366.c       |    4 -
+ drivers/ata/pata_hpt3x3.c       |    4 -
+ drivers/ata/pata_it8213.c       |    4 -
+ drivers/ata/pata_it821x.c       |    4 -
+ drivers/ata/pata_ixp4xx_cf.c    |    2 +-
+ drivers/ata/pata_jmicron.c      |    4 -
+ drivers/ata/pata_marvell.c      |    4 -
+ drivers/ata/pata_mpc52xx.c      |    4 -
+ drivers/ata/pata_mpiix.c        |    4 -
+ drivers/ata/pata_netcell.c      |    4 -
+ drivers/ata/pata_ns87410.c      |    4 -
+ drivers/ata/pata_oldpiix.c      |    4 -
+ drivers/ata/pata_opti.c         |    4 -
+ drivers/ata/pata_optidma.c      |    4 -
+ drivers/ata/pata_pdc202xx_old.c |    4 -
+ drivers/ata/pata_radisys.c      |    4 -
+ drivers/ata/pata_rz1000.c       |    6 +-
+ drivers/ata/pata_sc1200.c       |    4 -
+ drivers/ata/pata_scc.c          |    4 -
+ drivers/ata/pata_serverworks.c  |    4 -
+ drivers/ata/pata_sil680.c       |    4 -
+ drivers/ata/pata_sis.c          |    4 -
+ drivers/ata/pata_triflex.c      |    4 -
+ drivers/ata/pata_via.c          |    4 -
+ drivers/ata/sata_inic162x.c     |    4 -
+ drivers/ata/sata_nv.c           |    8 --
+ drivers/ata/sata_sil.c          |    4 -
+ drivers/ata/sata_sil24.c        |    4 -
+ include/linux/libata.h          |   14 +--
+ 45 files changed, 14 insertions(+), 575 deletions(-)
+
+Index: linux-2.6.21-gentoo-r1/drivers/ata/ahci.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/ahci.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/ahci.c
+@@ -245,10 +245,6 @@ static struct scsi_host_template ahci_sh
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const struct ata_port_operations ahci_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/ata_generic.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/ata_generic.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/ata_generic.c
+@@ -83,7 +83,7 @@ static int generic_set_mode(struct ata_p
+ 
+ 	for (i = 0; i < ATA_MAX_DEVICES; i++) {
+ 		struct ata_device *dev = &ap->device[i];
+-		if (ata_dev_ready(dev)) {
++		if (ata_dev_enabled(dev)) {
+ 			/* We don't really care */
+ 			dev->pio_mode = XFER_PIO_0;
+ 			dev->dma_mode = XFER_MW_DMA_0;
+@@ -119,10 +119,6 @@ static struct scsi_host_template generic
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations generic_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/ata_piix.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/ata_piix.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/ata_piix.c
+@@ -275,10 +275,6 @@ static struct scsi_host_template piix_sh
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations piix_pata_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-core.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
+@@ -2563,7 +2563,7 @@ int ata_set_mode(struct ata_port *ap, st
+ 		dev = &ap->device[i];
+ 
+ 		/* don't update suspended devices' xfer mode */
+-		if (!ata_dev_ready(dev))
++		if (!ata_dev_enabled(dev))
+ 			continue;
+ 
+ 		rc = ata_dev_set_mode(dev);
+@@ -5460,37 +5460,11 @@ static int ata_host_request_pm(struct at
+  */
+ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
+ {
+-	int i, j, rc;
++	int rc;
+ 
+ 	rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1);
+-	if (rc)
+-		goto fail;
+-
+-	/* EH is quiescent now.  Fail if we have any ready device.
+-	 * This happens if hotplug occurs between completion of device
+-	 * suspension and here.
+-	 */
+-	for (i = 0; i < host->n_ports; i++) {
+-		struct ata_port *ap = host->ports[i];
+-
+-		for (j = 0; j < ATA_MAX_DEVICES; j++) {
+-			struct ata_device *dev = &ap->device[j];
+-
+-			if (ata_dev_ready(dev)) {
+-				ata_port_printk(ap, KERN_WARNING,
+-						"suspend failed, device %d "
+-						"still active\n", dev->devno);
+-				rc = -EBUSY;
+-				goto fail;
+-			}
+-		}
+-	}
+-
+-	host->dev->power.power_state = mesg;
+-	return 0;
+-
+- fail:
+-	ata_host_resume(host);
++	if (rc == 0)
++		host->dev->power.power_state = mesg;
+ 	return rc;
+ }
+ 
+@@ -6442,11 +6416,6 @@ EXPORT_SYMBOL_GPL(ata_pci_default_filter
+ EXPORT_SYMBOL_GPL(ata_pci_clear_simplex);
+ #endif /* CONFIG_PCI */
+ 
+-#ifdef CONFIG_PM
+-EXPORT_SYMBOL_GPL(ata_scsi_device_suspend);
+-EXPORT_SYMBOL_GPL(ata_scsi_device_resume);
+-#endif /* CONFIG_PM */
+-
+ EXPORT_SYMBOL_GPL(ata_eng_timeout);
+ EXPORT_SYMBOL_GPL(ata_port_schedule_eh);
+ EXPORT_SYMBOL_GPL(ata_port_abort);
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-eh.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-eh.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-eh.c
+@@ -55,29 +55,12 @@ static void ata_eh_finish(struct ata_por
+ #ifdef CONFIG_PM
+ static void ata_eh_handle_port_suspend(struct ata_port *ap);
+ static void ata_eh_handle_port_resume(struct ata_port *ap);
+-static int ata_eh_suspend(struct ata_port *ap,
+-			  struct ata_device **r_failed_dev);
+-static void ata_eh_prep_resume(struct ata_port *ap);
+-static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev);
+ #else /* CONFIG_PM */
+ static void ata_eh_handle_port_suspend(struct ata_port *ap)
+ { }
+ 
+ static void ata_eh_handle_port_resume(struct ata_port *ap)
+ { }
+-
+-static int ata_eh_suspend(struct ata_port *ap, struct ata_device **r_failed_dev)
+-{
+-	return 0;
+-}
+-
+-static void ata_eh_prep_resume(struct ata_port *ap)
+-{ }
+-
+-static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev)
+-{
+-	return 0;
+-}
+ #endif /* CONFIG_PM */
+ 
+ static void ata_ering_record(struct ata_ering *ering, int is_io,
+@@ -1762,7 +1745,7 @@ static int ata_eh_revalidate_and_attach(
+ 		if (ehc->i.flags & ATA_EHI_DID_RESET)
+ 			readid_flags |= ATA_READID_POSTRESET;
+ 
+-		if (action & ATA_EH_REVALIDATE && ata_dev_ready(dev)) {
++		if ((action & ATA_EH_REVALIDATE) && ata_dev_enabled(dev)) {
+ 			if (ata_port_offline(ap)) {
+ 				rc = -EIO;
+ 				goto err;
+@@ -1839,166 +1822,6 @@ static int ata_eh_revalidate_and_attach(
+ 	return rc;
+ }
+ 
+-#ifdef CONFIG_PM
+-/**
+- *	ata_eh_suspend - handle suspend EH action
+- *	@ap: target host port
+- *	@r_failed_dev: result parameter to indicate failing device
+- *
+- *	Handle suspend EH action.  Disk devices are spinned down and
+- *	other types of devices are just marked suspended.  Once
+- *	suspended, no EH action to the device is allowed until it is
+- *	resumed.
+- *
+- *	LOCKING:
+- *	Kernel thread context (may sleep).
+- *
+- *	RETURNS:
+- *	0 on success, -errno otherwise
+- */
+-static int ata_eh_suspend(struct ata_port *ap, struct ata_device **r_failed_dev)
+-{
+-	struct ata_device *dev;
+-	int i, rc = 0;
+-
+-	DPRINTK("ENTER\n");
+-
+-	for (i = 0; i < ATA_MAX_DEVICES; i++) {
+-		unsigned long flags;
+-		unsigned int action, err_mask;
+-
+-		dev = &ap->device[i];
+-		action = ata_eh_dev_action(dev);
+-
+-		if (!ata_dev_enabled(dev) || !(action & ATA_EH_SUSPEND))
+-			continue;
+-
+-		WARN_ON(dev->flags & ATA_DFLAG_SUSPENDED);
+-
+-		ata_eh_about_to_do(ap, dev, ATA_EH_SUSPEND);
+-
+-		if (dev->class == ATA_DEV_ATA && !(action & ATA_EH_PM_FREEZE)) {
+-			/* flush cache */
+-			rc = ata_flush_cache(dev);
+-			if (rc)
+-				break;
+-
+-			/* spin down */
+-			err_mask = ata_do_simple_cmd(dev, ATA_CMD_STANDBYNOW1);
+-			if (err_mask) {
+-				ata_dev_printk(dev, KERN_ERR, "failed to "
+-					       "spin down (err_mask=0x%x)\n",
+-					       err_mask);
+-				rc = -EIO;
+-				break;
+-			}
+-		}
+-
+-		spin_lock_irqsave(ap->lock, flags);
+-		dev->flags |= ATA_DFLAG_SUSPENDED;
+-		spin_unlock_irqrestore(ap->lock, flags);
+-
+-		ata_eh_done(ap, dev, ATA_EH_SUSPEND);
+-	}
+-
+-	if (rc)
+-		*r_failed_dev = dev;
+-
+-	DPRINTK("EXIT\n");
+-	return rc;
+-}
+-
+-/**
+- *	ata_eh_prep_resume - prep for resume EH action
+- *	@ap: target host port
+- *
+- *	Clear SUSPENDED in preparation for scheduled resume actions.
+- *	This allows other parts of EH to access the devices being
+- *	resumed.
+- *
+- *	LOCKING:
+- *	Kernel thread context (may sleep).
+- */
+-static void ata_eh_prep_resume(struct ata_port *ap)
+-{
+-	struct ata_device *dev;
+-	unsigned long flags;
+-	int i;
+-
+-	DPRINTK("ENTER\n");
+-
+-	for (i = 0; i < ATA_MAX_DEVICES; i++) {
+-		unsigned int action;
+-
+-		dev = &ap->device[i];
+-		action = ata_eh_dev_action(dev);
+-
+-		if (!ata_dev_enabled(dev) || !(action & ATA_EH_RESUME))
+-			continue;
+-
+-		spin_lock_irqsave(ap->lock, flags);
+-		dev->flags &= ~ATA_DFLAG_SUSPENDED;
+-		spin_unlock_irqrestore(ap->lock, flags);
+-	}
+-
+-	DPRINTK("EXIT\n");
+-}
+-
+-/**
+- *	ata_eh_resume - handle resume EH action
+- *	@ap: target host port
+- *	@r_failed_dev: result parameter to indicate failing device
+- *
+- *	Handle resume EH action.  Target devices are already reset and
+- *	revalidated.  Spinning up is the only operation left.
+- *
+- *	LOCKING:
+- *	Kernel thread context (may sleep).
+- *
+- *	RETURNS:
+- *	0 on success, -errno otherwise
+- */
+-static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev)
+-{
+-	struct ata_device *dev;
+-	int i, rc = 0;
+-
+-	DPRINTK("ENTER\n");
+-
+-	for (i = 0; i < ATA_MAX_DEVICES; i++) {
+-		unsigned int action, err_mask;
+-
+-		dev = &ap->device[i];
+-		action = ata_eh_dev_action(dev);
+-
+-		if (!ata_dev_enabled(dev) || !(action & ATA_EH_RESUME))
+-			continue;
+-
+-		ata_eh_about_to_do(ap, dev, ATA_EH_RESUME);
+-
+-		if (dev->class == ATA_DEV_ATA && !(action & ATA_EH_PM_FREEZE)) {
+-			err_mask = ata_do_simple_cmd(dev,
+-						     ATA_CMD_IDLEIMMEDIATE);
+-			if (err_mask) {
+-				ata_dev_printk(dev, KERN_ERR, "failed to "
+-					       "spin up (err_mask=0x%x)\n",
+-					       err_mask);
+-				rc = -EIO;
+-				break;
+-			}
+-		}
+-
+-		ata_eh_done(ap, dev, ATA_EH_RESUME);
+-	}
+-
+-	if (rc)
+-		*r_failed_dev = dev;
+-
+-	DPRINTK("EXIT\n");
+-	return 0;
+-}
+-#endif /* CONFIG_PM */
+-
+ static int ata_port_nr_enabled(struct ata_port *ap)
+ {
+ 	int i, cnt = 0;
+@@ -2024,17 +1847,6 @@ static int ata_eh_skip_recovery(struct a
+ 	struct ata_eh_context *ehc = &ap->eh_context;
+ 	int i;
+ 
+-	/* skip if all possible devices are suspended */
+-	for (i = 0; i < ata_port_max_devices(ap); i++) {
+-		struct ata_device *dev = &ap->device[i];
+-
+-		if (!(dev->flags & ATA_DFLAG_SUSPENDED))
+-			break;
+-	}
+-
+-	if (i == ata_port_max_devices(ap))
+-		return 1;
+-
+ 	/* thaw frozen port, resume link and recover failed devices */
+ 	if ((ap->pflags & ATA_PFLAG_FROZEN) ||
+ 	    (ehc->i.flags & ATA_EHI_RESUME_LINK) || ata_port_nr_enabled(ap))
+@@ -2114,9 +1926,6 @@ static int ata_eh_recover(struct ata_por
+ 	if (ap->pflags & ATA_PFLAG_UNLOADING)
+ 		goto out;
+ 
+-	/* prep for resume */
+-	ata_eh_prep_resume(ap);
+-
+ 	/* skip EH if possible. */
+ 	if (ata_eh_skip_recovery(ap))
+ 		ehc->i.action = 0;
+@@ -2144,11 +1953,6 @@ static int ata_eh_recover(struct ata_por
+ 	if (rc)
+ 		goto dev_fail;
+ 
+-	/* resume devices */
+-	rc = ata_eh_resume(ap, &dev);
+-	if (rc)
+-		goto dev_fail;
+-
+ 	/* configure transfer mode if necessary */
+ 	if (ehc->i.flags & ATA_EHI_SETMODE) {
+ 		rc = ata_set_mode(ap, &dev);
+@@ -2157,11 +1961,6 @@ static int ata_eh_recover(struct ata_por
+ 		ehc->i.flags &= ~ATA_EHI_SETMODE;
+ 	}
+ 
+-	/* suspend devices */
+-	rc = ata_eh_suspend(ap, &dev);
+-	if (rc)
+-		goto dev_fail;
+-
+ 	goto out;
+ 
+  dev_fail:
+@@ -2357,22 +2156,13 @@ static void ata_eh_handle_port_suspend(s
+  *
+  *	Resume @ap.
+  *
+- *	This function also waits upto one second until all devices
+- *	hanging off this port requests resume EH action.  This is to
+- *	prevent invoking EH and thus reset multiple times on resume.
+- *
+- *	On DPM resume, where some of devices might not be resumed
+- *	together, this may delay port resume upto one second, but such
+- *	DPM resumes are rare and 1 sec delay isn't too bad.
+- *
+  *	LOCKING:
+  *	Kernel thread context (may sleep).
+  */
+ static void ata_eh_handle_port_resume(struct ata_port *ap)
+ {
+-	unsigned long timeout;
+ 	unsigned long flags;
+-	int i, rc = 0;
++	int rc = 0;
+ 
+ 	/* are we resuming? */
+ 	spin_lock_irqsave(ap->lock, flags);
+@@ -2383,31 +2173,12 @@ static void ata_eh_handle_port_resume(st
+ 	}
+ 	spin_unlock_irqrestore(ap->lock, flags);
+ 
+-	/* spurious? */
+-	if (!(ap->pflags & ATA_PFLAG_SUSPENDED))
+-		goto done;
++	WARN_ON(!(ap->pflags & ATA_PFLAG_SUSPENDED));
+ 
+ 	if (ap->ops->port_resume)
+ 		rc = ap->ops->port_resume(ap);
+ 
+-	/* give devices time to request EH */
+-	timeout = jiffies + HZ; /* 1s max */
+-	while (1) {
+-		for (i = 0; i < ATA_MAX_DEVICES; i++) {
+-			struct ata_device *dev = &ap->device[i];
+-			unsigned int action = ata_eh_dev_action(dev);
+-
+-			if ((dev->flags & ATA_DFLAG_SUSPENDED) &&
+-			    !(action & ATA_EH_RESUME))
+-				break;
+-		}
+-
+-		if (i == ATA_MAX_DEVICES || time_after(jiffies, timeout))
+-			break;
+-		msleep(10);
+-	}
+-
+- done:
++	/* report result */
+ 	spin_lock_irqsave(ap->lock, flags);
+ 	ap->pflags &= ~(ATA_PFLAG_PM_PENDING | ATA_PFLAG_SUSPENDED);
+ 	if (ap->pm_result) {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-scsi.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
+@@ -510,133 +510,6 @@ static void ata_dump_status(unsigned id,
+ 	}
+ }
+ 
+-#ifdef CONFIG_PM
+-/**
+- *	ata_scsi_device_suspend - suspend ATA device associated with sdev
+- *	@sdev: the SCSI device to suspend
+- *	@mesg: target power management message
+- *
+- *	Request suspend EH action on the ATA device associated with
+- *	@sdev and wait for the operation to complete.
+- *
+- *	LOCKING:
+- *	Kernel thread context (may sleep).
+- *
+- *	RETURNS:
+- *	0 on success, -errno otherwise.
+- */
+-int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t mesg)
+-{
+-	struct ata_port *ap = ata_shost_to_port(sdev->host);
+-	struct ata_device *dev = ata_scsi_find_dev(ap, sdev);
+-	unsigned long flags;
+-	unsigned int action;
+-	int rc = 0;
+-
+-	if (!dev)
+-		goto out;
+-
+-	spin_lock_irqsave(ap->lock, flags);
+-
+-	/* wait for the previous resume to complete */
+-	while (dev->flags & ATA_DFLAG_SUSPENDED) {
+-		spin_unlock_irqrestore(ap->lock, flags);
+-		ata_port_wait_eh(ap);
+-		spin_lock_irqsave(ap->lock, flags);
+-	}
+-
+-	/* if @sdev is already detached, nothing to do */
+-	if (sdev->sdev_state == SDEV_OFFLINE ||
+-	    sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL)
+-		goto out_unlock;
+-
+-	/* request suspend */
+-	action = ATA_EH_SUSPEND;
+-	if (mesg.event != PM_EVENT_SUSPEND)
+-		action |= ATA_EH_PM_FREEZE;
+-	ap->eh_info.dev_action[dev->devno] |= action;
+-	ap->eh_info.flags |= ATA_EHI_QUIET;
+-	ata_port_schedule_eh(ap);
+-
+-	spin_unlock_irqrestore(ap->lock, flags);
+-
+-	/* wait for EH to do the job */
+-	ata_port_wait_eh(ap);
+-
+-	spin_lock_irqsave(ap->lock, flags);
+-
+-	/* If @sdev is still attached but the associated ATA device
+-	 * isn't suspended, the operation failed.
+-	 */
+-	if (sdev->sdev_state != SDEV_OFFLINE &&
+-	    sdev->sdev_state != SDEV_CANCEL && sdev->sdev_state != SDEV_DEL &&
+-	    !(dev->flags & ATA_DFLAG_SUSPENDED))
+-		rc = -EIO;
+-
+- out_unlock:
+-	spin_unlock_irqrestore(ap->lock, flags);
+- out:
+-	if (rc == 0)
+-		sdev->sdev_gendev.power.power_state = mesg;
+-	return rc;
+-}
+-
+-/**
+- *	ata_scsi_device_resume - resume ATA device associated with sdev
+- *	@sdev: the SCSI device to resume
+- *
+- *	Request resume EH action on the ATA device associated with
+- *	@sdev and return immediately.  This enables parallel
+- *	wakeup/spinup of devices.
+- *
+- *	LOCKING:
+- *	Kernel thread context (may sleep).
+- *
+- *	RETURNS:
+- *	0.
+- */
+-int ata_scsi_device_resume(struct scsi_device *sdev)
+-{
+-	struct ata_port *ap = ata_shost_to_port(sdev->host);
+-	struct ata_device *dev = ata_scsi_find_dev(ap, sdev);
+-	struct ata_eh_info *ehi = &ap->eh_info;
+-	unsigned long flags;
+-	unsigned int action;
+-
+-	if (!dev)
+-		goto out;
+-
+-	spin_lock_irqsave(ap->lock, flags);
+-
+-	/* if @sdev is already detached, nothing to do */
+-	if (sdev->sdev_state == SDEV_OFFLINE ||
+-	    sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL)
+-		goto out_unlock;
+-
+-	/* request resume */
+-	action = ATA_EH_RESUME;
+-	if (sdev->sdev_gendev.power.power_state.event == PM_EVENT_SUSPEND)
+-		__ata_ehi_hotplugged(ehi);
+-	else
+-		action |= ATA_EH_PM_FREEZE | ATA_EH_SOFTRESET;
+-	ehi->dev_action[dev->devno] |= action;
+-
+-	/* We don't want autopsy and verbose EH messages.  Disable
+-	 * those if we're the only device on this link.
+-	 */
+-	if (ata_port_max_devices(ap) == 1)
+-		ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
+-
+-	ata_port_schedule_eh(ap);
+-
+- out_unlock:
+-	spin_unlock_irqrestore(ap->lock, flags);
+- out:
+-	sdev->sdev_gendev.power.power_state = PMSG_ON;
+-	return 0;
+-}
+-#endif /* CONFIG_PM */
+-
+ /**
+  *	ata_to_sense_error - convert ATA error to SCSI error
+  *	@id: ATA device number
+@@ -929,6 +802,8 @@ int ata_scsi_slave_config(struct scsi_de
+ 
+ 	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
+ 
++	sdev->manage_start_stop = 1;
++
+ 	if (dev)
+ 		ata_scsi_dev_config(sdev, dev);
+ 
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_ali.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_ali.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_ali.c
+@@ -345,10 +345,6 @@ static struct scsi_host_template ali_sht
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ /*
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_amd.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_amd.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_amd.c
+@@ -334,10 +334,6 @@ static struct scsi_host_template amd_sht
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations amd33_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_atiixp.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_atiixp.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_atiixp.c
+@@ -224,10 +224,6 @@ static struct scsi_host_template atiixp_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations atiixp_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_cmd64x.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_cmd64x.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_cmd64x.c
+@@ -285,10 +285,6 @@ static struct scsi_host_template cmd64x_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations cmd64x_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_cs5520.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_cs5520.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_cs5520.c
+@@ -167,10 +167,6 @@ static struct scsi_host_template cs5520_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations cs5520_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_cs5530.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_cs5530.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_cs5530.c
+@@ -188,10 +188,6 @@ static struct scsi_host_template cs5530_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations cs5530_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_cs5535.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_cs5535.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_cs5535.c
+@@ -185,10 +185,6 @@ static struct scsi_host_template cs5535_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations cs5535_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_cypress.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_cypress.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_cypress.c
+@@ -136,10 +136,6 @@ static struct scsi_host_template cy82c69
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations cy82c693_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_efar.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_efar.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_efar.c
+@@ -234,10 +234,6 @@ static struct scsi_host_template efar_sh
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations efar_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_hpt366.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_hpt366.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_hpt366.c
+@@ -328,10 +328,6 @@ static struct scsi_host_template hpt36x_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ /*
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_hpt3x3.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_hpt3x3.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_hpt3x3.c
+@@ -119,10 +119,6 @@ static struct scsi_host_template hpt3x3_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations hpt3x3_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_it8213.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_it8213.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_it8213.c
+@@ -246,10 +246,6 @@ static struct scsi_host_template it8213_
+ 	.dma_boundary		= ATA_DMA_BOUNDARY,
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations it8213_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_it821x.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_it821x.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_it821x.c
+@@ -646,10 +646,6 @@ static struct scsi_host_template it821x_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations it821x_smart_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_ixp4xx_cf.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_ixp4xx_cf.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_ixp4xx_cf.c
+@@ -31,7 +31,7 @@ static int ixp4xx_set_mode(struct ata_po
+ 
+ 	for (i = 0; i < ATA_MAX_DEVICES; i++) {
+ 		struct ata_device *dev = &ap->device[i];
+-		if (ata_dev_ready(dev)) {
++		if (ata_dev_enabled(dev)) {
+ 			ata_dev_printk(dev, KERN_INFO, "configured for PIO0\n");
+ 			dev->pio_mode = XFER_PIO_0;
+ 			dev->xfer_mode = XFER_PIO_0;
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_jmicron.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_jmicron.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_jmicron.c
+@@ -137,10 +137,6 @@ static struct scsi_host_template jmicron
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	/* Use standard CHS mapping rules */
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const struct ata_port_operations jmicron_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_marvell.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_marvell.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_marvell.c
+@@ -103,10 +103,6 @@ static struct scsi_host_template marvell
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	/* Use standard CHS mapping rules */
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations marvell_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_mpc52xx.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_mpc52xx.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_mpc52xx.c
+@@ -280,10 +280,6 @@ static struct scsi_host_template mpc52xx
+ 	.dma_boundary		= ATA_DMA_BOUNDARY,
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static struct ata_port_operations mpc52xx_ata_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_mpiix.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_mpiix.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_mpiix.c
+@@ -165,10 +165,6 @@ static struct scsi_host_template mpiix_s
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations mpiix_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_netcell.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_netcell.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_netcell.c
+@@ -63,10 +63,6 @@ static struct scsi_host_template netcell
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	/* Use standard CHS mapping rules */
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations netcell_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_ns87410.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_ns87410.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_ns87410.c
+@@ -157,10 +157,6 @@ static struct scsi_host_template ns87410
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations ns87410_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_oldpiix.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_oldpiix.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_oldpiix.c
+@@ -233,10 +233,6 @@ static struct scsi_host_template oldpiix
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations oldpiix_pata_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_opti.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_opti.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_opti.c
+@@ -179,10 +179,6 @@ static struct scsi_host_template opti_sh
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations opti_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_optidma.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_optidma.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_optidma.c
+@@ -360,10 +360,6 @@ static struct scsi_host_template optidma
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations optidma_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_pdc202xx_old.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_pdc202xx_old.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_pdc202xx_old.c
+@@ -273,10 +273,6 @@ static struct scsi_host_template pdc202x
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations pdc2024x_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_radisys.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_radisys.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_radisys.c
+@@ -228,10 +228,6 @@ static struct scsi_host_template radisys
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations radisys_pata_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_rz1000.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_rz1000.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_rz1000.c
+@@ -65,7 +65,7 @@ static int rz1000_set_mode(struct ata_po
+ 
+ 	for (i = 0; i < ATA_MAX_DEVICES; i++) {
+ 		struct ata_device *dev = &ap->device[i];
+-		if (ata_dev_ready(dev)) {
++		if (ata_dev_enabled(dev)) {
+ 			/* We don't really care */
+ 			dev->pio_mode = XFER_PIO_0;
+ 			dev->xfer_mode = XFER_PIO_0;
+@@ -94,10 +94,6 @@ static struct scsi_host_template rz1000_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations rz1000_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_sc1200.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_sc1200.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_sc1200.c
+@@ -194,10 +194,6 @@ static struct scsi_host_template sc1200_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations sc1200_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_scc.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_scc.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_scc.c
+@@ -984,10 +984,6 @@ static struct scsi_host_template scc_sht
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations scc_pata_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_serverworks.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_serverworks.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_serverworks.c
+@@ -319,10 +319,6 @@ static struct scsi_host_template serverw
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations serverworks_osb4_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_sil680.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_sil680.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_sil680.c
+@@ -236,10 +236,6 @@ static struct scsi_host_template sil680_
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static struct ata_port_operations sil680_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_sis.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_sis.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_sis.c
+@@ -575,10 +575,6 @@ static struct scsi_host_template sis_sht
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static const struct ata_port_operations sis_133_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_triflex.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_triflex.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_triflex.c
+@@ -193,10 +193,6 @@ static struct scsi_host_template triflex
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations triflex_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/pata_via.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/pata_via.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/pata_via.c
+@@ -305,10 +305,6 @@ static struct scsi_host_template via_sht
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.resume			= ata_scsi_device_resume,
+-	.suspend		= ata_scsi_device_suspend,
+-#endif
+ };
+ 
+ static struct ata_port_operations via_port_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/sata_inic162x.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/sata_inic162x.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/sata_inic162x.c
+@@ -135,10 +135,6 @@ static struct scsi_host_template inic_sh
+ 	.slave_configure	= inic_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const int scr_map[] = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/sata_nv.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/sata_nv.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/sata_nv.c
+@@ -322,10 +322,6 @@ static struct scsi_host_template nv_sht 
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static struct scsi_host_template nv_adma_sht = {
+@@ -344,10 +340,6 @@ static struct scsi_host_template nv_adma
+ 	.slave_configure	= nv_adma_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const struct ata_port_operations nv_generic_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/sata_sil.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/sata_sil.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/sata_sil.c
+@@ -183,10 +183,6 @@ static struct scsi_host_template sil_sht
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const struct ata_port_operations sil_ops = {
+Index: linux-2.6.21-gentoo-r1/drivers/ata/sata_sil24.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/sata_sil24.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/sata_sil24.c
+@@ -381,10 +381,6 @@ static struct scsi_host_template sil24_s
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const struct ata_port_operations sil24_ops = {
+Index: linux-2.6.21-gentoo-r1/include/linux/libata.h
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/include/linux/libata.h
++++ linux-2.6.21-gentoo-r1/include/linux/libata.h
+@@ -140,7 +140,6 @@ enum {
+ 
+ 	ATA_DFLAG_PIO		= (1 << 8), /* device limited to PIO mode */
+ 	ATA_DFLAG_NCQ_OFF	= (1 << 9), /* device limited to non-NCQ mode */
+-	ATA_DFLAG_SUSPENDED	= (1 << 10), /* device suspended */
+ 	ATA_DFLAG_INIT_MASK	= (1 << 16) - 1,
+ 
+ 	ATA_DFLAG_DETACH	= (1 << 16),
+@@ -267,13 +266,9 @@ enum {
+ 	ATA_EH_REVALIDATE	= (1 << 0),
+ 	ATA_EH_SOFTRESET	= (1 << 1),
+ 	ATA_EH_HARDRESET	= (1 << 2),
+-	ATA_EH_SUSPEND		= (1 << 3),
+-	ATA_EH_RESUME		= (1 << 4),
+-	ATA_EH_PM_FREEZE	= (1 << 5),
+ 
+ 	ATA_EH_RESET_MASK	= ATA_EH_SOFTRESET | ATA_EH_HARDRESET,
+-	ATA_EH_PERDEV_MASK	= ATA_EH_REVALIDATE | ATA_EH_SUSPEND |
+-				  ATA_EH_RESUME | ATA_EH_PM_FREEZE,
++	ATA_EH_PERDEV_MASK	= ATA_EH_REVALIDATE,
+ 
+ 	/* ata_eh_info->flags */
+ 	ATA_EHI_HOTPLUGGED	= (1 << 0),  /* could have been hotplugged */
+@@ -752,8 +747,6 @@ extern int sata_scr_write_flush(struct a
+ extern int ata_port_online(struct ata_port *ap);
+ extern int ata_port_offline(struct ata_port *ap);
+ #ifdef CONFIG_PM
+-extern int ata_scsi_device_resume(struct scsi_device *);
+-extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg);
+ extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
+ extern void ata_host_resume(struct ata_host *host);
+ #endif
+@@ -1019,11 +1012,6 @@ static inline unsigned int ata_dev_absen
+ 	return ata_class_absent(dev->class);
+ }
+ 
+-static inline unsigned int ata_dev_ready(const struct ata_device *dev)
+-{
+-	return ata_dev_enabled(dev) && !(dev->flags & ATA_DFLAG_SUSPENDED);
+-}
+-
+ /*
+  * port helpers
+  */

linux-2.6-2113_libata-spindown-compat.patch:

Index: linux-2.6-2113_libata-spindown-compat.patch
===================================================================
RCS file: linux-2.6-2113_libata-spindown-compat.patch
diff -N linux-2.6-2113_libata-spindown-compat.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2113_libata-spindown-compat.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,126 @@
+From 920a4b1038e442700a1cfac77ea7e20bd615a2c3 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun gmail com>
+Date: Fri, 4 May 2007 21:28:48 +0200
+Subject: [PATCH] libata: implement libata.spindown_compat
+
+Now that libata uses sd->manage_start_stop, libata spins down disk on
+shutdown.  In an attempt to compensate libata's previous shortcoming,
+some distros sync and spin down disks attached via libata in their
+shutdown(8).  Some disks spin back up just to spin down again on
+STANDBYNOW1 if the command is issued when the disk is spun down, so
+this double spinning down causes problem.
+
+This patch implements module parameter libata.spindown_compat which,
+when set to one (default value), prevents libata from spinning down
+disks on shutdown thus avoiding double spinning down.  Note that
+libata spins down disks for suspend to mem and disk, so with
+libata.spindown_compat set to one, disks should be properly spun down
+in all cases without modifying shutdown(8).
+
+shutdown(8) should be fixed eventually.  Some drive do spin up on
+SYNCHRONZE_CACHE even when their cache is clean.  Those disks
+currently spin up briefly when sd tries to shutdown the device and
+then the machine powers off immediately, which can't be good for the
+head.  We can't skip SYNCHRONIZE_CACHE during shudown as it can be
+dangerous data integrity-wise.
+
+So, this spindown_compat parameter is already scheduled for removal by
+the end of the next year and here's what shutdown(8) should do.
+
+  * Check whether /sys/modules/libata/parameters/spindown_compat
+    exists.  If it does, write 0 to it.
+
+  * For each libata harddisk {
+	* Check whether /sys/class/scsi_disk/h:c:i:l/manage_start_stop
+	  exists.  Iff it doesn't, synchronize cache and spin the disk
+	  down as before.
+  }
+
+The above procedure will make shutdown(8) work properly with kernels
+before this change, ones with this workaround and later ones without
+it.
+
+To accelerate shutdown(8) updates, if the compat mode is in use, this
+patch prints BIG FAT warning for five seconds during shutdown (the
+optimal interval to annoy the user just the right amount discovered by
+hours of tireless usability testing).
+
+Signed-off-by: Tejun Heo <htejun gmail com>
+Signed-off-by: Jeff Garzik <jeff garzik org>
+---
+ Documentation/feature-removal-schedule.txt |   19 +++++++++++++++++++
+ drivers/ata/libata-core.c                  |    6 ++++++
+ drivers/ata/libata-scsi.c                  |   28 +++++++++++++++++++++++++++-
+ drivers/ata/libata.h                       |    1 +
+ 4 files changed, 53 insertions(+), 1 deletions(-)
+
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-core.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
+@@ -97,6 +97,12 @@ int libata_noacpi = 1;
+ module_param_named(noacpi, libata_noacpi, int, 0444);
+ MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
+ 
++int ata_spindown_compat = 1;
++module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
++MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
++		 "behavior.  Will be removed.  More info can be found in "
++		 "Documentation/feature-removal-schedule.txt\n");
++
+ MODULE_AUTHOR("Jeff Garzik");
+ MODULE_DESCRIPTION("Library module for ATA devices");
+ MODULE_LICENSE("GPL");
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-scsi.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
+@@ -944,9 +944,35 @@ static unsigned int ata_scsi_start_stop_
+ 		}
+ 
+ 		tf->command = ATA_CMD_VERIFY;	/* READ VERIFY */
+-	} else
++	} else {
++		/* XXX: This is for backward compatibility, will be
++		 * removed.  Read Documentation/feature-removal-schedule.txt
++		 * for more info.
++		 */
++		if (ata_spindown_compat &&
++		    (system_state == SYSTEM_HALT ||
++		     system_state == SYSTEM_POWER_OFF)) {
++			static int warned = 0;
++
++			if (!warned) {
++				spin_unlock_irq(qc->ap->lock);
++				ata_dev_printk(qc->dev, KERN_WARNING,
++					"DISK MIGHT NOT BE SPUN DOWN PROPERLY. "
++					"UPDATE SHUTDOWN UTILITY\n");
++				ata_dev_printk(qc->dev, KERN_WARNING,
++					"For more info, visit "
++					"http://linux-ata.org/shutdown.html\n";);
++				warned = 1;
++				ssleep(5);
++				spin_lock_irq(qc->ap->lock);
++			}
++			scmd->result = SAM_STAT_GOOD;
++			return 1;
++		}
++
+ 		/* Issue ATA STANDBY IMMEDIATE command */
+ 		tf->command = ATA_CMD_STANDBYNOW1;
++	}
+ 
+ 	/*
+ 	 * Standby and Idle condition timers could be implemented but that
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata.h
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata.h
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata.h
+@@ -57,6 +57,7 @@ extern int atapi_enabled;
+ extern int atapi_dmadir;
+ extern int libata_fua;
+ extern int libata_noacpi;
++extern int ata_spindown_compat;
+ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
+ extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
+ 			   u64 block, u32 n_block, unsigned int tf_flags,

linux-2.6-2114_libata-shutdown-warning.patch:

Index: linux-2.6-2114_libata-shutdown-warning.patch
===================================================================
RCS file: linux-2.6-2114_libata-shutdown-warning.patch
diff -N linux-2.6-2114_libata-shutdown-warning.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2114_libata-shutdown-warning.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,98 @@
+From da071b42f73dabbd0daf7ea4c3ff157d53b00648 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun gmail com>
+Date: Mon, 14 May 2007 17:26:18 +0200
+Subject: [PATCH] libata: fix shutdown warning message printing
+
+Unlocking ap->lock and ssleeping don't work because SCSI commands can
+be issued from completion path without context.  Reimplement delayed
+completion by allowing translation functions to override
+qc->scsidone(), storing the original completion function to
+scmd->scsi_done() and overriding qc->scsidone() with a function which
+schedules delayed invocation of scmd->scsi_done().
+
+This isn't pretty at all but all the ugly parts are thankfully
+contained in the stop translation path where the compat feature is
+implemented.
+
+Signed-off-by: Tejun Heo <htejun gmail com>
+Signed-off-by: Jeff Garzik <jeff garzik org>
+---
+ drivers/ata/libata-scsi.c |   35 +++++++++++++++++++++++++++--------
+ 1 files changed, 27 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
+index dd81fa7..07b5a3d 100644
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -893,6 +893,23 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
+ 	return queue_depth;
+ }
+ 
++/* XXX: for ata_spindown_compat */
++static void ata_delayed_done_timerfn(unsigned long arg)
++{
++	struct scsi_cmnd *scmd = (void *)arg;
++
++	scmd->scsi_done(scmd);
++}
++
++/* XXX: for ata_spindown_compat */
++static void ata_delayed_done(struct scsi_cmnd *scmd)
++{
++	static struct timer_list timer;
++
++	setup_timer(&timer, ata_delayed_done_timerfn, (unsigned long)scmd);
++	mod_timer(&timer, jiffies + 5 * HZ);
++}
++
+ /**
+  *	ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
+  *	@qc: Storage for translated ATA taskfile
+@@ -952,19 +969,21 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
+ 		if (ata_spindown_compat &&
+ 		    (system_state == SYSTEM_HALT ||
+ 		     system_state == SYSTEM_POWER_OFF)) {
+-			static int warned = 0;
++			static unsigned long warned = 0;
+ 
+-			if (!warned) {
+-				spin_unlock_irq(qc->ap->lock);
++			if (!test_and_set_bit(0, &warned)) {
+ 				ata_dev_printk(qc->dev, KERN_WARNING,
+ 					"DISK MIGHT NOT BE SPUN DOWN PROPERLY. "
+ 					"UPDATE SHUTDOWN UTILITY\n");
+ 				ata_dev_printk(qc->dev, KERN_WARNING,
+ 					"For more info, visit "
+ 					"http://linux-ata.org/shutdown.html\n";);
+-				warned = 1;
+-				ssleep(5);
+-				spin_lock_irq(qc->ap->lock);
++
++				/* ->scsi_done is not used, use it for
++				 * delayed completion.
++				 */
++				scmd->scsi_done = qc->scsidone;
++				qc->scsidone = ata_delayed_done;
+ 			}
+ 			scmd->result = SAM_STAT_GOOD;
+ 			return 1;
+@@ -1488,14 +1507,14 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd,
+ 
+ early_finish:
+         ata_qc_free(qc);
+-	done(cmd);
++	qc->scsidone(cmd);
+ 	DPRINTK("EXIT - early finish (good or error)\n");
+ 	return 0;
+ 
+ err_did:
+ 	ata_qc_free(qc);
+ 	cmd->result = (DID_ERROR << 16);
+-	done(cmd);
++	qc->scsidone(cmd);
+ err_mem:
+ 	DPRINTK("EXIT - internal\n");
+ 	return 0;
+-- 
+1.5.1.4
+

linux-2.6-2115_libata-spindown-status.patch:

Index: linux-2.6-2115_libata-spindown-status.patch
===================================================================
RCS file: linux-2.6-2115_libata-spindown-status.patch
diff -N linux-2.6-2115_libata-spindown-status.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2115_libata-spindown-status.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,60 @@
+From 13b8d09f5de0aaa3153bbccc98baf247387823dc Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun gmail com>
+Date: Tue, 15 May 2007 12:29:22 +0200
+Subject: [PATCH] libata: track spindown status and skip spindown_compat if possible
+
+Our assumption that most distros issue STANDBYNOW seems wrong.  The
+upstream sysvinit and thus many distros including gentoo and opensuse
+don't take any action for libata disks on spindown.  We can skip
+compat handling for these distros so that they don't need to update
+anything to take advantage of kernel-side shutdown.
+
+Signed-off-by: Tejun Heo <htejun gmail com>
+Signed-off-by: Jeff Garzik <jeff garzik org>
+---
+ drivers/ata/libata-scsi.c |    9 +++++++++
+ include/linux/libata.h    |    1 +
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
+index 07b5a3d..b6a1de8 100644
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -967,6 +967,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
+ 		 * for more info.
+ 		 */
+ 		if (ata_spindown_compat &&
++		    (qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
+ 		    (system_state == SYSTEM_HALT ||
+ 		     system_state == SYSTEM_POWER_OFF)) {
+ 			static unsigned long warned = 0;
+@@ -1394,6 +1395,14 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
+ 		}
+ 	}
+ 
++	/* XXX: track spindown state for spindown_compat */
++	if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
++		     qc->tf.command == ATA_CMD_STANDBYNOW1))
++		qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
++	else if (likely(system_state != SYSTEM_HALT &&
++			system_state != SYSTEM_POWER_OFF))
++		qc->dev->flags &= ~ATA_DFLAG_SPUNDOWN;
++
+ 	if (need_sense && !ap->ops->error_handler)
+ 		ata_dump_status(ap->print_id, &qc->result_tf);
+ 
+diff --git a/include/linux/libata.h b/include/linux/libata.h
+index 9b2122d..666592e 100644
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
+@@ -140,6 +140,7 @@ enum {
+ 
+ 	ATA_DFLAG_PIO		= (1 << 8), /* device limited to PIO mode */
+ 	ATA_DFLAG_NCQ_OFF	= (1 << 9), /* device limited to non-NCQ mode */
++	ATA_DFLAG_SPUNDOWN	= (1 << 10), /* XXX: for spindown_compat */
+ 	ATA_DFLAG_INIT_MASK	= (1 << 16) - 1,
+ 
+ 	ATA_DFLAG_DETACH	= (1 << 16),
+-- 
+1.5.1.4
+

linux-2.6-2116_libata-remove-spindown-compat.patch:

Index: linux-2.6-2116_libata-remove-spindown-compat.patch
===================================================================
RCS file: linux-2.6-2116_libata-remove-spindown-compat.patch
diff -N linux-2.6-2116_libata-remove-spindown-compat.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2116_libata-remove-spindown-compat.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,90 @@
+From d9aca22cf443f5ed77d15a320abbab055ae4a976 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <htejun gmail com>
+Date: Thu, 17 May 2007 16:43:26 +0200
+Subject: [PATCH] libata: remove libata.spindown_compat
+
+With STANDBYDOWN tracking added, libata.spindown_compat isn't
+necessary anymore.  If userspace shutdown(8) issues STANDBYNOW, libata
+warns.  If userspace shutdown(8) doesn't issue STANDBYNOW, libata does
+the right thing.  Userspace can tell whether kernel supports spindown
+by testing whether sysfs node manage_start_stop exists as before.
+
+Signed-off-by: Tejun Heo <htejun gmail com>
+Signed-off-by: Jeff Garzik <jeff garzik org>
+---
+ Documentation/feature-removal-schedule.txt |   25 ++++++++++++-------------
+ drivers/ata/libata-core.c                  |    6 ------
+ drivers/ata/libata-scsi.c                  |    9 ++++-----
+ drivers/ata/libata.h                       |    1 -
+ 4 files changed, 16 insertions(+), 25 deletions(-)
+
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-core.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-core.c
+@@ -97,12 +97,6 @@ int libata_noacpi = 1;
+ module_param_named(noacpi, libata_noacpi, int, 0444);
+ MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
+ 
+-int ata_spindown_compat = 1;
+-module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
+-MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
+-		 "behavior.  Will be removed.  More info can be found in "
+-		 "Documentation/feature-removal-schedule.txt\n");
+-
+ MODULE_AUTHOR("Jeff Garzik");
+ MODULE_DESCRIPTION("Library module for ATA devices");
+ MODULE_LICENSE("GPL");
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata-scsi.c
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata-scsi.c
+@@ -893,7 +893,7 @@ int ata_scsi_change_queue_depth(struct s
+ 	return queue_depth;
+ }
+ 
+-/* XXX: for ata_spindown_compat */
++/* XXX: for spindown warning */
+ static void ata_delayed_done_timerfn(unsigned long arg)
+ {
+ 	struct scsi_cmnd *scmd = (void *)arg;
+@@ -901,7 +901,7 @@ static void ata_delayed_done_timerfn(uns
+ 	scmd->scsi_done(scmd);
+ }
+ 
+-/* XXX: for ata_spindown_compat */
++/* XXX: for spindown warning */
+ static void ata_delayed_done(struct scsi_cmnd *scmd)
+ {
+ 	static struct timer_list timer;
+@@ -966,8 +966,7 @@ static unsigned int ata_scsi_start_stop_
+ 		 * removed.  Read Documentation/feature-removal-schedule.txt
+ 		 * for more info.
+ 		 */
+-		if (ata_spindown_compat &&
+-		    (qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
++		if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
+ 		    (system_state == SYSTEM_HALT ||
+ 		     system_state == SYSTEM_POWER_OFF)) {
+ 			static unsigned long warned = 0;
+@@ -1395,7 +1394,7 @@ static void ata_scsi_qc_complete(struct 
+ 		}
+ 	}
+ 
+-	/* XXX: track spindown state for spindown_compat */
++	/* XXX: track spindown state for spindown skipping and warning */
+ 	if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
+ 		     qc->tf.command == ATA_CMD_STANDBYNOW1))
+ 		qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
+Index: linux-2.6.21-gentoo-r1/drivers/ata/libata.h
+===================================================================
+--- linux-2.6.21-gentoo-r1.orig/drivers/ata/libata.h
++++ linux-2.6.21-gentoo-r1/drivers/ata/libata.h
+@@ -57,7 +57,6 @@ extern int atapi_enabled;
+ extern int atapi_dmadir;
+ extern int libata_fua;
+ extern int libata_noacpi;
+-extern int ata_spindown_compat;
+ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
+ extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
+ 			   u64 block, u32 n_block, unsigned int tf_flags,

linux-2.6-2117_sata-via-suspend.patch:

Index: linux-2.6-2117_sata-via-suspend.patch
===================================================================
RCS file: linux-2.6-2117_sata-via-suspend.patch
diff -N linux-2.6-2117_sata-via-suspend.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2117_sata-via-suspend.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,15 @@
+Index: linux-2.6.21-gentoo-r2/drivers/ata/sata_via.c
+===================================================================
+--- linux-2.6.21-gentoo-r2.orig/drivers/ata/sata_via.c
++++ linux-2.6.21-gentoo-r2/drivers/ata/sata_via.c
+@@ -120,10 +120,6 @@ static struct scsi_host_template svia_sh
+ 	.slave_configure	= ata_scsi_slave_config,
+ 	.slave_destroy		= ata_scsi_slave_destroy,
+ 	.bios_param		= ata_std_bios_param,
+-#ifdef CONFIG_PM
+-	.suspend		= ata_scsi_device_suspend,
+-	.resume			= ata_scsi_device_resume,
+-#endif
+ };
+ 
+ static const struct ata_port_operations vt6420_sata_ops = {

linux-2.6-2118_scsi-constants.patch:

Index: linux-2.6-2118_scsi-constants.patch
===================================================================
RCS file: linux-2.6-2118_scsi-constants.patch
diff -N linux-2.6-2118_scsi-constants.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-2118_scsi-constants.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,532 @@
+From: Martin K. Petersen <martin petersen oracle com>
+Date: Wed, 28 Feb 2007 03:39:44 +0000 (-0500)
+Subject: [SCSI] constants.c: cleanup, verbose result printing
+X-Git-Tag: v2.6.22-rc1~1015^2~85
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=684b7fe976554d12e6266d7280c87a0f3feff02e
+
+[SCSI] constants.c: cleanup, verbose result printing
+
+Clean up constants.c and make result printing more user friendly:
+
+ - Refactor the command and sense functions so that the actual
+   formatting can be called from the various helper functions with the
+   correct prefix.
+
+ - Replace scsi_print_hostbyte() and scsi_print_driverbyte() with
+   scsi_print_result() which is verbose when CONFIG_SCSI_CONSTANTS is
+   on.
+
+Signed-off-by: Martin K. Petersen <martin petersen oracle com>
+Signed-off-by: James Bottomley <James Bottomley SteelEye com>
+---
+
+diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
+index 61f6024..6114875 100644
+--- a/drivers/scsi/constants.c
++++ b/drivers/scsi/constants.c
+@@ -202,31 +202,29 @@ static const char * get_sa_name(const struct value_name_pair * arr,
+ }
+ 
+ /* attempt to guess cdb length if cdb_len==0 . No trailing linefeed. */
+-static void print_opcode_name(unsigned char * cdbp, int cdb_len,
+-			      int start_of_line)
++static void print_opcode_name(unsigned char * cdbp, int cdb_len)
+ {
+ 	int sa, len, cdb0;
+ 	const char * name;
+-	const char * leadin = start_of_line ? KERN_INFO : "";
+ 
+ 	cdb0 = cdbp[0];
+ 	switch(cdb0) {
+ 	case VARIABLE_LENGTH_CMD:
+ 		len = cdbp[7] + 8;
+ 		if (len < 10) {
+-			printk("%sshort variable length command, "
+-			       "len=%d ext_len=%d", leadin, len, cdb_len);
++			printk("short variable length command, "
++			       "len=%d ext_len=%d", len, cdb_len);
+ 			break;
+ 		}
+ 		sa = (cdbp[8] << 8) + cdbp[9];
+ 		name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa);
+ 		if (name) {
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 			if ((cdb_len > 0) && (len != cdb_len))
+ 				printk(", in_cdb_len=%d, ext_len=%d",
+ 				       len, cdb_len);
+ 		} else {
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 			if ((cdb_len > 0) && (len != cdb_len))
+ 				printk(", in_cdb_len=%d, ext_len=%d",
+ 				       len, cdb_len);
+@@ -236,83 +234,80 @@ static void print_opcode_name(unsigned char * cdbp, int cdb_len,
+ 		sa = cdbp[1] & 0x1f;
+ 		name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa);
+ 		if (name)
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 		else
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	case MAINTENANCE_OUT:
+ 		sa = cdbp[1] & 0x1f;
+ 		name = get_sa_name(maint_out_arr, MAINT_OUT_SZ, sa);
+ 		if (name)
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 		else
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	case SERVICE_ACTION_IN_12:
+ 		sa = cdbp[1] & 0x1f;
+ 		name = get_sa_name(serv_in12_arr, SERV_IN12_SZ, sa);
+ 		if (name)
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 		else
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	case SERVICE_ACTION_OUT_12:
+ 		sa = cdbp[1] & 0x1f;
+ 		name = get_sa_name(serv_out12_arr, SERV_OUT12_SZ, sa);
+ 		if (name)
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 		else
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	case SERVICE_ACTION_IN_16:
+ 		sa = cdbp[1] & 0x1f;
+ 		name = get_sa_name(serv_in16_arr, SERV_IN16_SZ, sa);
+ 		if (name)
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 		else
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	case SERVICE_ACTION_OUT_16:
+ 		sa = cdbp[1] & 0x1f;
+ 		name = get_sa_name(serv_out16_arr, SERV_OUT16_SZ, sa);
+ 		if (name)
+-			printk("%s%s", leadin, name);
++			printk("%s", name);
+ 		else
+-			printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++			printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	default:
+ 		if (cdb0 < 0xc0) {
+ 			name = cdb_byte0_names[cdb0];
+ 			if (name)
+-				printk("%s%s", leadin, name);
++				printk("%s", name);
+ 			else
+-				printk("%scdb[0]=0x%x (reserved)",
+-				       leadin, cdb0);
++				printk("cdb[0]=0x%x (reserved)", cdb0);
+ 		} else
+-			printk("%scdb[0]=0x%x (vendor)", leadin, cdb0);
++			printk("cdb[0]=0x%x (vendor)", cdb0);
+ 		break;
+ 	}
+ }
+ 
+ #else /* ifndef CONFIG_SCSI_CONSTANTS */
+ 
+-static void print_opcode_name(unsigned char * cdbp, int cdb_len,
+-			      int start_of_line)
++static void print_opcode_name(unsigned char * cdbp, int cdb_len)
+ {
+ 	int sa, len, cdb0;
+-	const char * leadin = start_of_line ? KERN_INFO : "";
+ 
+ 	cdb0 = cdbp[0];
+ 	switch(cdb0) {
+ 	case VARIABLE_LENGTH_CMD:
+ 		len = cdbp[7] + 8;
+ 		if (len < 10) {
+-			printk("%sshort opcode=0x%x command, len=%d "
+-			       "ext_len=%d", leadin, cdb0, len, cdb_len);
++			printk("short opcode=0x%x command, len=%d "
++			       "ext_len=%d", cdb0, len, cdb_len);
+ 			break;
+ 		}
+ 		sa = (cdbp[8] << 8) + cdbp[9];
+-		printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++		printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		if (len != cdb_len)
+ 			printk(", in_cdb_len=%d, ext_len=%d", len, cdb_len);
+ 		break;
+@@ -323,49 +318,48 @@ static void print_opcode_name(unsigned char * cdbp, int cdb_len,
+ 	case SERVICE_ACTION_IN_16:
+ 	case SERVICE_ACTION_OUT_16:
+ 		sa = cdbp[1] & 0x1f;
+-		printk("%scdb[0]=0x%x, sa=0x%x", leadin, cdb0, sa);
++		printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa);
+ 		break;
+ 	default:
+ 		if (cdb0 < 0xc0)
+-			printk("%scdb[0]=0x%x", leadin, cdb0);
++			printk("cdb[0]=0x%x", cdb0);
+ 		else
+-			printk("%scdb[0]=0x%x (vendor)", leadin, cdb0);
++			printk("cdb[0]=0x%x (vendor)", cdb0);
+ 		break;
+ 	}
+ }
+ #endif  
+ 
+-void __scsi_print_command(unsigned char *command)
++void __scsi_print_command(unsigned char *cdb)
+ {
+ 	int k, len;
+ 
+-	print_opcode_name(command, 0, 1);
+-	if (VARIABLE_LENGTH_CMD == command[0])
+-		len = command[7] + 8;
++	print_opcode_name(cdb, 0);
++	if (VARIABLE_LENGTH_CMD == cdb[0])
++		len = cdb[7] + 8;
+ 	else
+-		len = COMMAND_SIZE(command[0]);
++		len = COMMAND_SIZE(cdb[0]);
+ 	/* print out all bytes in cdb */
+ 	for (k = 0; k < len; ++k) 
+-		printk(" %02x", command[k]);
++		printk(" %02x", cdb[k]);
+ 	printk("\n");
+ }
+ EXPORT_SYMBOL(__scsi_print_command);
+ 
+-/* This function (perhaps with the addition of peripheral device type)
+- * is more approriate than __scsi_print_command(). Perhaps that static
+- * can be dropped later if it replaces the __scsi_print_command version.
+- */
+-static void scsi_print_cdb(unsigned char *cdb, int cdb_len, int start_of_line)
++void scsi_print_command(struct scsi_cmnd *cmd)
+ {
+ 	int k;
+ 
+-	print_opcode_name(cdb, cdb_len, start_of_line);
++	scmd_printk(KERN_INFO, cmd, "CDB: ");
++	print_opcode_name(cmd->cmnd, cmd->cmd_len);
++
+ 	/* print out all bytes in cdb */
+ 	printk(":");
+-	for (k = 0; k < cdb_len; ++k) 
+-		printk(" %02x", cdb[k]);
++	for (k = 0; k < cmd->cmd_len; ++k)
++		printk(" %02x", cmd->cmnd[k]);
+ 	printk("\n");
+ }
++EXPORT_SYMBOL(scsi_print_command);
+ 
+ /**
+  *
+@@ -1176,67 +1170,77 @@ scsi_extd_sense_format(unsigned char asc, unsigned char ascq) {
+ }
+ EXPORT_SYMBOL(scsi_extd_sense_format);
+ 
+-/* Print extended sense information; no leadin, no linefeed */
+-static void
++void
+ scsi_show_extd_sense(unsigned char asc, unsigned char ascq)
+ {
+-	const char *extd_sense_fmt = scsi_extd_sense_format(asc, ascq);
++        const char *extd_sense_fmt = scsi_extd_sense_format(asc, ascq);
+ 
+ 	if (extd_sense_fmt) {
+ 		if (strstr(extd_sense_fmt, "%x")) {
+-			printk("Additional sense: ");
++			printk("Add. Sense: ");
+ 			printk(extd_sense_fmt, ascq);
+ 		} else
+-			printk("Additional sense: %s", extd_sense_fmt);
++			printk("Add. Sense: %s", extd_sense_fmt);
+ 	} else {
+ 		if (asc >= 0x80)
+-			printk("<<vendor>> ASC=0x%x ASCQ=0x%x", asc, ascq);
++			printk("<<vendor>> ASC=0x%x ASCQ=0x%x", asc,
++			       ascq);
+ 		if (ascq >= 0x80)
+-			printk("ASC=0x%x <<vendor>> ASCQ=0x%x", asc, ascq);
++			printk("ASC=0x%x <<vendor>> ASCQ=0x%x", asc,
++			       ascq);
+ 		else
+ 			printk("ASC=0x%x ASCQ=0x%x", asc, ascq);
+ 	}
++
++	printk("\n");
+ }
++EXPORT_SYMBOL(scsi_show_extd_sense);
+ 
+ void
+-scsi_print_sense_hdr(const char *name, struct scsi_sense_hdr *sshdr)
++scsi_show_sense_hdr(struct scsi_sense_hdr *sshdr)
+ {
+ 	const char *sense_txt;
+-	/* An example of deferred is when an earlier write to disk cache
+-	 * succeeded, but now the disk discovers that it cannot write the
+-	 * data to the magnetic media.
+-	 */
+-	const char *error = scsi_sense_is_deferred(sshdr) ? 
+-		"<<DEFERRED>>" : "Current";
+-	printk(KERN_INFO "%s: %s", name, error);
+-	if (sshdr->response_code >= 0x72)
+-		printk(" [descriptor]");
+ 
+ 	sense_txt = scsi_sense_key_string(sshdr->sense_key);
+ 	if (sense_txt)
+-		printk(": sense key: %s\n", sense_txt);
++		printk("Sense Key : %s ", sense_txt);
+ 	else
+-		printk(": sense key=0x%x\n", sshdr->sense_key);
+-	printk(KERN_INFO "    ");
+-	scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
++		printk("Sense Key : 0x%x ", sshdr->sense_key);
++
++	printk("%s", scsi_sense_is_deferred(sshdr) ? "[deferred] " :
++	       "[current] ");
++
++	if (sshdr->response_code >= 0x72)
++		printk("[descriptor]");
++
+ 	printk("\n");
+ }
++EXPORT_SYMBOL(scsi_show_sense_hdr);
++
++/*
++ * Print normalized SCSI sense header with a prefix.
++ */
++void
++scsi_print_sense_hdr(const char *name, struct scsi_sense_hdr *sshdr)
++{
++	printk(KERN_INFO "%s: ", name);
++	scsi_show_sense_hdr(sshdr);
++	printk(KERN_INFO "%s: ", name);
++	scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
++}
+ EXPORT_SYMBOL(scsi_print_sense_hdr);
+ 
+-/* Print sense information */
+ void
+-__scsi_print_sense(const char *name, const unsigned char *sense_buffer,
+-		   int sense_len)
++scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
++		       struct scsi_sense_hdr *sshdr)
+ {
+ 	int k, num, res;
+-	unsigned int info;
+-	struct scsi_sense_hdr ssh;
+     
+-	res = scsi_normalize_sense(sense_buffer, sense_len, &ssh);
++	res = scsi_normalize_sense(sense_buffer, sense_len, sshdr);
+ 	if (0 == res) {
+ 		/* this may be SCSI-1 sense data */
+ 		num = (sense_len < 32) ? sense_len : 32;
+-		printk(KERN_INFO "Unrecognized sense data (in hex):");
++		printk("Unrecognized sense data (in hex):");
+ 		for (k = 0; k < num; ++k) {
+ 			if (0 == (k % 16)) {
+ 				printk("\n");
+@@ -1247,11 +1251,20 @@ __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
+ 		printk("\n");
+ 		return;
+ 	}
+-	scsi_print_sense_hdr(name, &ssh);
+-	if (ssh.response_code < 0x72) {
++}
++
++void
++scsi_decode_sense_extras(const unsigned char *sense_buffer, int sense_len,
++			 struct scsi_sense_hdr *sshdr)
++{
++	int k, num, res;
++
++	if (sshdr->response_code < 0x72)
++	{
+ 		/* only decode extras for "fixed" format now */
+ 		char buff[80];
+ 		int blen, fixed_valid;
++		unsigned int info;
+ 
+ 		fixed_valid = sense_buffer[0] & 0x80;
+ 		info = ((sense_buffer[3] << 24) | (sense_buffer[4] << 16) |
+@@ -1281,13 +1294,13 @@ __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
+ 			res += snprintf(buff + res, blen - res, "ILI");
+ 		}
+ 		if (res > 0)
+-			printk(KERN_INFO "%s\n", buff);
+-	} else if (ssh.additional_length > 0) {
++			printk("%s\n", buff);
++	} else if (sshdr->additional_length > 0) {
+ 		/* descriptor format with sense descriptors */
+-		num = 8 + ssh.additional_length;
++		num = 8 + sshdr->additional_length;
+ 		num = (sense_len < num) ? sense_len : num;
+-		printk(KERN_INFO "Descriptor sense data with sense "
+-		       "descriptors (in hex):");
++		printk("Descriptor sense data with sense descriptors "
++		       "(in hex):");
+ 		for (k = 0; k < num; ++k) {
+ 			if (0 == (k % 16)) {
+ 				printk("\n");
+@@ -1295,29 +1308,42 @@ __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
+ 			}
+ 			printk("%02x ", sense_buffer[k]);
+ 		}
++
+ 		printk("\n");
+ 	}
++
+ }
+-EXPORT_SYMBOL(__scsi_print_sense);
+ 
+-void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
++/* Normalize and print sense buffer with name prefix */
++void __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
++			int sense_len)
+ {
+-	const char *name = devclass;
+-
+-	if (cmd->request->rq_disk)
+-		name = cmd->request->rq_disk->disk_name;
+-	__scsi_print_sense(name, cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE);
++	struct scsi_sense_hdr sshdr;
++
++	printk(KERN_INFO "%s: ", name);
++	scsi_decode_sense_buffer(sense_buffer, sense_len, &sshdr);
++	scsi_show_sense_hdr(&sshdr);
++	scsi_decode_sense_extras(sense_buffer, sense_len, &sshdr);
++	printk(KERN_INFO "%s: ", name);
++	scsi_show_extd_sense(sshdr.asc, sshdr.ascq);
+ }
+-EXPORT_SYMBOL(scsi_print_sense);
++EXPORT_SYMBOL(__scsi_print_sense);
+ 
+-void scsi_print_command(struct scsi_cmnd *cmd)
++/* Normalize and print sense buffer in SCSI command */
++void scsi_print_sense(char *name, struct scsi_cmnd *cmd)
+ {
+-	/* Assume appended output (i.e. not at start of line) */
+-	sdev_printk("", cmd->device, "\n");
+-	printk(KERN_INFO "        command: ");
+-	scsi_print_cdb(cmd->cmnd, cmd->cmd_len, 0);
++	struct scsi_sense_hdr sshdr;
++
++	scmd_printk(KERN_INFO, cmd, "");
++	scsi_decode_sense_buffer(cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE,
++				 &sshdr);
++	scsi_show_sense_hdr(&sshdr);
++	scsi_decode_sense_extras(cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE,
++				 &sshdr);
++	scmd_printk(KERN_INFO, cmd, "");
++	scsi_show_extd_sense(sshdr.asc, sshdr.ascq);
+ }
+-EXPORT_SYMBOL(scsi_print_command);
++EXPORT_SYMBOL(scsi_print_sense);
+ 
+ #ifdef CONFIG_SCSI_CONSTANTS
+ 
+@@ -1327,25 +1353,6 @@ static const char * const hostbyte_table[]={
+ "DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY"};
+ #define NUM_HOSTBYTE_STRS ARRAY_SIZE(hostbyte_table)
+ 
+-void scsi_print_hostbyte(int scsiresult)
+-{
+-	int hb = host_byte(scsiresult);
+-
+-	printk("Hostbyte=0x%02x", hb);
+-	if (hb < NUM_HOSTBYTE_STRS)
+-		printk("(%s) ", hostbyte_table[hb]);
+-	else
+-		printk("is invalid ");
+-}
+-#else
+-void scsi_print_hostbyte(int scsiresult)
+-{
+-	printk("Hostbyte=0x%02x ", host_byte(scsiresult));
+-}
+-#endif
+-
+-#ifdef CONFIG_SCSI_CONSTANTS
+-
+ static const char * const driverbyte_table[]={
+ "DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT",  "DRIVER_MEDIA", "DRIVER_ERROR",
+ "DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
+@@ -1356,19 +1363,35 @@ static const char * const driversuggest_table[]={"SUGGEST_OK",
+ "SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"};
+ #define NUM_SUGGEST_STRS ARRAY_SIZE(driversuggest_table)
+ 
+-void scsi_print_driverbyte(int scsiresult)
++void scsi_show_result(int result)
+ {
+-	int dr = (driver_byte(scsiresult) & DRIVER_MASK);
+-	int su = ((driver_byte(scsiresult) & SUGGEST_MASK) >> 4);
++	int hb = host_byte(result);
++	int db = (driver_byte(result) & DRIVER_MASK);
++	int su = ((driver_byte(result) & SUGGEST_MASK) >> 4);
+ 
+-	printk("Driverbyte=0x%02x ", driver_byte(scsiresult));
+-	printk("(%s,%s) ",
+-	       (dr < NUM_DRIVERBYTE_STRS ? driverbyte_table[dr] : "invalid"),
++	printk("Result: hostbyte=%s driverbyte=%s,%s\n",
++	       (hb < NUM_HOSTBYTE_STRS ? hostbyte_table[hb]     : "invalid"),
++	       (db < NUM_DRIVERBYTE_STRS ? driverbyte_table[db] : "invalid"),
+ 	       (su < NUM_SUGGEST_STRS ? driversuggest_table[su] : "invalid"));
+ }
++
+ #else
+-void scsi_print_driverbyte(int scsiresult)
++
++void scsi_show_result(int result)
+ {
+-	printk("Driverbyte=0x%02x ", driver_byte(scsiresult));
++	printk("Result: hostbyte=0x%02x driverbyte=0x%02x\n",
++	       host_byte(result), driver_byte(result));
+ }
++
+ #endif
++EXPORT_SYMBOL(scsi_show_result);
++
++
++void scsi_print_result(struct scsi_cmnd *cmd)
++{
++	scmd_printk(KERN_INFO, cmd, "");
++	scsi_show_result(cmd->result);
++}
++EXPORT_SYMBOL(scsi_print_result);
++
++
+diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h
+index 3bbbfbe..5a43a4c 100644
+--- a/include/scsi/scsi_dbg.h
++++ b/include/scsi/scsi_dbg.h
+@@ -5,14 +5,16 @@ struct scsi_cmnd;
+ struct scsi_sense_hdr;
+ 
+ extern void scsi_print_command(struct scsi_cmnd *);
+-extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *);
+ extern void __scsi_print_command(unsigned char *);
+-extern void scsi_print_sense(const char *, struct scsi_cmnd *);
++extern void scsi_show_extd_sense(unsigned char, unsigned char);
++extern void scsi_show_sense_hdr(struct scsi_sense_hdr *);
++extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *);
++extern void scsi_print_sense(char *, struct scsi_cmnd *);
+ extern void __scsi_print_sense(const char *name,
+ 			       const unsigned char *sense_buffer,
+ 			       int sense_len);
+-extern void scsi_print_driverbyte(int);
+-extern void scsi_print_hostbyte(int);
++extern void scsi_show_result(int);
++extern void scsi_print_result(struct scsi_cmnd *);
+ extern void scsi_print_status(unsigned char);
+ extern const char *scsi_sense_key_string(unsigned char);
+ extern const char *scsi_extd_sense_format(unsigned char, unsigned char);

linux-2.6-acpi-boot-regression.patch:

Index: linux-2.6-acpi-boot-regression.patch
===================================================================
RCS file: linux-2.6-acpi-boot-regression.patch
diff -N linux-2.6-acpi-boot-regression.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-boot-regression.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,50 @@
+commit d5a3d32a042126f65a008e0e5204ef92ad2ee55d
+Author: Venkatesh Pallipadi <venkatesh pallipadi intel com>
+Date:   Fri Jun 15 19:36:00 2007 -0400
+
+    ACPI: fix 2.6.20 SMP boot regression
+    
+    Always disable/enable interrupts in the acpi idle routine,
+    even in the error path.
+    
+    This is required as the 2.6.20 change in git commit d331e739f5ad2aaa9...
+    "Fix interrupt race in idle callback" expects the idle handler
+    to enable interrupt before returning.
+    
+    There was a case in acpi idle routine, in which interrupt was not being
+    enabled before return, which caused the system to hang at bootup, while
+    enabling C-states on an SMP system.
+    
+    The signature of the hang was that "processor.nocst"
+    was required to enable boot.
+    
+    Signed-off-by: Venkatesh Pallipadi <venkatesh pallipadi intel com>
+    Signed-off-by: Len Brown <len brown intel com>
+
+diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
+index ee5759b..80ffc78 100644
+--- a/drivers/acpi/processor_idle.c
++++ b/drivers/acpi/processor_idle.c
+@@ -332,16 +332,18 @@ static void acpi_processor_idle(void)
+ 	int sleep_ticks = 0;
+ 	u32 t1, t2 = 0;
+ 
+-	pr = processors[smp_processor_id()];
+-	if (!pr)
+-		return;
+-
+ 	/*
+ 	 * Interrupts must be disabled during bus mastering calculations and
+ 	 * for C2/C3 transitions.
+ 	 */
+ 	local_irq_disable();
+ 
++	pr = processors[smp_processor_id()];
++	if (!pr) {
++		local_irq_enable();
++		return;
++	}
++
+ 	/*
+ 	 * Check whether we truly need to go idle, or should
+ 	 * reschedule:

linux-2.6-acpi-dock-oops.patch:

Index: linux-2.6-acpi-dock-oops.patch
===================================================================
RCS file: linux-2.6-acpi-dock-oops.patch
diff -N linux-2.6-acpi-dock-oops.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-dock-oops.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,54 @@
+---
+ drivers/acpi/dock.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- 2.6.21-d390.orig/drivers/acpi/dock.c
++++ 2.6.21-d390/drivers/acpi/dock.c
+@@ -698,6 +698,7 @@ static int dock_add(acpi_handle handle)
+ 	if (ret) {
+ 		printk(KERN_ERR PREFIX "Error %d registering dock device\n", ret);
+ 		kfree(dock_station);
++		dock_station = NULL;
+ 		return ret;
+ 	}
+ 	ret = device_create_file(&dock_device.dev, &dev_attr_docked);
+@@ -705,6 +706,7 @@ static int dock_add(acpi_handle handle)
+ 		printk("Error %d adding sysfs file\n", ret);
+ 		platform_device_unregister(&dock_device);
+ 		kfree(dock_station);
++		dock_station = NULL;
+ 		return ret;
+ 	}
+ 	ret = device_create_file(&dock_device.dev, &dev_attr_undock);
+@@ -713,6 +715,7 @@ static int dock_add(acpi_handle handle)
+ 		device_remove_file(&dock_device.dev, &dev_attr_docked);
+ 		platform_device_unregister(&dock_device);
+ 		kfree(dock_station);
++		dock_station = NULL;
+ 		return ret;
+ 	}
+ 
+@@ -725,6 +728,7 @@ static int dock_add(acpi_handle handle)
+ 	dd = alloc_dock_dependent_device(handle);
+ 	if (!dd) {
+ 		kfree(dock_station);
++		dock_station = NULL;
+ 		ret = -ENOMEM;
+ 		goto dock_add_err_unregister;
+ 	}
+@@ -752,6 +756,7 @@ dock_add_err_unregister:
+ 	device_remove_file(&dock_device.dev, &dev_attr_undock);
+ 	platform_device_unregister(&dock_device);
+ 	kfree(dock_station);
++	dock_station = NULL;
+ 	return ret;
+ }
+ 
+@@ -785,6 +790,7 @@ static int dock_remove(void)
+ 
+ 	/* free dock station memory */
+ 	kfree(dock_station);
++	dock_station = NULL;
+ 	return 0;
+ }
+ 

linux-2.6-acpi-git-ec-init-fixes.patch:

Index: linux-2.6-acpi-git-ec-init-fixes.patch
===================================================================
RCS file: linux-2.6-acpi-git-ec-init-fixes.patch
diff -N linux-2.6-acpi-git-ec-init-fixes.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-git-ec-init-fixes.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,207 @@
+From: Alexey Starikovskiy <astarikovskiy suse de>
+Date: Wed, 5 Sep 2007 23:56:38 +0000 (-0400)
+Subject: ACPI: EC: Drop ECDT-based boot_ec as soon as we find DSDT-based one.
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Flenb%2Flinux-acpi-2.6.git;a=commitdiff_plain;h=4c611060660f0de3e9b8f02df207312bc6f5c331
+
+ACPI: EC: Drop ECDT-based boot_ec as soon as we find DSDT-based one.
+
+ASUS notebooks have numerous problems with EC initialization
+This patch tries to work around three known issues reported
+in bugzilla 8598, 8709 and 8909/8919.
+
+Signed-off-by: Alexey Starikovskiy <astarikovskiy suse de>
+Signed-off-by: Len Brown <len brown intel com>
+---
+
+diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
+index 3f7935a..9cd7997 100644
+--- a/drivers/acpi/ec.c
++++ b/drivers/acpi/ec.c
+@@ -121,6 +121,7 @@ static struct acpi_ec {
+ 	atomic_t event_count;
+ 	wait_queue_head_t wait;
+ 	struct list_head list;
++	u8 handlers_installed;
+ } *boot_ec, *first_ec;
+ 
+ /* --------------------------------------------------------------------------
+@@ -680,32 +681,50 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
+ 	status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe);
+ 	if (ACPI_FAILURE(status))
+ 		return status;
+-
+ 	/* Find and register all query methods */
+ 	acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
+ 			    acpi_ec_register_query_methods, ec, NULL);
+-
+ 	/* Use the global lock for all EC transactions? */
+ 	acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
+-
+ 	ec->handle = handle;
+-
+-	printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
+-			  ec->gpe, ec->command_addr, ec->data_addr);
+-
+ 	return AE_CTRL_TERMINATE;
+ }
+ 
++static void ec_remove_handlers(struct acpi_ec *ec)
++{
++	if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
++				ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
++		printk(KERN_ERR PREFIX "failed to remove space handler\n");
++	if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
++				&acpi_ec_gpe_handler)))
++		printk(KERN_ERR PREFIX "failed to remove gpe handler\n");
++	ec->handlers_installed = 0;
++}
++
+ static int acpi_ec_add(struct acpi_device *device)
+ {
+ 	struct acpi_ec *ec = NULL;
+ 
+ 	if (!device)
+ 		return -EINVAL;
+-
+ 	strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
+ 	strcpy(acpi_device_class(device), ACPI_EC_CLASS);
+ 
++	/* Check for boot EC */
++	if (boot_ec) {
++		if (boot_ec->handle == device->handle) {
++			/* Pre-loaded EC from DSDT, just move pointer */
++			ec = boot_ec;
++			boot_ec = NULL;
++			goto end;
++		} else if (boot_ec->handle == ACPI_ROOT_OBJECT) {
++			/* ECDT-based EC, time to shut it down */
++			ec_remove_handlers(boot_ec);
++			kfree(boot_ec);
++			first_ec = boot_ec = NULL;
++		}
++	}
++
+ 	ec = make_acpi_ec();
+ 	if (!ec)
+ 		return -ENOMEM;
+@@ -715,25 +734,14 @@ static int acpi_ec_add(struct acpi_device *device)
+ 		kfree(ec);
+ 		return -EINVAL;
+ 	}
+-
+-	/* Check if we found the boot EC */
+-	if (boot_ec) {
+-		if (boot_ec->gpe == ec->gpe) {
+-			/* We might have incorrect info for GL at boot time */
+-			mutex_lock(&boot_ec->lock);
+-			boot_ec->global_lock = ec->global_lock;
+-			/* Copy handlers from new ec into boot ec */
+-			list_splice(&ec->list, &boot_ec->list);
+-			mutex_unlock(&boot_ec->lock);
+-			kfree(ec);
+-			ec = boot_ec;
+-		}
+-	} else
+-		first_ec = ec;
+ 	ec->handle = device->handle;
++      end:
++	if (!first_ec)
++		first_ec = ec;
+ 	acpi_driver_data(device) = ec;
+-
+ 	acpi_ec_add_fs(device);
++	printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
++			  ec->gpe, ec->command_addr, ec->data_addr);
+ 	return 0;
+ }
+ 
+@@ -756,10 +764,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
+ 	acpi_driver_data(device) = NULL;
+ 	if (ec == first_ec)
+ 		first_ec = NULL;
+-
+-	/* Don't touch boot EC */
+-	if (boot_ec != ec)
+-		kfree(ec);
++	kfree(ec);
+ 	return 0;
+ }
+ 
+@@ -789,6 +794,8 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context)
+ static int ec_install_handlers(struct acpi_ec *ec)
+ {
+ 	acpi_status status;
++	if (ec->handlers_installed)
++		return 0;
+ 	status = acpi_install_gpe_handler(NULL, ec->gpe,
+ 					  ACPI_GPE_EDGE_TRIGGERED,
+ 					  &acpi_ec_gpe_handler, ec);
+@@ -807,6 +814,7 @@ static int ec_install_handlers(struct acpi_ec *ec)
+ 		return -ENODEV;
+ 	}
+ 
++	ec->handlers_installed = 1;
+ 	return 0;
+ }
+ 
+@@ -823,41 +831,22 @@ static int acpi_ec_start(struct acpi_device *device)
+ 	if (!ec)
+ 		return -EINVAL;
+ 
+-	/* Boot EC is already working */
+-	if (ec != boot_ec)
+-		ret = ec_install_handlers(ec);
++	ret = ec_install_handlers(ec);
+ 
+ 	/* EC is fully operational, allow queries */
+ 	atomic_set(&ec->query_pending, 0);
+-
+ 	return ret;
+ }
+ 
+ static int acpi_ec_stop(struct acpi_device *device, int type)
+ {
+-	acpi_status status;
+ 	struct acpi_ec *ec;
+-
+ 	if (!device)
+ 		return -EINVAL;
+-
+ 	ec = acpi_driver_data(device);
+ 	if (!ec)
+ 		return -EINVAL;
+-
+-	/* Don't touch boot EC */
+-	if (ec == boot_ec)
+-		return 0;
+-
+-	status = acpi_remove_address_space_handler(ec->handle,
+-						   ACPI_ADR_SPACE_EC,
+-						   &acpi_ec_space_handler);
+-	if (ACPI_FAILURE(status))
+-		return -ENODEV;
+-
+-	status = acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler);
+-	if (ACPI_FAILURE(status))
+-		return -ENODEV;
++	ec_remove_handlers(ec);
+ 
+ 	return 0;
+ }
+@@ -877,7 +866,7 @@ int __init acpi_ec_ecdt_probe(void)
+ 	status = acpi_get_table(ACPI_SIG_ECDT, 1,
+ 				(struct acpi_table_header **)&ecdt_ptr);
+ 	if (ACPI_SUCCESS(status)) {
+-		printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n\n");
++		printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n");
+ 		boot_ec->command_addr = ecdt_ptr->control.address;
+ 		boot_ec->data_addr = ecdt_ptr->data.address;
+ 		boot_ec->gpe = ecdt_ptr->gpe;
+@@ -899,7 +888,6 @@ int __init acpi_ec_ecdt_probe(void)
+       error:
+ 	kfree(boot_ec);
+ 	boot_ec = NULL;
+-
+ 	return -ENODEV;
+ }
+ 

linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch:

Index: linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch
===================================================================
RCS file: linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch
diff -N linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-keep-tsc-stable-when-lapic-timer-c2-ok-is-set.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,65 @@
+Subject: ACPI: Keep TSC stable, when lapic_timer_c2_ok is set
+
+The local apic timer stop in C2 resp. C3 states is coupled with the
+stop of the TSC. When the local apic timer is marked stable in C2
+on the kernel commandline, then keep the TSC marked stable in C2 as well.
+
+Signed-off-by: Thomas Gleixner <tglx linutronix de>
+
+---
+ drivers/acpi/processor_idle.c |   19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+Index: linux-2.6.21/drivers/acpi/processor_idle.c
+===================================================================
+--- linux-2.6.21.orig/drivers/acpi/processor_idle.c
++++ linux-2.6.21/drivers/acpi/processor_idle.c
+@@ -305,18 +305,23 @@ static void acpi_state_timer_broadcast(s
+ 				       struct acpi_processor_cx *cx,
+ 				       int broadcast)
+ {
+-#ifdef CONFIG_GENERIC_CLOCKEVENTS
+-
+ 	int state = cx - pr->power.states;
+ 
+ 	if (state >= pr->power.timer_broadcast_on_state) {
++
++#ifdef CONFIG_GENERIC_CLOCKEVENTS
+ 		unsigned long reason;
+ 
+ 		reason = broadcast ?  CLOCK_EVT_NOTIFY_BROADCAST_ENTER :
+ 			CLOCK_EVT_NOTIFY_BROADCAST_EXIT;
+ 		clockevents_notify(reason, &pr->id);
+-	}
+ #endif
++
++#ifdef CONFIG_GENERIC_TIME
++		/* TSC halts in C2/3, so notify users */
++		mark_tsc_unstable();
++#endif
++	}
+ }
+ 
+ #else
+@@ -481,10 +486,6 @@ static void acpi_processor_idle(void)
+ 		/* Get end time (ticks) */
+ 		t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
+ 
+-#ifdef CONFIG_GENERIC_TIME
+-		/* TSC halts in C2, so notify users */
+-		mark_tsc_unstable();
+-#endif
+ 		/* Re-enable interrupts */
+ 		local_irq_enable();
+ 		current_thread_info()->status |= TS_POLLING;
+@@ -523,10 +524,6 @@ static void acpi_processor_idle(void)
+ 			acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
+ 		}
+ 
+-#ifdef CONFIG_GENERIC_TIME
+-		/* TSC halts in C3, so notify users */
+-		mark_tsc_unstable();
+-#endif
+ 		/* Re-enable interrupts */
+ 		local_irq_enable();
+ 		current_thread_info()->status |= TS_POLLING;

linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch:

Index: linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch
===================================================================
RCS file: linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch
diff -N linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-preserve-ebx-in-acpi_copy_wakeup_routine.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,55 @@
+Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c8cbee61c9d53ee28473ad33bbb54f6a88f5e3af
+Commit:     c8cbee61c9d53ee28473ad33bbb54f6a88f5e3af
+Parent:     e5d2861f31474b373ce7754dc5122b414a176c64
+Author:     Tian Kevin <kevin tian intel com>
+AuthorDate: Sat Jun 23 17:16:52 2007 -0700
+Committer:  Linus Torvalds <torvalds woody linux-foundation org>
+CommitDate: Sun Jun 24 08:59:12 2007 -0700
+
+    ACPI: preserve the ebx value in acpi_copy_wakeup_routine
+    
+    Register %ebx serves as the "global offset table base register" for
+    position-independent code.  For absolute code, %ebx serves as a local
+    register and has no specified role in the function calling sequence.  In
+    either case, a function must preserve the register value for the caller.
+    
+    acpi_copy_wakeup_routine overrides %ebx without saving it, this may corrupt
+    the called data.
+    
+    Kevin found that most time the value of Sx is saved in %esi, however
+    sometimes compiler also uses %ebx.  When this happens, suspends fails since
+    sleep value in ebx is changed by acpi_copy_wakeup_routine.
+    
+    The same funtion in X86_64 doesn't have this problem.
+    
+    Signed-off-by: Zhang Rui <rui zhang intel com>
+    Looks-okay-to: Pavel Machek <pavel ucw cz>
+    Signed-off-by: Rafael J. Wysocki <rjw sisk pl>
+    Cc: Len Brown <lenb kernel org>
+    Acked-by: Andi Kleen <ak suse de>
+    Signed-off-by: Andrew Morton <akpm linux-foundation org>
+    Signed-off-by: Linus Torvalds <torvalds linux-foundation org>
+---
+ arch/i386/kernel/acpi/wakeup.S |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S
+index b781b38..a2295a3 100644
+--- a/arch/i386/kernel/acpi/wakeup.S
++++ b/arch/i386/kernel/acpi/wakeup.S
+@@ -230,6 +230,7 @@ bogus_magic:
+ #
+ ENTRY(acpi_copy_wakeup_routine)
+ 
++	pushl	%ebx
+ 	sgdt	saved_gdt
+ 	sidt	saved_idt
+ 	sldt	saved_ldt
+@@ -263,6 +264,7 @@ ENTRY(acpi_copy_wakeup_routine)
+ 	movl	%edx, video_flags - wakeup_start (%eax)
+ 	movl	$0x12345678, real_magic - wakeup_start (%eax)
+ 	movl	$0x12345678, saved_magic
++	popl	%ebx
+ 	ret
+ 
+ save_registers:

linux-2.6-acpi-unblacklist-dell-gx240.patch:

Index: linux-2.6-acpi-unblacklist-dell-gx240.patch
===================================================================
RCS file: linux-2.6-acpi-unblacklist-dell-gx240.patch
diff -N linux-2.6-acpi-unblacklist-dell-gx240.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-acpi-unblacklist-dell-gx240.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,121 @@
+From davej  Wed May 23 17:33:54 2007
+Return-Path: <linux-acpi-owner vger kernel org>
+X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO,
+	NO_REAL_NAME,UNPARSEABLE_RELAY autolearn=no version=3.1.8
+Received: from pobox.devel.redhat.com [10.11.255.8]
+	by gelk.kernelslacker.org with IMAP (fetchmail-6.3.6)
+	for <davej localhost> (single-drop); Wed, 23 May 2007 17:33:54 -0400 (EDT)
+Received: from pobox.devel.redhat.com ([unix socket])
+	 by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;
+	 Wed, 23 May 2007 17:31:47 -0400
+X-Sieve: CMU Sieve 2.2
+Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
+	by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id l4NLVlpG032241
+	for <davej pobox devel redhat com>; Wed, 23 May 2007 17:31:47 -0400
+Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31])
+	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4NLVkpU029647;
+	Wed, 23 May 2007 17:31:46 -0400
+Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
+	by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l4NJIQrC021439;
+	Wed, 23 May 2007 17:31:45 -0400
+Received: (majordomo vger kernel org) by vger.kernel.org via listexpand
+	id S1755625AbXEWVYq (ORCPT <rfc822;prarit redhat com> + 1 other);
+	Wed, 23 May 2007 17:24:46 -0400
+Received: (majordomo vger kernel org) by vger.kernel.org id S1755898AbXEWVYq
+	(ORCPT <rfc822;linux-acpi-outgoing>);
+	Wed, 23 May 2007 17:24:46 -0400
+Received: from smtp1.linux-foundation.org ([207.189.120.13]:57412 "EHLO
+	smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK)
+	by vger.kernel.org with ESMTP id S1755684AbXEWVYp (ORCPT
+	<rfc822;linux-acpi vger kernel org>);
+	Wed, 23 May 2007 17:24:45 -0400
+X-Greylist: delayed 661 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 May 2007 17:24:44 EDT
+Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6])
+	by smtp1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l4NLCVvd022824
+	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
+	Wed, 23 May 2007 14:12:32 -0700
+Received: from localhost.localdomain (shell0.pdx.osdl.net [10.9.0.31])
+	by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id l4NLCUrC032160;
+	Wed, 23 May 2007 14:12:31 -0700
+Message-Id: <200705232112 l4NLCUrC032160 shell0 pdx osdl net>
+Subject: [patch 6/6] Remove Dell Optiplex GX240 from the ACPI blacklist
+To: lenb kernel org
+Cc: linux-acpi vger kernel org, akpm linux-foundation org, tarrqt yahoo com
+From: akpm linux-foundation org
+Date: 	Wed, 23 May 2007 14:12:30 -0700
+X-MIMEDefang-Filter: osdl$Revision$
+X-Scanned-By: MIMEDefang 2.53 on 207.189.120.13
+Sender: linux-acpi-owner vger kernel org
+Precedence: bulk
+X-Mailing-List: 	linux-acpi vger kernel org
+X-RedHat-Spam-Score: 0.55 
+Status: RO
+Content-Length: 2331
+Lines: 62
+
+From: Tear <tarrqt yahoo com>
+
+I have a Dell Optiplex GX240 and when I boot Linux, ACPI gets set up by only
+acpi=ht.  dmesg shows the following line:
+
+   DELL GX240 detected: force use of acpi=ht
+
+Everything seemed to be fine.  However, I discovered that everything is not
+fine.  The USB controller works so slowly that copying a few (uncached) 1
+megabyte large photos from a USB-enabled digital camera takes many minutes
+instead of a couple of seconds.
+
+I am using Linux 2.6.21.1 on a Debian 4.0 ("Etch") system.
+
+I thought that this might be related to ACPI.  So I tried to boot with _only_
+"acpi=force" appended to the kernel command line.  Voila, the USB controller
+started to work at full speed and copying photos from my digital camera took
+only seconds.
+
+I tested the system with "acpi=force" and could not find anything which did
+not work.  So, can we please remove Dell Optiplex GX240 from the blacklist in
+
+..../arch/i386/kernel/acpi/boot.c
+
+?  The attached patch does just that: It removes Dell Optiplex GX240 from the
+ACPI blacklist.
+
+I thought that this might be related to interrupts and APIC as well.  (Note
+that this is APIC, not ACPI.) I tried booting with _only_ "noapic" and
+"nolapic" appended to the command line.  Again, the USB controller started to
+work at full speed.
+
+Cc: Len Brown <lenb kernel org>
+Signed-off-by: Andrew Morton <akpm linux-foundation org>
+---
+
+ arch/i386/kernel/acpi/boot.c |    8 --------
+ 1 files changed, 8 deletions(-)
+
+diff -puN arch/i386/kernel/acpi/boot.c~remove-dell-optiplex-gx240-from-the-acpi-blacklist arch/i386/kernel/acpi/boot.c
+--- a/arch/i386/kernel/acpi/boot.c~remove-dell-optiplex-gx240-from-the-acpi-blacklist
++++ a/arch/i386/kernel/acpi/boot.c
+@@ -971,14 +971,6 @@ static struct dmi_system_id __initdata a
+ 	 },
+ 	{
+ 	 .callback = force_acpi_ht,
+-	 .ident = "DELL GX240",
+-	 .matches = {
+-		     DMI_MATCH(DMI_BOARD_VENDOR, "Dell Computer Corporation"),
+-		     DMI_MATCH(DMI_BOARD_NAME, "OptiPlex GX240"),
+-		     },
+-	 },
+-	{
+-	 .callback = force_acpi_ht,
+ 	 .ident = "HP VISUALIZE NT Workstation",
+ 	 .matches = {
+ 		     DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+_
+-
+To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
+the body of a message to majordomo vger kernel org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+

linux-2.6-add-mmf_dump_elf_headers.patch:

Index: linux-2.6-add-mmf_dump_elf_headers.patch
===================================================================
RCS file: linux-2.6-add-mmf_dump_elf_headers.patch
diff -N linux-2.6-add-mmf_dump_elf_headers.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-add-mmf_dump_elf_headers.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,172 @@
+
+
+*** Remember to use Documentation/SubmitChecklist when testing your code ***
+
+See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
+out what to do about this
+
+------------------------------------------------------
+Subject: Add MMF_DUMP_ELF_HEADERS
+From: Roland McGrath <roland redhat com>
+
+This adds the MMF_DUMP_ELF_HEADERS option to /proc/pid/coredump_filter. 
+This dumps the first page (only) of a private file mapping if it appears to
+be a mapping of an ELF file.  Including these pages in the core dump may
+give sufficient identifying information to associate the original DSO and
+executable file images and their debugging information with a core file in
+a generic way just from its contents (e.g.  when those binaries were built
+with ld --build-id).  I expect this to become the default behavior
+eventually.  Existing versions of gdb can be confused by the core dumps it
+creates, so it won't enabled by default for some time to come.  Soon many
+people will have systems with a gdb that handle these dumps, so they can
+arrange to set the bit at boot and have it inherited system-wide.
+
+This also cleans up the checking of the MMF_DUMP_* flag bits, which did not
+need to be using atomic macros.
+
+Signed-off-by: Roland McGrath <roland redhat com>
+Cc: Hidehiro Kawai <hidehiro kawai ez hitachi com>
+Signed-off-by: Andrew Morton <akpm linux-foundation org>
+---
+
+ fs/binfmt_elf.c       |   78 +++++++++++++++++++++++++++-------------
+ include/linux/sched.h |    3 +
+ 2 files changed, 55 insertions(+), 26 deletions(-)
+
+diff -puN fs/binfmt_elf.c~add-mmf_dump_elf_headers fs/binfmt_elf.c
+--- a/fs/binfmt_elf.c~add-mmf_dump_elf_headers
++++ a/fs/binfmt_elf.c
+@@ -1201,35 +1201,68 @@ static int dump_seek(struct file *file, 
+ }
+ 
+ /*
+- * Decide whether a segment is worth dumping; default is yes to be
+- * sure (missing info is worse than too much; etc).
+- * Personally I'd include everything, and use the coredump limit...
+- *
+- * I think we should skip something. But I am not sure how. H.J.
++ * Decide what to dump of a segment, part, all or none.
+  */
+-static int maydump(struct vm_area_struct *vma, unsigned long mm_flags)
++static unsigned long vma_dump_size(struct vm_area_struct *vma,
++				   unsigned long mm_flags)
+ {
+ 	/* The vma can be set up to tell us the answer directly.  */
+ 	if (vma->vm_flags & VM_ALWAYSDUMP)
+-		return 1;
++		goto whole;
+ 
+ 	/* Do not dump I/O mapped devices or special mappings */
+ 	if (vma->vm_flags & (VM_IO | VM_RESERVED))
+ 		return 0;
+ 
++#define FILTER(type)	(mm_flags & (1UL << MMF_DUMP_##type))
++
+ 	/* By default, dump shared memory if mapped from an anonymous file. */
+ 	if (vma->vm_flags & VM_SHARED) {
+-		if (vma->vm_file->f_path.dentry->d_inode->i_nlink == 0)
+-			return test_bit(MMF_DUMP_ANON_SHARED, &mm_flags);
+-		else
+-			return test_bit(MMF_DUMP_MAPPED_SHARED, &mm_flags);
++		if (vma->vm_file->f_path.dentry->d_inode->i_nlink == 0 ?
++		    FILTER(ANON_SHARED) : FILTER(MAPPED_SHARED))
++			goto whole;
++		return 0;
+ 	}
+ 
+-	/* By default, if it hasn't been written to, don't write it out. */
+-	if (!vma->anon_vma)
+-		return test_bit(MMF_DUMP_MAPPED_PRIVATE, &mm_flags);
++	/* Dump segments that have been written to.  */
++	if (vma->anon_vma && FILTER(ANON_PRIVATE))
++		goto whole;
++	if (vma->vm_file == NULL)
++		return 0;
++
++	if (FILTER(MAPPED_PRIVATE))
++		goto whole;
+ 
+-	return test_bit(MMF_DUMP_ANON_PRIVATE, &mm_flags);
++	/*
++	 * If this looks like the beginning of a DSO or executable mapping,
++	 * check for an ELF header.  If we find one, dump the first page to
++	 * aid in determining what was mapped here.
++	 */
++	if (FILTER(ELF_HEADERS) && vma->vm_file != NULL && vma->vm_pgoff == 0) {
++		u32 __user *header = (u32 __user *) vma->vm_start;
++		u32 word;
++		/*
++		 * Doing it this way gets the constant folded by GCC.
++		 */
++		union {
++			u32 cmp;
++			char elfmag[SELFMAG];
++		} magic;
++		BUILD_BUG_ON(SELFMAG != sizeof word);
++		magic.elfmag[EI_MAG0] = ELFMAG0;
++		magic.elfmag[EI_MAG1] = ELFMAG1;
++		magic.elfmag[EI_MAG2] = ELFMAG2;
++		magic.elfmag[EI_MAG3] = ELFMAG3;
++		if (get_user(word, header) == 0 && word == magic.cmp)
++			return PAGE_SIZE;
++	}
++
++#undef	FILTER
++
++	return 0;
++
++whole:
++	return vma->vm_end - vma->vm_start;
+ }
+ 
+ /* An ELF note in memory */
+@@ -1675,16 +1708,13 @@ static int elf_core_dump(long signr, str
+ 	for (vma = first_vma(current, gate_vma); vma != NULL;
+ 			vma = next_vma(vma, gate_vma)) {
+ 		struct elf_phdr phdr;
+-		size_t sz;
+-
+-		sz = vma->vm_end - vma->vm_start;
+ 
+ 		phdr.p_type = PT_LOAD;
+ 		phdr.p_offset = offset;
+ 		phdr.p_vaddr = vma->vm_start;
+ 		phdr.p_paddr = 0;
+-		phdr.p_filesz = maydump(vma, mm_flags) ? sz : 0;
+-		phdr.p_memsz = sz;
++		phdr.p_filesz = vma_dump_size(vma, mm_flags);
++		phdr.p_memsz = vma->vm_end - vma->vm_start;
+ 		offset += phdr.p_filesz;
+ 		phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
+ 		if (vma->vm_flags & VM_WRITE)
+@@ -1726,13 +1756,11 @@ static int elf_core_dump(long signr, str
+ 	for (vma = first_vma(current, gate_vma); vma != NULL;
+ 			vma = next_vma(vma, gate_vma)) {
+ 		unsigned long addr;
++		unsigned long end;
+ 
+-		if (!maydump(vma, mm_flags))
+-			continue;
++		end = vma->vm_start + vma_dump_size(vma, mm_flags);
+ 
+-		for (addr = vma->vm_start;
+-		     addr < vma->vm_end;
+-		     addr += PAGE_SIZE) {
++		for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
+ 			struct page *page;
+ 			struct vm_area_struct *vma;
+ 
+diff -puN include/linux/sched.h~add-mmf_dump_elf_headers include/linux/sched.h
+--- a/include/linux/sched.h~add-mmf_dump_elf_headers
++++ a/include/linux/sched.h
+@@ -360,8 +360,9 @@ extern int get_dumpable(struct mm_struct
+ #define MMF_DUMP_ANON_SHARED	3
+ #define MMF_DUMP_MAPPED_PRIVATE	4
+ #define MMF_DUMP_MAPPED_SHARED	5
++#define MMF_DUMP_ELF_HEADERS	6
+ #define MMF_DUMP_FILTER_SHIFT	MMF_DUMPABLE_BITS
+-#define MMF_DUMP_FILTER_BITS	4
++#define MMF_DUMP_FILTER_BITS	5
+ #define MMF_DUMP_FILTER_MASK \
+ 	(((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
+ #define MMF_DUMP_FILTER_DEFAULT \

linux-2.6-add-sys-module-name-notes.patch:

Index: linux-2.6-add-sys-module-name-notes.patch
===================================================================
RCS file: linux-2.6-add-sys-module-name-notes.patch
diff -N linux-2.6-add-sys-module-name-notes.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-add-sys-module-name-notes.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,183 @@
+
+
+*** Remember to use Documentation/SubmitChecklist when testing your code ***
+
+See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
+out what to do about this
+
+------------------------------------------------------
+Subject: Add /sys/module/name/notes
+From: Roland McGrath <roland redhat com>
+
+This patch adds the /sys/module/<name>/notes/ magic directory, which has a
+file for each allocated SHT_NOTE section that appears in <name>.ko.  This
+is the counterpart for each module of /sys/kernel/notes for vmlinux. 
+Reading this delivers the contents of the module's SHT_NOTE sections.  This
+lets userland easily glean any detailed information about that module's
+build that was stored there at compile time (e.g.  by ld --build-id).
+
+Signed-off-by: Roland McGrath <roland redhat com>
+Signed-off-by: Andrew Morton <akpm linux-foundation org>
+---
+
+ include/linux/module.h |    3 +
+ kernel/module.c        |  106 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 109 insertions(+)
+
+diff -puN include/linux/module.h~add-sys-module-name-notes include/linux/module.h
+--- a/include/linux/module.h~add-sys-module-name-notes
++++ a/include/linux/module.h
+@@ -359,6 +359,9 @@ struct module
+ 
+ 	/* Section attributes */
+ 	struct module_sect_attrs *sect_attrs;
++
++	/* Notes attributes */
++	struct module_notes_attrs *notes_attrs;
+ #endif
+ 
+ 	/* Per-cpu data. */
+diff -puN kernel/module.c~add-sys-module-name-notes kernel/module.c
+--- a/kernel/module.c~add-sys-module-name-notes
++++ a/kernel/module.c
+@@ -20,6 +20,7 @@
+ #include <linux/moduleloader.h>
+ #include <linux/init.h>
+ #include <linux/kallsyms.h>
++#include <linux/sysfs.h>
+ #include <linux/kernel.h>
+ #include <linux/slab.h>
+ #include <linux/vmalloc.h>
+@@ -1063,6 +1064,100 @@ static void remove_sect_attrs(struct mod
+ 	}
+ }
+ 
++/*
++ * /sys/module/foo/notes/.section.name gives contents of SHT_NOTE sections.
++ */
++
++struct module_notes_attrs {
++	struct kobject *dir;
++	unsigned int notes;
++	struct bin_attribute attrs[0];
++};
++
++static ssize_t module_notes_read(struct kobject *kobj,
++				 struct bin_attribute *bin_attr,
++				 char *buf, loff_t pos, size_t count)
++{
++	/*
++	 * The caller checked the pos and count against our size.
++	 */
++	memcpy(buf, bin_attr->private + pos, count);
++	return count;
++}
++
++static void free_notes_attrs(struct module_notes_attrs *notes_attrs,
++			     unsigned int i)
++{
++	if (notes_attrs->dir) {
++		while (i-- > 0)
++			sysfs_remove_bin_file(notes_attrs->dir,
++					      &notes_attrs->attrs[i]);
++		kobject_del(notes_attrs->dir);
++	}
++	kfree(notes_attrs);
++}
++
++static void add_notes_attrs(struct module *mod, unsigned int nsect,
++			    char *secstrings, Elf_Shdr *sechdrs)
++{
++	unsigned int notes, loaded, i;
++	struct module_notes_attrs *notes_attrs;
++	struct bin_attribute *nattr;
++
++	/* Count notes sections and allocate structures.  */
++	notes = 0;
++	for (i = 0; i < nsect; i++)
++		if ((sechdrs[i].sh_flags & SHF_ALLOC) &&
++		    (sechdrs[i].sh_type == SHT_NOTE))
++			++notes;
++
++	if (notes == 0)
++		return;
++
++	notes_attrs = kzalloc(sizeof(*notes_attrs)
++			      + notes * sizeof(notes_attrs->attrs[0]),
++			      GFP_KERNEL);
++	if (notes_attrs == NULL)
++		return;
++
++	notes_attrs->notes = notes;
++	nattr = &notes_attrs->attrs[0];
++	for (loaded = i = 0; i < nsect; ++i) {
++		if (!(sechdrs[i].sh_flags & SHF_ALLOC))
++			continue;
++		if (sechdrs[i].sh_type == SHT_NOTE) {
++			nattr->attr.name = mod->sect_attrs->attrs[loaded].name;
++			nattr->attr.mode = S_IRUGO;
++			nattr->size = sechdrs[i].sh_size;
++			nattr->private = (void *) sechdrs[i].sh_addr;
++			nattr->read = module_notes_read;
++			++nattr;
++		}
++		++loaded;
++	}
++
++	notes_attrs->dir = kobject_add_dir(&mod->mkobj.kobj, "notes");
++	if (!notes_attrs->dir)
++		goto out;
++
++	for (i = 0; i < notes; ++i)
++		if (sysfs_create_bin_file(notes_attrs->dir,
++					  &notes_attrs->attrs[i]))
++			goto out;
++
++	mod->notes_attrs = notes_attrs;
++	return;
++
++  out:
++	free_notes_attrs(notes_attrs, i);
++}
++
++static void remove_notes_attrs(struct module *mod)
++{
++	if (mod->notes_attrs)
++		free_notes_attrs(mod->notes_attrs, mod->notes_attrs->notes);
++}
++
+ #else
+ 
+ static inline void add_sect_attrs(struct module *mod, unsigned int nsect,
+@@ -1073,6 +1168,15 @@ static inline void add_sect_attrs(struct
+ static inline void remove_sect_attrs(struct module *mod)
+ {
+ }
++
++static inline void add_notes_attrs(struct module *mod, unsigned int nsect,
++				   char *sectstrings, Elf_Shdr *sechdrs)
++{
++}
++
++static inline void remove_notes_attrs(struct module *mod)
++{
++}
+ #endif /* CONFIG_KALLSYMS */
+ 
+ #ifdef CONFIG_SYSFS
+@@ -1207,6 +1311,7 @@ static void free_module(struct module *m
+ {
+ 	/* Delete from various lists */
+ 	stop_machine_run(__unlink_module, mod, NR_CPUS);
++	remove_notes_attrs(mod);
+ 	remove_sect_attrs(mod);
+ 	mod_kobject_remove(mod);
+ 
+@@ -1971,6 +2076,7 @@ static struct module *load_module(void _
+ 	if (err < 0)
+ 		goto arch_cleanup;
+ 	add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
++	add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+ 
+ 	/* Size of section 0 is 0, so this works well if no unwind info. */
+ 	mod->unwind_info = unwind_add_table(mod,

linux-2.6-amd-disabled-svm-detect-msr-1.patch:

Index: linux-2.6-amd-disabled-svm-detect-msr-1.patch
===================================================================
RCS file: linux-2.6-amd-disabled-svm-detect-msr-1.patch
diff -N linux-2.6-amd-disabled-svm-detect-msr-1.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-amd-disabled-svm-detect-msr-1.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,17 @@
+bz #246250
+
+From: H.J. Lu
+
+--- linux-2.6.21.i686/drivers/kvm/svm.h.msr	2007-06-28 22:42:12.000000000 -0700
++++ linux-2.6.21.i686/drivers/kvm/svm.h	2007-06-29 08:03:09.000000000 -0700
+@@ -175,8 +175,8 @@ struct __attribute__ ((__packed__)) vmcb
+ #define SVM_CPUID_FUNC 0x8000000a
+ 
+ #define MSR_EFER_SVME_MASK (1ULL << 12)
+-#define MSR_VM_CR       0xc0010114ULL
+-#define MSR_VM_HSAVE_PA 0xc0010117ULL
++#define MSR_VM_CR       0xc0010114
++#define MSR_VM_HSAVE_PA 0xc0010117
+ 
+ #define SVM_VM_CR_SVM_DISABLE 4
+ 

linux-2.6-amd-disabled-svm-detect.patch:

Index: linux-2.6-amd-disabled-svm-detect.patch
===================================================================
RCS file: linux-2.6-amd-disabled-svm-detect.patch
diff -N linux-2.6-amd-disabled-svm-detect.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-amd-disabled-svm-detect.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,47 @@
+commit cfc329b216bc3e54fe1107e8f714c7b3bc133224
+Author: Joerg Roedel <joerg roedel amd com>
+Date:   Fri Jun 22 12:29:50 2007 +0300
+
+    KVM: SVM: Reliably detect if SVM was disabled by BIOS
+    
+    This patch adds an implementation to the svm is_disabled function to
+    detect reliably if the BIOS disabled the SVM feature in the CPU. This
+    fixes the issues with kernel panics when loading the kvm-amd module on
+    machines where SVM is available but disabled.
+    
+    Signed-off-by: Joerg Roedel <joerg roedel amd com>
+    Signed-off-by: Avi Kivity <avi qumranet com>
+
+diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
+index 62ec38c..a0d4428 100644
+--- a/drivers/kvm/svm.c
++++ b/drivers/kvm/svm.c
+@@ -1735,6 +1735,12 @@ static void svm_inject_page_fault(struct kvm_vcpu *vcpu,
+ 
+ static int is_disabled(void)
+ {
++	u64 vm_cr;
++
++	rdmsrl(MSR_VM_CR, vm_cr);
++	if (vm_cr & (1 << SVM_VM_CR_SVM_DISABLE))
++		return 1;
++
+ 	return 0;
+ }
+ 
+diff --git a/drivers/kvm/svm.h b/drivers/kvm/svm.h
+index 5e93814..005a9c5 100644
+--- a/drivers/kvm/svm.h
++++ b/drivers/kvm/svm.h
+@@ -175,8 +175,11 @@ struct __attribute__ ((__packed__)) vmcb {
+ #define SVM_CPUID_FUNC 0x8000000a
+ 
+ #define MSR_EFER_SVME_MASK (1ULL << 12)
++#define MSR_VM_CR       0xc0010114ULL
+ #define MSR_VM_HSAVE_PA 0xc0010117ULL
+ 
++#define SVM_VM_CR_SVM_DISABLE 4
++
+ #define SVM_SELECTOR_S_SHIFT 4
+ #define SVM_SELECTOR_DPL_SHIFT 5
+ #define SVM_SELECTOR_P_SHIFT 7

linux-2.6-at76.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-at76.patch
Index: linux-2.6-at76.patch
===================================================================
RCS file: linux-2.6-at76.patch
diff -N linux-2.6-at76.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-at76.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,6272 @@
+diff -up linux-2.6.22.noarch/MAINTAINERS.orig linux-2.6.22.noarch/MAINTAINERS
+--- linux-2.6.22.noarch/MAINTAINERS.orig	2007-09-26 19:57:31.000000000 -0400
++++ linux-2.6.22.noarch/MAINTAINERS	2007-09-26 19:59:33.000000000 -0400
+@@ -685,6 +685,15 @@ W:	http://www.thekelleys.org.uk/atmel
+ W:	http://atmelwlandriver.sourceforge.net/
+ S:	Maintained
+ 
++ATMEL USB WIRELESS DRIVER
++P:	Pavel Roskin
++M:	proski gnu org
++L:	linux-wireless vger kernel org
++L:	at76c503a-user lists berlios de
++L:	at76c503a-develop lists berlios de
++W:	http://at76c503a.berlios.de/
++S:	Maintained
++
+ AUDIT SUBSYSTEM
+ P:	David Woodhouse
+ M:	dwmw2 infradead org
+diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/at76_usb.h
+--- /dev/null	2007-09-25 08:26:55.562976333 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/at76_usb.h	2007-09-26 19:59:33.000000000 -0400
+@@ -0,0 +1,662 @@
++/*
++ * Copyright (c) 2002,2003 Oliver Kurth
++ *	     (c) 2003,2004 Joerg Albert <joerg albert gmx de>
++ *	     (c) 2007 Guido Guenther <agx sigxcpu org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This driver was based on information from the Sourceforge driver
++ * released and maintained by Atmel:
++ *
++ *  http://sourceforge.net/projects/atmelwlandriver/
++ *
++ * Although the code was completely re-written,
++ * it would have been impossible without Atmel's decision to
++ * release an Open Source driver (unfortunately the firmware was
++ * kept binary only). Thanks for that decision to Atmel!
++ */
++
++#ifndef _AT76_USB_H
++#define _AT76_USB_H
++
++#include <net/ieee80211.h>
++
++/* current driver version */
++#define DRIVER_VERSION	"0.16"
++
++/* Board types */
++enum board_type {
++	BOARD_503_ISL3861 = 1,
++	BOARD_503_ISL3863 = 2,
++	BOARD_503 = 3,
++	BOARD_503_ACC = 4,
++	BOARD_505 = 5,
++	BOARD_505_2958 = 6,
++	BOARD_505A = 7,
++	BOARD_505AMX = 8
++};
++
++/* our private ioctl's */
++/* preamble length (0 - long, 1 - short, 2 - auto) */
++#define AT76_SET_SHORT_PREAMBLE		(SIOCIWFIRSTPRIV + 0)
++#define AT76_GET_SHORT_PREAMBLE		(SIOCIWFIRSTPRIV + 1)
++/* which debug channels are enabled */
++#define AT76_SET_DEBUG			(SIOCIWFIRSTPRIV + 2)
++#define AT76_GET_DEBUG			(SIOCIWFIRSTPRIV + 3)
++/* power save mode (incl. the Atmel proprietary smart save mode) */
++#define AT76_SET_POWERSAVE_MODE		(SIOCIWFIRSTPRIV + 4)
++#define AT76_GET_POWERSAVE_MODE		(SIOCIWFIRSTPRIV + 5)
++/* min and max channel times for scan */
++#define AT76_SET_SCAN_TIMES		(SIOCIWFIRSTPRIV + 6)
++#define AT76_GET_SCAN_TIMES		(SIOCIWFIRSTPRIV + 7)
++/* scan mode (0 - active, 1 - passive) */
++#define AT76_SET_SCAN_MODE		(SIOCIWFIRSTPRIV + 8)
++#define AT76_GET_SCAN_MODE		(SIOCIWFIRSTPRIV + 9)
++
++#define CMD_STATUS_IDLE				0x00
++#define CMD_STATUS_COMPLETE			0x01
++#define CMD_STATUS_UNKNOWN			0x02
++#define CMD_STATUS_INVALID_PARAMETER		0x03
++#define CMD_STATUS_FUNCTION_NOT_SUPPORTED	0x04
++#define CMD_STATUS_TIME_OUT			0x07
++#define CMD_STATUS_IN_PROGRESS			0x08
++#define CMD_STATUS_HOST_FAILURE			0xff
++#define CMD_STATUS_SCAN_FAILED			0xf0
++
++/* answers to get op mode */
++#define OPMODE_NONE				0x00
++#define OPMODE_NORMAL_NIC_WITH_FLASH		0x01
++#define OPMODE_HW_CONFIG_MODE			0x02
++#define OPMODE_DFU_MODE_WITH_FLASH		0x03
++#define OPMODE_NORMAL_NIC_WITHOUT_FLASH		0x04
++
++#define CMD_SET_MIB		0x01
++#define CMD_GET_MIB		0x02
++#define CMD_SCAN		0x03
++#define CMD_JOIN		0x04
++#define CMD_START_IBSS		0x05
++#define CMD_RADIO		0x06
++#define CMD_STARTUP		0x0B
++#define CMD_GETOPMODE		0x33
++
++#define MIB_LOCAL		0x01
++#define MIB_MAC_ADDR		0x02
++#define MIB_MAC			0x03
++#define MIB_MAC_MGMT		0x05
++#define MIB_MAC_WEP		0x06
++#define MIB_PHY			0x07
++#define MIB_FW_VERSION		0x08
++#define MIB_MDOMAIN		0x09
++
++#define ADHOC_MODE		1
++#define INFRASTRUCTURE_MODE	2
++
++/* values for struct mib_local, field preamble_type */
++#define PREAMBLE_TYPE_LONG	0
++#define PREAMBLE_TYPE_SHORT	1
++#define PREAMBLE_TYPE_AUTO	2
++
++/* values for tx_rate */
++#define TX_RATE_1MBIT		0
++#define TX_RATE_2MBIT		1
++#define TX_RATE_5_5MBIT 	2
++#define TX_RATE_11MBIT		3
++#define TX_RATE_AUTO		4
++
++/* power management modes */
++#define AT76_PM_OFF		1
++#define AT76_PM_ON		2
++#define AT76_PM_SMART		3
++
++struct hwcfg_r505 {
++	u8 cr39_values[14];
++	u8 reserved1[14];
++	u8 bb_cr[14];
++	u8 pidvid[4];
++	u8 mac_addr[ETH_ALEN];
++	u8 regulatory_domain;
++	u8 reserved2[14];
++	u8 cr15_values[14];
++	u8 reserved3[3];
++} __attribute__((packed));
++
++struct hwcfg_rfmd {
++	u8 cr20_values[14];
++	u8 cr21_values[14];
++	u8 bb_cr[14];
++	u8 pidvid[4];
++	u8 mac_addr[ETH_ALEN];
++	u8 regulatory_domain;
++	u8 low_power_values[14];
++	u8 normal_power_values[14];
++	u8 reserved1[3];
++} __attribute__((packed));
++
++struct hwcfg_intersil {
++	u8 mac_addr[ETH_ALEN];
++	u8 cr31_values[14];
++	u8 cr58_values[14];
++	u8 pidvid[4];
++	u8 regulatory_domain;
++	u8 reserved[1];
++} __attribute__((packed));
++
++union at76_hwcfg {
++	struct hwcfg_intersil i;
++	struct hwcfg_rfmd r3;
++	struct hwcfg_r505 r5;
++};
++
++#define WEP_SMALL_KEY_LEN	(40 / 8)
++#define WEP_LARGE_KEY_LEN	(104 / 8)
++
++struct at76_card_config {
++	u8 exclude_unencrypted;
++	u8 promiscuous_mode;
++	u8 short_retry_limit;
++	u8 encryption_type;
++	__le16 rts_threshold;
++	__le16 fragmentation_threshold;	/* 256..2346 */
++	u8 basic_rate_set[4];
++	u8 auto_rate_fallback;	/* 0,1 */
++	u8 channel;
++	u8 privacy_invoked;
++	u8 wep_default_key_id;	/* 0..3 */
++	u8 current_ssid[32];
++	u8 wep_default_key_value[4][WEP_KEY_LEN];
++	u8 ssid_len;
[...5879 lines suppressed...]
++{
++	int ret;
++	struct at76_priv *priv;
++	struct fwentry *fwe;
++	struct usb_device *udev;
++	int op_mode;
++	int need_ext_fw = 0;
++	struct mib_fw_version fwv;
++	int board_type = (int)id->driver_info;
++
++	udev = usb_get_dev(interface_to_usbdev(interface));
++
++	/* Load firmware into kernel memory */
++	fwe = at76_load_firmware(udev, board_type);
++	if (!fwe) {
++		ret = -ENOENT;
++		goto error;
++	}
++
++	op_mode = at76_get_op_mode(udev);
++
++	at76_dbg(DBG_DEVSTART, "opmode %d", op_mode);
++
++	/* we get OPMODE_NONE with 2.4.23, SMC2662W-AR ???
++	   we get 204 with 2.4.23, Fiberline FL-WL240u (505A+RFMD2958) ??? */
++
++	if (op_mode == OPMODE_HW_CONFIG_MODE) {
++		err("cannot handle a device in HW_CONFIG_MODE (opmode %d)",
++		    op_mode);
++		ret = -EBUSY;
++		goto error;
++	}
++
++	if (op_mode != OPMODE_NORMAL_NIC_WITH_FLASH
++	    && op_mode != OPMODE_NORMAL_NIC_WITHOUT_FLASH) {
++		/* download internal firmware part */
++		at76_dbg(DBG_DEVSTART, "downloading internal firmware");
++		ret = at76_load_internal_fw(udev, fwe);
++		if (ret < 0) {
++			err("error %d downloading internal firmware", ret);
++			goto error;
++		}
++		usb_put_dev(udev);
++		return ret;
++	}
++
++	/* Internal firmware already inside the device.  Get firmware
++	 * version to test if external firmware is loaded.
++	 * This works only for newer firmware, e.g. the Intersil 0.90.x
++	 * says "control timeout on ep0in" and subsequent
++	 * at76_get_op_mode() fail too :-( */
++
++	/* if version >= 0.100.x.y or device with built-in flash we can
++	 * query the device for the fw version */
++	if ((fwe->fw_version.major > 0 || fwe->fw_version.minor >= 100)
++	    || (op_mode == OPMODE_NORMAL_NIC_WITH_FLASH)) {
++		ret = at76_get_mib(udev, MIB_FW_VERSION, &fwv, sizeof(fwv));
++		if (ret < 0 || (fwv.major | fwv.minor) == 0)
++			need_ext_fw = 1;
++	} else
++		/* No way to check firmware version, reload to be sure */
++		need_ext_fw = 1;
++
++	if (need_ext_fw) {
++		at76_dbg(DBG_DEVSTART, "downloading external firmware");
++
++		ret = at76_load_external_fw(udev, fwe);
++		if (ret)
++			goto error;
++
++		/* Re-check firmware version */
++		ret = at76_get_mib(udev, MIB_FW_VERSION, &fwv, sizeof(fwv));
++		if (ret < 0) {
++			err("error %d getting firmware version", ret);
++			goto error;
++		}
++
++		/* Major and minor version must match */
++		if (fwv.major != fwe->fw_version.major
++		    || fwv.minor != fwe->fw_version.minor) {
++			printk(KERN_ERR DRIVER_NAME
++			       ": wrong firmware version, loaded %d.%d.%d-%d, "
++			       "read back %d.%d.%d-%d\n",
++			       fwe->fw_version.major, fwe->fw_version.minor,
++			       fwe->fw_version.patch, fwe->fw_version.build,
++			       fwv.major, fwv.minor, fwv.patch, fwv.build);
++			ret = -EBUSY;
++			goto error;
++		}
++	}
++
++	priv = at76_alloc_new_device(udev);
++	if (!priv) {
++		ret = -ENOMEM;
++		goto error;
++	}
++
++	SET_NETDEV_DEV(priv->netdev, &interface->dev);
++	usb_set_intfdata(interface, priv);
++
++	memcpy(&priv->fw_version, &fwv, sizeof(struct mib_fw_version));
++	priv->board_type = board_type;
++
++	ret = at76_init_new_device(priv, interface);
++	if (ret < 0)
++		at76_delete_device(priv);
++
++	return ret;
++
++error:
++	usb_put_dev(udev);
++	return ret;
++}
++
++static void at76_disconnect(struct usb_interface *interface)
++{
++	struct at76_priv *priv;
++
++	priv = usb_get_intfdata(interface);
++	usb_set_intfdata(interface, NULL);
++
++	/* Disconnect after loading internal firmware */
++	if (!priv)
++		return;
++
++	printk(KERN_INFO "%s: disconnecting\n", priv->netdev->name);
++	at76_delete_device(priv);
++	printk(KERN_INFO DRIVER_NAME ": disconnected\n");
++}
++
++/* Structure for registering this driver with the USB subsystem */
++static struct usb_driver at76_driver = {
++	.name = DRIVER_NAME,
++	.probe = at76_probe,
++	.disconnect = at76_disconnect,
++	.id_table = dev_table,
++};
++
++static int __init at76_mod_init(void)
++{
++	int result;
++
++	printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " loading\n");
++
++	mutex_init(&fw_mutex);
++
++	/* register this driver with the USB subsystem */
++	result = usb_register(&at76_driver);
++	if (result < 0)
++		err("usb_register failed (status %d)", result);
++
++	led_trigger_register_simple("at76_usb-tx", &ledtrig_tx);
++	return result;
++}
++
++static void __exit at76_mod_exit(void)
++{
++	int i;
++
++	printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " unloading\n");
++	usb_deregister(&at76_driver);
++	for (i = 0; i < ARRAY_SIZE(firmwares); i++) {
++		if (firmwares[i].fw)
++			release_firmware(firmwares[i].fw);
++	}
++	led_trigger_unregister_simple(ledtrig_tx);
++}
++
++module_param_named(debug, at76_debug, int, 0600);
++MODULE_PARM_DESC(debug, "Debugging level");
++
++module_init(at76_mod_init);
++module_exit(at76_mod_exit);
++
++MODULE_AUTHOR("Oliver Kurth <oku masqmail cx>");
++MODULE_AUTHOR("Joerg Albert <joerg albert gmx de>");
++MODULE_AUTHOR("Alex <alex foogod com>");
++MODULE_AUTHOR("Nick Jones");
++MODULE_AUTHOR("Balint Seeber <n0_5p4m_p13453 hotmail com>");
++MODULE_AUTHOR("Pavel Roskin <proski gnu org>");
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_LICENSE("GPL");
+diff -up linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.22.noarch/drivers/net/wireless/Kconfig
+--- linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig	2007-09-26 19:57:31.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/Kconfig	2007-09-26 19:59:33.000000000 -0400
+@@ -381,6 +381,14 @@ config PCI_HERMES
+ 	  common.  Some of the built-in wireless adaptors in laptops are of
+ 	  this variety.
+ 
++config USB_ATMEL
++	tristate "Atmel at76c503/at76c505/at76c505a USB cards"
++	depends on WLAN_80211 && USB
++	select FW_LOADER
++	---help---
++	  Enable support for USB Wireless devices using Atmel at76c503,
++	  at76c505 or at76c505a chips.
++
+ config PCMCIA_HERMES
+ 	tristate "Hermes PCMCIA card support"
+ 	depends on PCMCIA && HERMES

linux-2.6-ata-call-check-dma-with-qc-prepared.patch:

Index: linux-2.6-ata-call-check-dma-with-qc-prepared.patch
===================================================================
RCS file: linux-2.6-ata-call-check-dma-with-qc-prepared.patch
diff -N linux-2.6-ata-call-check-dma-with-qc-prepared.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ata-call-check-dma-with-qc-prepared.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,74 @@
+Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e00f1ff3c8977eff07d0214d2f3478ac947bda0f
+Commit:     e00f1ff3c8977eff07d0214d2f3478ac947bda0f
+Parent:     914616a3c2a54504f3b0eda0b67fcd32226b3e83
+Author:     Tejun Heo <htejun gmail com>
+AuthorDate: Wed Jun 27 02:47:35 2007 +0900
+Committer:  Jeff Garzik <jeff garzik org>
+CommitDate: Wed Jun 27 02:50:08 2007 -0400
+
+    libata: call ata_check_atapi_dma() with qc better prepared
+    
+    In atapi_xlat(), prepare qc better before calling
+    ata_check_atapi_dma() such that ata_check_atapi_dma() can use info
+    from qc.  While at it, reformat weird looking if/else block in the
+    function.
+    
+    Signed-off-by: Tejun Heo <htejun gmail com>
+    Signed-off-by: Jeff Garzik <jeff garzik org>
+---
+ drivers/ata/libata-scsi.c |   20 ++++++++------------
+ 1 files changed, 8 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
+index c228df2..4ddf00c 100644
+--- a/drivers/ata/libata-scsi.c
++++ b/drivers/ata/libata-scsi.c
+@@ -2373,11 +2373,6 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
+ 	int using_pio = (dev->flags & ATA_DFLAG_PIO);
+ 	int nodata = (scmd->sc_data_direction == DMA_NONE);
+ 
+-	if (!using_pio)
+-		/* Check whether ATAPI DMA is safe */
+-		if (ata_check_atapi_dma(qc))
+-			using_pio = 1;
+-
+ 	memset(qc->cdb, 0, dev->cdb_len);
+ 	memcpy(qc->cdb, scmd->cmnd, scmd->cmd_len);
+ 
+@@ -2390,19 +2385,22 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
+ 	}
+ 
+ 	qc->tf.command = ATA_CMD_PACKET;
++	qc->nbytes = scmd->request_bufflen;
++
++	/* check whether ATAPI DMA is safe */
++	if (!using_pio && ata_check_atapi_dma(qc))
++		using_pio = 1;
+ 
+-	/* no data, or PIO data xfer */
+ 	if (using_pio || nodata) {
++		/* no data, or PIO data xfer */
+ 		if (nodata)
+ 			qc->tf.protocol = ATA_PROT_ATAPI_NODATA;
+ 		else
+ 			qc->tf.protocol = ATA_PROT_ATAPI;
+ 		qc->tf.lbam = (8 * 1024) & 0xff;
+ 		qc->tf.lbah = (8 * 1024) >> 8;
+-	}
+-
+-	/* DMA data xfer */
+-	else {
++	} else {
++		/* DMA data xfer */
+ 		qc->tf.protocol = ATA_PROT_ATAPI_DMA;
+ 		qc->tf.feature |= ATAPI_PKT_DMA;
+ 
+@@ -2411,8 +2409,6 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
+ 			qc->tf.feature |= ATAPI_DMADIR;
+ 	}
+ 
+-	qc->nbytes = scmd->request_bufflen;
+-
+ 	return 0;
+ }
+ 

linux-2.6-ata-quirk.patch:

Index: linux-2.6-ata-quirk.patch
===================================================================
RCS file: linux-2.6-ata-quirk.patch
diff -N linux-2.6-ata-quirk.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ata-quirk.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,58 @@
+--- linux-2.6.20/arch/ia64/kernel/quirks.c	1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.20_fix/arch/ia64/kernel/quirks.c	2007-02-13 13:56:34.000000000 -0500
+@@ -0,0 +1,45 @@
++/*
++ * This file contains work-arounds for ia64 platform bugs.
++ */
++#include <linux/pci.h>
++
++/*
++ * quirk_intel_ide_controller: If an ide/ata controller is
++ * at legacy mode, BIOS might initiates BAR(bar 0~3 and 5)
++ * with incorrect value. This quirk will reset the incorrect
++ * value to 0.
++ */
++static void __devinit quirk_intel_ide_controller(struct pci_dev *dev)
++{
++	unsigned int pos;
++	struct resource *res;
++	int fixed = 0;
++	u8 tmp8;
++
++	if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
++		return;
++
++	/* TODO: What if one channel is in native mode ... */
++	pci_read_config_byte(dev, PCI_CLASS_PROG, &tmp8);
++	if ((tmp8 & 5) == 5)
++		return;
++
++	for( pos = 0; pos < 6; pos ++ ) {
++		res = &dev->resource[pos];
++		if (!(res->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
++			continue;
++
++		if (!res->start && res->end) {
++			res->start = res->end = 0;
++			res->flags = 0;
++			fixed = 1;
++		}
++	}
++	if (fixed)
++		printk(KERN_WARNING
++			"PCI device %s: BIOS resource configuration fixed.\n",
++			pci_name(dev));
++}
++
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_11, quirk_intel_ide_controller);
++
+--- linux-2.6.20/arch/ia64/kernel/Makefile	2007-02-08 02:13:41.000000000 -0500
++++ linux-2.6.20_fix/arch/ia64/kernel/Makefile	2007-02-12 09:49:39.000000000 -0500
+@@ -33,6 +33,7 @@ obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
+ obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR)	+= uncached.o
+ obj-$(CONFIG_AUDIT)		+= audit.o
+ obj-$(CONFIG_PCI_MSI)		+= msi_ia64.o
++obj-$(CONFIG_PCI)		+= quirks.o
+ mca_recovery-y			+= mca_drv.o mca_drv_asm.o
+ 
+ obj-$(CONFIG_IA64_ESI)		+= esi.o

linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch:

Index: linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch
===================================================================
RCS file: linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch
diff -N linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ata-use-pio-for-non-16-byte-xfers.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,82 @@
+Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9a4197e266a40d5d1d16c9fb2a852cf10743afe
+Commit:     b9a4197e266a40d5d1d16c9fb2a852cf10743afe
+Parent:     e00f1ff3c8977eff07d0214d2f3478ac947bda0f
+Author:     Tejun Heo <htejun gmail com>
+AuthorDate: Wed Jun 27 02:48:43 2007 +0900
+Committer:  Jeff Garzik <jeff garzik org>
+CommitDate: Wed Jun 27 02:50:08 2007 -0400
+
+    libata: use PIO for non-16 byte aligned ATAPI commands
+    
+    The IDE driver used DMA for ATAPI commands if READ/WRITE command is
+    multiple of sector size or sg command is multiple of 16 bytes.  For
+    libata, READ/WRITE sector alignment is guaranteed by the high level
+    driver (sr), so we only have to worry about the 16 byte alignment.
+    
+    This patch makes ata_check_atapi_dma() always request PIO for all data
+    transfer commands which are not multiple of 16 bytes.
+    
+    The following reports are related to this problem.
+    
+    http://bugzilla.kernel.org/show_bug.cgi?id=8605		(confirmed)
+    http://thread.gmane.org/gmane.linux.kernel/476620	(confirmed)
+    https://bugzilla.novell.com/show_bug.cgi?id=229260	(probably)
+    
+    Albert first pointed out the difference between IDE and libata.  Kudos
+    to him.
+    
+    Signed-off-by: Tejun Heo <htejun gmail com>
+    Cc: Albert Lee <albertcc tw ibm com>
+    Signed-off-by: Jeff Garzik <jeff garzik org>
+    [cebbert redhat com: removed extraneous whitespace change for -stable]
+---
+ drivers/ata/libata-core.c |   33 ++++++++++-----------------------
+ 1 files changed, 10 insertions(+), 23 deletions(-)
+
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
+index 642097a..094b518 100644
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -3900,33 +3900,19 @@ static void ata_fill_sg(struct ata_queued_cmd *qc)
+ int ata_check_atapi_dma(struct ata_queued_cmd *qc)
+ {
+ 	struct ata_port *ap = qc->ap;
+-	int rc = 0; /* Assume ATAPI DMA is OK by default */
+-
+-	/* some drives can only do ATAPI DMA on read/write */
+-	if (unlikely(qc->dev->horkage & ATA_HORKAGE_DMA_RW_ONLY)) {
+-		struct scsi_cmnd *cmd = qc->scsicmd;
+-		u8 *scsicmd = cmd->cmnd;
+-
+-		switch (scsicmd[0]) {
+-		case READ_10:
+-		case WRITE_10:
+-		case READ_12:
+-		case WRITE_12:
+-		case READ_6:
+-		case WRITE_6:
+-			/* atapi dma maybe ok */
+-			break;
+-		default:
+-			/* turn off atapi dma */
+-			return 1;
+-		}
+-	}
++
++	/* Don't allow DMA if it isn't multiple of 16 bytes.  Quite a
++	 * few ATAPI devices choke on such DMA requests.
++	 */
++	if (unlikely(qc->nbytes & 15))
++		return 1;
+ 
+ 	if (ap->ops->check_atapi_dma)
+-		rc = ap->ops->check_atapi_dma(qc);
++		return ap->ops->check_atapi_dma(qc);
+ 
+-	return rc;
++	return 0;
+ }
++
+ /**
+  *	ata_qc_prep - Prepare taskfile for submission
+  *	@qc: Metadata associated with taskfile to be prepared

linux-2.6-ath5k.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-ath5k.patch
Index: linux-2.6-ath5k.patch
===================================================================
RCS file: linux-2.6-ath5k.patch
diff -N linux-2.6-ath5k.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ath5k.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,14257 @@
+diff -up linux-2.6.22.noarch/MAINTAINERS.orig linux-2.6.22.noarch/MAINTAINERS
+--- linux-2.6.22.noarch/MAINTAINERS.orig	2007-09-27 19:25:02.000000000 -0400
++++ linux-2.6.22.noarch/MAINTAINERS	2007-09-27 19:26:44.000000000 -0400
+@@ -642,6 +642,14 @@ M:	ecashin coraid com
+ W:	http://www.coraid.com/support/linux
+ S:	Supported
+ 
++ATHEROS ATH5K WIRELESS DRIVER
++P:	Jiri Slaby
++M:	jirislaby gmail com
++P:	Luis R. Rodriguez
++M:	mcgrof gmail com
++L:	linux-wireless vger kernel org
++S:	Maintained
++
+ ATL1 ETHERNET DRIVER
+ P:	Jay Cliburn
+ M:	jcliburn gmail com
+diff -up linux-2.6.22.noarch/drivers/net/wireless/Makefile.orig linux-2.6.22.noarch/drivers/net/wireless/Makefile
+--- linux-2.6.22.noarch/drivers/net/wireless/Makefile.orig	2007-09-27 19:25:02.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/Makefile	2007-09-27 19:27:03.000000000 -0400
+@@ -61,3 +61,5 @@ obj-$(CONFIG_RT2X00)		+= rt2x00/
+ obj-$(CONFIG_P54_COMMON)	+= p54common.o
+ obj-$(CONFIG_P54_USB)		+= p54usb.o
+ obj-$(CONFIG_P54_PCI)		+= p54pci.o
++
++obj-$(CONFIG_ATH5K)	+= ath5k/
+diff -up linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.22.noarch/drivers/net/wireless/Kconfig
+--- linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig	2007-09-27 19:25:02.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/Kconfig	2007-09-27 19:26:44.000000000 -0400
+@@ -598,6 +598,19 @@ config P54_PCI
+ 	tristate "Prism54 PCI support"
+ 	depends on P54_COMMON && PCI
+ 
++config ATH5K
++	tristate "Atheros 5xxx wireless cards support"
++	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
++	default m
++	---help---
++	  This module adds support for atheros 5xxx (e.g. 5212) wireless
++	  cards. If you have this card in your PC, select this to be build.
++
++	  This driver uses the kernel's mac80211 subsystem.
++
++	  If you choose to build a module, it'll be called ath5k. Say M if
++	  unsure.
++
+ source "drivers/net/wireless/hostap/Kconfig"
+ source "drivers/net/wireless/bcm43xx/Kconfig"
+ source "drivers/net/wireless/b43/Kconfig"
+diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/ath5k/phy.c
+--- /dev/null	2007-09-27 08:31:24.563724082 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/ath5k/phy.c	2007-09-27 19:26:44.000000000 -0400
+@@ -0,0 +1,1704 @@
++/*
++ * PHY functions
++ *
++ * Copyright (c) 2006-2007 Nick Kossifidis <mickflemm gmail com>
++ *
++ *  This file is free software: you can copy, redistribute and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation, either version 2 of the License, or (at
++ *  your option) any later version.
++ *
++ *  This file is distributed in the hope that it will be useful, but
++ *  WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *  General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ *
++ * This file incorporates work covered by the following copyright and
++ * permission notice:
++ *
++ *     Copyright (c) 2007 Jiri Slaby <jirislaby gmail com>
++ *     Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk openbsd org>
++ *
++ *     Permission to use, copy, modify, and distribute this software for
++ *     any purpose with or without fee is hereby granted, provided that
++ *     the above copyright notice and this permission notice appear in all
++ *     copies.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
++ *     WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
++ *     WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
++ *     AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
++ *     CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
++ *     OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
++ *     NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
++ *     CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include <linux/delay.h>
++
++#include "ath5k.h"
++#include "reg.h"
++
++/* Struct to hold initial RF register values (RF Banks) */
++struct ath5k_ini_rf {
++	u8	rf_bank;	/* check out ath5k_reg.h */
++	u16	rf_register;	/* register address */
++	u32	rf_value[5];	/* register value for different modes (above) */
++};
++
++/*
++ * Mode-specific RF Gain table (64bytes) for RF5111/5112
++ * (RF5110 only comes with AR5210 and only supports a/turbo a mode so initial
++ * RF Gain values are included in AR5K_AR5210_INI)
++ */
++struct ath5k_ini_rfgain {
++	u16	rfg_register;	/* RF Gain register address */
++	u32	rfg_value[2];	/* [freq (see below)] */
++};
++
++struct ath5k_gain_opt {
++	u32			go_default;
++	u32			go_steps_count;
++	const struct ath5k_gain_opt_step	go_step[AR5K_GAIN_STEP_COUNT];
++};
++
++/* RF5111 mode-specific init registers */
++static const struct ath5k_ini_rf rfregs_5111[] = {
++	{ 0, 0x989c,
++	/*    mode a/XR   mode aTurbo mode b      mode g      mode gTurbo */
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00380000, 0x00380000, 0x00380000, 0x00380000, 0x00380000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 0, 0x989c,
++	    { 0x00000000, 0x00000000, 0x000000c0, 0x00000080, 0x00000080 } },
++	{ 0, 0x989c,
++	    { 0x000400f9, 0x000400f9, 0x000400ff, 0x000400fd, 0x000400fd } },
++	{ 0, 0x98d4,
++	    { 0x00000000, 0x00000000, 0x00000004, 0x00000004, 0x00000004 } },
++	{ 1, 0x98d4,
++	    { 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020 } },
++	{ 2, 0x98d4,
++	    { 0x00000010, 0x00000014, 0x00000010, 0x00000010, 0x00000014 } },
++	{ 3, 0x98d8,
++	    { 0x00601068, 0x00601068, 0x00601068, 0x00601068, 0x00601068 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x10000000, 0x10000000, 0x10000000, 0x10000000, 0x10000000 } },
++	{ 6, 0x989c,
++	    { 0x04000000, 0x04000000, 0x04000000, 0x04000000, 0x04000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x00000000, 0x00000000, 0x0a000000, 0x00000000, 0x00000000 } },
++	{ 6, 0x989c,
++	    { 0x003800c0, 0x00380080, 0x023800c0, 0x003800c0, 0x003800c0 } },
++	{ 6, 0x989c,
++	    { 0x00020006, 0x00020006, 0x00000006, 0x00020006, 0x00020006 } },
++	{ 6, 0x989c,
++	    { 0x00000089, 0x00000089, 0x00000089, 0x00000089, 0x00000089 } },
++	{ 6, 0x989c,
[...13864 lines suppressed...]
++	enum ieee80211_if_types	opmode;
++	struct ath_hw		*ah;		/* Atheros HW */
++
++	int			debug;
++
++	struct ath_buf		*bufptr;	/* allocated buffer ptr */
++	struct ath_desc		*desc;		/* TX/RX descriptors */
++	dma_addr_t		desc_daddr;	/* DMA (physical) address */
++	size_t			desc_len;	/* size of TX/RX descriptors */
++	u16			cachelsz;	/* cache line size */
++
++	DECLARE_BITMAP(status, 6);
++#define ATH_STAT_INVALID	0		/* disable hardware accesses */
++#define ATH_STAT_MRRETRY	1		/* multi-rate retry support */
++#define ATH_STAT_PROMISC	2
++#define ATH_STAT_LEDBLINKING	3		/* LED blink operation active */
++#define ATH_STAT_LEDENDBLINK	4		/* finish LED blink operation */
++#define ATH_STAT_LEDSOFT	5		/* enable LED gpio status */
++
++	unsigned int		curmode;	/* current phy mode */
++	struct ieee80211_channel *curchan;	/* current h/w channel */
++
++	int 			iface_id;	/* add/remove_interface id */
++
++	struct {
++		u8	rxflags;	/* radiotap rx flags */
++		u8	txflags;	/* radiotap tx flags */
++		u16	ledon;		/* softled on time */
++		u16	ledoff;		/* softled off time */
++	} hwmap[32];				/* h/w rate ix mappings */
++
++	enum ath5k_int		imask;		/* interrupt mask copy */
++
++	DECLARE_BITMAP(keymap, AR5K_KEYCACHE_SIZE); /* key use bit map */
++
++	u8			bssidmask[ETH_ALEN];
++
++	unsigned int		led_pin,	/* GPIO pin for driving LED */
++				led_on,		/* pin setting for LED on */
++				led_off;	/* off time for current blink */
++	struct timer_list	led_tim;	/* led off timer */
++	u8			led_rxrate;	/* current rx rate for LED */
++	u8			led_txrate;	/* current tx rate for LED */
++
++	struct tasklet_struct	restq;		/* reset tasklet */
++
++	unsigned int		rxbufsize;	/* rx size based on mtu */
++	struct list_head	rxbuf;		/* receive buffer */
++	spinlock_t		rxbuflock;
++	u32			*rxlink;	/* link ptr in last RX desc */
++	struct tasklet_struct	rxtq;		/* rx intr tasklet */
++
++	struct list_head	txbuf;		/* transmit buffer */
++	spinlock_t		txbuflock;
++	unsigned int		txbuf_len;	/* buf count in txbuf list */
++	struct ath_txq		txqs[2];	/* beacon and tx */
++
++	struct ath_txq		*txq;		/* beacon and tx*/
++	struct tasklet_struct	txtq;		/* tx intr tasklet */
++
++	struct ath_buf		*bbuf;		/* beacon buffer */
++	unsigned int		bhalq,		/* HAL q for outgoing beacons */
++				bmisscount,	/* missed beacon transmits */
++				bintval,	/* beacon interval */
++				bsent;
++
++	struct timer_list	calib_tim;	/* calibration timer */
++};
++
++#define ath5k_hw_hasbssidmask(_ah) \
++	(ath5k_hw_get_capability(_ah, AR5K_CAP_BSSIDMASK, 0, NULL) == 0)
++#define ath5k_hw_hasveol(_ah) \
++	(ath5k_hw_get_capability(_ah, AR5K_CAP_VEOL, 0, NULL) == 0)
++
++#endif
+diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/ath5k/regdom.c
+--- /dev/null	2007-09-27 08:31:24.563724082 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/ath5k/regdom.c	2007-09-27 19:26:44.000000000 -0400
+@@ -0,0 +1,121 @@
++/*
++ * Copyright (c) 2004, 2005 Reyk Floeter <reyk vantronix net>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++/*
++ * Basic regulation domain extensions for the IEEE 802.11 stack
++ */
++
++#include <linux/kernel.h>
++#include <linux/string.h>
++
++#include "regdom.h"
++
++static const struct ath5k_regdommap {
++	enum ath5k_regdom dmn;
++	enum ath5k_regdom dmn5;
++	enum ath5k_regdom dmn2;
++} r_map[] = {
++	{ DMN_DEFAULT,		DMN_DEBUG,	DMN_DEBUG },
++	{ DMN_NULL_WORLD,	DMN_NULL,	DMN_WORLD },
++	{ DMN_NULL_ETSIB,	DMN_NULL,	DMN_ETSIB },
++	{ DMN_NULL_ETSIC,	DMN_NULL,	DMN_ETSIC },
++	{ DMN_FCC1_FCCA,	DMN_FCC1,	DMN_FCCA },
++	{ DMN_FCC1_WORLD,	DMN_FCC1,	DMN_WORLD },
++	{ DMN_FCC2_FCCA,	DMN_FCC2,	DMN_FCCA },
++	{ DMN_FCC2_WORLD,	DMN_FCC2,	DMN_WORLD },
++	{ DMN_FCC2_ETSIC,	DMN_FCC2,	DMN_ETSIC },
++	{ DMN_FRANCE_NULL,	DMN_ETSI3,	DMN_ETSI3 },
++	{ DMN_FCC3_FCCA,	DMN_FCC3,	DMN_WORLD },
++	{ DMN_ETSI1_WORLD,	DMN_ETSI1,	DMN_WORLD },
++	{ DMN_ETSI3_ETSIA,	DMN_ETSI3,	DMN_WORLD },
++	{ DMN_ETSI2_WORLD,	DMN_ETSI2,	DMN_WORLD },
++	{ DMN_ETSI3_WORLD,	DMN_ETSI3,	DMN_WORLD },
++	{ DMN_ETSI4_WORLD,	DMN_ETSI4,	DMN_WORLD },
++	{ DMN_ETSI4_ETSIC,	DMN_ETSI4,	DMN_ETSIC },
++	{ DMN_ETSI5_WORLD,	DMN_ETSI5,	DMN_WORLD },
++	{ DMN_ETSI6_WORLD,	DMN_ETSI6,	DMN_WORLD },
++	{ DMN_ETSI_NULL,	DMN_ETSI1,	DMN_ETSI1 },
++	{ DMN_MKK1_MKKA,	DMN_MKK1,	DMN_MKKA },
++	{ DMN_MKK1_MKKB,	DMN_MKK1,	DMN_MKKA },
++	{ DMN_APL4_WORLD,	DMN_APL4,	DMN_WORLD },
++	{ DMN_MKK2_MKKA,	DMN_MKK2,	DMN_MKKA },
++	{ DMN_APL_NULL,		DMN_APL1,	DMN_NULL },
++	{ DMN_APL2_WORLD,	DMN_APL2,	DMN_WORLD },
++	{ DMN_APL2_APLC,	DMN_APL2,	DMN_WORLD },
++	{ DMN_APL3_WORLD,	DMN_APL3,	DMN_WORLD },
++	{ DMN_MKK1_FCCA,	DMN_MKK1,	DMN_FCCA },
++	{ DMN_APL2_APLD,	DMN_APL2,	DMN_APLD },
++	{ DMN_MKK1_MKKA1,	DMN_MKK1,	DMN_MKKA },
++	{ DMN_MKK1_MKKA2,	DMN_MKK1,	DMN_MKKA },
++	{ DMN_APL1_WORLD,	DMN_APL1,	DMN_WORLD },
++	{ DMN_APL1_FCCA,	DMN_APL1,	DMN_FCCA },
++	{ DMN_APL1_APLA,	DMN_APL1,	DMN_WORLD },
++	{ DMN_APL1_ETSIC,	DMN_APL1,	DMN_ETSIC },
++	{ DMN_APL2_ETSIC,	DMN_APL2,	DMN_ETSIC },
++	{ DMN_APL5_WORLD,	DMN_APL5,	DMN_WORLD },
++	{ DMN_WOR0_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR1_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR2_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR3_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR4_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR5_ETSIC,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR01_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WOR02_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_EU1_WORLD,	DMN_ETSI1,	DMN_WORLD },
++	{ DMN_WOR9_WORLD,	DMN_WORLD,	DMN_WORLD },
++	{ DMN_WORA_WORLD,	DMN_WORLD,	DMN_WORLD },
++};
++
++enum ath5k_regdom ath5k_regdom2flag(enum ath5k_regdom dmn, u16 mhz)
++{
++	unsigned int i;
++
++	for (i = 0; i < ARRAY_SIZE(r_map); i++) {
++		if (r_map[i].dmn == dmn) {
++			if (mhz >= 2000 && mhz <= 3000)
++				return r_map[i].dmn2;
++			if (mhz >= IEEE80211_CHANNELS_5GHZ_MIN &&
++					mhz <= IEEE80211_CHANNELS_5GHZ_MAX)
++				return r_map[i].dmn5;
++		}
++	}
++
++	return DMN_DEBUG;
++}
++
++u16 ath5k_regdom_from_ieee(enum ath5k_regdom ieee)
++{
++	u32 regdomain = (u32)ieee;
++
++	/*
++	 * Use the default regulation domain if the value is empty
++	 * or not supported by the net80211 regulation code.
++	 */
++	if (ath5k_regdom2flag(regdomain, IEEE80211_CHANNELS_5GHZ_MIN) ==
++			DMN_DEBUG)
++		return (u16)AR5K_TUNE_REGDOMAIN;
++
++	/* It is supported, just return the value */
++	return regdomain;
++}
++
++enum ath5k_regdom ath5k_regdom_to_ieee(u16 regdomain)
++{
++	enum ath5k_regdom ieee = (enum ath5k_regdom)regdomain;
++
++	return ieee;
++}
++

linux-2.6-bcm43xx-pci-neuter.patch:

Index: linux-2.6-bcm43xx-pci-neuter.patch
===================================================================
RCS file: linux-2.6-bcm43xx-pci-neuter.patch
diff -N linux-2.6-bcm43xx-pci-neuter.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-bcm43xx-pci-neuter.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,18 @@
+--- linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c.orig	2007-05-08 14:16:48.000000000 -0400
++++ linux-2.6.21.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2007-05-08 14:17:35.000000000 -0400
+@@ -124,6 +124,7 @@
+ 	static struct pci_device_id bcm43xx_pci_tbl[] = {
+ 	/* Broadcom 4303 802.11b */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
++#if 0 /* Disable in favor of bcm43xx-mac80211 */
+ 	/* Broadcom 4307 802.11b */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x4307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ 	/* Broadcom 4311 802.11(a)/b/g */
+@@ -146,6 +147,7 @@
+ 	/* SB bus on BCM947xx */
+ 	{ PCI_VENDOR_ID_BROADCOM, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ #endif
++#endif
+ 	{ 0 },
+ };
+ MODULE_DEVICE_TABLE(pci, bcm43xx_pci_tbl);

linux-2.6-cell-spu-device-tree.patch:

Index: linux-2.6-cell-spu-device-tree.patch
===================================================================
RCS file: linux-2.6-cell-spu-device-tree.patch
diff -N linux-2.6-cell-spu-device-tree.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-cell-spu-device-tree.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,391 @@
+Subject: [PATCH 01/10] cell: add cbe_node_to_cpu function
+From: Christian Krafft <krafft de ibm com>
+
+This patch adds code to deal with conversion of
+logical cpu to cbe nodes. It removes code that
+assummed there were two logical CPUs per CBE.
+
+Signed-off-by: Christian Krafft <krafft de ibm com>
+Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+----------
+
+Subject: [PATCH 07/10] add of_iomap function
+From: Christian Krafft <krafft de ibm com>
+
+The of_iomap function maps memory for a given
+device_node and returns a pointer to that memory.
+This is used at some places, so it makes sense to
+a seperate function.
+
+Signed-off-by: Christian Krafft <krafft de ibm com>
+Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+----------
+
+Subject: [PATCH 08/10] cell: add support for proper device-tree
+From: Christian Krafft <krafft de ibm com>
+
+This patch adds support for a proper device-tree.
+A porper device-tree on cell contains be nodes
+for each CBE containg nodes for SPEs and all the
+other special devices on it.
+Ofcourse oldschool devicetree is still supported.
+
+Signed-off-by: Christian Krafft <krafft de ibm com>
+Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+
+diff -ur linux-2.6.20.ppc64.3108/arch/powerpc/oprofile/op_model_cell.c linux-2.6.20.ppc64/arch/powerpc/oprofile/op_model_cell.c
+--- linux-2.6.20.ppc64.3108/arch/powerpc/oprofile/op_model_cell.c	2007-04-24 18:03:51.000000000 +0100
++++ linux-2.6.20.ppc64/arch/powerpc/oprofile/op_model_cell.c	2007-04-24 19:34:42.000000000 +0100
+@@ -37,6 +37,7 @@
+ #include <asm/system.h>
+ 
+ #include "../platforms/cell/interrupt.h"
++#include "../platforms/cell/cbe_regs.h"
+ 
+ #define PPU_CYCLES_EVENT_NUM 1	/*  event number for CYCLES */
+ #define PPU_CYCLES_GRP_NUM   1  /* special group number for identifying
+diff -ur linux-2.6.20.ppc64.3108/arch/powerpc/platforms/cell/cbe_regs.c linux-2.6.20.ppc64/arch/powerpc/platforms/cell/cbe_regs.c
+--- linux-2.6.20.ppc64/arch/powerpc//platforms/cell/cbe_regs.c	2007-04-24 22:50:22.000000000 +0100
++++ linux-2.6.20.ppc64.spustuff/arch/powerpc/platforms/cell/cbe_regs.c	2007-04-24 19:39:15.000000000 +0100
+@@ -14,6 +14,8 @@
+ #include <asm/pgtable.h>
+ #include <asm/prom.h>
+ #include <asm/ptrace.h>
++#include <asm/of_device.h>
++#include <asm/of_platform.h>
+ 
+ #include "cbe_regs.h"
+ 
+@@ -27,6 +29,7 @@
+ static struct cbe_regs_map
+ {
+ 	struct device_node *cpu_node;
++	struct device_node *be_node;
+ 	struct cbe_pmd_regs __iomem *pmd_regs;
+ 	struct cbe_iic_regs __iomem *iic_regs;
+ 	struct cbe_mic_tm_regs __iomem *mic_tm_regs;
+@@ -37,30 +40,43 @@ static int cbe_regs_map_count;
+ static struct cbe_thread_map
+ {
+ 	struct device_node *cpu_node;
++	struct device_node *be_node;
+ 	struct cbe_regs_map *regs;
++	unsigned int thread_id;
++	unsigned int cbe_id;
+ } cbe_thread_map[NR_CPUS];
+ 
++static cpumask_t cbe_local_mask[MAX_CBE] = { [0 ... MAX_CBE-1] = CPU_MASK_NONE };
++static cpumask_t cbe_first_online_cpu = CPU_MASK_NONE;
++
+ static struct cbe_regs_map *cbe_find_map(struct device_node *np)
+ {
+ 	int i;
+ 	struct device_node *tmp_np;
+ 
+-	if (strcasecmp(np->type, "spe") == 0) {
+-		if (np->data == NULL) {
+-			/* walk up path until cpu node was found */
+-			tmp_np = np->parent;
+-			while (tmp_np != NULL && strcasecmp(tmp_np->type, "cpu") != 0)
+-				tmp_np = tmp_np->parent;
++	if (strcasecmp(np->type, "spe")) {
++		for (i = 0; i < cbe_regs_map_count; i++)
++			if (cbe_regs_maps[i].cpu_node == np ||
++			    cbe_regs_maps[i].be_node == np)
++				return &cbe_regs_maps[i];
++		return NULL;
++	}
+ 
+-			np->data = cbe_find_map(tmp_np);
+-		}
++	if (np->data)
+ 		return np->data;
+-	}
+ 
+-	for (i = 0; i < cbe_regs_map_count; i++)
+-		if (cbe_regs_maps[i].cpu_node == np)
+-			return &cbe_regs_maps[i];
+-	return NULL;
++	/* walk up path until cpu or be node was found */
++	tmp_np = np;
++	do {
++		tmp_np = tmp_np->parent;
++		/* on a correct devicetree we wont get up to root */
++		BUG_ON(!tmp_np);
++	} while (strcasecmp(tmp_np->type, "cpu") &&
++		 strcasecmp(tmp_np->type, "be"));
++
++	np->data = cbe_find_map(tmp_np);
++
++	return np->data;
+ }
+ 
+ struct cbe_pmd_regs __iomem *cbe_get_pmd_regs(struct device_node *np)
+@@ -130,49 +146,69 @@ struct cbe_mic_tm_regs __iomem *cbe_get_
+ }
+ EXPORT_SYMBOL_GPL(cbe_get_cpu_mic_tm_regs);
+ 
+-/* FIXME
+- * This is little more than a stub at the moment.  It should be
+- * fleshed out so that it works for both SMT and non-SMT, no
+- * matter if the passed cpu is odd or even.
+- * For SMT enabled, returns 0 for even-numbered cpu; otherwise 1.
+- * For SMT disabled, returns 0 for all cpus.
+- */
+ u32 cbe_get_hw_thread_id(int cpu)
+ {
+-	return (cpu & 1);
++	return cbe_thread_map[cpu].thread_id;
+ }
+ EXPORT_SYMBOL_GPL(cbe_get_hw_thread_id);
+ 
+-void __init cbe_regs_init(void)
++u32 cbe_cpu_to_node(int cpu)
+ {
+-	int i;
+-	struct device_node *cpu;
++	return cbe_thread_map[cpu].cbe_id;
++}
++EXPORT_SYMBOL_GPL(cbe_cpu_to_node);
+ 
+-	/* Build local fast map of CPUs */
+-	for_each_possible_cpu(i)
+-		cbe_thread_map[i].cpu_node = of_get_cpu_node(i, NULL);
++u32 cbe_node_to_cpu(int node)
++{
++	return find_first_bit( (unsigned long *) &cbe_local_mask[node], sizeof(cpumask_t));
++}
++EXPORT_SYMBOL_GPL(cbe_node_to_cpu);
+ 
+-	/* Find maps for each device tree CPU */
+-	for_each_node_by_type(cpu, "cpu") {
+-		struct cbe_regs_map *map = &cbe_regs_maps[cbe_regs_map_count++];
++static struct device_node *cbe_get_be_node(int cpu_id)
++{
++	struct device_node *np;
++
++	for_each_node_by_type (np, "be") {
++		int len,i;
++		const phandle *cpu_handle;
++
++		cpu_handle = get_property(np, "cpus", &len);
++
++		for (i=0; i<len; i++)
++			if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL))
++				return np;
++	}
++
++	return NULL;
++}
++
++void __init cbe_fill_regs_map(struct cbe_regs_map *map)
++{
++	if(map->be_node) {
++		struct device_node *be, *np;
+ 
++		be = map->be_node;
++
++		for_each_node_by_type(np, "pervasive")
++			if (of_get_parent(np) == be)
++				map->pmd_regs = of_iomap(np, 0);
++
++		for_each_node_by_type(np, "CBEA-Internal-Interrupt-Controller")
++			if (of_get_parent(np) == be)
++				map->iic_regs = of_iomap(np, 2);
++
++		for_each_node_by_type(np, "mic-tm")
++			if (of_get_parent(np) == be)
++				map->mic_tm_regs = of_iomap(np, 0);
++	} else {
++		struct device_node *cpu;
+ 		/* That hack must die die die ! */
+ 		const struct address_prop {
+ 			unsigned long address;
+ 			unsigned int len;
+ 		} __attribute__((packed)) *prop;
+ 
+-
+-		if (cbe_regs_map_count > MAX_CBE) {
+-			printk(KERN_ERR "cbe_regs: More BE chips than supported"
+-			       "!\n");
+-			cbe_regs_map_count--;
+-			return;
+-		}
+-		map->cpu_node = cpu;
+-		for_each_possible_cpu(i)
+-			if (cbe_thread_map[i].cpu_node == cpu)
+-				cbe_thread_map[i].regs = map;
++		cpu = map->cpu_node;
+ 
+ 		prop = get_property(cpu, "pervasive", NULL);
+ 		if (prop != NULL)
+@@ -182,10 +218,56 @@ void __init cbe_regs_init(void)
+ 		if (prop != NULL)
+ 			map->iic_regs = ioremap(prop->address, prop->len);
+ 
+-		prop = (struct address_prop *)get_property(cpu, "mic-tm",
+-							   NULL);
++		prop = get_property(cpu, "mic-tm", NULL);
+ 		if (prop != NULL)
+ 			map->mic_tm_regs = ioremap(prop->address, prop->len);
+ 	}
+ }
+ 
++
++void __init cbe_regs_init(void)
++{
++	int i;
++	unsigned int thread_id;
++	struct device_node *cpu;
++
++	/* Build local fast map of CPUs */
++	for_each_possible_cpu(i) {
++		cbe_thread_map[i].cpu_node = of_get_cpu_node(i, &thread_id);
++		cbe_thread_map[i].be_node = cbe_get_be_node(i);
++		cbe_thread_map[i].thread_id = thread_id;
++	}
++
++	/* Find maps for each device tree CPU */
++	for_each_node_by_type(cpu, "cpu") {
++		struct cbe_regs_map *map;
++		unsigned int cbe_id;
++
++		cbe_id = cbe_regs_map_count++;
++		map = &cbe_regs_maps[cbe_id];
++
++		if (cbe_regs_map_count > MAX_CBE) {
++			printk(KERN_ERR "cbe_regs: More BE chips than supported"
++			       "!\n");
++			cbe_regs_map_count--;
++			return;
++		}
++		map->cpu_node = cpu;
++
++		for_each_possible_cpu(i) {
++			struct cbe_thread_map *thread = &cbe_thread_map[i];
++
++			if (thread->cpu_node == cpu) {
++				thread->regs = map;
++				thread->cbe_id = cbe_id;
++				map->be_node = thread->be_node;
++				cpu_set(i, cbe_local_mask[cbe_id]);
++				if(thread->thread_id == 0)
++					cpu_set(i, cbe_first_online_cpu);
++			}
++		}
++
++		cbe_fill_regs_map(map);
++	}
++}
++
+diff -ur linux-2.6.20.ppc64.3108/arch/powerpc/platforms/cell/cbe_regs.h linux-2.6.20.ppc64/arch/powerpc/platforms/cell/cbe_regs.h
+--- linux-2.6.20.ppc64.3108/arch/powerpc/platforms/cell/cbe_regs.h	2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20.ppc64/arch/powerpc/platforms/cell/cbe_regs.h	2007-04-24 19:34:42.000000000 +0100
+@@ -255,6 +255,11 @@
+ extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np);
+ extern struct cbe_mic_tm_regs __iomem *cbe_get_cpu_mic_tm_regs(int cpu);
+ 
++/* some utility functions to deal with SMT */
++extern u32 cbe_get_hw_thread_id(int cpu);
++extern u32 cbe_cpu_to_node(int cpu);
++extern u32 cbe_node_to_cpu(int node);
++
+ /* Init this module early */
+ extern void cbe_regs_init(void);
+ 
+diff -ur linux-2.6.20.ppc64.3108/include/asm-powerpc/cell-pmu.h linux-2.6.20.ppc64/include/asm-powerpc/cell-pmu.h
+--- linux-2.6.20.ppc64.3108/include/asm-powerpc/cell-pmu.h	2007-04-24 18:03:57.000000000 +0100
++++ linux-2.6.20.ppc64/include/asm-powerpc/cell-pmu.h	2007-04-24 19:34:42.000000000 +0100
+@@ -97,11 +97,6 @@
+ extern u32  cbe_get_and_clear_pm_interrupts(u32 cpu);
+ extern void cbe_sync_irq(int node);
+ 
+-/* Utility functions, macros */
+-extern u32 cbe_get_hw_thread_id(int cpu);
+-
+-#define cbe_cpu_to_node(cpu) ((cpu) >> 1)
+-
+ #define CBE_COUNT_SUPERVISOR_MODE       0
+ #define CBE_COUNT_HYPERVISOR_MODE       1
+ #define CBE_COUNT_PROBLEM_MODE          2
+--- linux-2.6.orig/arch/powerpc/sysdev/pmi.c
++++ linux-2.6/arch/powerpc/sysdev/pmi.c
+@@ -33,7 +33,7 @@
+ #include <asm/of_platform.h>
+ #include <asm/io.h>
+ #include <asm/pmi.h>
+-
++#include <asm/prom.h>
+ 
+ struct pmi_data {
+ 	struct list_head	handler;
+@@ -49,21 +49,6 @@ struct pmi_data {
+ };
+ 
+ 
+-
+-static void __iomem *of_iomap(struct device_node *np)
+-{
+-	struct resource res;
+-
+-	if (of_address_to_resource(np, 0, &res))
+-		return NULL;
+-
+-	pr_debug("Resource start: 0x%lx\n", res.start);
+-	pr_debug("Resource end: 0x%lx\n", res.end);
+-
+-	return ioremap(res.start, 1 + res.end - res.start);
+-}
+-
+-
+ static int pmi_irq_handler(int irq, void *dev_id)
+ {
+ 	struct pmi_data *data;
+@@ -154,7 +139,7 @@ static int pmi_of_probe(struct of_device
+ 		goto out;
+ 	}
+ 
+-	data->pmi_reg = of_iomap(np);
++	data->pmi_reg = of_iomap(np, 0);
+ 	if (!data->pmi_reg) {
+ 		printk(KERN_ERR "pmi: invalid register address.\n");
+ 		rc = -EFAULT;
+Index: linux-2.6/include/asm-powerpc/prom.h
+===================================================================
+--- linux-2.6.orig/include/asm-powerpc/prom.h
++++ linux-2.6/include/asm-powerpc/prom.h
+@@ -20,6 +20,7 @@
+ #include <linux/platform_device.h>
+ #include <asm/irq.h>
+ #include <asm/atomic.h>
++#include <asm/io.h>
+ 
+ /* Definitions used by the flattened device tree */
+ #define OF_DT_HEADER		0xd00dfeed	/* marker */
+@@ -355,6 +356,16 @@ static inline int of_irq_to_resource(str
+ 	return irq;
+ }
+ 
++static inline void __iomem *of_iomap(struct device_node *np, int index)
++{
++	struct resource res;
++
++	if (of_address_to_resource(np, index, &res))
++		return NULL;
++
++	return ioremap(res.start, 1 + res.end - res.start);
++}
++
+ 
+ #endif /* __KERNEL__ */
+ #endif /* _POWERPC_PROM_H */
+
+--
+
+_______________________________________________
+Linuxppc-dev mailing list
+Linuxppc-dev ozlabs org
+https://ozlabs.org/mailman/listinfo/linuxppc-dev

linux-2.6-cell-spufs-fixes.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 linux-2.6-cell-spufs-fixes.patch
Index: linux-2.6-cell-spufs-fixes.patch
===================================================================
RCS file: linux-2.6-cell-spufs-fixes.patch
diff -N linux-2.6-cell-spufs-fixes.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-cell-spufs-fixes.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,2064 @@
+commit ccf17e9d008dfebbf90dfa4ee1a56e81c784c73e
+Author: Jeremy Kerr <jk ozlabs org>
+Date:   Mon Apr 23 21:08:29 2007 +0200
+
+    [POWERPC] spu_base: fix initialisation on systems with no SPEs
+    
+    This change fixes the case where spu_base and spufs are initialised on a
+    system with no SPEs - unconditionally create the spu_lists so spu_alloc
+    doesn't explode, and check for spu_management ops before starting spufs.
+    
+    Signed-off-by: Jeremy Kerr <jk ozlabs org>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+    
+     arch/powerpc/platforms/cell/spu_base.c    |    7 ++++---
+     arch/powerpc/platforms/cell/spufs/inode.c |    5 +++++
+     2 files changed, 9 insertions(+), 3 deletions(-)
+
+commit befdc746ee027d686a06be29cb1391f9d2c45cf6
+Author: Christoph Hellwig <hch lst de>
+Date:   Mon Apr 23 21:08:28 2007 +0200
+
+    [POWERPC] spu_base: remove cleanup_spu_base
+    
+    spu_base.c is always built into the kernel image, so there is no need
+    for a cleanup function.  And some of the things it does are in the
+    way for my following patches, so I'd rather get rid of it ASAP.
+    
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit aa45e2569ffe963dfbbbfddfdccd12afe69b2d65
+Author: Christoph Hellwig <hch lst de>
+Date:   Mon Apr 23 21:08:27 2007 +0200
+
+    [POWERPC] spufs: various run.c cleanups
+    
+     - remove the spu_acquire_runnable from spu_run_init.  I need to
+       opencode it in spufs_run_spu in the next patch
+     - remove various inline attributes, we don't really want to inline
+       long functions with multiple callsites
+     - cleanup return values and runcntl_write calls in spu_run_init
+     - use normal kernel codingstyle in spu_reacquire_runnable
+    
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit fe8a29db5bce1b5bd1ceb85fd153fac52cdab7b2
+Author: Akinobu Mita <mita fixstars com>
+Date:   Mon Apr 23 21:08:26 2007 +0200
+
+    [POWERPC] spufs: enable SPU coredump for kernel-builtin spufs
+    
+    spu_coredump_calls.owner is NULL in case of a builtin spufs,
+    so the checks in here break.
+    Check for the availability of the spu_coredump_calls variable
+    instead.
+    
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit 6cf2179202cf706471777ad6ee5d0377d5990ab7
+Author: Arnd Bergmann <arnd bergmann de ibm com>
+Date:   Mon Apr 23 21:08:25 2007 +0200
+
+    [POWERPC] spufs: fix memory leak on coredump
+    
+    Dynamically allocated read/write buffer in spufs_arch_write_note() will
+    not be freed. Convert it to get_free_page at the same time.
+    
+    Cc: Akinobu Mita <mita fixstars com>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit d3764397d07b1e03943edfdcc3fb77af7bdac02b
+Author: Jeremy Kerr <jk ozlabs org>
+Date:   Mon Apr 23 21:08:24 2007 +0200
+
+    [POWERPC] spufs: Minor cleanup of spu_wait
+    
+    Change the loop in spu_wait to be a little more straightforward.
+    
+    Signed-off-by: Jeremy Kerr <jk ozlabs org>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit f11f5ee70f48899506514e5e0d10ee2c8ddd359a
+Author: Jeremy Kerr <jk ozlabs org>
+Date:   Mon Apr 23 21:08:23 2007 +0200
+
+    [POWERPC] spufs: add mode= mount option
+    
+    Add a 'mode=' option to spufs mount arguments. This allows more
+    control over access to the top-level spufs directory.
+    
+    Tested on Cell.
+    
+    Signed-off-by: Jeremy Kerr <jk ozlabs org>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit 9e2fe2ce4e957a79d3dc5d813e0cfb10d79b79b3
+Author: Akinobu Mita <mita fixstars com>
+Date:   Mon Apr 23 21:08:22 2007 +0200
+
+    [POWERPC] spufs: use memcpy_fromio() to copy from local store
+    
+    GCC may generates inline copy loop to handle memcpy() function
+    instead of kernel defined memcpy(). But this inlined version of memcpy()
+    causes an alignment interrupt when copying from local store.
+    
+    This patch uses memcpy_fromio() and memcpy_toio to copy local store
+    to prevent memcpy() being inlined.
+    
+    Signed-off-by: Akinobu Mita <mita fixstars com>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit 8a7d86bdb22678b17928eef0c8fa356d8b21cc76
+Author: Christoph Hellwig <hch lst de>
+Date:   Mon Apr 23 21:08:21 2007 +0200
+
+    [POWERPC] spufs: avoid spurious memory barriers
+    
+    We now have proper locking around assignets of the mapping pointers,
+    and the spin_unlock implies enough of a barrier to get rid of the
+    explicit one.
+    
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit db1384b40d12eda6910513ff429ad90453ca49e1
+Author: Akinobu Mita <mita fixstars com>
+Date:   Mon Apr 23 21:08:20 2007 +0200
+
+    [POWERPC] spufs: fix memory leak on spufs reloading
+    
+    When SPU isolation mode enabled, isolated_loader would be
+    allocated by spufs_init_isolated_loader() on module_init().
+    But anyone do not free it.
+    
+    This patch introduces spufs_exit_isolated_loader() which is
+    the opposite of spufs_init_isolated_loader() and called on
+    module_exit().
+    
+    Cc: Arnd Bergmann <arnd arndb de>
+    Signed-off-by: Akinobu Mita <mita fixstars com>
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit c99c1994a2bb9493b4ac372b2b6ee2606d291171
+Author: Akinobu Mita <mita fixstars com>
+Date:   Mon Apr 23 21:08:19 2007 +0200
+
+    [POWERPC] spufs: fix missing error handling in module_init()
+    
+    spufs module_init forgot to call a few cleanup functions
+    on error path. This patch also includes cosmetic changes in
+    spu_sched_init() (identation fix and return error code).
+    
+    [modified by hch to apply ontop of the latest schedule changes]
+    
+    Cc: Arnd Bergmann <arnd arndb de>
+    Signed-off-by: Akinobu Mita <mita fixstars com>
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit 577f8f1021f9ee6ef2a98a142652759ec122d27f
+Author: Akinobu Mita <mita fixstars com>
+Date:   Mon Apr 23 21:08:18 2007 +0200
+
+    [POWERPC] spufs: check spu_acquire_runnable() return value
+    
+    This patch checks return value of spu_acquire_runnable() in
+    spufs_mfc_write().
+    
+    Signed-off-by: Akinobu Mita <mita fixstars com>
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit e45d48a34d4d1862d28d22c2533b8c6bb83b8c1f
+Author: Christoph Hellwig <hch lst de>
+Date:   Mon Apr 23 21:08:17 2007 +0200
+
+    [POWERPC] spufs: turn run_sema into run_mutex
+    
+    There is no reason for run_sema to be a struct semaphore.  Changing
+    it to a mutex and rename it accordingly.
+    
+    Signed-off-by: Christoph Hellwig <hch lst de>
+    Signed-off-by: Arnd Bergmann <arnd bergmann de ibm com>
+
+commit c8a1e9393a86f862ab9c8bc0db9b8a1822226f84
+Author: Jeremy Kerr <jk ozlabs org>
+Date:   Mon Apr 23 21:08:16 2007 +0200
+
+    [POWERPC] spufs: provide siginfo for SPE faults
+    
+    This change populates a siginfo struct for SPE application exceptions
[...1671 lines suppressed...]
++		spin_lock(&spu_prio->runq_lock);
++		__spu_del_from_rq(ctx);
+ 	}
++	spin_unlock(&spu_prio->runq_lock);
+ 	__set_current_state(TASK_RUNNING);
+ 	remove_wait_queue(&ctx->stop_wq, &wait);
+ }
+@@ -280,9 +290,14 @@ static void spu_reschedule(struct spu *spu)
+ 	spin_lock(&spu_prio->runq_lock);
+ 	best = sched_find_first_bit(spu_prio->bitmap);
+ 	if (best < MAX_PRIO) {
+-		struct spu_context *ctx = spu_grab_context(best);
+-		if (ctx)
+-			wake_up(&ctx->stop_wq);
++		struct list_head *rq = &spu_prio->runq[best];
++		struct spu_context *ctx;
++
++		BUG_ON(list_empty(rq));
++
++		ctx = list_entry(rq->next, struct spu_context, rq);
++		__spu_del_from_rq(ctx);
++		wake_up(&ctx->stop_wq);
+ 	}
+ 	spin_unlock(&spu_prio->runq_lock);
+ }
+@@ -365,6 +380,12 @@ static struct spu *find_victim(struct spu_context *ctx)
+ 			}
+ 			spu_unbind_context(spu, victim);
+ 			mutex_unlock(&victim->state_mutex);
++			/*
++			 * We need to break out of the wait loop in spu_run
++			 * manually to ensure this context gets put on the
++			 * runqueue again ASAP.
++			 */
++			wake_up(&victim->stop_wq);
+ 			return spu;
+ 		}
+ 	}
+@@ -377,7 +398,7 @@ static struct spu *find_victim(struct spu_context *ctx)
+  * @ctx:	spu context to schedule
+  * @flags:	flags (currently ignored)
+  *
+- * Tries to find a free spu to run @ctx.  If no free spu is availble
++ * Tries to find a free spu to run @ctx.  If no free spu is available
+  * add the context to the runqueue so it gets woken up once an spu
+  * is available.
+  */
+@@ -402,9 +423,7 @@ int spu_activate(struct spu_context *ctx, unsigned long flags)
+ 			return 0;
+ 		}
+ 
+-		spu_add_to_rq(ctx);
+ 		spu_prio_wait(ctx);
+-		spu_del_from_rq(ctx);
+ 	} while (!signal_pending(current));
+ 
+ 	return -ERESTARTSYS;
+diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
+index 5c4e47d..0a947fd 100644
+--- a/arch/powerpc/platforms/cell/spufs/spufs.h
++++ b/arch/powerpc/platforms/cell/spufs/spufs.h
+@@ -41,7 +41,7 @@ struct spu_gang;
+ 
+ /* ctx->sched_flags */
+ enum {
+-	SPU_SCHED_WAKE = 0, /* currently unused */
++	SPU_SCHED_EXITING = 0,
+ };
+ 
+ struct spu_context {
+@@ -50,16 +50,17 @@ struct spu_context {
+ 	spinlock_t mmio_lock;		  /* protects mmio access */
+ 	struct address_space *local_store; /* local store mapping.  */
+ 	struct address_space *mfc;	   /* 'mfc' area mappings. */
+-	struct address_space *cntl; 	   /* 'control' area mappings. */
+-	struct address_space *signal1; 	   /* 'signal1' area mappings. */
+-	struct address_space *signal2; 	   /* 'signal2' area mappings. */
+-	struct address_space *mss; 	   /* 'mss' area mappings. */
+-	struct address_space *psmap; 	   /* 'psmap' area mappings. */
++	struct address_space *cntl;	   /* 'control' area mappings. */
++	struct address_space *signal1;	   /* 'signal1' area mappings. */
++	struct address_space *signal2;	   /* 'signal2' area mappings. */
++	struct address_space *mss;	   /* 'mss' area mappings. */
++	struct address_space *psmap;	   /* 'psmap' area mappings. */
++	spinlock_t mapping_lock;
+ 	u64 object_id;		   /* user space pointer for oprofile */
+ 
+ 	enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
+ 	struct mutex state_mutex;
+-	struct semaphore run_sema;
++	struct mutex run_mutex;
+ 
+ 	struct mm_struct *owner;
+ 
+@@ -140,6 +141,7 @@ struct spu_context_ops {
+ 			       struct spu_dma_info * info);
+ 	void (*proxydma_info_read) (struct spu_context * ctx,
+ 				    struct spu_proxydma_info * info);
++	void (*restart_dma)(struct spu_context *ctx);
+ };
+ 
+ extern struct spu_context_ops spu_hw_ops;
+@@ -149,6 +151,7 @@ struct spufs_inode_info {
+ 	struct spu_context *i_ctx;
+ 	struct spu_gang *i_gang;
+ 	struct inode vfs_inode;
++	int i_openers;
+ };
+ #define SPUFS_I(inode) \
+ 	container_of(inode, struct spufs_inode_info, vfs_inode)
+@@ -170,6 +173,9 @@ int put_spu_gang(struct spu_gang *gang);
+ void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx);
+ void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
+ 
++/* fault handling */
++int spufs_handle_class1(struct spu_context *ctx);
++
+ /* context management */
+ static inline void spu_acquire(struct spu_context *ctx)
+ {
+@@ -190,7 +196,6 @@ void spu_unmap_mappings(struct spu_context *ctx);
+ void spu_forget(struct spu_context *ctx);
+ int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
+ void spu_acquire_saved(struct spu_context *ctx);
+-int spu_acquire_exclusive(struct spu_context *ctx);
+ 
+ int spu_activate(struct spu_context *ctx, unsigned long flags);
+ void spu_deactivate(struct spu_context *ctx);
+@@ -218,14 +223,13 @@ extern char *isolated_loader;
+ 		prepare_to_wait(&(wq), &__wait, TASK_INTERRUPTIBLE);	\
+ 		if (condition)						\
+ 			break;						\
+-		if (!signal_pending(current)) {				\
+-			spu_release(ctx);				\
+-			schedule();					\
+-			spu_acquire(ctx);				\
+-			continue;					\
++		if (signal_pending(current)) {				\
++			__ret = -ERESTARTSYS;				\
++			break;						\
+ 		}							\
+-		__ret = -ERESTARTSYS;					\
+-		break;							\
++		spu_release(ctx);					\
++		schedule();						\
++		spu_acquire(ctx);					\
+ 	}								\
+ 	finish_wait(&(wq), &__wait);					\
+ 	__ret;								\
+diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
+index fd91c73..8347c4a 100644
+--- a/arch/powerpc/platforms/cell/spufs/switch.c
++++ b/arch/powerpc/platforms/cell/spufs/switch.c
+@@ -2084,6 +2084,10 @@ int spu_save(struct spu_state *prev, struct spu *spu)
+ 	int rc;
+ 
+ 	acquire_spu_lock(spu);	        /* Step 1.     */
++	prev->dar = spu->dar;
++	prev->dsisr = spu->dsisr;
++	spu->dar = 0;
++	spu->dsisr = 0;
+ 	rc = __do_spu_save(prev, spu);	/* Steps 2-53. */
+ 	release_spu_lock(spu);
+ 	if (rc != 0 && rc != 2 && rc != 6) {
+@@ -2109,9 +2113,9 @@ int spu_restore(struct spu_state *new, struct spu *spu)
+ 
+ 	acquire_spu_lock(spu);
+ 	harvest(NULL, spu);
+-	spu->dar = 0;
+-	spu->dsisr = 0;
+ 	spu->slb_replace = 0;
++	new->dar = 0;
++	new->dsisr = 0;
+ 	spu->class_0_pending = 0;
+ 	rc = __do_spu_restore(new, spu);
+ 	release_spu_lock(spu);
+diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h
+index 200055a..e22fd88 100644
+--- a/include/asm-powerpc/mmu.h
++++ b/include/asm-powerpc/mmu.h
+@@ -234,6 +234,7 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access,
+ 			   unsigned long vsid, pte_t *ptep, unsigned long trap,
+ 			   unsigned int local);
+ struct mm_struct;
++extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap);
+ extern int hash_huge_page(struct mm_struct *mm, unsigned long access,
+ 			  unsigned long ea, unsigned long vsid, int local,
+ 			  unsigned long trap);
+diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h
+index 8aad061..02e56a6 100644
+--- a/include/asm-powerpc/spu_csa.h
++++ b/include/asm-powerpc/spu_csa.h
+@@ -242,6 +242,7 @@ struct spu_state {
+ 	u64 spu_chnldata_RW[32];
+ 	u32 spu_mailbox_data[4];
+ 	u32 pu_mailbox_data[1];
++	u64 dar, dsisr;
+ 	unsigned long suspend_time;
+ 	spinlock_t register_lock;
+ };

linux-2.6-clockevents-fix-resume-logic.patch:

Index: linux-2.6-clockevents-fix-resume-logic.patch
===================================================================
RCS file: linux-2.6-clockevents-fix-resume-logic.patch
diff -N linux-2.6-clockevents-fix-resume-logic.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-clockevents-fix-resume-logic.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,284 @@
+Subject: clockevents: Fix resume logic
+
+We need to make sure, that the clockevent devices are resumed, before
+the tick is resumed. The current resume logic does not guarantee this.
+
+Add CLOCK_EVT_MODE_RESUME and call the set mode functions of the clock
+event devices before resuming the tick / oneshot functionality.
+
+Fixup the existing users.
+
+Signed-off-by: Thomas Gleixner <tglx linutronix de>
+
+---
+ arch/i386/kernel/apic.c      |    3 +
+ arch/i386/kernel/hpet.c      |   71 +++----------------------------------------
+ arch/i386/kernel/i8253.c     |   43 +++++++++++++++++---------
+ include/linux/clockchips.h   |    1 
+ kernel/time/tick-broadcast.c |    4 +-
+ kernel/time/tick-common.c    |   16 ++++++---
+ 6 files changed, 51 insertions(+), 87 deletions(-)
+
+Index: linux-2.6.21/arch/i386/kernel/apic.c
+===================================================================
+--- linux-2.6.21.orig/arch/i386/kernel/apic.c
++++ linux-2.6.21/arch/i386/kernel/apic.c
+@@ -242,6 +242,9 @@ static void lapic_timer_setup(enum clock
+ 		v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
+ 		apic_write_around(APIC_LVTT, v);
+ 		break;
++	case CLOCK_EVT_MODE_RESUME:
++		/* Nothing to do here */
++		break;
+ 	}
+ 
+ 	local_irq_restore(flags);
+Index: linux-2.6.21/arch/i386/kernel/hpet.c
+===================================================================
+--- linux-2.6.21.orig/arch/i386/kernel/hpet.c
++++ linux-2.6.21/arch/i386/kernel/hpet.c
+@@ -187,6 +187,10 @@ static void hpet_set_mode(enum clock_eve
+ 		cfg &= ~HPET_TN_ENABLE;
+ 		hpet_writel(cfg, HPET_T0_CFG);
+ 		break;
++
++	case CLOCK_EVT_MODE_RESUME:
++		hpet_enable_int();
++		break;
+ 	}
+ }
+ 
+@@ -217,6 +221,7 @@ static struct clocksource clocksource_hp
+ 	.mask		= HPET_MASK,
+ 	.shift		= HPET_SHIFT,
+ 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
++	.resume		= hpet_start_counter,
+ };
+ 
+ /*
+@@ -291,7 +296,6 @@ int __init hpet_enable(void)
+ 
+ 	clocksource_register(&clocksource_hpet);
+ 
+-
+ 	if (id & HPET_ID_LEGSUP) {
+ 		hpet_enable_int();
+ 		hpet_reserve_platform_timers(id);
+@@ -524,68 +528,3 @@ irqreturn_t hpet_rtc_interrupt(int irq, 
+ 	return IRQ_HANDLED;
+ }
+ #endif
+-
+-
+-/*
+- * Suspend/resume part
+- */
+-
+-#ifdef CONFIG_PM
+-
+-static int hpet_suspend(struct sys_device *sys_device, pm_message_t state)
+-{
+-	unsigned long cfg = hpet_readl(HPET_CFG);
+-
+-	cfg &= ~(HPET_CFG_ENABLE|HPET_CFG_LEGACY);
+-	hpet_writel(cfg, HPET_CFG);
+-
+-	return 0;
+-}
+-
+-static int hpet_resume(struct sys_device *sys_device)
+-{
+-	unsigned int id;
+-
+-	hpet_start_counter();
+-
+-	id = hpet_readl(HPET_ID);
+-
+-	if (id & HPET_ID_LEGSUP)
+-		hpet_enable_int();
+-
+-	return 0;
+-}
+-
+-static struct sysdev_class hpet_class = {
+-	set_kset_name("hpet"),
+-	.suspend	= hpet_suspend,
+-	.resume		= hpet_resume,
+-};
+-
+-static struct sys_device hpet_device = {
+-	.id		= 0,
+-	.cls		= &hpet_class,
+-};
+-
+-
+-static __init int hpet_register_sysfs(void)
+-{
+-	int err;
+-
+-	if (!is_hpet_capable())
+-		return 0;
+-
+-	err = sysdev_class_register(&hpet_class);
+-
+-	if (!err) {
+-		err = sysdev_register(&hpet_device);
+-		if (err)
+-			sysdev_class_unregister(&hpet_class);
+-	}
+-
+-	return err;
+-}
+-
+-device_initcall(hpet_register_sysfs);
+-
+-#endif
+Index: linux-2.6.21/arch/i386/kernel/i8253.c
+===================================================================
+--- linux-2.6.21.orig/arch/i386/kernel/i8253.c
++++ linux-2.6.21/arch/i386/kernel/i8253.c
+@@ -3,11 +3,11 @@
+  *
+  */
+ #include <linux/clockchips.h>
+-#include <linux/spinlock.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
+ #include <linux/jiffies.h>
+-#include <linux/sysdev.h>
+ #include <linux/module.h>
+-#include <linux/init.h>
++#include <linux/spinlock.h>
+ 
+ #include <asm/smp.h>
+ #include <asm/delay.h>
+@@ -25,6 +25,24 @@ EXPORT_SYMBOL(i8253_lock);
+  */
+ struct clock_event_device *global_clock_event;
+ 
++/* Status of the PIT interrupt */
++static int pit_irq_disabled;
++
++/*
++ * Control pit interrupt enable / disable
++ */
++static void pit_control_irq(int disable)
++{
++	if (pit_irq_disabled == disable)
++		return;
++
++	pit_irq_disabled = disable;
++	if (disable)
++		disable_irq(0);
++	else
++		enable_irq(0);
++}
++
+ /*
+  * Initialize the PIT timer.
+  *
+@@ -41,26 +59,23 @@ static void init_pit_timer(enum clock_ev
+ 	case CLOCK_EVT_MODE_PERIODIC:
+ 		/* binary, mode 2, LSB/MSB, ch 0 */
+ 		outb_p(0x34, PIT_MODE);
+-		udelay(10);
+ 		outb_p(LATCH & 0xff , PIT_CH0);	/* LSB */
+-		udelay(10);
+ 		outb(LATCH >> 8 , PIT_CH0);	/* MSB */
++		pit_control_irq(0);
+ 		break;
+ 
+-	/*
+-	 * Avoid unnecessary state transitions, as it confuses
+-	 * Geode / Cyrix based boxen.
+-	 */
+ 	case CLOCK_EVT_MODE_SHUTDOWN:
+-		if (evt->mode == CLOCK_EVT_MODE_UNUSED)
+-			break;
+ 	case CLOCK_EVT_MODE_UNUSED:
+-		if (evt->mode == CLOCK_EVT_MODE_SHUTDOWN)
+-			break;
++		pit_control_irq(1);
++		break;
+ 	case CLOCK_EVT_MODE_ONESHOT:
+ 		/* One shot setup */
+ 		outb_p(0x38, PIT_MODE);
+-		udelay(10);
++		pit_control_irq(0);
++		break;
++
++	case CLOCK_EVT_MODE_RESUME:
++		/* Nothing to do here */
+ 		break;
+ 	}
+ 	spin_unlock_irqrestore(&i8253_lock, flags);
+Index: linux-2.6.21/include/linux/clockchips.h
+===================================================================
+--- linux-2.6.21.orig/include/linux/clockchips.h
++++ linux-2.6.21/include/linux/clockchips.h
+@@ -23,6 +23,7 @@ enum clock_event_mode {
+ 	CLOCK_EVT_MODE_SHUTDOWN,
+ 	CLOCK_EVT_MODE_PERIODIC,
+ 	CLOCK_EVT_MODE_ONESHOT,
++	CLOCK_EVT_MODE_RESUME,
+ };
+ 
+ /* Clock event notification values */
+Index: linux-2.6.21/kernel/time/tick-broadcast.c
+===================================================================
+--- linux-2.6.21.orig/kernel/time/tick-broadcast.c
++++ linux-2.6.21/kernel/time/tick-broadcast.c
+@@ -292,7 +292,7 @@ void tick_suspend_broadcast(void)
+ 	spin_lock_irqsave(&tick_broadcast_lock, flags);
+ 
+ 	bc = tick_broadcast_device.evtdev;
+-	if (bc && tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
++	if (bc)
+ 		clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
+ 
+ 	spin_unlock_irqrestore(&tick_broadcast_lock, flags);
+@@ -309,6 +309,8 @@ int tick_resume_broadcast(void)
+ 	bc = tick_broadcast_device.evtdev;
+ 
+ 	if (bc) {
++		clockevents_set_mode(bc, CLOCK_EVT_MODE_RESUME);
++
+ 		switch (tick_broadcast_device.mode) {
+ 		case TICKDEV_MODE_PERIODIC:
+ 			if(!cpus_empty(tick_broadcast_mask))
+Index: linux-2.6.21/kernel/time/tick-common.c
+===================================================================
+--- linux-2.6.21.orig/kernel/time/tick-common.c
++++ linux-2.6.21/kernel/time/tick-common.c
+@@ -318,12 +318,17 @@ static void tick_resume(void)
+ {
+ 	struct tick_device *td = &__get_cpu_var(tick_cpu_device);
+ 	unsigned long flags;
++	int broadcast = tick_resume_broadcast();
+ 
+ 	spin_lock_irqsave(&tick_device_lock, flags);
+-	if (td->mode == TICKDEV_MODE_PERIODIC)
+-		tick_setup_periodic(td->evtdev, 0);
+-	else
+-		tick_resume_oneshot();
++	clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME);
++
++	if (!broadcast) {
++		if (td->mode == TICKDEV_MODE_PERIODIC)
++			tick_setup_periodic(td->evtdev, 0);
++		else
++			tick_resume_oneshot();
++	}
+ 	spin_unlock_irqrestore(&tick_device_lock, flags);
+ }
+ 
+@@ -360,8 +365,7 @@ static int tick_notify(struct notifier_b
+ 		break;
+ 
+ 	case CLOCK_EVT_NOTIFY_RESUME:
+-		if (!tick_resume_broadcast())
+-			tick_resume();
++		tick_resume();
+ 		break;
+ 
+ 	default:

linux-2.6-crap-sysfs-workaround.patch:

Index: linux-2.6-crap-sysfs-workaround.patch
===================================================================
RCS file: linux-2.6-crap-sysfs-workaround.patch
diff -N linux-2.6-crap-sysfs-workaround.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-crap-sysfs-workaround.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,11 @@
+--- linux-2.6.20.ppc/drivers/base/class.c~	2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20.ppc/drivers/base/class.c	2007-03-28 00:23:30.000000000 +0100
+@@ -380,7 +380,7 @@ static int deprecated_class_uevent(char 
+ 	struct device *dev = class_dev->dev;
+ 	char *path;
+ 
+-	if (!dev)
++	//if (!dev)
+ 		return 0;
+ 
+ 	/* add device, backing this class device (deprecated) */

linux-2.6-debug-acpi-os-write-port.patch:

Index: linux-2.6-debug-acpi-os-write-port.patch
===================================================================
RCS file: linux-2.6-debug-acpi-os-write-port.patch
diff -N linux-2.6-debug-acpi-os-write-port.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-debug-acpi-os-write-port.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,15 @@
+---
+ drivers/acpi/osl.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.22.noarch.orig/drivers/acpi/osl.c
++++ linux-2.6.22.noarch/drivers/acpi/osl.c
+@@ -419,6 +419,8 @@ acpi_status acpi_os_write_port(acpi_io_a
+ 		outl(value, port);
+ 		break;
+ 	default:
++		printk(KERN_ERR PREFIX
++		       "writing %d bits to port %d\n", (int)width, (int)port);
+ 		BUG();
+ 	}
+ 

linux-2.6-debug-extra-warnings.patch:

Index: linux-2.6-debug-extra-warnings.patch
===================================================================
RCS file: linux-2.6-debug-extra-warnings.patch
diff -N linux-2.6-debug-extra-warnings.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-debug-extra-warnings.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,21 @@
+-Werror-implicit-function-declaration
+ This makes builds fail sooner if something is implicitly defined instead
+ of having to wait half an hour for it to fail at the linking stage.
+
+-Wpointer-arith
+ http://bugzilla.kernel.org/show_bug.cgi?id=7561
+
+Signed-off-by: Dave Jones <davej redhat com>
+
+--- linux-2.6.21.noarch/Makefile~	2007-06-04 16:46:24.000000000 -0400
++++ linux-2.6.21.noarch/Makefile	2007-06-04 16:46:53.000000000 -0400
+@@ -313,7 +313,8 @@ LINUXINCLUDE    := -Iinclude \
+ CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
+ 
+ CFLAGS          := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+-                   -fno-strict-aliasing -fno-common
++		   -fno-strict-aliasing -fno-common \
++		   -Werror-implicit-function-declaration -Wpointer-arith
+ AFLAGS          := -D__ASSEMBLY__
+ 
+ # Read KERNELRELEASE from include/config/kernel.release (if it exists)

linux-2.6-debug-nmi-timeout.patch:

Index: linux-2.6-debug-nmi-timeout.patch
===================================================================
RCS file: linux-2.6-debug-nmi-timeout.patch
diff -N linux-2.6-debug-nmi-timeout.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-debug-nmi-timeout.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,39 @@
+--- linux-2.6.20.noarch/arch/i386/kernel/nmi.c~	2007-04-13 15:52:37.000000000 -0400
++++ linux-2.6.20.noarch/arch/i386/kernel/nmi.c	2007-04-13 15:53:06.000000000 -0400
+@@ -1044,7 +1044,7 @@ __kprobes int nmi_watchdog_tick(struct p
+ 		 * wait a few IRQs (5 seconds) before doing the oops ...
+ 		 */
+ 		alert_counter[cpu]++;
+-		if (alert_counter[cpu] == 5*nmi_hz)
++		if (alert_counter[cpu] == CONFIG_DEBUG_NMI_TIMEOUT*nmi_hz)
+ 			/*
+ 			 * die_nmi will return ONLY if NOTIFY_STOP happens..
+ 			 */
+--- linux-2.6.20.noarch/arch/x86_64/kernel/nmi.c~	2007-04-13 15:53:09.000000000 -0400
++++ linux-2.6.20.noarch/arch/x86_64/kernel/nmi.c	2007-04-13 15:53:29.000000000 -0400
+@@ -923,7 +923,7 @@ int __kprobes nmi_watchdog_tick(struct p
+ 		 * wait a few IRQs (5 seconds) before doing the oops ...
+ 		 */
+ 		local_inc(&__get_cpu_var(alert_counter));
+-		if (local_read(&__get_cpu_var(alert_counter)) == 5*nmi_hz)
++		if (local_read(&__get_cpu_var(alert_counter)) == CONFIG_DEBUG_NMI_TIMEOUT*nmi_hz)
+ 			die_nmi("NMI Watchdog detected LOCKUP on CPU %d\n", regs,
+ 				panic_on_timeout);
+ 	} else {
+--- linux-2.6.20.noarch/lib/Kconfig.debug~	2007-04-13 15:53:48.000000000 -0400
++++ linux-2.6.20.noarch/lib/Kconfig.debug	2007-04-13 15:55:18.000000000 -0400
+@@ -133,6 +133,14 @@ config DETECT_SOFTLOCKUP
+ 	   can be detected via the NMI-watchdog, on platforms that
+ 	   support it.)
+ 
++config DEBUG_NMI_TIMEOUT
++	int "Number of seconds before NMI timeout"
++	depends on X86
++	default 5
++	help
++	  This value is the number of seconds the NMI watchdog will tick
++	  before it decides the machine has hung.
++
+ config SCHEDSTATS
+ 	bool "Collect scheduler statistics"
+ 	depends on DEBUG_KERNEL && PROC_FS

linux-2.6-default-mmf_dump_elf_headers.patch:

Index: linux-2.6-default-mmf_dump_elf_headers.patch
===================================================================
RCS file: linux-2.6-default-mmf_dump_elf_headers.patch
diff -N linux-2.6-default-mmf_dump_elf_headers.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-default-mmf_dump_elf_headers.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,13 @@
+--- linux-2.6/include/linux/sched.h
++++ linux-2.6/include/linux/sched.h
+@@ -365,7 +365,8 @@ extern int get_dumpable(struct mm_struct
+ #define MMF_DUMP_FILTER_MASK \
+ 	(((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
+ #define MMF_DUMP_FILTER_DEFAULT \
+-	((1 << MMF_DUMP_ANON_PRIVATE) |	(1 << MMF_DUMP_ANON_SHARED))
++	((1 << MMF_DUMP_ANON_PRIVATE) |	(1 << MMF_DUMP_ANON_SHARED) | \
++	 (1 << MMF_DUMP_ELF_HEADERS))
+ 
+ struct mm_struct {
+ 	struct vm_area_struct * mmap;		/* list of VMAs */
+

linux-2.6-defaults-pci_no_msi_mmconf.patch:

Index: linux-2.6-defaults-pci_no_msi_mmconf.patch
===================================================================
RCS file: linux-2.6-defaults-pci_no_msi_mmconf.patch
diff -N linux-2.6-defaults-pci_no_msi_mmconf.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-defaults-pci_no_msi_mmconf.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,99 @@
+Disable PCI MSI and MMCONFIG by default, add kernel parameters
+to enable them.
+
+Original mmconfig patch by Kyle McMartin <kyle ubuntu com>
+
+Signed-off-by: Chuck Ebbert <cebbert redhat com>
+
+---
+ Documentation/kernel-parameters.txt |    5 +++++
+ arch/i386/pci/common.c              |    6 +++++-
+ drivers/pci/msi.c                   |    6 +++++-
+ drivers/pci/pci.c                   |    2 ++
+ drivers/pci/pci.h                   |    2 ++
+ 5 files changed, 19 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.noarch.orig/drivers/pci/msi.c
++++ linux-2.6.20.noarch/drivers/pci/msi.c
+@@ -28,7 +28,7 @@ static DEFINE_SPINLOCK(msi_lock);
+ static struct msi_desc* msi_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = NULL };
+ static struct kmem_cache* msi_cachep;
+ 
+-static int pci_msi_enable = 1;
++static int pci_msi_enable = 0;
+ 
+ static int msi_cache_init(void)
+ {
+@@ -977,6 +977,10 @@ void pci_no_msi(void)
+ {
+ 	pci_msi_enable = 0;
+ }
++void pci_yes_msi(void)
++{
++	pci_msi_enable = 1;
++}
+ 
+ EXPORT_SYMBOL(pci_enable_msi);
+ EXPORT_SYMBOL(pci_disable_msi);
+--- linux-2.6.20.noarch.orig/Documentation/kernel-parameters.txt
++++ linux-2.6.20.noarch/Documentation/kernel-parameters.txt
+@@ -1197,8 +1197,13 @@ and is between 256 and 4096 characters. 
+ 				Mechanism 1.
+ 		conf2		[IA-32] Force use of PCI Configuration
+ 				Mechanism 2.
++		mmconf		[IA-32,X86_64] Enable use of MMCONFIG for PCI
++				Configuration
+ 		nommconf	[IA-32,X86_64] Disable use of MMCONFIG for PCI
+ 				Configuration
++		msi		[MSI] If the PCI_MSI kernel config parameter is
++				enabled, this kernel boot option can be used to
++				enable the use of MSI interrupts system-wide.
+ 		nomsi		[MSI] If the PCI_MSI kernel config parameter is
+ 				enabled, this kernel boot option can be used to
+ 				disable the use of MSI interrupts system-wide.
+--- linux-2.6.20.noarch.orig/arch/i386/pci/common.c
++++ linux-2.6.20.noarch/arch/i386/pci/common.c
+@@ -18,7 +18,7 @@
+ #include "pci.h"
+ 
+ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
+-				PCI_PROBE_MMCONF;
++				0; /* PCI_PROBE_MMCONF */
+ 
+ static int pci_bf_sort;
+ int pci_routeirq;
+@@ -292,6 +292,10 @@ char * __devinit  pcibios_setup(char *st
+ 		pci_probe &= ~PCI_PROBE_MMCONF;
+ 		return NULL;
+ 	}
++	else if (!strcmp(str, "mmconf")) {
++		pci_probe |= PCI_PROBE_MMCONF;
++		return NULL;
++	}
+ #endif
+ 	else if (!strcmp(str, "noacpi")) {
+ 		acpi_noirq_set();
+--- linux-2.6.20.noarch/drivers/pci/pci.c~	2007-04-04 01:33:08.000000000 -0400
++++ linux-2.6.20.noarch/drivers/pci/pci.c	2007-04-04 01:33:33.000000000 -0400
+@@ -1358,6 +1358,8 @@ static int __devinit pci_setup(char *str
+ 		if (*str && (str = pcibios_setup(str)) && *str) {
+ 			if (!strcmp(str, "nomsi")) {
+ 				pci_no_msi();
++			} else if (!strcmp(str, "msi")) {
++				pci_yes_msi();
+ 			} else if (!strncmp(str, "cbiosize=", 9)) {
+ 				pci_cardbus_io_size = memparse(str + 9, &str);
+ 			} else if (!strncmp(str, "cbmemsize=", 10)) {
+--- linux-2.6.20.noarch/drivers/pci/pci.h~	2007-04-04 01:34:07.000000000 -0400
++++ linux-2.6.20.noarch/drivers/pci/pci.h	2007-04-04 01:34:31.000000000 -0400
+@@ -47,8 +47,10 @@ extern unsigned int pci_pm_d3_delay;
+ 
+ #ifdef CONFIG_PCI_MSI
+ void pci_no_msi(void);
++void pci_yes_msi(void);
+ #else
+ static inline void pci_no_msi(void) { }
++static inline void pci_yes_msi(void) { }
+ #endif
+ 
+ #if defined(CONFIG_PCI_MSI) && defined(CONFIG_PM)

linux-2.6-drivers-ssb-debug-revision.patch:

Index: linux-2.6-drivers-ssb-debug-revision.patch
===================================================================
RCS file: linux-2.6-drivers-ssb-debug-revision.patch
diff -N linux-2.6-drivers-ssb-debug-revision.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-drivers-ssb-debug-revision.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,15 @@
+---
+ drivers/ssb/main.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.22.noarch.orig/drivers/ssb/main.c
++++ linux-2.6.22.noarch/drivers/ssb/main.c
+@@ -884,6 +884,8 @@ static u32 ssb_tmslow_reject_bitmask(str
+ 	case SSB_IDLOW_SSBREV_23:
+ 		return SSB_TMSLOW_REJECT_23;
+ 	default:
++		printk(KERN_ERR "ssb: rev %x\n", 
++		       ssb_read32(dev, SSB_IDLOW) & SSB_IDLOW_SSBREV);
+ 		WARN_ON(1);
+ 	}
+ 	return (SSB_TMSLOW_REJECT_22 | SSB_TMSLOW_REJECT_23);

linux-2.6-dvb-spinlock.patch:

Index: linux-2.6-dvb-spinlock.patch
===================================================================
RCS file: linux-2.6-dvb-spinlock.patch
diff -N linux-2.6-dvb-spinlock.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-dvb-spinlock.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,62 @@
+
+# HG changeset patch
+# User Mauro Carvalho Chehab <mchehab infradead org>
+# Date Thu Apr 05 14:28:11 2007 -0300
+# Node ID a80058519added447f1cdd870334282e8ac3226e
+# parent: 628ca02d680721a85e9b2fca7cf4b782b31f9443
+Fix Kernel Bugzilla #8301: spinlock fix for flexcop-pci
+
+# Now, patch author (just the main one), on a From: field
+# Please change below if the committer is not the patch author.
+#
+From Hendrik Borghorst <hendrik borghorst org>
+
+# Then a detailed description:
+If you modprobe the b2c2-flexcop-pci module you got a hardlock of your system.
+This is due the usage of spin_lock before spin_lock_init is called.
+
+# At the end Signed-off-by: fields by patch author and committer, at least.
+#
+Signed-Off-By: Patrick Boettcher <pb linuxtv org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab infradead org>
+
+--- a/drivers/media/dvb/b2c2/flexcop-pci.c	Wed Apr 04 13:11:06 2007 -0700
++++ b/drivers/media/dvb/b2c2/flexcop-pci.c	Thu Apr 05 14:28:11 2007 -0300
+@@ -143,10 +143,11 @@ static irqreturn_t flexcop_pci_isr(int i
+ {
+ 	struct flexcop_pci *fc_pci = dev_id;
+ 	struct flexcop_device *fc = fc_pci->fc_dev;
++	unsigned long flags;
+ 	flexcop_ibi_value v;
+ 	irqreturn_t ret = IRQ_HANDLED;
+ 
+-	spin_lock_irq(&fc_pci->irq_lock);
++	spin_lock_irqsave(&fc_pci->irq_lock,flags);
+ 
+ 	v = fc->read_ibi_reg(fc,irq_20c);
+ 
+@@ -210,7 +211,7 @@ static irqreturn_t flexcop_pci_isr(int i
+ 		ret = IRQ_NONE;
+ 	}
+ 
+-	spin_unlock_irq(&fc_pci->irq_lock);
++	spin_unlock_irqrestore(&fc_pci->irq_lock,flags);
+ 
+ 	return ret;
+ }
+@@ -309,12 +310,12 @@ static int flexcop_pci_init(struct flexc
+ 	}
+ 
+ 	pci_set_drvdata(fc_pci->pdev, fc_pci);
+-
++	spin_lock_init(&fc_pci->irq_lock);
+ 	if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr,
+ 					IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0)
+ 		goto err_pci_iounmap;
+ 
+-	spin_lock_init(&fc_pci->irq_lock);
++
+ 
+ 	fc_pci->init_state |= FC_PCI_INIT;
+ 	return ret;
+

linux-2.6-e1000-corrupt-eeprom-checksum.patch:

Index: linux-2.6-e1000-corrupt-eeprom-checksum.patch
===================================================================
RCS file: linux-2.6-e1000-corrupt-eeprom-checksum.patch
diff -N linux-2.6-e1000-corrupt-eeprom-checksum.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-e1000-corrupt-eeprom-checksum.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,30 @@
+http://www.thinkwiki.org/wiki/Problem_with_e1000:_EEPROM_Checksum_Is_Not_Valid
+
+--- linux-2.6.23.noarch/drivers/net/e1000/e1000_main.c~	2007-10-15 14:29:07.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/e1000/e1000_main.c	2007-10-15 14:31:11.000000000 -0400
+@@ -1003,14 +1003,18 @@ e1000_probe(struct pci_dev *pdev,
+ 		goto err_eeprom;
+ 	}
+ 
+-	/* before reading the EEPROM, reset the controller to
+-	 * put the device in a known good starting state */
+-
+-	e1000_reset_hw(&adapter->hw);
+-
+-	/* make sure the EEPROM is good */
+-
+ 	if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
++		/* before reading the EEPROM, reset the controller to
++		 * put the device in a known good starting state */
++		e1000_reset_hw(&adapter->hw);
++
++		/* make sure the EEPROM is good */
++
++		if (e1000_validate_eeprom_checksum(&adapter->hw) < 0) {
++			DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
++			goto err_eeprom;
++		}
++
+ 		DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n");
+ 		goto err_eeprom;
+ 	}

linux-2.6-execshield-xen.patch:

Index: linux-2.6-execshield-xen.patch
===================================================================
RCS file: linux-2.6-execshield-xen.patch
diff -N linux-2.6-execshield-xen.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-execshield-xen.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,390 @@
+Index: patching/arch/i386/kernel/process-xen.c
+===================================================================
+--- patching.orig/arch/i386/kernel/process-xen.c
++++ patching/arch/i386/kernel/process-xen.c
+@@ -605,6 +605,9 @@ struct task_struct fastcall * __switch_t
+ 	else BUG_ON(!(read_cr0() & 8));
+ #endif
+ 
++	if (next_p->mm)
++		load_user_cs_desc(cpu, next_p->mm);
++
+ 	/* we're going to use this soon, after a few expensive things */
+ 	if (next_p->fpu_counter > 5)
+ 		prefetch(&next->i387.fxsave);
+@@ -900,3 +903,60 @@ unsigned long arch_align_stack(unsigned 
+ 		sp -= get_random_int() % 8192;
+ 	return sp & ~0xf;
+ }
++
++void arch_add_exec_range(struct mm_struct *mm, unsigned long limit)
++{
++	if (limit > mm->context.exec_limit) {
++		mm->context.exec_limit = limit;
++		set_user_cs(&mm->context.user_cs, limit);
++		if (mm == current->mm) {
++			preempt_disable();
++			load_user_cs_desc(smp_processor_id(), mm);
++			preempt_enable();
++		}
++	}
++}
++
++void arch_remove_exec_range(struct mm_struct *mm, unsigned long old_end)
++{
++	struct vm_area_struct *vma;
++	unsigned long limit = PAGE_SIZE;
++
++	if (old_end == mm->context.exec_limit) {
++		for (vma = mm->mmap; vma; vma = vma->vm_next)
++			if ((vma->vm_flags & VM_EXEC) && (vma->vm_end > limit))
++				limit = vma->vm_end;
++
++		mm->context.exec_limit = limit;
++		set_user_cs(&mm->context.user_cs, limit);
++		if (mm == current->mm) {
++			preempt_disable();
++			load_user_cs_desc(smp_processor_id(), mm);
++			preempt_enable();
++		}
++	}
++}
++
++void arch_flush_exec_range(struct mm_struct *mm)
++{
++	mm->context.exec_limit = 0;
++	set_user_cs(&mm->context.user_cs, 0);
++}
++
++/*
++ * Generate random brk address between 128MB and 196MB. (if the layout
++ * allows it.)
++ */
++void randomize_brk(unsigned long old_brk)
++{
++	unsigned long new_brk, range_start, range_end;
++
++	range_start = 0x08000000;
++	if (current->mm->brk >= range_start)
++		range_start = current->mm->brk;
++	range_end = range_start + 0x02000000;
++	new_brk = randomize_range(range_start, range_end, 0);
++	if (new_brk)
++		current->mm->brk = new_brk;
++}
++
+Index: patching/arch/i386/kernel/smp-xen.c
+===================================================================
+--- patching.orig/arch/i386/kernel/smp-xen.c
++++ patching/arch/i386/kernel/smp-xen.c
+@@ -23,6 +23,7 @@
+ 
+ #include <asm/mtrr.h>
+ #include <asm/tlbflush.h>
++#include <asm/desc.h>
+ #ifndef CONFIG_XEN
+ #include <mach_apic.h>
+ #endif
+@@ -285,6 +286,8 @@ fastcall void smp_invalidate_interrupt(s
+ 	unsigned long cpu;
+ 
+ 	cpu = get_cpu();
++	if (current->active_mm)
++		load_user_cs_desc(cpu, current->active_mm);
+ 
+ 	if (!cpu_isset(cpu, flush_cpumask))
+ 		goto out;
+Index: patching/arch/i386/kernel/traps-xen.c
+===================================================================
+--- patching.orig/arch/i386/kernel/traps-xen.c
++++ patching/arch/i386/kernel/traps-xen.c
+@@ -578,11 +578,89 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", inv
+ DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present)
+ DO_ERROR(12, SIGBUS,  "stack segment", stack_segment)
+ DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
+-DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0)
++
++
++/*
++ * lazy-check for CS validity on exec-shield binaries:
++ *
++ * the original non-exec stack patch was written by
++ * Solar Designer <solar at openwall.com>. Thanks!
++ */
++static int
++check_lazy_exec_limit(int cpu, struct pt_regs *regs, long error_code)
++{
++	struct desc_struct *desc1, *desc2;
++	struct vm_area_struct *vma;
++	unsigned long limit;
++
++	if (current->mm == NULL)
++		return 0;
++
++	limit = -1UL;
++	if (current->mm->context.exec_limit != -1UL) {
++		limit = PAGE_SIZE;
++		spin_lock(&current->mm->page_table_lock);
++		for (vma = current->mm->mmap; vma; vma = vma->vm_next)
++			if ((vma->vm_flags & VM_EXEC) && (vma->vm_end > limit))
++				limit = vma->vm_end;
++		spin_unlock(&current->mm->page_table_lock);
++		if (limit >= TASK_SIZE)
++			limit = -1UL;
++		current->mm->context.exec_limit = limit;
++	}
++	set_user_cs(&current->mm->context.user_cs, limit);
++
++	desc1 = &current->mm->context.user_cs;
++	desc2 = get_cpu_gdt_table(cpu) + GDT_ENTRY_DEFAULT_USER_CS;
++
++	if (desc1->a != desc2->a || desc1->b != desc2->b) {
++		/*
++		 * The CS was not in sync - reload it and retry the
++		 * instruction. If the instruction still faults then
++		 * we won't hit this branch next time around.
++		 */
++		if (print_fatal_signals >= 2) {
++			printk("#GPF fixup (%ld[seg:%lx]) at %08lx, CPU#%d.\n", error_code, error_code/8, regs->eip, smp_processor_id());
++			printk(" exec_limit: %08lx, user_cs: %08lx/%08lx, CPU_cs: %08lx/%08lx.\n", current->mm->context.exec_limit, desc1->a, desc1->b, desc2->a, desc2->b);
++		}
++		load_user_cs_desc(cpu, current->mm);
++		return 1;
++	}
++
++	return 0;
++}
++
++/*
++ * The fixup code for errors in iret jumps to here (iret_exc).  It loses
++ * the original trap number and error code.  The bogus trap 32 and error
++ * code 0 are what the vanilla kernel delivers via:
++ * DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0)
++ *
++ * In case of a general protection fault in the iret instruction, we
++ * need to check for a lazy CS update for exec-shield.
++ */
++fastcall void do_iret_error(struct pt_regs *regs, long error_code)
++{
++	int ok = check_lazy_exec_limit(get_cpu(), regs, error_code);
++	put_cpu();
++	if (!ok && notify_die(DIE_TRAP, "iret exception", regs,
++			      error_code, 32, SIGSEGV) != NOTIFY_STOP) {
++		siginfo_t info;
++		info.si_signo = SIGSEGV;
++		info.si_errno = 0;
++		info.si_code = ILL_BADSTK;
++		info.si_addr = 0;
++		do_trap(32, SIGSEGV, "iret exception", 0, regs, error_code,
++			&info);
++	}
++}
+ 
+ fastcall void __kprobes do_general_protection(struct pt_regs * regs,
+ 					      long error_code)
+ {
++	int cpu = get_cpu();
++	int ok;
++
+ 	current->thread.error_code = error_code;
+ 	current->thread.trap_no = 13;
+ 
+@@ -592,17 +670,31 @@ fastcall void __kprobes do_general_prote
+ 	if (!user_mode(regs))
+ 		goto gp_in_kernel;
+ 
++	ok = check_lazy_exec_limit(cpu, regs, error_code);
++
++	put_cpu();
++
++	if (ok)
++		return;
++
++	if (print_fatal_signals) {
++		printk("#GPF(%ld[seg:%lx]) at %08lx, CPU#%d.\n", error_code, error_code/8, regs->eip, smp_processor_id());
++		printk(" exec_limit: %08lx, user_cs: %08lx/%08lx.\n", current->mm->context.exec_limit, current->mm->context.user_cs.a, current->mm->context.user_cs.b);
++	}
++
+ 	current->thread.error_code = error_code;
+ 	current->thread.trap_no = 13;
+ 	force_sig(SIGSEGV, current);
+ 	return;
+ 
+ gp_in_vm86:
++	put_cpu();
+ 	local_irq_enable();
+ 	handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code);
+ 	return;
+ 
+ gp_in_kernel:
++	put_cpu();
+ 	if (!fixup_exception(regs)) {
+ 		if (notify_die(DIE_GPF, "general protection fault", regs,
+ 				error_code, 13, SIGSEGV) == NOTIFY_STOP)
+Index: patching/arch/i386/mm/init-xen.c
+===================================================================
+--- patching.orig/arch/i386/mm/init-xen.c
++++ patching/arch/i386/mm/init-xen.c
+@@ -486,7 +486,7 @@ EXPORT_SYMBOL(__supported_pte_mask);
+  * Control non executable mappings.
+  *
+  * on      Enable
+- * off     Disable
++ * off     Disable (disables exec-shield too)
+  */
+ static int __init noexec_setup(char *str)
+ {
+@@ -498,6 +498,7 @@ static int __init noexec_setup(char *str
+ 	} else if (!strcmp(str,"off")) {
+ 		disable_nx = 1;
+ 		__supported_pte_mask &= ~_PAGE_NX;
++		exec_shield = 0;
+ 	} else
+ 		return -EINVAL;
+ 
+@@ -569,7 +570,10 @@ void __init paging_init(void)
+ 	set_nx();
+ 	if (nx_enabled)
+ 		printk("NX (Execute Disable) protection: active\n");
++	else
+ #endif
++	if (exec_shield)
++		printk("Using x86 segment limits to approximate NX protection\n");
+ 
+ 	pagetable_init();
+ 
+Index: patching/arch/x86_64/kernel/process-xen.c
+===================================================================
+--- patching.orig/arch/x86_64/kernel/process-xen.c
++++ patching/arch/x86_64/kernel/process-xen.c
+@@ -701,12 +701,6 @@ void set_personality_64bit(void)
+ 
+ 	/* Make sure to be in 64bit mode */
+ 	clear_thread_flag(TIF_IA32); 
+-
+-	/* TBD: overwrites user setup. Should have two bits.
+-	   But 64bit processes have always behaved this way,
+-	   so it's not too bad. The main problem is just that
+-   	   32bit childs are affected again. */
+-	current->personality &= ~READ_IMPLIES_EXEC;
+ }
+ 
+ asmlinkage long sys_fork(struct pt_regs *regs)
+Index: patching/arch/x86_64/kernel/setup64-xen.c
+===================================================================
+--- patching.orig/arch/x86_64/kernel/setup64-xen.c
++++ patching/arch/x86_64/kernel/setup64-xen.c
+@@ -49,46 +49,6 @@ unsigned long __supported_pte_mask __rea
+ EXPORT_SYMBOL(__supported_pte_mask);
+ static int do_not_nx __cpuinitdata = 0;
+ 
+-/* noexec=on|off
+-Control non executable mappings for 64bit processes.
+-
+-on	Enable(default)
+-off	Disable
+-*/ 
+-static int __init nonx_setup(char *str)
+-{
+-	if (!str)
+-		return -EINVAL;
+-	if (!strncmp(str, "on", 2)) {
+-                __supported_pte_mask |= _PAGE_NX; 
+- 		do_not_nx = 0; 
+-	} else if (!strncmp(str, "off", 3)) {
+-		do_not_nx = 1;
+-		__supported_pte_mask &= ~_PAGE_NX;
+-        }
+-	return 0;
+-} 
+-early_param("noexec", nonx_setup);
+-
+-int force_personality32 = 0; 
+-
+-/* noexec32=on|off
+-Control non executable heap for 32bit processes.
+-To control the stack too use noexec=off
+-
+-on	PROT_READ does not imply PROT_EXEC for 32bit processes
+-off	PROT_READ implies PROT_EXEC (default)
+-*/
+-static int __init nonx32_setup(char *str)
+-{
+-	if (!strcmp(str, "on"))
+-		force_personality32 &= ~READ_IMPLIES_EXEC;
+-	else if (!strcmp(str, "off"))
+-		force_personality32 |= READ_IMPLIES_EXEC;
+-	return 1;
+-}
+-__setup("noexec32=", nonx32_setup);
+-
+ /*
+  * Great future plan:
+  * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
+Index: patching/include/asm-i386/mach-xen/asm/processor.h
+===================================================================
+--- patching.orig/include/asm-i386/mach-xen/asm/processor.h
++++ patching/include/asm-i386/mach-xen/asm/processor.h
+@@ -280,7 +280,10 @@ extern int bootloader_type;
+ /* This decides where the kernel will search for a free chunk of vm
+  * space during mmap's.
+  */
+-#define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
++#define TASK_UNMAPPED_BASE	PAGE_ALIGN(TASK_SIZE/3)
++
++#define __HAVE_ARCH_ALIGN_STACK
++extern unsigned long arch_align_stack(unsigned long sp);
+ 
+ #define HAVE_ARCH_PICK_MMAP_LAYOUT
+ 
+@@ -460,6 +463,9 @@ struct thread_struct {
+ 	regs->xcs = __USER_CS;					\
+ 	regs->eip = new_eip;					\
+ 	regs->esp = new_esp;					\
++	preempt_disable();					\
++	load_user_cs_desc(smp_processor_id(), current->mm);	\
++	preempt_enable();					\
+ } while (0)
+ 
+ /* Forward declaration, a strange C thing */
+Index: patching/include/asm-x86_64/mach-xen/asm/pgalloc.h
+===================================================================
+--- patching.orig/include/asm-x86_64/mach-xen/asm/pgalloc.h
++++ patching/include/asm-x86_64/mach-xen/asm/pgalloc.h
+@@ -15,6 +15,13 @@ void make_pages_writable(void *va, unsig
+ 
+ #define __user_pgd(pgd) ((pgd) + PTRS_PER_PGD)
+ 
++#define arch_add_exec_range(mm, limit) \
++		do { (void)(mm), (void)(limit); } while (0)
++#define arch_flush_exec_range(mm) \
++		do { (void)(mm); } while (0)
++#define arch_remove_exec_range(mm, limit) \
++		do { (void)(mm), (void)(limit); } while (0)
++
+ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
+ {
+ 	set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte)));
+Index: patching/include/asm-i386/desc.h
+===================================================================
+--- patching.orig/include/asm-i386/desc.h
++++ patching/include/asm-i386/desc.h
+@@ -206,9 +206,18 @@ static inline void set_user_cs(struct de
+ 	desc->b = (limit & 0xf0000) | 0x00c0fb00;
+ }
+ 
++#ifdef CONFIG_XEN
++
++#define load_user_cs_desc(cpu, mm) \
++        HYPERVISOR_update_descriptor(virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS]), (u64)(mm)->context.user_cs.a | ((u64)(mm)->context.user_cs.b) << 32);
++
++#else /* CONFIG_XEN */
++
+ #define load_user_cs_desc(cpu, mm) \
+ 	get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS] = (mm)->context.user_cs
+ 
++#endif /* CONFIG_XEN */
++
+ extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
+ extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);
+ extern void arch_flush_exec_range(struct mm_struct *mm);

linux-2.6-firewire-be32-fix.patch:

Index: linux-2.6-firewire-be32-fix.patch
===================================================================
RCS file: linux-2.6-firewire-be32-fix.patch
diff -N linux-2.6-firewire-be32-fix.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-firewire-be32-fix.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,23 @@
+diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
+index c17342d..2e4cfa5 100644
+--- a/drivers/firewire/fw-ohci.c
++++ b/drivers/firewire/fw-ohci.c
+@@ -268,7 +268,7 @@ static int ar_context_add_page(struct ar_context *ctx)
+ 
+ 	dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL);
+ 
+-	ctx->last_buffer->descriptor.branch_address = ab_bus | 1;
++	ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1);
+ 	ctx->last_buffer->next = ab;
+ 	ctx->last_buffer = ab;
+ 
+@@ -417,7 +417,8 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 regs)
+ 	ctx->current_buffer = ab.next;
+ 	ctx->pointer = ctx->current_buffer->data;
+ 
+-	reg_write(ctx->ohci, command_ptr(ctx->regs), ab.descriptor.branch_address);
++	reg_write(ctx->ohci, command_ptr(ctx->regs),
++		  le32_to_cpu(ab.descriptor.branch_address));
+ 	reg_write(ctx->ohci, control_set(ctx->regs), CONTEXT_RUN);
+ 	flush_writes(ctx->ohci);
+ 

linux-2.6-firewire-lockdep.patch:

Index: linux-2.6-firewire-lockdep.patch
===================================================================
RCS file: linux-2.6-firewire-lockdep.patch
diff -N linux-2.6-firewire-lockdep.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-firewire-lockdep.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,113 @@
+Date: Mon, 8 Oct 2007 17:00:29 -0400
+From: Jay Fenlason <fenlason redhat com>
+To: linux1394-devel lists sourceforge net
+Message-ID: <20071008210029 GA19900 redhat com>
+References: <b3998a500710080618t46eddf7ah7e64b3d297ff8218 mail gmail com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <b3998a500710080618t46eddf7ah7e64b3d297ff8218 mail gmail com>
+User-Agent: Mutt/1.4.2.2i
+X-loop: fedora-test-list redhat com
+Cc: fedora-test-list redhat com
+Subject: PATCH Re: Firewire locking problem
+X-BeenThere: fedora-test-list redhat com
+X-Mailman-Version: 2.1.5
+Precedence: junk
+Reply-To: For testers of Fedora Core development releases <fedora-test-list redhat com>
+List-Id: For testers of Fedora Core development releases
+	<fedora-test-list.redhat.com>
+List-Unsubscribe: <https://www.redhat.com/mailman/listinfo/fedora-test-list>, 
+	<mailto:fedora-test-list-request redhat com?subject=unsubscribe>
+List-Archive: <https://www.redhat.com/archives/fedora-test-list>
+List-Post: <mailto:fedora-test-list redhat com>
+List-Help: <mailto:fedora-test-list-request redhat com?subject=help>
+List-Subscribe: <https://www.redhat.com/mailman/listinfo/fedora-test-list>,
+	<mailto:fedora-test-list-request redhat com?subject=subscribe>
+Sender: fedora-test-list-bounces redhat com
+Errors-To: fedora-test-list-bounces redhat com
+Status: RO
+Content-Length: 2963
+Lines: 80
+
+On Mon, Oct 08, 2007 at 09:18:18AM -0400, Pat Kane wrote:
+> While trying to use dvgrab to input DV from an ADVC-100 Firewire
+> device on my DELL Inspiron 8600 laptop, I got the following
+> console message:
+> 
+>   =============================================
+>   [ INFO: possible recursive locking detected ]
+>   2.6.23-0.222.rc9.git4.fc8 #1
+>   ---------------------------------------------
+>   X/2522 is trying to acquire lock:
+>    (&q->lock){++..}, at: [<c042671c>] __wake_up+0x15/0x42
+> 
+>   but task is already holding lock:
+>    (&q->lock){++..}, at: [<c042671c>] __wake_up+0x15/0x42
+> 
+>   other info that might help us debug this:
+>   2 locks held by X/2522:
+>    #0:  (&client->lock){.+..}, at: [<e0993f51>] queue_event+0x2b/0x68
+> [firewire_core]
+>    #1:  (&q->lock){++..}, at: [<c042671c>] __wake_up+0x15/0x42
+> 
+>   stack backtrace:
+>    [<c0406463>] show_trace_log_lvl+0x1a/0x2f
+>    [<c0406e4d>] show_trace+0x12/0x14
+>    [<c0406e65>] dump_stack+0x16/0x18
+>    [<c0449c56>] __lock_acquire+0x189/0xc67
+>    [<c044abae>] lock_acquire+0x7b/0x9e
+>    [<c0634712>] _spin_lock_irqsave+0x4a/0x77
+>    [<c042671c>] __wake_up+0x15/0x42
+>    [<c04aed7e>] ep_poll_safewake+0x86/0xa8
+>    [<c04afa05>] ep_poll_callback+0x9f/0xaa
+>    [<c042483e>] __wake_up_common+0x32/0x55
+>    [<c0426738>] __wake_up+0x31/0x42
+>    [<e0993f7d>] queue_event+0x57/0x68 [firewire_core]
+>    [<e0994a5a>] handle_request+0xd8/0xe0 [firewire_core]
+>    [<e099269a>] fw_core_handle_request+0x215/0x23c [firewire_core]
+>    [<e0961c42>] handle_ar_packet+0xd7/0xeb [firewire_ohci]
+>    [<e0962bac>] ar_context_tasklet+0xb6/0xc4 [firewire_ohci]
+>    [<c0432b5b>] tasklet_action+0x68/0xd3
+>    [<c0432a39>] __do_softirq+0x78/0xff
+>    [<c04075d4>] do_softirq+0x74/0xf7
+>    =======================
+(snip)
+
+I think this is caused by queue_event() calling
+wake_up_interruptible(&client->wait) with client->lock still held.  I
+don't see a compelling reason to do the wake_up... inside the lock, so
+I propose the following patch.  I tested it out against
+2.6.23-0.222.rc9.git4.fc8, which is the latest fedora rawhide kernel.
+I never reproduced the original problem, but at least this doesn't
+seem to introduce any regressions.
+
+			-- JF
+
+
+Signed-off-by: Jay Fenlason <fenlason redhat com>
+
+-----------------------------------------------------------------------------
+--- 1/drivers/firewire/fw-cdev.c	2007-07-08 19:32:17.000000000 -0400
++++ 2/drivers/firewire/fw-cdev.c	2007-10-08 11:21:53.000000000 -0400
+@@ -140,11 +140,10 @@ static void queue_event(struct client *c
+ 	event->v[1].size = size1;
+ 
+ 	spin_lock_irqsave(&client->lock, flags);
+-
+ 	list_add_tail(&event->link, &client->event_list);
+-	wake_up_interruptible(&client->wait);
+-
+ 	spin_unlock_irqrestore(&client->lock, flags);
++
++	wake_up_interruptible(&client->wait);
+ }
+ 
+ static int
+
+-- 
+fedora-test-list mailing list
+fedora-test-list redhat com
+To unsubscribe: 
+https://www.redhat.com/mailman/listinfo/fedora-test-list
+

linux-2.6-firewire-multi-lun.patch:

Index: linux-2.6-firewire-multi-lun.patch
===================================================================
RCS file: linux-2.6-firewire-multi-lun.patch
diff -N linux-2.6-firewire-multi-lun.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-firewire-multi-lun.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,997 @@
+From: Stefan Richter <stefanr s5r6 in-berlin de>
+Subject: [PATCH update] firewire: fw-sbp2: add support for multiple logical
+	units per target
+To: linux1394-devel lists sourceforge net
+cc: =?iso-8859-1?Q?Kristian_H=F8gsberg?= <krh redhat com>
+Message-ID: <tkrat 1d824f10636d44c0 s5r6 in-berlin de>
+MIME-Version: 1.0
+Content-Type: TEXT/PLAIN; CHARSET=us-ascii
+Content-Disposition: INLINE
+Content-Transfer-Encoding: 8bit
+
+Fixes "New firewire stack only recognizing half of a chain of drives",
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242254
+
+Signed-off-by: Stefan Richter <stefanr s5r6 in-berlin de>
+---
+
+Update:
+  - refresh after patch "Add ref-counting for sbp2 orbs"
+  - further simplify exit paths in sbp2_scsi_queuecommand
+  - use the eight_bytes_lun variable more readably
+
+ drivers/firewire/fw-device.h |    5 
+ drivers/firewire/fw-sbp2.c   |  583 +++++++++++++++++++----------------
+ 2 files changed, 328 insertions(+), 260 deletions(-)
+
+Index: linux/drivers/firewire/fw-device.h
+===================================================================
+--- linux.orig/drivers/firewire/fw-device.h
++++ linux/drivers/firewire/fw-device.h
+@@ -102,11 +102,6 @@ fw_unit(struct device *dev)
+ #define CSR_INSTANCE		0x18
+ #define CSR_DIRECTORY_ID	0x20
+ 
+-#define SBP2_COMMAND_SET_SPECIFIER	0x38
+-#define SBP2_COMMAND_SET		0x39
+-#define SBP2_COMMAND_SET_REVISION	0x3b
+-#define SBP2_FIRMWARE_REVISION		0x3c
+-
+ struct fw_csr_iterator {
+ 	u32 *p;
+ 	u32 *end;
+Index: linux/drivers/firewire/fw-sbp2.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-sbp2.c
++++ linux/drivers/firewire/fw-sbp2.c
+@@ -41,7 +41,6 @@
+ 
+ #include <scsi/scsi.h>
+ #include <scsi/scsi_cmnd.h>
+-#include <scsi/scsi_dbg.h>
+ #include <scsi/scsi_device.h>
+ #include <scsi/scsi_host.h>
+ 
+@@ -66,31 +65,49 @@ typedef void (*scsi_done_fn_t)(struct sc
+ 
+ static const char sbp2_driver_name[] = "sbp2";
+ 
+-struct sbp2_device {
+-	struct kref kref;
+-	struct fw_unit *unit;
++/*
++ * We create one struct sbp2_logical_unit per SBP-2 Logical Unit Number Entry
++ * and one struct scsi_device per sbp2_logical_unit.
++ */
++struct sbp2_logical_unit {
++	struct sbp2_target *tgt;
++	struct list_head link;
++	struct scsi_device *sdev;
+ 	struct fw_address_handler address_handler;
+ 	struct list_head orb_list;
+-	u64 management_agent_address;
++
+ 	u64 command_block_agent_address;
+-	u32 workarounds;
++	u16 lun;
+ 	int login_id;
+ 
+ 	/*
+-	 * We cache these addresses and only update them once we've
+-	 * logged in or reconnected to the sbp2 device.  That way, any
+-	 * IO to the device will automatically fail and get retried if
+-	 * it happens in a window where the device is not ready to
+-	 * handle it (e.g. after a bus reset but before we reconnect).
++	 * The generation is updated once we've logged in or reconnected
++	 * to the logical unit.  Thus, I/O to the device will automatically
++	 * fail and get retried if it happens in a window where the device
++	 * is not ready, e.g. after a bus reset but before we reconnect.
+ 	 */
+-	int node_id;
+-	int address_high;
+ 	int generation;
+-
+ 	int retries;
+ 	struct delayed_work work;
+ };
+ 
++/*
++ * We create one struct sbp2_target per IEEE 1212 Unit Directory
++ * and one struct Scsi_Host per sbp2_target.
++ */
++struct sbp2_target {
++	struct kref kref;
++	struct fw_unit *unit;
++
++	u64 management_agent_address;
++	int directory_id;
++	int node_id;
++	int address_high;
++
++	unsigned workarounds;
++	struct list_head lu_list;
++};
++
+ #define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
+ #define SBP2_MAX_SECTORS		255	/* Max sectors supported */
+ #define SBP2_ORB_TIMEOUT		2000	/* Timeout in ms */
+@@ -101,10 +118,9 @@ struct sbp2_device {
+ #define SBP2_DIRECTION_FROM_MEDIA	0x1
+ 
+ /* Unit directory keys */
+-#define SBP2_COMMAND_SET_SPECIFIER	0x38
+-#define SBP2_COMMAND_SET		0x39
+-#define SBP2_COMMAND_SET_REVISION	0x3b
+-#define SBP2_FIRMWARE_REVISION		0x3c
++#define SBP2_CSR_FIRMWARE_REVISION	0x3c
++#define SBP2_CSR_LOGICAL_UNIT_NUMBER	0x14
++#define SBP2_CSR_LOGICAL_UNIT_DIRECTORY	0xd4
+ 
+ /* Flags for detected oddities and brokeness */
+ #define SBP2_WORKAROUND_128K_MAX_TRANS	0x1
+@@ -219,7 +235,7 @@ struct sbp2_command_orb {
+ 	} request;
+ 	struct scsi_cmnd *cmd;
+ 	scsi_done_fn_t done;
+-	struct fw_unit *unit;
++	struct sbp2_logical_unit *lu;
+ 
+ 	struct sbp2_pointer page_table[SG_ALL] __attribute__((aligned(8)));
+ 	dma_addr_t page_table_bus;
+@@ -295,7 +311,7 @@ sbp2_status_write(struct fw_card *card, 
+ 		  unsigned long long offset,
+ 		  void *payload, size_t length, void *callback_data)
+ {
+-	struct sbp2_device *sd = callback_data;
++	struct sbp2_logical_unit *lu = callback_data;
+ 	struct sbp2_orb *orb;
+ 	struct sbp2_status status;
+ 	size_t header_size;
+@@ -319,7 +335,7 @@ sbp2_status_write(struct fw_card *card, 
+ 
+ 	/* Lookup the orb corresponding to this status write. */
+ 	spin_lock_irqsave(&card->lock, flags);
+-	list_for_each_entry(orb, &sd->orb_list, link) {
++	list_for_each_entry(orb, &lu->orb_list, link) {
+ 		if (STATUS_GET_ORB_HIGH(status) == 0 &&
+ 		    STATUS_GET_ORB_LOW(status) == orb->request_bus) {
+ 			orb->rcode = RCODE_COMPLETE;
+@@ -329,7 +345,7 @@ sbp2_status_write(struct fw_card *card, 
+ 	}
+ 	spin_unlock_irqrestore(&card->lock, flags);
+ 
+-	if (&orb->link != &sd->orb_list)
++	if (&orb->link != &lu->orb_list)
+ 		orb->callback(orb, &status);
+ 	else
+ 		fw_error("status write for unknown orb\n");
+@@ -371,11 +387,10 @@ complete_transaction(struct fw_card *car
+ }
+ 
+ static void
+-sbp2_send_orb(struct sbp2_orb *orb, struct fw_unit *unit,
++sbp2_send_orb(struct sbp2_orb *orb, struct sbp2_logical_unit *lu,
+ 	      int node_id, int generation, u64 offset)
+ {
+-	struct fw_device *device = fw_device(unit->device.parent);
+-	struct sbp2_device *sd = unit->device.driver_data;
++	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	unsigned long flags;
+ 
+ 	orb->pointer.high = 0;
+@@ -383,7 +398,7 @@ sbp2_send_orb(struct sbp2_orb *orb, stru
+ 	fw_memcpy_to_be32(&orb->pointer, &orb->pointer, sizeof(orb->pointer));
+ 
+ 	spin_lock_irqsave(&device->card->lock, flags);
+-	list_add_tail(&orb->link, &sd->orb_list);
++	list_add_tail(&orb->link, &lu->orb_list);
+ 	spin_unlock_irqrestore(&device->card->lock, flags);
+ 
+ 	/* Take a ref for the orb list and for the transaction callback. */
+@@ -396,10 +411,9 @@ sbp2_send_orb(struct sbp2_orb *orb, stru
+ 			complete_transaction, orb);
+ }
+ 
+-static int sbp2_cancel_orbs(struct fw_unit *unit)
++static int sbp2_cancel_orbs(struct sbp2_logical_unit *lu)
+ {
+-	struct fw_device *device = fw_device(unit->device.parent);
+-	struct sbp2_device *sd = unit->device.driver_data;
++	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	struct sbp2_orb *orb, *next;
+ 	struct list_head list;
+ 	unsigned long flags;
+@@ -407,7 +421,7 @@ static int sbp2_cancel_orbs(struct fw_un
+ 
+ 	INIT_LIST_HEAD(&list);
+ 	spin_lock_irqsave(&device->card->lock, flags);
+-	list_splice_init(&sd->orb_list, &list);
++	list_splice_init(&lu->orb_list, &list);
+ 	spin_unlock_irqrestore(&device->card->lock, flags);
+ 
+ 	list_for_each_entry_safe(orb, next, &list, link) {
+@@ -434,11 +448,11 @@ complete_management_orb(struct sbp2_orb 
+ }
+ 
+ static int
+-sbp2_send_management_orb(struct fw_unit *unit, int node_id, int generation,
+-			 int function, int lun, void *response)
++sbp2_send_management_orb(struct sbp2_logical_unit *lu, int node_id,
++			 int generation, int function, int lun_or_login_id,
++			 void *response)
+ {
+-	struct fw_device *device = fw_device(unit->device.parent);
+-	struct sbp2_device *sd = unit->device.driver_data;
++	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	struct sbp2_management_orb *orb;
+ 	int retval = -ENOMEM;
+ 
+@@ -459,12 +473,12 @@ sbp2_send_management_orb(struct fw_unit 
+ 	orb->request.misc =
+ 		MANAGEMENT_ORB_NOTIFY |
+ 		MANAGEMENT_ORB_FUNCTION(function) |
+-		MANAGEMENT_ORB_LUN(lun);
++		MANAGEMENT_ORB_LUN(lun_or_login_id);
+ 	orb->request.length =
+ 		MANAGEMENT_ORB_RESPONSE_LENGTH(sizeof(orb->response));
+ 
+-	orb->request.status_fifo.high = sd->address_handler.offset >> 32;
+-	orb->request.status_fifo.low  = sd->address_handler.offset;
++	orb->request.status_fifo.high = lu->address_handler.offset >> 32;
++	orb->request.status_fifo.low  = lu->address_handler.offset;
+ 
+ 	if (function == SBP2_LOGIN_REQUEST) {
+ 		orb->request.misc |=
+@@ -483,14 +497,14 @@ sbp2_send_management_orb(struct fw_unit 
+ 	if (dma_mapping_error(orb->base.request_bus))
+ 		goto fail_mapping_request;
+ 
+-	sbp2_send_orb(&orb->base, unit,
+-		      node_id, generation, sd->management_agent_address);
++	sbp2_send_orb(&orb->base, lu, node_id, generation,
++		      lu->tgt->management_agent_address);
+ 
+ 	wait_for_completion_timeout(&orb->done,
+ 				    msecs_to_jiffies(SBP2_ORB_TIMEOUT));
+ 
+ 	retval = -EIO;
+-	if (sbp2_cancel_orbs(unit) == 0) {
++	if (sbp2_cancel_orbs(lu) == 0) {
+ 		fw_error("orb reply timed out, rcode=0x%02x\n",
+ 			 orb->base.rcode);
+ 		goto out;
+@@ -535,10 +549,9 @@ complete_agent_reset_write(struct fw_car
+ 	kfree(t);
+ }
+ 
+-static int sbp2_agent_reset(struct fw_unit *unit)
++static int sbp2_agent_reset(struct sbp2_logical_unit *lu)
+ {
+-	struct fw_device *device = fw_device(unit->device.parent);
+-	struct sbp2_device *sd = unit->device.driver_data;
++	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	struct fw_transaction *t;
+ 	static u32 zero;
+ 
+@@ -547,181 +560,261 @@ static int sbp2_agent_reset(struct fw_un
+ 		return -ENOMEM;
+ 
+ 	fw_send_request(device->card, t, TCODE_WRITE_QUADLET_REQUEST,
+-			sd->node_id, sd->generation, device->max_speed,
+-			sd->command_block_agent_address + SBP2_AGENT_RESET,
++			lu->tgt->node_id, lu->generation, device->max_speed,
++			lu->command_block_agent_address + SBP2_AGENT_RESET,
+ 			&zero, sizeof(zero), complete_agent_reset_write, t);
+ 
+ 	return 0;
+ }
+ 
+-static void sbp2_reconnect(struct work_struct *work);
+-static struct scsi_host_template scsi_driver_template;
+-
+-static void release_sbp2_device(struct kref *kref)
++static void sbp2_release_target(struct kref *kref)
+ {
+-	struct sbp2_device *sd = container_of(kref, struct sbp2_device, kref);
+-	struct Scsi_Host *host =
+-		container_of((void *)sd, struct Scsi_Host, hostdata[0]);
+-
+-	scsi_remove_host(host);
+-	sbp2_send_management_orb(sd->unit, sd->node_id, sd->generation,
+-				 SBP2_LOGOUT_REQUEST, sd->login_id, NULL);
+-	fw_core_remove_address_handler(&sd->address_handler);
+-	fw_notify("removed sbp2 unit %s\n", sd->unit->device.bus_id);
+-	put_device(&sd->unit->device);
+-	scsi_host_put(host);
++	struct sbp2_target *tgt = container_of(kref, struct sbp2_target, kref);
++	struct sbp2_logical_unit *lu, *next;
++	struct Scsi_Host *shost =
++		container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
++
++	list_for_each_entry_safe(lu, next, &tgt->lu_list, link) {
++		if (lu->sdev)
++			scsi_remove_device(lu->sdev);
++
++		sbp2_send_management_orb(lu, tgt->node_id, lu->generation,
++				SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
++		fw_core_remove_address_handler(&lu->address_handler);
++		list_del(&lu->link);
++		kfree(lu);
++	}
++	scsi_remove_host(shost);
++	fw_notify("released %s\n", tgt->unit->device.bus_id);
++
++	put_device(&tgt->unit->device);
++	scsi_host_put(shost);
+ }
+ 
++static void sbp2_reconnect(struct work_struct *work);
++
+ static void sbp2_login(struct work_struct *work)
+ {
+-	struct sbp2_device *sd =
+-		container_of(work, struct sbp2_device, work.work);
+-	struct Scsi_Host *host =
+-		container_of((void *)sd, struct Scsi_Host, hostdata[0]);
+-	struct fw_unit *unit = sd->unit;
++	struct sbp2_logical_unit *lu =
++		container_of(work, struct sbp2_logical_unit, work.work);
++	struct Scsi_Host *shost =
++		container_of((void *)lu->tgt, struct Scsi_Host, hostdata[0]);
++	struct scsi_device *sdev;
++	struct scsi_lun eight_bytes_lun;
++	struct fw_unit *unit = lu->tgt->unit;
+ 	struct fw_device *device = fw_device(unit->device.parent);
+ 	struct sbp2_login_response response;
+-	int generation, node_id, local_node_id, lun, retval;
+-
+-	/* FIXME: Make this work for multi-lun devices. */
+-	lun = 0;
++	int generation, node_id, local_node_id;
+ 
+ 	generation    = device->card->generation;
+ 	node_id       = device->node->node_id;
+ 	local_node_id = device->card->local_node->node_id;
+ 
+-	if (sbp2_send_management_orb(unit, node_id, generation,
+-				     SBP2_LOGIN_REQUEST, lun, &response) < 0) {
+-		if (sd->retries++ < 5) {
+-			schedule_delayed_work(&sd->work, DIV_ROUND_UP(HZ, 5));
++	if (sbp2_send_management_orb(lu, node_id, generation,
++				SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) {
++		if (lu->retries++ < 5) {
++			schedule_delayed_work(&lu->work, DIV_ROUND_UP(HZ, 5));
+ 		} else {
+-			fw_error("failed to login to %s\n",
+-				 unit->device.bus_id);
+-			kref_put(&sd->kref, release_sbp2_device);
++			fw_error("failed to login to %s LUN %04x\n",
++				 unit->device.bus_id, lu->lun);
++			kref_put(&lu->tgt->kref, sbp2_release_target);
+ 		}
+ 		return;
+ 	}
+ 
+-	sd->generation   = generation;
+-	sd->node_id      = node_id;
+-	sd->address_high = local_node_id << 16;
++	lu->generation        = generation;
++	lu->tgt->node_id      = node_id;
++	lu->tgt->address_high = local_node_id << 16;
+ 
+ 	/* Get command block agent offset and login id. */
+-	sd->command_block_agent_address =
++	lu->command_block_agent_address =
+ 		((u64) (response.command_block_agent.high & 0xffff) << 32) |
+ 		response.command_block_agent.low;
+-	sd->login_id = LOGIN_RESPONSE_GET_LOGIN_ID(response);
++	lu->login_id = LOGIN_RESPONSE_GET_LOGIN_ID(response);
+ 
+-	fw_notify("logged in to sbp2 unit %s (%d retries)\n",
+-		  unit->device.bus_id, sd->retries);
+-	fw_notify(" - management_agent_address:    0x%012llx\n",
+-		  (unsigned long long) sd->management_agent_address);
+-	fw_notify(" - command_block_agent_address: 0x%012llx\n",
+-		  (unsigned long long) sd->command_block_agent_address);
+-	fw_notify(" - status write address:        0x%012llx\n",
+-		  (unsigned long long) sd->address_handler.offset);
++	fw_notify("logged in to %s LUN %04x (%d retries)\n",
++		  unit->device.bus_id, lu->lun, lu->retries);
+ 
+ #if 0
+ 	/* FIXME: The linux1394 sbp2 does this last step. */
+ 	sbp2_set_busy_timeout(scsi_id);
+ #endif
+ 
+-	PREPARE_DELAYED_WORK(&sd->work, sbp2_reconnect);
+-	sbp2_agent_reset(unit);
++	PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect);
++	sbp2_agent_reset(lu);
+ 
+-	/* FIXME: Loop over luns here. */
+-	lun = 0;
+-	retval = scsi_add_device(host, 0, 0, lun);
+-	if (retval < 0) {
+-		sbp2_send_management_orb(unit, sd->node_id, sd->generation,
+-					 SBP2_LOGOUT_REQUEST, sd->login_id,
+-					 NULL);
++	memset(&eight_bytes_lun, 0, sizeof(eight_bytes_lun));
++	eight_bytes_lun.scsi_lun[0] = (lu->lun >> 8) & 0xff;
++	eight_bytes_lun.scsi_lun[1] = lu->lun & 0xff;
++
++	sdev = __scsi_add_device(shost, 0, 0,
++				 scsilun_to_int(&eight_bytes_lun), lu);
++	if (IS_ERR(sdev)) {
++		sbp2_send_management_orb(lu, node_id, generation,
++				SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
+ 		/*
+ 		 * Set this back to sbp2_login so we fall back and
+ 		 * retry login on bus reset.
+ 		 */
+-		PREPARE_DELAYED_WORK(&sd->work, sbp2_login);
++		PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
++	} else {
++		lu->sdev = sdev;
++		scsi_device_put(sdev);
+ 	}
+-	kref_put(&sd->kref, release_sbp2_device);
++	kref_put(&lu->tgt->kref, sbp2_release_target);
+ }
+ 
+-static int sbp2_probe(struct device *dev)
++static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry)
++{
++	struct sbp2_logical_unit *lu;
++
++	lu = kmalloc(sizeof(*lu), GFP_KERNEL);
++	if (!lu)
++		return -ENOMEM;
++
++	lu->address_handler.length           = 0x100;
++	lu->address_handler.address_callback = sbp2_status_write;
++	lu->address_handler.callback_data    = lu;
++
++	if (fw_core_add_address_handler(&lu->address_handler,
++					&fw_high_memory_region) < 0) {
++		kfree(lu);
++		return -ENOMEM;
++	}
++
++	lu->tgt  = tgt;
++	lu->sdev = NULL;
++	lu->lun  = lun_entry & 0xffff;
++	lu->retries = 0;
++	INIT_LIST_HEAD(&lu->orb_list);
++	INIT_DELAYED_WORK(&lu->work, sbp2_login);
++
++	list_add_tail(&lu->link, &tgt->lu_list);
++	return 0;
++}
++
++static int sbp2_scan_logical_unit_dir(struct sbp2_target *tgt, u32 *directory)
+ {
+-	struct fw_unit *unit = fw_unit(dev);
+-	struct fw_device *device = fw_device(unit->device.parent);
+-	struct sbp2_device *sd;
+ 	struct fw_csr_iterator ci;
+-	struct Scsi_Host *host;
+-	int i, key, value, err;
+-	u32 model, firmware_revision;
++	int key, value;
+ 
+-	err = -ENOMEM;
+-	host = scsi_host_alloc(&scsi_driver_template, sizeof(*sd));
+-	if (host == NULL)
+-		goto fail;
++	fw_csr_iterator_init(&ci, directory);
++	while (fw_csr_iterator_next(&ci, &key, &value))
++		if (key == SBP2_CSR_LOGICAL_UNIT_NUMBER &&
++		    sbp2_add_logical_unit(tgt, value) < 0)
++			return -ENOMEM;
++	return 0;
++}
+ 
+-	sd = (struct sbp2_device *) host->hostdata;
+-	unit->device.driver_data = sd;
+-	sd->unit = unit;
+-	INIT_LIST_HEAD(&sd->orb_list);
+-	kref_init(&sd->kref);
+-
+-	sd->address_handler.length = 0x100;
+-	sd->address_handler.address_callback = sbp2_status_write;
+-	sd->address_handler.callback_data = sd;
+-
+-	err = fw_core_add_address_handler(&sd->address_handler,
+-					  &fw_high_memory_region);
+-	if (err < 0)
+-		goto fail_host;
+-
+-	err = fw_device_enable_phys_dma(device);
+-	if (err < 0)
+-		goto fail_address_handler;
+-
+-	err = scsi_add_host(host, &unit->device);
+-	if (err < 0)
+-		goto fail_address_handler;
++static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory,
++			      u32 *model, u32 *firmware_revision)
++{
++	struct fw_csr_iterator ci;
++	int key, value;
+ 
+-	/*
+-	 * Scan unit directory to get management agent address,
+-	 * firmware revison and model.  Initialize firmware_revision
+-	 * and model to values that wont match anything in our table.
+-	 */
+-	firmware_revision = 0xff000000;
+-	model = 0xff000000;
+-	fw_csr_iterator_init(&ci, unit->directory);
++	fw_csr_iterator_init(&ci, directory);
+ 	while (fw_csr_iterator_next(&ci, &key, &value)) {
+ 		switch (key) {
++
+ 		case CSR_DEPENDENT_INFO | CSR_OFFSET:
+-			sd->management_agent_address =
+-				0xfffff0000000ULL + 4 * value;
++			tgt->management_agent_address =
++					CSR_REGISTER_BASE + 4 * value;
+ 			break;
+-		case SBP2_FIRMWARE_REVISION:
+-			firmware_revision = value;
++
++		case CSR_DIRECTORY_ID:
++			tgt->directory_id = value;
+ 			break;
++
+ 		case CSR_MODEL:
+-			model = value;
++			*model = value;
++			break;
++
++		case SBP2_CSR_FIRMWARE_REVISION:
++			*firmware_revision = value;
++			break;
++
++		case SBP2_CSR_LOGICAL_UNIT_NUMBER:
++			if (sbp2_add_logical_unit(tgt, value) < 0)
++				return -ENOMEM;
++			break;
++
++		case SBP2_CSR_LOGICAL_UNIT_DIRECTORY:
++			if (sbp2_scan_logical_unit_dir(tgt, ci.p + value) < 0)
++				return -ENOMEM;
+ 			break;
+ 		}
+ 	}
++	return 0;
++}
++
++static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model,
++				  u32 firmware_revision)
++{
++	int i;
++
++	tgt->workarounds = 0;
+ 
+ 	for (i = 0; i < ARRAY_SIZE(sbp2_workarounds_table); i++) {
++
+ 		if (sbp2_workarounds_table[i].firmware_revision !=
+ 		    (firmware_revision & 0xffffff00))
+ 			continue;
++
+ 		if (sbp2_workarounds_table[i].model != model &&
+ 		    sbp2_workarounds_table[i].model != ~0)
+ 			continue;
+-		sd->workarounds |= sbp2_workarounds_table[i].workarounds;
++
++		tgt->workarounds |= sbp2_workarounds_table[i].workarounds;
+ 		break;
+ 	}
+ 
+-	if (sd->workarounds)
+-		fw_notify("Workarounds for node %s: 0x%x "
++	if (tgt->workarounds)
++		fw_notify("Workarounds for %s: 0x%x "
+ 			  "(firmware_revision 0x%06x, model_id 0x%06x)\n",
+-			  unit->device.bus_id,
+-			  sd->workarounds, firmware_revision, model);
++			  tgt->unit->device.bus_id,
++			  tgt->workarounds, firmware_revision, model);
++}
++
++static struct scsi_host_template scsi_driver_template;
++
++static int sbp2_probe(struct device *dev)
++{
++	struct fw_unit *unit = fw_unit(dev);
++	struct fw_device *device = fw_device(unit->device.parent);
++	struct sbp2_target *tgt;
++	struct sbp2_logical_unit *lu;
++	struct Scsi_Host *shost;
++	u32 model, firmware_revision;
++
++	shost = scsi_host_alloc(&scsi_driver_template, sizeof(*tgt));
++	if (shost == NULL)
++		return -ENOMEM;
++
++	tgt = (struct sbp2_target *)shost->hostdata;
++	unit->device.driver_data = tgt;
++	tgt->unit = unit;
++	kref_init(&tgt->kref);
++	INIT_LIST_HEAD(&tgt->lu_list);
++
++	if (fw_device_enable_phys_dma(device) < 0)
++		goto fail_shost_put;
++
++	if (scsi_add_host(shost, &unit->device) < 0)
++		goto fail_shost_put;
++
++	/* Initialize to values that won't match anything in our table. */
++	firmware_revision = 0xff000000;
++	model = 0xff000000;
++
++	/* implicit directory ID */
++	tgt->directory_id = ((unit->directory - device->config_rom) * 4
++			     + CSR_CONFIG_ROM) & 0xffffff;
++
++	if (sbp2_scan_unit_dir(tgt, unit->directory, &model,
++			       &firmware_revision) < 0)
++		goto fail_tgt_put;
++
++	sbp2_init_workarounds(tgt, model, firmware_revision);
+ 
+ 	get_device(&unit->device);
+ 
+@@ -730,35 +823,34 @@ static int sbp2_probe(struct device *dev
+ 	 * reschedule retries. Always get the ref before scheduling
+ 	 * work.
+ 	 */
+-	INIT_DELAYED_WORK(&sd->work, sbp2_login);
+-	if (schedule_delayed_work(&sd->work, 0))
+-		kref_get(&sd->kref);
+-
++	list_for_each_entry(lu, &tgt->lu_list, link)
++		if (schedule_delayed_work(&lu->work, 0))
++			kref_get(&tgt->kref);
+ 	return 0;
+ 
+- fail_address_handler:
+-	fw_core_remove_address_handler(&sd->address_handler);
+- fail_host:
+-	scsi_host_put(host);
+- fail:
+-	return err;
++ fail_tgt_put:
++	kref_put(&tgt->kref, sbp2_release_target);
++	return -ENOMEM;
++
++ fail_shost_put:
++	scsi_host_put(shost);
++	return -ENOMEM;
+ }
+ 
+ static int sbp2_remove(struct device *dev)
+ {
+ 	struct fw_unit *unit = fw_unit(dev);
+-	struct sbp2_device *sd = unit->device.driver_data;
+-
+-	kref_put(&sd->kref, release_sbp2_device);
++	struct sbp2_target *tgt = unit->device.driver_data;
+ 
++	kref_put(&tgt->kref, sbp2_release_target);
+ 	return 0;
+ }
+ 
+ static void sbp2_reconnect(struct work_struct *work)
+ {
+-	struct sbp2_device *sd =
+-		container_of(work, struct sbp2_device, work.work);
+-	struct fw_unit *unit = sd->unit;
++	struct sbp2_logical_unit *lu =
++		container_of(work, struct sbp2_logical_unit, work.work);
++	struct fw_unit *unit = lu->tgt->unit;
+ 	struct fw_device *device = fw_device(unit->device.parent);
+ 	int generation, node_id, local_node_id;
+ 
+@@ -766,40 +858,49 @@ static void sbp2_reconnect(struct work_s
+ 	node_id       = device->node->node_id;
+ 	local_node_id = device->card->local_node->node_id;
+ 
+-	if (sbp2_send_management_orb(unit, node_id, generation,
++	if (sbp2_send_management_orb(lu, node_id, generation,
+ 				     SBP2_RECONNECT_REQUEST,
+-				     sd->login_id, NULL) < 0) {
+-		if (sd->retries++ >= 5) {
++				     lu->login_id, NULL) < 0) {
++		if (lu->retries++ >= 5) {
+ 			fw_error("failed to reconnect to %s\n",
+ 				 unit->device.bus_id);
+ 			/* Fall back and try to log in again. */
+-			sd->retries = 0;
+-			PREPARE_DELAYED_WORK(&sd->work, sbp2_login);
++			lu->retries = 0;
++			PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
+ 		}
+-		schedule_delayed_work(&sd->work, DIV_ROUND_UP(HZ, 5));
++		schedule_delayed_work(&lu->work, DIV_ROUND_UP(HZ, 5));
+ 		return;
+ 	}
+ 
+-	sd->generation   = generation;
+-	sd->node_id      = node_id;
+-	sd->address_high = local_node_id << 16;
+-
+-	fw_notify("reconnected to unit %s (%d retries)\n",
+-		  unit->device.bus_id, sd->retries);
+-	sbp2_agent_reset(unit);
+-	sbp2_cancel_orbs(unit);
+-	kref_put(&sd->kref, release_sbp2_device);
++	lu->generation        = generation;
++	lu->tgt->node_id      = node_id;
++	lu->tgt->address_high = local_node_id << 16;
++
++	fw_notify("reconnected to %s LUN %04x (%d retries)\n",
++		  unit->device.bus_id, lu->lun, lu->retries);
++
++	sbp2_agent_reset(lu);
++	sbp2_cancel_orbs(lu);
++
++	kref_put(&lu->tgt->kref, sbp2_release_target);
+ }
+ 
+ static void sbp2_update(struct fw_unit *unit)
+ {
+-	struct fw_device *device = fw_device(unit->device.parent);
+-	struct sbp2_device *sd = unit->device.driver_data;
++	struct sbp2_target *tgt = unit->device.driver_data;
++	struct sbp2_logical_unit *lu;
+ 
+-	sd->retries = 0;
+-	fw_device_enable_phys_dma(device);
+-	if (schedule_delayed_work(&sd->work, 0))
+-		kref_get(&sd->kref);
++	fw_device_enable_phys_dma(fw_device(unit->device.parent));
++
++	/*
++	 * Fw-core serializes sbp2_update() against sbp2_remove().
++	 * Iteration over tgt->lu_list is therefore safe here.
++	 */
++	list_for_each_entry(lu, &tgt->lu_list, link) {
++		lu->retries = 0;
++		if (schedule_delayed_work(&lu->work, 0))
++			kref_get(&tgt->kref);
++	}
+ }
+ 
+ #define SBP2_UNIT_SPEC_ID_ENTRY	0x0000609e
+@@ -869,13 +970,12 @@ complete_command_orb(struct sbp2_orb *ba
+ {
+ 	struct sbp2_command_orb *orb =
+ 		container_of(base_orb, struct sbp2_command_orb, base);
+-	struct fw_unit *unit = orb->unit;
+-	struct fw_device *device = fw_device(unit->device.parent);
++	struct fw_device *device = fw_device(orb->lu->tgt->unit->device.parent);
+ 	int result;
+ 
+ 	if (status != NULL) {
+ 		if (STATUS_GET_DEAD(*status))
+-			sbp2_agent_reset(unit);
++			sbp2_agent_reset(orb->lu);
+ 
+ 		switch (STATUS_GET_RESPONSE(*status)) {
+ 		case SBP2_STATUS_REQUEST_COMPLETE:
+@@ -919,12 +1019,10 @@ complete_command_orb(struct sbp2_orb *ba
+ 	orb->done(orb->cmd);
+ }
+ 
+-static int sbp2_command_orb_map_scatterlist(struct sbp2_command_orb *orb)
++static int
++sbp2_map_scatterlist(struct sbp2_command_orb *orb, struct fw_device *device,
++		     struct sbp2_logical_unit *lu)
+ {
+-	struct sbp2_device *sd =
+-		(struct sbp2_device *)orb->cmd->device->host->hostdata;
+-	struct fw_unit *unit = sd->unit;
+-	struct fw_device *device = fw_device(unit->device.parent);
+ 	struct scatterlist *sg;
+ 	int sg_len, l, i, j, count;
+ 	dma_addr_t sg_addr;
+@@ -943,10 +1041,9 @@ static int sbp2_command_orb_map_scatterl
+ 	 * tables.
+ 	 */
+ 	if (count == 1 && sg_dma_len(sg) < SBP2_MAX_SG_ELEMENT_LENGTH) {
+-		orb->request.data_descriptor.high = sd->address_high;
++		orb->request.data_descriptor.high = lu->tgt->address_high;
+ 		orb->request.data_descriptor.low  = sg_dma_address(sg);
+-		orb->request.misc |=
+-			COMMAND_ORB_DATA_SIZE(sg_dma_len(sg));
++		orb->request.misc |= COMMAND_ORB_DATA_SIZE(sg_dma_len(sg));
+ 		return 0;
+ 	}
+ 
+@@ -990,7 +1087,7 @@ static int sbp2_command_orb_map_scatterl
+ 	 * initiator (i.e. us), but data_descriptor can refer to data
+ 	 * on other nodes so we need to put our ID in descriptor.high.
+ 	 */
+-	orb->request.data_descriptor.high = sd->address_high;
++	orb->request.data_descriptor.high = lu->tgt->address_high;
+ 	orb->request.data_descriptor.low  = orb->page_table_bus;
+ 	orb->request.misc |=
+ 		COMMAND_ORB_PAGE_TABLE_PRESENT |
+@@ -1009,12 +1106,11 @@ static int sbp2_command_orb_map_scatterl
+ 
+ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
+ {
+-	struct sbp2_device *sd =
+-		(struct sbp2_device *)cmd->device->host->hostdata;
+-	struct fw_unit *unit = sd->unit;
+-	struct fw_device *device = fw_device(unit->device.parent);
++	struct sbp2_logical_unit *lu = cmd->device->hostdata;
++	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	struct sbp2_command_orb *orb;
+ 	unsigned max_payload;
++	int retval = SCSI_MLQUEUE_HOST_BUSY;
+ 
+ 	/*
+ 	 * Bidirectional commands are not yet implemented, and unknown
+@@ -1030,14 +1126,14 @@ static int sbp2_scsi_queuecommand(struct
+ 	orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
+ 	if (orb == NULL) {
+ 		fw_notify("failed to alloc orb\n");
+-		goto fail_alloc;
++		return SCSI_MLQUEUE_HOST_BUSY;
+ 	}
+ 
+ 	/* Initialize rcode to something not RCODE_COMPLETE. */
+ 	orb->base.rcode = -1;
+ 	kref_init(&orb->base.kref);
+ 
+-	orb->unit = unit;
++	orb->lu   = lu;
+ 	orb->done = done;
+ 	orb->cmd  = cmd;
+ 
+@@ -1063,8 +1159,8 @@ static int sbp2_scsi_queuecommand(struct
+ 		orb->request.misc |=
+ 			COMMAND_ORB_DIRECTION(SBP2_DIRECTION_TO_MEDIA);
+ 
+-	if (scsi_sg_count(cmd) && sbp2_command_orb_map_scatterlist(orb) < 0)
+-		goto fail_mapping;
++	if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0)
++		goto out;
+ 
+ 	fw_memcpy_to_be32(&orb->request, &orb->request, sizeof(orb->request));
+ 
+@@ -1077,49 +1173,47 @@ static int sbp2_scsi_queuecommand(struct
+ 		dma_map_single(device->card->device, &orb->request,
+ 			       sizeof(orb->request), DMA_TO_DEVICE);
+ 	if (dma_mapping_error(orb->base.request_bus))
+-		goto fail_mapping;
+-
+-	sbp2_send_orb(&orb->base, unit, sd->node_id, sd->generation,
+-		      sd->command_block_agent_address + SBP2_ORB_POINTER);
+-
+-	kref_put(&orb->base.kref, free_orb);
+-	return 0;
++		goto out;
+ 
+- fail_mapping:
++	sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, lu->generation,
++		      lu->command_block_agent_address + SBP2_ORB_POINTER);
++	retval = 0;
++ out:
+ 	kref_put(&orb->base.kref, free_orb);
+- fail_alloc:
+-	return SCSI_MLQUEUE_HOST_BUSY;
++	return retval;
+ }
+ 
+ static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
+ {
+-	struct sbp2_device *sd = (struct sbp2_device *)sdev->host->hostdata;
++	struct sbp2_logical_unit *lu = sdev->hostdata;
+ 
+ 	sdev->allow_restart = 1;
+ 
+-	if (sd->workarounds & SBP2_WORKAROUND_INQUIRY_36)
++	if (lu->tgt->workarounds & SBP2_WORKAROUND_INQUIRY_36)
+ 		sdev->inquiry_len = 36;
++
+ 	return 0;
+ }
+ 
+ static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
+ {
+-	struct sbp2_device *sd = (struct sbp2_device *)sdev->host->hostdata;
+-	struct fw_unit *unit = sd->unit;
++	struct sbp2_logical_unit *lu = sdev->hostdata;
+ 
+ 	sdev->use_10_for_rw = 1;
+ 
+ 	if (sdev->type == TYPE_ROM)
+ 		sdev->use_10_for_ms = 1;
++
+ 	if (sdev->type == TYPE_DISK &&
+-	    sd->workarounds & SBP2_WORKAROUND_MODE_SENSE_8)
++	    lu->tgt->workarounds & SBP2_WORKAROUND_MODE_SENSE_8)
+ 		sdev->skip_ms_page_8 = 1;
+-	if (sd->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) {
+-		fw_notify("setting fix_capacity for %s\n", unit->device.bus_id);
++
++	if (lu->tgt->workarounds & SBP2_WORKAROUND_FIX_CAPACITY)
+ 		sdev->fix_capacity = 1;
+-	}
+-	if (sd->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
++
++	if (lu->tgt->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
+ 		blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512);
++
+ 	return 0;
+ }
+ 
+@@ -1129,13 +1223,11 @@ static int sbp2_scsi_slave_configure(str
+  */
+ static int sbp2_scsi_abort(struct scsi_cmnd *cmd)
+ {
+-	struct sbp2_device *sd =
+-		(struct sbp2_device *)cmd->device->host->hostdata;
+-	struct fw_unit *unit = sd->unit;
++	struct sbp2_logical_unit *lu = cmd->device->hostdata;
+ 
+ 	fw_notify("sbp2_scsi_abort\n");
+-	sbp2_agent_reset(unit);
+-	sbp2_cancel_orbs(unit);
++	sbp2_agent_reset(lu);
++	sbp2_cancel_orbs(lu);
+ 
+ 	return SUCCESS;
+ }
+@@ -1152,37 +1244,18 @@ sbp2_sysfs_ieee1394_id_show(struct devic
+ 			    char *buf)
+ {
+ 	struct scsi_device *sdev = to_scsi_device(dev);
+-	struct sbp2_device *sd;
+-	struct fw_unit *unit;
++	struct sbp2_logical_unit *lu;
+ 	struct fw_device *device;
+-	u32 directory_id;
+-	struct fw_csr_iterator ci;
+-	int key, value, lun;
+ 
+ 	if (!sdev)
+ 		return 0;
+-	sd = (struct sbp2_device *)sdev->host->hostdata;
+-	unit = sd->unit;
+-	device = fw_device(unit->device.parent);
+-
+-	/* implicit directory ID */
+-	directory_id = ((unit->directory - device->config_rom) * 4
+-			+ CSR_CONFIG_ROM) & 0xffffff;
+-
+-	/* explicit directory ID, overrides implicit ID if present */
+-	fw_csr_iterator_init(&ci, unit->directory);
+-	while (fw_csr_iterator_next(&ci, &key, &value))
+-		if (key == CSR_DIRECTORY_ID) {
+-			directory_id = value;
+-			break;
+-		}
+ 
+-	/* FIXME: Make this work for multi-lun devices. */
+-	lun = 0;
++	lu = sdev->hostdata;
++	device = fw_device(lu->tgt->unit->device.parent);
+ 
+ 	return sprintf(buf, "%08x%08x:%06x:%04x\n",
+ 			device->config_rom[3], device->config_rom[4],
+-			directory_id, lun);
++			lu->tgt->directory_id, lu->lun);
+ }
+ 
+ static DEVICE_ATTR(ieee1394_id, S_IRUGO, sbp2_sysfs_ieee1394_id_show, NULL);
+
+-- 
+Stefan Richter
+-=====-=-=== =--- ==--=
+http://arcgraph.de/sr/
+

linux-2.6-fix-pmops-1.patch:

Index: linux-2.6-fix-pmops-1.patch
===================================================================
RCS file: linux-2.6-fix-pmops-1.patch
diff -N linux-2.6-fix-pmops-1.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-fix-pmops-1.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,339 @@
+From johannes sipsolutions net Wed Mar 21 15:56:28 2007
+Date: Wed, 21 Mar 2007 15:56:28 +0100
+From: Johannes Berg <johannes sipsolutions net>
+To: Andrew Morton <akpm linux-foundation org>
+Cc: linux-pm lists linux-foundation org, David Brownell <david-b pacbell net>, Pavel Machek <pavel ucw cz>
+Subject: [PATCH 1/3] rework pm_ops pm_disk_mode, kill misuse
+
+The pm_ops.pm_disk_mode is used in totally bogus ways since
+nobody really seems to understand what it actually does.
+
+This patch clarifies the pm_disk_mode description.
+
+It also removes all the arm and sh users that think they can veto
+suspend to disk via pm_ops; not so since the user can always
+do echo shutdown > /sys/power/disk, they need to find a better
+way involving Kconfig or such.
+
+ACPI is the only user left with a non-zero pm_disk_mode.
+
+The patch also sets the default mode to shutdown again, but
+when a new pm_ops is registered its pm_disk_mode is selected
+as default, that way the default stays for ACPI where it is
+apparently required.
+
+Signed-off-by: Johannes Berg <johannes sipsolutions net>
+Cc: David Brownell <david-b pacbell net>
+Cc: Pavel Machek <pavel ucw cz>
+Cc: linux-pm lists linux-foundation org
+
+---
+ arch/arm/common/sharpsl_pm.c |    1 
+ arch/arm/mach-at91/pm.c      |    1 
+ arch/arm/mach-omap1/pm.c     |    1 
+ arch/arm/mach-omap2/pm.c     |    1 
+ arch/arm/mach-pxa/pm.c       |    4 ---
+ arch/arm/mach-sa1100/pm.c    |    7 -----
+ arch/arm/plat-s3c24xx/pm.c   |    9 ------
+ arch/sh/boards/hp6xx/pm.c    |    7 -----
+ include/linux/pm.h           |   23 +++++++++--------
+ kernel/power/disk.c          |   56 ++++++++++++++++++++++++++++---------------
+ kernel/power/main.c          |    6 +++-
+ 11 files changed, 54 insertions(+), 62 deletions(-)
+
+--- linux-2.6.orig/include/linux/pm.h	2007-03-20 12:41:38.423214909 +0100
++++ linux-2.6/include/linux/pm.h	2007-03-20 12:42:02.253214909 +0100
+@@ -112,6 +112,8 @@ typedef int __bitwise suspend_state_t;
+ 
+ typedef int __bitwise suspend_disk_method_t;
+ 
++/* invalid must be 0 so struct pm_ops initialisers can leave it out */
++#define PM_DISK_INVALID		((__force suspend_disk_method_t) 0)
+ #define	PM_DISK_FIRMWARE	((__force suspend_disk_method_t) 1)
+ #define	PM_DISK_PLATFORM	((__force suspend_disk_method_t) 2)
+ #define	PM_DISK_SHUTDOWN	((__force suspend_disk_method_t) 3)
+@@ -137,17 +139,16 @@ typedef int __bitwise suspend_disk_metho
+  * @finish: Called when the system has left the given state and all devices
+  *	are resumed. The return value is ignored.
+  *
+- * @pm_disk_mode: Set to the disk method that the user should be able to
+- *	configure for suspend-to-disk. Since %PM_DISK_SHUTDOWN,
+- *	%PM_DISK_REBOOT, %PM_DISK_TEST and %PM_DISK_TESTPROC
+- *	are always allowed, currently only %PM_DISK_PLATFORM
+- *	makes sense. If the user then choses %PM_DISK_PLATFORM,
+- *	the @prepare call will be called before suspending to disk
+- *	(if present), the @enter call should be present and will
+- *	be called after all state has been saved and the machine
+- *	is ready to be shut down/suspended/..., and the @finish
+- *	callback is called after state has been restored. All
+- *	these calls are called with %PM_SUSPEND_DISK as the state.
++ * @pm_disk_mode: The generic code always allows one of the shutdown methods
++ *	%PM_DISK_SHUTDOWN, %PM_DISK_REBOOT, %PM_DISK_TEST and
++ *	%PM_DISK_TESTPROC. If this variable is set, the mode it is set
++ *	to is allowed in addition to those modes and is also made default.
++ *	When this mode is sent selected, the @prepare call will be called
++ *	before suspending to disk (if present), the @enter call should be
++ *	present and will be called after all state has been saved and the
++ *	machine is ready to be powered off; the @finish callback is called
++ *	after state has been restored. All these calls are called with
++ *	%PM_SUSPEND_DISK as the state.
+  */
+ struct pm_ops {
+ 	int (*valid)(suspend_state_t state);
+--- linux-2.6.orig/kernel/power/disk.c	2007-03-20 12:41:38.463214909 +0100
++++ linux-2.6/kernel/power/disk.c	2007-03-20 12:42:02.263214909 +0100
+@@ -39,7 +39,13 @@ static inline int platform_prepare(void)
+ {
+ 	int error = 0;
+ 
+-	if (pm_disk_mode == PM_DISK_PLATFORM) {
++	switch (pm_disk_mode) {
++	case PM_DISK_TEST:
++	case PM_DISK_TESTPROC:
++	case PM_DISK_SHUTDOWN:
++	case PM_DISK_REBOOT:
++		break;
++	default:
+ 		if (pm_ops && pm_ops->prepare)
+ 			error = pm_ops->prepare(PM_SUSPEND_DISK);
+ 	}
+@@ -48,30 +54,32 @@ static inline int platform_prepare(void)
+ 
+ /**
+  *	power_down - Shut machine down for hibernate.
+- *	@mode:		Suspend-to-disk mode
+  *
+- *	Use the platform driver, if configured so, and return gracefully if it
+- *	fails.
+- *	Otherwise, try to power off and reboot. If they fail, halt the machine,
+- *	there ain't no turning back.
++ *	Use the platform driver, if configured so; otherwise try
++ *	to power off or reboot.
+  */
+ 
+-static void power_down(suspend_disk_method_t mode)
++static void power_down(void)
+ {
+-	switch(mode) {
+-	case PM_DISK_PLATFORM:
+-		if (pm_ops && pm_ops->enter) {
+-			kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
+-			pm_ops->enter(PM_SUSPEND_DISK);
+-			break;
+-		}
++
++	switch (pm_disk_mode) {
++	case PM_DISK_TEST:
++	case PM_DISK_TESTPROC:
++		break;
+ 	case PM_DISK_SHUTDOWN:
+ 		kernel_power_off();
+ 		break;
+ 	case PM_DISK_REBOOT:
+ 		kernel_restart(NULL);
+ 		break;
++	default:
++		if (pm_ops && pm_ops->enter) {
++			kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
++			pm_ops->enter(PM_SUSPEND_DISK);
++			break;
++		}
+ 	}
++
+ 	kernel_halt();
+ 	/* Valid image is on the disk, if we continue we risk serious data corruption
+ 	   after resume. */
+@@ -82,7 +90,13 @@ static void power_down(suspend_disk_meth
+ 
+ static inline void platform_finish(void)
+ {
+-	if (pm_disk_mode == PM_DISK_PLATFORM) {
++	switch (pm_disk_mode) {
++	case PM_DISK_TEST:
++	case PM_DISK_TESTPROC:
++	case PM_DISK_SHUTDOWN:
++	case PM_DISK_REBOOT:
++		break;
++	default:
+ 		if (pm_ops && pm_ops->finish)
+ 			pm_ops->finish(PM_SUSPEND_DISK);
+ 	}
+@@ -167,7 +181,7 @@ int pm_suspend_disk(void)
+ 		pr_debug("PM: writing image.\n");
+ 		error = swsusp_write();
+ 		if (!error)
+-			power_down(pm_disk_mode);
++			power_down();
+ 		else {
+ 			swsusp_free();
+ 			goto Thaw;
+@@ -347,10 +361,14 @@ static ssize_t disk_store(struct subsyst
+ 		}
+ 	}
+ 	if (mode) {
+-		if (mode == PM_DISK_SHUTDOWN || mode == PM_DISK_REBOOT ||
+-		     mode == PM_DISK_TEST || mode == PM_DISK_TESTPROC) {
++		switch (mode) {
++		case PM_DISK_SHUTDOWN:
++		case PM_DISK_REBOOT:
++		case PM_DISK_TEST:
++		case PM_DISK_TESTPROC:
+ 			pm_disk_mode = mode;
+-		} else {
++			break;
++		default:
+ 			if (pm_ops && pm_ops->enter &&
+ 			    (mode == pm_ops->pm_disk_mode))
+ 				pm_disk_mode = mode;
+--- linux-2.6.orig/kernel/power/main.c	2007-03-20 12:41:38.543214909 +0100
++++ linux-2.6/kernel/power/main.c	2007-03-20 12:42:02.263214909 +0100
+@@ -30,7 +30,7 @@
+ DEFINE_MUTEX(pm_mutex);
+ 
+ struct pm_ops *pm_ops;
+-suspend_disk_method_t pm_disk_mode = PM_DISK_PLATFORM;
++suspend_disk_method_t pm_disk_mode = PM_DISK_SHUTDOWN;
+ 
+ /**
+  *	pm_set_ops - Set the global power method table. 
+@@ -41,6 +41,10 @@ void pm_set_ops(struct pm_ops * ops)
+ {
+ 	mutex_lock(&pm_mutex);
+ 	pm_ops = ops;
++	if (ops && ops->pm_disk_mode != PM_DISK_INVALID) {
++		pm_disk_mode = ops->pm_disk_mode;
++	} else
++		pm_disk_mode = PM_DISK_SHUTDOWN;
+ 	mutex_unlock(&pm_mutex);
+ }
+ 
+--- linux-2.6.orig/arch/arm/common/sharpsl_pm.c	2007-03-20 12:41:38.673214909 +0100
++++ linux-2.6/arch/arm/common/sharpsl_pm.c	2007-03-20 12:42:02.263214909 +0100
+@@ -766,7 +766,6 @@ static void sharpsl_apm_get_power_status
+ }
+ 
+ static struct pm_ops sharpsl_pm_ops = {
+-	.pm_disk_mode	= PM_DISK_FIRMWARE,
+ 	.prepare	= pxa_pm_prepare,
+ 	.enter		= corgi_pxa_pm_enter,
+ 	.finish		= pxa_pm_finish,
+--- linux-2.6.orig/arch/arm/mach-at91/pm.c	2007-03-20 12:41:38.743214909 +0100
++++ linux-2.6/arch/arm/mach-at91/pm.c	2007-03-20 12:42:02.263214909 +0100
+@@ -201,7 +201,6 @@ error:
+ 
+ 
+ static struct pm_ops at91_pm_ops ={
+-	.pm_disk_mode	= 0,
+ 	.valid		= at91_pm_valid_state,
+ 	.prepare	= at91_pm_prepare,
+ 	.enter		= at91_pm_enter,
+--- linux-2.6.orig/arch/arm/mach-omap1/pm.c	2007-03-20 12:41:38.763214909 +0100
++++ linux-2.6/arch/arm/mach-omap1/pm.c	2007-03-20 12:42:02.263214909 +0100
+@@ -698,7 +698,6 @@ static struct irqaction omap_wakeup_irq 
+ 
+ 
+ static struct pm_ops omap_pm_ops ={
+-	.pm_disk_mode	= 0,
+ 	.prepare	= omap_pm_prepare,
+ 	.enter		= omap_pm_enter,
+ 	.finish		= omap_pm_finish,
+--- linux-2.6.orig/arch/arm/mach-omap2/pm.c	2007-03-20 12:41:38.833214909 +0100
++++ linux-2.6/arch/arm/mach-omap2/pm.c	2007-03-20 12:42:02.263214909 +0100
+@@ -370,7 +370,6 @@ static int omap2_pm_finish(suspend_state
+ }
+ 
+ static struct pm_ops omap_pm_ops = {
+-	.pm_disk_mode	= 0,
+ 	.prepare	= omap2_pm_prepare,
+ 	.enter		= omap2_pm_enter,
+ 	.finish		= omap2_pm_finish,
+--- linux-2.6.orig/arch/arm/mach-pxa/pm.c	2007-03-20 12:41:38.853214909 +0100
++++ linux-2.6/arch/arm/mach-pxa/pm.c	2007-03-20 12:42:02.263214909 +0100
+@@ -223,11 +223,7 @@ int pxa_pm_finish(suspend_state_t state)
+ 
+ EXPORT_SYMBOL_GPL(pxa_pm_finish);
+ 
+-/*
+- * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
+- */
+ static struct pm_ops pxa_pm_ops = {
+-	.pm_disk_mode	= PM_DISK_FIRMWARE,
+ 	.prepare	= pxa_pm_prepare,
+ 	.enter		= pxa_pm_enter,
+ 	.finish		= pxa_pm_finish,
+--- linux-2.6.orig/arch/arm/mach-sa1100/pm.c	2007-03-20 12:41:38.903214909 +0100
++++ linux-2.6/arch/arm/mach-sa1100/pm.c	2007-03-20 12:42:02.273214909 +0100
+@@ -59,9 +59,6 @@ static int sa11x0_pm_enter(suspend_state
+ 	unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE];
+ 	struct timespec delta, rtc;
+ 
+-	if (state != PM_SUSPEND_MEM)
+-		return -EINVAL;
+-
+ 	/* preserve current time */
+ 	rtc.tv_sec = RCNR;
+ 	rtc.tv_nsec = 0;
+@@ -134,11 +131,7 @@ unsigned long sleep_phys_sp(void *sp)
+ 	return virt_to_phys(sp);
+ }
+ 
+-/*
+- * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
+- */
+ static struct pm_ops sa11x0_pm_ops = {
+-	.pm_disk_mode	= PM_DISK_FIRMWARE,
+ 	.enter		= sa11x0_pm_enter,
+ };
+ 
+--- linux-2.6.orig/arch/arm/plat-s3c24xx/pm.c	2007-03-20 12:41:38.953214909 +0100
++++ linux-2.6/arch/arm/plat-s3c24xx/pm.c	2007-03-20 12:42:02.273214909 +0100
+@@ -511,11 +511,6 @@ static int s3c2410_pm_enter(suspend_stat
+ 		return -EINVAL;
+ 	}
+ 
+-	if (state != PM_SUSPEND_MEM) {
+-		printk(KERN_ERR PFX "error: only PM_SUSPEND_MEM supported\n");
+-		return -EINVAL;
+-	}
+-
+ 	/* check if we have anything to wake-up with... bad things seem
+ 	 * to happen if you suspend with no wakeup (system will often
+ 	 * require a full power-cycle)
+@@ -633,11 +628,7 @@ static int s3c2410_pm_finish(suspend_sta
+ 	return 0;
+ }
+ 
+-/*
+- * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
+- */
+ static struct pm_ops s3c2410_pm_ops = {
+-	.pm_disk_mode	= PM_DISK_FIRMWARE,
+ 	.prepare	= s3c2410_pm_prepare,
+ 	.enter		= s3c2410_pm_enter,
+ 	.finish		= s3c2410_pm_finish,
+--- linux-2.6.orig/arch/sh/boards/hp6xx/pm.c	2007-03-20 12:41:39.163214909 +0100
++++ linux-2.6/arch/sh/boards/hp6xx/pm.c	2007-03-20 12:42:02.273214909 +0100
+@@ -27,9 +27,6 @@ static int hp6x0_pm_enter(suspend_state_
+ 	u16 hd64461_stbcr;
+ #endif
+ 
+-	if (state != PM_SUSPEND_MEM)
+-		return -EINVAL;
+-
+ #ifdef CONFIG_HD64461_ENABLER
+ 	outb(0, HD64461_PCC1CSCIER);
+ 
+@@ -70,11 +67,7 @@ static int hp6x0_pm_enter(suspend_state_
+ 	return 0;
+ }
+ 
+-/*
+- * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
+- */
+ static struct pm_ops hp6x0_pm_ops = {
+-	.pm_disk_mode	= PM_DISK_FIRMWARE,
+ 	.enter		= hp6x0_pm_enter,
+ };
+ 
+
+--

linux-2.6-fix-pmops-2.patch:

Index: linux-2.6-fix-pmops-2.patch
===================================================================
RCS file: linux-2.6-fix-pmops-2.patch
diff -N linux-2.6-fix-pmops-2.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-fix-pmops-2.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,219 @@
+From johannes sipsolutions net Wed Mar 21 15:56:26 2007
+Date: Wed, 21 Mar 2007 15:56:26 +0100
+From: Johannes Berg <johannes sipsolutions net>
+To: Andrew Morton <akpm linux-foundation org>
+Cc: linux-pm lists linux-foundation org, Pavel Machek <pavel ucw cz>
+Subject: [PATCH 2/3] power management: remove firmware disk mode
+
+This patch removes the firmware disk suspend mode which is the wrong
+approach, it is supposed to be used for implementing firmware-based disk
+suspend but cannot actually be used for that.
+
+Signed-off-by: Johannes Berg <johannes sipsolutions net>
+Cc: Pavel Machek <pavel ucw cz>
+Cc: linux-pm lists linux-foundation org
+
+---
+ Documentation/power/interface.txt |   21 +++++----------------
+ Documentation/power/states.txt    |   13 +++++++------
+ Documentation/power/swsusp.txt    |   14 +++++---------
+ include/linux/pm.h                |   13 ++++++-------
+ kernel/power/disk.c               |   27 +++++++++++----------------
+ 5 files changed, 34 insertions(+), 54 deletions(-)
+
+--- linux-2.6.orig/include/linux/pm.h	2007-03-21 15:44:54.663148946 +0100
++++ linux-2.6/include/linux/pm.h	2007-03-21 15:45:04.403148946 +0100
+@@ -114,13 +114,12 @@ typedef int __bitwise suspend_disk_metho
+ 
+ /* invalid must be 0 so struct pm_ops initialisers can leave it out */
+ #define PM_DISK_INVALID		((__force suspend_disk_method_t) 0)
+-#define	PM_DISK_FIRMWARE	((__force suspend_disk_method_t) 1)
+-#define	PM_DISK_PLATFORM	((__force suspend_disk_method_t) 2)
+-#define	PM_DISK_SHUTDOWN	((__force suspend_disk_method_t) 3)
+-#define	PM_DISK_REBOOT		((__force suspend_disk_method_t) 4)
+-#define	PM_DISK_TEST		((__force suspend_disk_method_t) 5)
+-#define	PM_DISK_TESTPROC	((__force suspend_disk_method_t) 6)
+-#define	PM_DISK_MAX		((__force suspend_disk_method_t) 7)
++#define	PM_DISK_PLATFORM	((__force suspend_disk_method_t) 1)
++#define	PM_DISK_SHUTDOWN	((__force suspend_disk_method_t) 2)
++#define	PM_DISK_REBOOT		((__force suspend_disk_method_t) 3)
++#define	PM_DISK_TEST		((__force suspend_disk_method_t) 4)
++#define	PM_DISK_TESTPROC	((__force suspend_disk_method_t) 5)
++#define	PM_DISK_MAX		((__force suspend_disk_method_t) 6)
+ 
+ /**
+  * struct pm_ops - Callbacks for managing platform dependent suspend states.
+--- linux-2.6.orig/kernel/power/disk.c	2007-03-21 15:44:54.693148946 +0100
++++ linux-2.6/kernel/power/disk.c	2007-03-21 15:48:06.073148946 +0100
+@@ -123,8 +123,6 @@ static int prepare_processes(void)
+ /**
+  *	pm_suspend_disk - The granpappy of hibernation power management.
+  *
+- *	If we're going through the firmware, then get it over with quickly.
+- *
+  *	If not, then call swsusp to do its thing, then figure out how
+  *	to power down the system.
+  */
+@@ -301,7 +299,6 @@ late_initcall(software_resume);
+ 
+ 
+ static const char * const pm_disk_modes[] = {
+-	[PM_DISK_FIRMWARE]	= "firmware",
+ 	[PM_DISK_PLATFORM]	= "platform",
+ 	[PM_DISK_SHUTDOWN]	= "shutdown",
+ 	[PM_DISK_REBOOT]	= "reboot",
+@@ -312,27 +309,25 @@ static const char * const pm_disk_modes[
+ /**
+  *	disk - Control suspend-to-disk mode
+  *
+- *	Suspend-to-disk can be handled in several ways. The greatest
+- *	distinction is who writes memory to disk - the firmware or the OS.
+- *	If the firmware does it, we assume that it also handles suspending
+- *	the system.
+- *	If the OS does it, then we have three options for putting the system
+- *	to sleep - using the platform driver (e.g. ACPI or other PM registers),
+- *	powering off the system or rebooting the system (for testing).
++ *	Suspend-to-disk can be handled in several ways. We have a few options
++ *	for putting the system to sleep - using the platform driver (e.g. ACPI
++ *	or other pm_ops), powering off the system or rebooting the system
++ *	(for testing) as well as the two test modes.
+  *
+- *	The system will support either 'firmware' or 'platform', and that is
+- *	known a priori (and encoded in pm_ops). But, the user may choose
+- *	'shutdown' or 'reboot' as alternatives.
++ *	The system can support 'platform', and that is known a priori (and
++ *	encoded in pm_ops). However, the user may choose 'shutdown' or 'reboot'
++ *	as alternatives, as well as the test modes 'test' and 'testproc'.
+  *
+  *	show() will display what the mode is currently set to.
+  *	store() will accept one of
+  *
+- *	'firmware'
+  *	'platform'
+  *	'shutdown'
+  *	'reboot'
++ *	'test'
++ *	'testproc'
+  *
+- *	It will only change to 'firmware' or 'platform' if the system
++ *	It will only change to 'platform' if the system
+  *	supports it (as determined from pm_ops->pm_disk_mode).
+  */
+ 
+@@ -354,7 +349,7 @@ static ssize_t disk_store(struct subsyst
+ 	len = p ? p - buf : n;
+ 
+ 	mutex_lock(&pm_mutex);
+-	for (i = PM_DISK_FIRMWARE; i < PM_DISK_MAX; i++) {
++	for (i = PM_DISK_PLATFORM; i < PM_DISK_MAX; i++) {
+ 		if (!strncmp(buf, pm_disk_modes[i], len)) {
+ 			mode = i;
+ 			break;
+--- linux-2.6.orig/Documentation/power/interface.txt	2007-03-21 15:45:17.873148946 +0100
++++ linux-2.6/Documentation/power/interface.txt	2007-03-21 15:49:26.673148946 +0100
+@@ -18,17 +18,10 @@ states.
+ 
+ 
+ /sys/power/disk controls the operating mode of the suspend-to-disk
+-mechanism. Suspend-to-disk can be handled in several ways. The
+-greatest distinction is who writes memory to disk - the firmware or
+-the kernel. If the firmware does it, we assume that it also handles
+-suspending the system. 
+-
+-If the kernel does it, then we have three options for putting the system
+-to sleep - using the platform driver (e.g. ACPI or other PM
+-registers), powering off the system or rebooting the system (for
+-testing). The system will support either 'firmware' or 'platform', and
+-that is known a priori. But, the user may choose 'shutdown' or
+-'reboot' as alternatives. 
++mechanism. Suspend-to-disk can be handled in several ways. We have a
++few options for putting the system to sleep - using the platform driver
++(e.g. ACPI or other pm_ops), powering off the system or rebooting the
++system (for testing).
+ 
+ Additionally, /sys/power/disk can be used to turn on one of the two testing
+ modes of the suspend-to-disk mechanism: 'testproc' or 'test'.  If the
+@@ -44,16 +37,12 @@ is being slow and which device drivers a
+ Reading from this file will display what the mode is currently set
+ to. Writing to this file will accept one of
+ 
+-       'firmware'
+-       'platform'
++       'platform' (only if the platform supports it)
+        'shutdown'
+        'reboot'
+        'testproc'
+        'test'
+ 
+-It will only change to 'firmware' or 'platform' if the system supports
+-it. 
+-
+ /sys/power/image_size controls the size of the image created by
+ the suspend-to-disk mechanism.  It can be written a string
+ representing a non-negative integer that will be used as an upper
+--- linux-2.6.orig/Documentation/power/states.txt	2007-03-21 15:45:17.993148946 +0100
++++ linux-2.6/Documentation/power/states.txt	2007-03-21 15:51:18.763148946 +0100
+@@ -62,17 +62,18 @@ setup via another operating system for i
+ inconvenience, this method requires minimal work by the kernel, since
+ the firmware will also handle restoring memory contents on resume. 
+ 
+-If the kernel is responsible for persistently saving state, a mechanism
+-called 'swsusp' (Swap Suspend) is used to write memory contents to
+-free swap space. swsusp has some restrictive requirements, but should
+-work in most cases. Some, albeit outdated, documentation can be found
+-in Documentation/power/swsusp.txt. 
++For suspend-to-disk, a mechanism called swsusp called 'swsusp' (Swap
++Suspend) is used to write memory contents to free swap space.
++swsusp has some restrictive requirements, but should work in most
++cases. Some, albeit outdated, documentation can be found in
++Documentation/power/swsusp.txt. Alternatively, userspace can do most
++of the actual suspend to disk work, see userland-swsusp.txt.
+ 
+ Once memory state is written to disk, the system may either enter a
+ low-power state (like ACPI S4), or it may simply power down. Powering
+ down offers greater savings, and allows this mechanism to work on any
+ system. However, entering a real low-power state allows the user to
+-trigger wake up events (e.g. pressing a key or opening a laptop lid). 
++trigger wake up events (e.g. pressing a key or opening a laptop lid).
+ 
+ A transition from Suspend-to-Disk to the On state should take about 30
+ seconds, though it's typically a bit more with the current
+--- linux-2.6.orig/Documentation/power/swsusp.txt	2007-03-21 15:45:18.133148946 +0100
++++ linux-2.6/Documentation/power/swsusp.txt	2007-03-21 15:52:20.423148946 +0100
+@@ -156,8 +156,7 @@ instead set the PF_NOFREEZE process flag
+ be very careful).
+ 
+ 
+-Q: What is the difference between "platform", "shutdown" and
+-"firmware" in /sys/power/disk?
++Q: What is the difference between "platform" and "shutdown"?
+ 
+ A:
+ 
+@@ -166,11 +165,8 @@ shutdown: save state in linux, then tell
+ platform: save state in linux, then tell bios to powerdown and blink
+           "suspended led"
+ 
+-firmware: tell bios to save state itself [needs BIOS-specific suspend
+-	  partition, and has very little to do with swsusp]
+-
+-"platform" is actually right thing to do, but "shutdown" is most
+-reliable.
++"platform" is actually right thing to do where supported, but
++"shutdown" is most reliable (except on ACPI systems).
+ 
+ Q: I do not understand why you have such strong objections to idea of
+ selective suspend.
+@@ -388,8 +384,8 @@ while the system is asleep, maintaining 
+ modes like "suspend-to-RAM" or "standby".  (Don't write "disk" to the
+ /sys/power/state file; write "standby" or "mem".)  We've not seen any
+ hardware that can use these modes through software suspend, although in
+-theory some systems might support "platform" or "firmware" modes that
+-won't break the USB connections.
++theory some systems might support "platform" modes that won't break the
++USB connections.
+ 
+ Remember that it's always a bad idea to unplug a disk drive containing a
+ mounted filesystem.  That's true even when your system is asleep!  The
+
+--

linux-2.6-fix-pmops-3.patch:

Index: linux-2.6-fix-pmops-3.patch
===================================================================
RCS file: linux-2.6-fix-pmops-3.patch
diff -N linux-2.6-fix-pmops-3.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-fix-pmops-3.patch	12 Nov 2007 12:56:59 -0000	1.2
@@ -0,0 +1,237 @@
+From johannes sipsolutions net Wed Mar 21 15:56:31 2007
+Date: Wed, 21 Mar 2007 15:56:31 +0100
+From: Johannes Berg <johannes sipsolutions net>
+To: Andrew Morton <akpm linux-foundation org>
+Cc: linux-pm lists linux-foundation org, David Brownell <david-b pacbell net>, Pavel Machek <pavel ucw cz>
+Subject: [PATCH 3/3] power management: implement pm_ops.valid for everybody
+
+Almost all users of pm_ops only support mem sleep, don't check in .valid
+and don't reject any others in .prepare so users can be confused if they
+check /sys/power/state, especially when new states are added (these would
+then result in s-t-r although they're supposed to be something different).
+
+This patch implements a generic pm_valid_only_mem function that is then
+exported for users and puts it to use in almost all existing pm_ops.
+
+Signed-off-by: Johannes Berg <johannes sipsolutions net>
+Cc: David Brownell <david-b pacbell net>
+Cc: Pavel Machek <pavel ucw cz>
+Cc: linux-pm lists linux-foundation org
+
+---
+ arch/arm/common/sharpsl_pm.c |    1 +
+ arch/arm/mach-omap1/pm.c     |    1 +
+ arch/arm/mach-omap2/pm.c     |    1 +
+ arch/arm/mach-pnx4008/pm.c   |   35 +----------------------------------
+ arch/arm/mach-pxa/pm.c       |    1 +
+ arch/arm/mach-sa1100/pm.c    |    1 +
+ arch/arm/plat-s3c24xx/pm.c   |   19 +------------------
+ arch/sh/boards/hp6xx/pm.c    |    1 +
+ drivers/acpi/sleep/main.c    |   13 +++++++++++--
+ include/linux/pm.h           |    4 ++++
+ kernel/power/main.c          |   13 +++++++++++++
+ 11 files changed, 36 insertions(+), 54 deletions(-)
+
+--- linux-2.6.orig/include/linux/pm.h	2007-03-20 12:42:04.813214909 +0100
++++ linux-2.6/include/linux/pm.h	2007-03-20 12:42:05.693214909 +0100
+@@ -128,6 +128,9 @@ typedef int __bitwise suspend_disk_metho
+  *	always valid and never passed to this call.
+  *	If not assigned, all suspend states are advertised as valid
+  *	in /sys/power/state (but can still be rejected by prepare or enter.)
++ *	Since new states can be added for other platforms, you should
++ *	assign this callback. There is a %pm_valid_only_mem function
++ *	available if you only implemented mem sleep.
+  *
+  * @prepare: Prepare the platform for the given suspend state. Can return a
+  *	negative error code if necessary.
+@@ -165,6 +168,7 @@ extern void pm_set_ops(struct pm_ops *pm
+ extern struct pm_ops *pm_ops;
+ extern int pm_suspend(suspend_state_t state);
+ 
++extern int pm_valid_only_mem(suspend_state_t state);
+ 
+ /*
+  * Device power management
+--- linux-2.6.orig/arch/arm/common/sharpsl_pm.c	2007-03-20 12:42:02.263214909 +0100
++++ linux-2.6/arch/arm/common/sharpsl_pm.c	2007-03-20 12:42:05.693214909 +0100
+@@ -769,6 +769,7 @@ static struct pm_ops sharpsl_pm_ops = {
+ 	.prepare	= pxa_pm_prepare,
+ 	.enter		= corgi_pxa_pm_enter,
+ 	.finish		= pxa_pm_finish,
++	.valid		= pm_valid_only_mem,
+ };
+ 
+ static int __init sharpsl_pm_probe(struct platform_device *pdev)
+--- linux-2.6.orig/arch/arm/mach-omap1/pm.c	2007-03-20 12:42:02.263214909 +0100
++++ linux-2.6/arch/arm/mach-omap1/p